Contract a80e37912a85e673fc4ca69c8f7f313b6d2a7fef8f32ffff061e298af4778038

← Back to Index 📥 Download WASM

Meta

cliver 25.2.0#28484880988199233a7e8e87c97cb12dac323cb3
rssdkver 25.3.0#dcbea44513feb7734af6b6c4aced2c4a7a2715d0
rsver 1.94.1

Instances

  • CB3HSCCUEL7SGI7KCNG7GOMGEXXRVV4TGT7FAA3EUX5XX44X6LE35NGB

Interface

Mint a new SBT to to. Returns the new token_id. metadata_uri is an IPFS URI pointing to the badge JSON.

fn mint(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    metadata_uri: soroban_sdk::String,
) -> u64
fn name(env: soroban_sdk::Env) -> soroban_sdk::String

Get the admin address.

fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address

Check if a token exists (has been minted).

fn exists(env: soroban_sdk::Env, token_id: u64) -> bool

Revoke/burn an SBT (admin only). Removes ownership but token_id remains used.

fn revoke(env: soroban_sdk::Env, token_id: u64)
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String

BLOCKED — SBTs are non-transferable.

fn approve(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    token_id: u64,
)

Get the SBT balance of an address.

fn balance(env: soroban_sdk::Env, owner: soroban_sdk::Address) -> u64

Get the owner of a token.

fn owner_of(env: soroban_sdk::Env, token_id: u64) -> soroban_sdk::Address

BLOCKED — SBTs are non-transferable.

fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u64,
)

Transfer admin role to a new address.

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

Get the metadata URI of a token.

fn token_uri(env: soroban_sdk::Env, token_id: u64) -> soroban_sdk::String

Initialize the contract. Only callable once.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    name: soroban_sdk::String,
    symbol: soroban_sdk::String,
)

Update the metadata URI of an existing token (admin only).

fn update_uri(env: soroban_sdk::Env, token_id: u64, new_uri: soroban_sdk::String)
fn token_count(env: soroban_sdk::Env) -> u64

BLOCKED — SBTs are non-transferable.

fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u64,
)

Imports

WebAssembly Text (WAT) ▶