Contract 2fd3a8d9f27ecf000641e7e6380df6a3a4f5fdc472cef912c53fd76dc80d68dd

← Back to Index 📥 Download WASM

Meta

cliver 23.4.1#a152ec2488c25136808ad28277c24b3a0765ffd4
rssdkver 23.5.1#59fcef437260ed4da42d1efb357137a5c166c02e
rsver 1.92.0

Instances

  • CAXRT6PVFQVXKLX3UO3SEZLA5C6275XQEADBGG7NTX3B4R5MCK74BGFL

Interface

Pause minting — admin only.

fn pause(env: soroban_sdk::Env)

View helper — returns current contract state.

fn status(
    env: soroban_sdk::Env,
) -> (
    bool,
    i128,
    u64,
    i128,
    soroban_sdk::Address,
    soroban_sdk::Address,
    soroban_sdk::Address,
    soroban_sdk::Address,
)

Rotate ops address — admin only, new ops must co-sign.

fn set_ops(env: soroban_sdk::Env, new_ops: soroban_sdk::Address)

Unpause minting — admin only.

fn unpause(env: soroban_sdk::Env)

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.

old_mint_controller is the legacy MC contract that holds SAC admin. Minting is proxied through it until SAC admin can be transferred.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    ops: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    sac_contract_id: soroban_sdk::Address,
    daily_cap: i128,
    old_mint_controller: soroban_sdk::Address,
)

Rotate treasury address — admin only, new treasury must co-sign.

fn set_treasury(env: soroban_sdk::Env, new_treasury: soroban_sdk::Address)

Update daily minting cap — admin only.

fn set_daily_cap(env: soroban_sdk::Env, new_cap: 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>)

Mint to treasury — OPS only.

Must not be paused, amount > 0, ref hash unique (replay protection), enforces daily cap by UTC day window, mints only to stored treasury.

Chains through the old Mint Controller (which holds SAC admin) to call SAC.mint(). This contract is the old MC's OPS, so the auth check on the old MC passes when this contract invokes it.

fn mint_to_treasury(
    env: soroban_sdk::Env,
    amount: i128,
    ref_hash: soroban_sdk::BytesN<32>,
)

Propose SAC admin rotation — admin only.

Only useful if this contract IS the SAC admin (or becomes it in the future). Prevents the SAC admin from becoming permanently locked inside this contract.

fn propose_sac_admin(env: soroban_sdk::Env, new_admin: 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 SAC_ADMIN_DELAY_LEDGERS elapsed. Calls SAC.set_admin(pending).

fn execute_sac_admin_handoff(env: soroban_sdk::Env)

Imports

WebAssembly Text (WAT) ▶