Contract 006b5f39c4ef99bed27feaae3af96c0a9e9b82418e47daa9e11c1e0135367375

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.94.1

Instances

  • CBZGF5KEDHRI6ACZCGW6BRYQSFH4PZ7PH6DN735YJZZEFZKZCYVPIUJV

Interface

Burn ZMOKE owned by the caller. ZmokeAgent calls this when a user redeems 1000 ZMOKE for $1 store credit.

fn burn(env: soroban_sdk::Env, from: soroban_sdk::Address, amount: i128)

Mint ZMOKE rewards to an address.

Only callable by the current admin. ZmokeAgent enforces the 10 ZMOKE/$1 rate upstream — this contract does not re-validate business logic.

Amounts are in the smallest unit (10^decimal): mint 10 ZMOKE → amount = 100_000_000 (10 × 10^7)

fn mint(env: soroban_sdk::Env, to: soroban_sdk::Address, amount: i128)
fn name(env: soroban_sdk::Env) -> soroban_sdk::String

Return the current admin address. Exposed so the TypeScript client can confirm distributor configuration.

fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    expiration_ledger: u32,
)
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::MuxedAddress,
    amount: i128,
)
fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128
fn burn_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    amount: i128,
)

Transfer admin authority. Emits set_admin event.

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

Initialize the ZMOKE token. Must be called exactly once after deployment.

Arguments

  • admin — The address authorized to mint (ZmokeAgent's distributor key)
  • decimal — Token precision. Use 7 to match XLM/USDC Stellar conventions.
  • name — Full token name, e.g. "ZMOKE Loyalty Token"
  • symbol — Ticker, e.g. "ZMOKE"
fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    decimal: u32,
    name: soroban_sdk::String,
    symbol: soroban_sdk::String,
)
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
)

Imports

WebAssembly Text (WAT) ▶