Contract 0698612e5e88ff06583318777d4026698ce809e1251392915b1e4757e8f157c1

← Back to Index 📥 Download WASM

Meta

cliver 27.0.0#5a7c5fe76530bf4248477ac812fc757146b98cc4
rssdkver 25.1.0#86c50a1ea4f87b40add3064ff9df95c7553565c5
rsver 1.89.0

Instances

  • CALENVG66JDNZEYEPMFLFKYZ5434XD5Y7TCOC5XIF74ZTJPSQASG5AIC

Interface

Initialize once after deploy.

age_verifier — address of the AgeVerifier contract on this network.

fn initialize(
    env: soroban_sdk::Env,
    age_verifier: soroban_sdk::Address,
    admin: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    usdc_token: soroban_sdk::Address,
) -> Result<(), SoulboundNftError>

Mint a soulbound identity NFT.

Requirements:

  • to must have a verified credential in age_verifier
  • to must not already have a token (one per address)
  • tier: 0 = Basic ($10), 1 = Premium ($25), 2 = Rare ($100)
  • avatar_uri: IPFS or HTTPS URI pointing to the avatar image

The tier fee is forwarded directly to the treasury (same as age_verifier model).

fn mint(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    tier: u32,
    avatar_uri: soroban_sdk::String,
) -> Result<(), SoulboundNftError>

Change the avatar URI. Free — no fee charged. Only the token holder can change their own avatar.

fn set_avatar(
    env: soroban_sdk::Env,
    holder: soroban_sdk::Address,
    avatar_uri: soroban_sdk::String,
) -> Result<(), SoulboundNftError>

Burn (revoke) the token. Permanently removes the NFT from the holder. Only the holder can burn their own token.

fn burn(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    amount: i128,
) -> Result<(), SoulboundNftError>
fn token_uri(
    env: soroban_sdk::Env,
    id: soroban_sdk::Address,
) -> Option
fn token_tier(env: soroban_sdk::Env, id: soroban_sdk::Address) -> Option
fn balance(env: soroban_sdk::Env, id: soroban_sdk::Address) -> i128
fn decimals(env: soroban_sdk::Env) -> u32
fn name(env: soroban_sdk::Env) -> soroban_sdk::String
fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String
fn allowance(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
) -> i128
fn approve(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    spender: soroban_sdk::Address,
    amount: i128,
    expiration_ledger: u32,
) -> Result<(), SoulboundNftError>
fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), SoulboundNftError>
fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    amount: i128,
) -> Result<(), SoulboundNftError>
fn burn_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    amount: i128,
) -> Result<(), SoulboundNftError>

Imports

WebAssembly Text (WAT) ▶