Contract b52fc2d7f98c0d4592bad7d8634fdd53db908fa8d43f01bd1ee1ae342a22148e

← Back to Index 📥 Download WASM

Meta

cliver 23.4.1#a152ec2488c25136808ad28277c24b3a0765ffd4
rssdkver 23.5.1#59fcef437260ed4da42d1efb357137a5c166c02e
rsver 1.92.0

Instances

  • CBKSJ4CWDQQIUJY3G5OJONW2VU76WH52PBORNEUZITGZO3S7F6E7UQ7G

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)

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

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

I-01: deployment-time constructor. Runs atomically with contract creation, closing the deploy-init race window that initialize() had. Soroban SDK 23+ recognizes the __constructor name and invokes it automatically with the args supplied during deploy.

This contract must be set as the SAC admin (via propose_sac_admin / execute_sac_admin_handoff) before mint_to_treasury can succeed.

fn __constructor(
    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,
)

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.

Calls SAC.mint() directly. This contract holds SAC admin authority (transferred via execute_sac_admin_handoff post-deploy).

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