Marketplace
When using the Marketplace
smart contract, additional top-level functionality is available to use.
To access the top-level functionality, provide the marketplace
contract type when creating the contract instance:
Auction - CancelListing
Cancel a listing that you made.
Note: Auction listings cannot be canceled if a bid has been made.
Auction - CreateListing
List an NFT for sale in an auction listing on the marketplace.
Auction - ExecuteSale
Close the auction for both buyer and seller.
This means that the NFT is transferred to the buyer, and the seller is paid the amount of the winning bid.
Auction - GetListing
Get the details of a listing using the listing ID.
Auction - GetMinimumNextBid
Get the value that the next bid must be in order to be accepted.
- If there is no current bid, this value is the reserve price.
- If there is a current bid, this value is the current bid plus the bid buffer.
Auction - GetWinner
Get the address that won an auction after an auction has ended.
Auction - GetWinningBid
Get the current highest bid of an active auction.
Direct - CancelListing
Cancel a direct listing you created.
Direct listings can be canceled at any time, unless a buyout has already occurred.
Direct - CreateListing
List an NFT for sale on the marketplace for direct purchase.
Direct - GetActiveOffer
Get an active offer on a listing from a specific wallet address, if there is one.
Direct - GetListing
Get a direct listing by its ID.
GetActiveListings
Get all active listings on the marketplace, both direct and auction listings.
An active listing means it can be bought or bid on.
GetAllListings
Get all the listings on the marketplace, including inactive ones.
GetOffers
Get all the offers made on a listing.
MakeOffer
Create a new bid on an auction listing or a new offer on a direct listing.