fn burn(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
Mint amount shares to to. Only the minter (the strategy) may call.
fn mint(
env: soroban_sdk::Env,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn minter(env: soroban_sdk::Env) -> soroban_sdk::Address
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,
) -> Result<(), TokenError>
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
fn allowance(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
spender: soroban_sdk::Address,
) -> i128
fn burn_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
Rotate the minter (admin only) — e.g. when the strategy is redeployed.
fn set_minter(
env: soroban_sdk::Env,
new_minter: soroban_sdk::Address,
) -> Result<(), TokenError>
fn total_supply(env: soroban_sdk::Env) -> i128
Initialize the token.
admin — may rotate the minter and rotate the admin (no upgrade:
the share-ledger code is immutable).minter — the only account allowed to mint/burn (the strategy).decimals/name/symbol — token metadata.fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
minter: soroban_sdk::Address,
decimals: u32,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
)
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>
Burn amount shares from from. Only the minter (the strategy) may
call — used by withdraw so the strategy never needs the holder's auth.
fn burn_by_minter(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
amount: i128,
) -> Result<(), TokenError>