Rotate ops address — admin only, new ops must co-sign.
fn set_ops(env: soroban_sdk::Env, new_ops: soroban_sdk::Address)
Rotate admin address — admin only, new admin must co-sign.
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
One-time initialization. Admin must auth. Treasury, burn pool, and SAC ID become immutable (no setters).
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
ops: soroban_sdk::Address,
treasury: soroban_sdk::Address,
burn_pool: soroban_sdk::Address,
sac_contract_id: soroban_sdk::Address,
allowed_hot_wallets: soroban_sdk::Vec,
)
Send from treasury to an allowlisted hot wallet — OPS only.
Amount must be positive, destination must be allowlisted.
Uses SAC allowance model: transfer_from(spender=this, from=treasury, to, amount).
The SAC allowance (granted by Treasury) acts as the on-chain spending ceiling.
fn treasury_send(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
Add a hot wallet to the allowlist — admin only.
fn add_hot_wallet(env: soroban_sdk::Env, addr: soroban_sdk::Address)
Burn from the burn pool — OPS only.
Amount must be positive. Uses SAC allowance model:
burn_from(spender=this, from=burn_pool, amount).
fn burn_from_pool(env: soroban_sdk::Env, amount: i128)
Cancel a pending WASM upgrade — admin only.
fn cancel_upgrade(env: soroban_sdk::Env)
Execute a pending WASM upgrade — admin only.
Fails if no pending upgrade or UPGRADE_DELAY_LEDGERS has not elapsed.
fn execute_upgrade(env: soroban_sdk::Env)
Propose a WASM upgrade — admin only.
Stores the hash; must wait UPGRADE_DELAY_LEDGERS before executing.
fn propose_upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)
Propose SAC admin rotation — admin only. Stores pending admin + proposal ledger.
fn propose_sac_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)
Remove a hot wallet from the allowlist — admin only.
fn remove_hot_wallet(env: soroban_sdk::Env, addr: soroban_sdk::Address)
Cancel pending SAC admin handoff — admin only.
fn cancel_sac_admin_handoff(env: soroban_sdk::Env)
Execute SAC admin handoff — admin only.
Requires pending proposal and DELAY_LEDGERS elapsed.
Calls SAC.set_admin(pending).
fn execute_sac_admin_handoff(env: soroban_sdk::Env)