Listing and Selling NFTs (SALE)
Workflow:
Prepare NFTs: Ensure you have minted NFTs via ART20 and hold them in your
UserBalance
.Create Sale: Call
create_nft_sale(...)
to list a set of NFTs at a fixedprice_per_nft
. The sale becomes active, and aSaleCreated
event is emitted.Manage Inventory: Use
add_nfts_to_sale(...)
to add more NFTs to the sale orclose_sale(...)
to end the sale when you’re done.Buyers Purchase: Buyers call
purchase_nfts(...)
supplying the required currency to acquire listed NFTs directly.
Result: A straightforward marketplace scenario. Buyers pay a fixed price, and sellers can withdraw proceeds once sales occur.
Example Script:
PreviousCreating a Collection and Minting Tokens (ART20)NextProviding Liquidity and Trading NFTs (TRADE)
Last updated