Contract 0bebc24948941497ddd871076fcd6906b26d978fe803dd7ef7877dad6746431e

← Back to Index 📥 Download WASM

Meta

binver 1.0.0
cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.93.0

Instances

  • CC2RSPG42RRIX6M24NEFI6KIWCTT5NZPXRFYKHV5MBV6CPFMSP3CWTVV

Interface

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,
)

Mints a transferable Stellar PFP NFT. Charges 1 XLD (10,000,000 stroops). URI stored on-chain.

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>

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

Mints a soulbound (non-transferable) Stellar PFP NFT. Charges 2 XLD (20,000,000 stroops). URI is immutable forever.

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

Imports

WebAssembly Text (WAT) ▶