Contract 00172516c9999771601540706a997d8ff8cb96b3fae4aaed3b2d85deb6c43c5e

← Back to Index 📥 Download WASM

Meta

binver 2.0.0
rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.93.0

Instances

  • CDB7SKCDPJ63V2HTFABMVWTDD6R55PH6YTK5LSU6PSB7VGC5GM7T4E3Q

Interface

Buy a listed NFT at the fixed price.

fn buy(env: soroban_sdk::Env, listing_id: u64, buyer: soroban_sdk::Address)

Create a fixed-price listing (public — anyone can buy).

fn list(
    env: soroban_sdk::Env,
    seller: soroban_sdk::Address,
    nft_contract: soroban_sdk::Address,
    nft_id: soroban_sdk::Val,
    currency: soroban_sdk::Address,
    price: i128,
) -> u64

Upgrade the contract WASM. Admin only. ⚠️ NEVER REMOVE THIS FUNCTION — doing so bricks the contract permanently.

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

Contract version.

fn version(env: soroban_sdk::Env) -> u32
fn get_offer(env: soroban_sdk::Env, offer_id: u64) -> Offer

Transfer admin role.

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

Extend instance and persistent storage TTLs.

fn extend_ttl(env: soroban_sdk::Env)

Make an offer on any NFT. Bid amount is escrowed.

fn make_offer(
    env: soroban_sdk::Env,
    bidder: soroban_sdk::Address,
    nft_contract: soroban_sdk::Address,
    nft_id: soroban_sdk::Val,
    currency: soroban_sdk::Address,
    amount: i128,
    expires_at: u32,
) -> u64
fn get_listing(env: soroban_sdk::Env, listing_id: u64) -> Listing
fn update_fees(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    protocol_fee_bps: u32,
    project_fee_bps: u32,
)

Accept an offer. NFT owner calls this.

fn accept_offer(env: soroban_sdk::Env, offer_id: u64, seller: soroban_sdk::Address)
fn add_currency(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    currency: soroban_sdk::Address,
)

Cancel an active offer. Returns escrowed funds.

fn cancel_offer(env: soroban_sdk::Env, offer_id: u64, bidder: soroban_sdk::Address)

Get a page of listings. Returns listing_ids that exist in [start, start+limit). Client-side filters by status/collection.

fn get_listings(env: soroban_sdk::Env, start: u64, limit: u64) -> soroban_sdk::Vec

Create a private listing — only the designated buyer can purchase.

fn list_private(
    env: soroban_sdk::Env,
    seller: soroban_sdk::Address,
    nft_contract: soroban_sdk::Address,
    nft_id: soroban_sdk::Val,
    currency: soroban_sdk::Address,
    price: i128,
    designated_buyer: soroban_sdk::Address,
) -> u64

Initialize the marketplace.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    protocol_fee_bps: u32,
    protocol_fee_receiver: soroban_sdk::Address,
    project_fee_bps: u32,
    project_fee_receiver: soroban_sdk::Address,
    allowed_currencies: soroban_sdk::Vec,
)

Add an NFT collection to the whitelist.

fn add_collection(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    collection: soroban_sdk::Address,
)

Cancel an active listing.

fn cancel_listing(env: soroban_sdk::Env, listing_id: u64, seller: soroban_sdk::Address)

Replace the entire allowed currencies list (admin only).

fn set_currencies(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    currencies: soroban_sdk::Vec,
)

Get the total number of offers ever created.

fn next_offer_id_value(env: soroban_sdk::Env) -> u64

Get the designated buyer for a listing (if any).

fn get_designated_buyer(
    env: soroban_sdk::Env,
    listing_id: u64,
) -> Option

Get the total number of listings ever created.

fn next_listing_id_value(env: soroban_sdk::Env) -> u64

Imports

WebAssembly Text (WAT) ▶