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
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.
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
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