fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)
Admin-only (the vault). Mints new shares — called from
MeridianVault::deposit. There is no direct-to-holder mint path:
only the vault can grow supply, exactly as only the vault could mint
mUSDC as a SAC via StellarAssetClient::mint before this contract
replaced it.
No Result return: this matches MusdcAdminInterface on the vault
side (vault/src/lib.rs), which calls this the same panic-through
way it already calls the adapter interface's non-Result methods.
fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn admin(env: soroban_sdk::Env) -> Result
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 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 burn_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
amount: i128,
)
Retained for symmetry with blend-adapter's own initialize, and as
a manual fallback. Unreachable on any token deployed from this WASM:
__constructor has already set ADMIN, so every call here returns
AlreadyInitialized.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
decimals: u32,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
) -> Result<(), ContractError>
fn total_supply(env: soroban_sdk::Env) -> i128
fn transfer_from(
env: soroban_sdk::Env,
spender: soroban_sdk::Address,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
Runs inside the CreateContract host operation that deploys this
token, in the same transaction, so it is never observable on-ledger
in an uninitialized state. admin is the vault this token backs —
see the module doc comment for why that's permanent, unlike the
vault's own admin.
This is the same fix blend-adapter's __constructor applies for
#505: initialize() below has no authorization check by design
(there is no admin in storage yet to check the caller against), so
if deploy and initialize were two separate transactions, anyone
watching the ledger could land initialize() first with their own
address as admin, permanently owning mint rights over this token.
Removing the intervening ledger closes that window entirely, rather
than trying to authorize a call that has no identity to authorize
against yet.
fn __constructor(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
decimals: u32,
name: soroban_sdk::String,
symbol: soroban_sdk::String,
)