Trade Offer (TradeOffer)

A sell order that allows users to list NFTs for sale at a specified price.

Structure Definition

public struct TradeOffer has key, store {
    id: UID,                           // Unique identifier for the trade offer
    offerer: address,                  // Address of the seller listing the NFTs
    collection_id: ID,                 // ID of the NFT collection
    offered_asset_ids: vector<u64>,    // List of NFT asset IDs being sold
    requested_currency: TypeName,      // Currency type required for payment
    requested_amount: u64,             // Price per NFT in the specified currency
    status: u8,                        // Current status of the offer (OPEN, FILLED, etc.)
    timestamp: u64,                    // Timestamp when the offer was created
    trade_ledger_id: ID                 // Reference to the corresponding trade ledger
}

Purpose

  • Allows NFT owners to list their assets for sale.

  • Defines the price per NFT and accepted currency.

  • Supports status updates (open, filled, cancelled).

Last updated