Contract 33d309b1be08dc66f358979e48b1051a916e2952f529d0f42eae9d22e304d0e6

← Back to Index 📥 Download WASM

Meta

binver 1.0.0
cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.93.0

Instances

  • CC2RSPG42RRIX6M24NEFI6KIWCTT5NZPXRFYKHV5MBV6CPFMSP3CWTVV

Interface

fn mint(
    env: soroban_sdk::Env,
    payer: soroban_sdk::Address,
    to: soroban_sdk::Address,
    uri: soroban_sdk::String,
    is_pfp: bool,
    is_soulbound: bool,
) -> u32

Collection name.

fn name(env: soroban_sdk::Env) -> soroban_sdk::String

Collection symbol.

fn symbol(env: soroban_sdk::Env) -> soroban_sdk::String

Grants approved permission to transfer token_id. Only owner or operator can approve. Soulbound tokens cannot be approved.

fn approve(
    env: soroban_sdk::Env,
    approver: soroban_sdk::Address,
    approved: soroban_sdk::Address,
    token_id: u32,
    live_until_ledger: u32,
) -> Result<(), PfpError>

Returns the number of tokens owned by owner.

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

Upgrades the contract WASM (admin only).

fn upgrade(env: soroban_sdk::Env, new_wasm_hash: soroban_sdk::BytesN<32>)

Returns the owner of token_id. Panics if token does not exist (per spec).

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

Transfers token_id from from to to (owner-initiated).

fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u32,
) -> Result<(), PfpError>

Returns the URI for token_id. Panics if token does not exist (per spec).

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

Returns all token IDs owned by owner (SEP-0050 enumeration extension). Single-call replacement for the O(n) owner_of() loop in the frontend.

fn tokens_of(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
) -> soroban_sdk::Vec

Extend TTL for instance storage (public, anyone can call).

fn extend_ttl(env: soroban_sdk::Env)

Initializes the contract with admin, treasury, and XLD token address. Legacy fallback — guarded for single-call use.

fn initialize(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    xld_token: soroban_sdk::Address,
)
fn public_mint(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    uri: soroban_sdk::String,
) -> u32

Returns the approved address for token_id, if not expired. Panics if token does not exist (per spec).

fn get_approved(env: soroban_sdk::Env, token_id: u32) -> Option

Returns whether token_id is soulbound.

fn is_soulbound(env: soroban_sdk::Env, token_id: u32) -> bool

Returns the total number of minted tokens.

fn total_minted(env: soroban_sdk::Env) -> u32

Constructor (Protocol 22+): Called atomically during CreateContractV2.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    treasury: soroban_sdk::Address,
    xld_token: soroban_sdk::Address,
)

Updates the URI for token_id. Owner-only. Blocked for soulbound tokens.

fn set_token_uri(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    token_id: u32,
    uri: soroban_sdk::String,
) -> Result<(), PfpError>

Transfers token_id from from to to via approved spender.

fn transfer_from(
    env: soroban_sdk::Env,
    spender: soroban_sdk::Address,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    token_id: u32,
) -> Result<(), PfpError>

Grants or revokes operator as operator for all tokens of owner. Set live_until_ledger = 0 to revoke.

fn approve_for_all(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
    live_until_ledger: u32,
) -> Result<(), PfpError>

Admin-only: Set token URI for any token. Bypasses owner check. Used for metadata format migrations and compliance actions.

fn admin_set_token_uri(
    env: soroban_sdk::Env,
    token_id: u32,
    uri: soroban_sdk::String,
) -> Result<(), PfpError>

Returns whether operator is approved for all tokens of owner.

fn is_approved_for_all(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    operator: soroban_sdk::Address,
) -> bool
fn public_mint_soulbound(
    env: soroban_sdk::Env,
    to: soroban_sdk::Address,
    uri: soroban_sdk::String,
) -> u32

Imports

WebAssembly Text (WAT) ▶