fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn config(env: soroban_sdk::Env) -> Result
fn redeem(env: soroban_sdk::Env, from: soroban_sdk::Address, sy_amount: i128) -> i128
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn approve(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
amount: i128,
expiration_ledger: u32,
)
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn deposit(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
underlying: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn underlying(env: soroban_sdk::Env) -> soroban_sdk::Address
fn total_shares(env: soroban_sdk::Env) -> Result
fn total_supply(env: soroban_sdk::Env) -> i128
fn accrued_yield(env: soroban_sdk::Env, holder: soroban_sdk::Address) -> i128
fn exchange_rate(env: soroban_sdk::Env) -> i128
fn share_balance(
env: soroban_sdk::Env,
holder: soroban_sdk::Address,
) -> Result
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
Initializes a production wrapper whose custody and exchange rate are backed by a Blend v2 plain-supply position.
fn initialize_blend(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
underlying: soroban_sdk::Address,
pool: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>
fn set_exchange_rate(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
exchange_rate: i128,
) -> Result<(), soroban_sdk::Error>
Recovers from a Blend reserve reindex.
config.reserve_index is fixed at init and the rate path traps with
InvalidBlendReserve whenever Blend has since moved the underlying to a
different reserve slot. That fail-closed trap is correct (pricing the
wrong reserve would be worse), but on its own it is unrecoverable: every
rate read, and therefore every deposit/redeem/split/recombine, stays
bricked for the life of the market. This admin entrypoint re-syncs the
stored index to wherever the pool now keeps this wrapper's underlying.
It does NOT trust a caller-supplied index. It re-derives the index the
same way initialize_blend does: it finds the underlying's position in
the pool's reserve list and cross-checks that against the pool's own
get_reserve(underlying).config.index, and requires the reserve decimals
to still match. The new index is accepted only if the asset actually
sitting there is config.underlying. So the strongest thing an admin can
do here is re-point the wrapper at the same underlying und
fn migrate_reserve_index(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result