Create Sell Offer

Function:

public entry fun create_sell_offer<CURRENCY>(
    registry: &LedgerRegistry,
    ledger: &mut TradeLedger,
    collection_cap: &CollectionCap,
    mut nfts: vector<NFT>,
    mut sender_balances: vector<UserBalance>,
    requested_amount_per_nft: u64,
    nft_amount: u64,
    clock: &Clock,
    ctx: &mut TxContext
)

Description:

  • Allows NFT holders to create a sell offer.

  • The seller defines the price per NFT and quantity.

  • Updates the ledger index to track available offers.

Validations:

  • The user must own the NFTs being listed.

  • The collection must match the trade ledger.

  • The requested amount must be greater than zero.

Last updated