Contract b2c70650834487575be5019fe844a4616ff75cbffe96bef199f3d4d18a295454

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CAPRQAUNC3L54PX54ELLFHGOEIWE5GEOSOHEQ4IWBMKK6E73D32BOLF3

Interface

Register the WordScrambleContract address as the only authorized badge minter.

fn init(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Check whether a player holds a specific badge.

fn has_badge(
    env: soroban_sdk::Env,
    player: soroban_sdk::Address,
    badge: soroban_sdk::Symbol,
) -> bool

Return all badges earned by a player.

fn get_badges(
    env: soroban_sdk::Env,
    player: soroban_sdk::Address,
) -> soroban_sdk::Vec

Mint a badge for a player. Only callable by the registered WordScrambleContract (the address passed to init) — calling this directly as any other caller panics, since a contract Address's require_auth() only succeeds when that contract is the direct invoker of the current call, with no signature involved.

fn mint_badge(
    env: soroban_sdk::Env,
    player: soroban_sdk::Address,
    badge: soroban_sdk::Symbol,
) -> bool

Imports

WebAssembly Text (WAT) ▶