Contract ef39a3db1905e73acb53fcfc0b4d7b2ee1198454c2fe624645049e5007569816

← Back to Index 📥 Download WASM

Meta

cliver 23.3.0#08473ac20016c369067ce0dbca91d9595e72d6d4
rssdkver 23.3.0#a35990025247146e24cb9e1deda063f17f3e441d
rsver 1.92.0

Instances

  • CDU4RZ7QEWVTYBIJEJA2SXKIPVG4MZY55O5KNWAHQLRKADYXDWDWIHA4

Interface

pause() - admin only

fn pause(env: soroban_sdk::Env)

(optional) status() view helper for sanity checks Returns: (paused, daily_cap, day_index, minted_today, admin, ops, treasury, sac_id)

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

set_ops(new_ops) - admin only

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

unpause() - admin only

fn unpause(env: soroban_sdk::Env)

(optional) set_admin(new_admin) - admin only If you want the 2-of-4 to rotate admin for this mint contract later.

fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

initialize(admin, ops, treasury, sac_contract_id, daily_cap)

  • one-time
  • admin MUST auth
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,
)

set_treasury(new_treasury) - admin only NOTE: this enables future treasury rotation without redeploying.

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

set_daily_cap(new_cap) - admin only

fn set_daily_cap(env: soroban_sdk::Env, new_cap: i128)

mint_to_treasury(amount, ref_hash) - OPS only Rules:

  • must not be paused
  • amount > 0
  • ref_hash can only be used once (replay protection)
  • enforces daily cap by UTC day window
  • mints ONLY to the stored treasury

Mechanically: calls SAC.mint(to=treasury, amount) NOTE: This will only succeed once THIS CONTRACT is the SAC admin.

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

Imports

WebAssembly Text (WAT) ▶