How to close Auction Listings in a Marketplace
How to close an auction after bidding has ended
Auction listings on Marketplaces allow potential buyers to place bids on the item until the bidding period is complete. The highest bidder at the end of the auction wins the item.
Once the auction ends, both the lister and winning bidder need to close the auction to collect the winning bid, and the auctioned items, respectively. The buyer and seller always need to close the auction or have the auction closed on their behalf.
Below we dive into how to close the auctions in both Marketplace v3 and v2.
Marketplace v3
To close an auction on the Marketplace v3 contract, the buyer calls collectAuctionTokens
and the seller calls collectAuctionPayout
.
- Buyer - Once the auction ends, collect the auctioned NFTs for which you were the highest bidder.
collectAuctionTokens
- Seller - Once the auction ends, collect the highest bid made for your auctioned NFTs.
collectAuctionPayout
Close auction for the buyer
Here’s how you can close the Auction Listing on Marketplace v3 for the Buyer.
- Navigate to the thirdweb dashboard.
- Navigate to your marketplace contract directly or by entering your NFT Marketplace contract address in the search bar.
- Select the Explorer tab.
- Connect your wallet.
- Select
collectAuctionTokens
function.
- Enter the Auction Id parameter and execute the transaction. Criteria that must be satisfied:
- The auction must be expired.
- The caller must be the winning bidder.
Close auction for the seller
Here’s how you can close the Auction Listing on Marketplace v3 for the Seller.
- Navigate to the thirdweb dashboard.
- Navigate to your marketplace contract directly or by entering your NFT Marketplace contract address in the search bar.
- Select the Explorer tab.
- Connect your wallet.
- Select
collectAuctionPayout
function.
- Enter the Auction Id parameter and execute the transaction. Criteria that must be satisfied:
- The auction must be expired.
- The auction must have received at least one valid bid.
Marketplace v2
To close an auction on the Marketplace v2 contract, both the buyer and seller need to call closeAuction
to complete the transaction, or have the auction closed on their behalf.
Once the auction has expired and closeAuction
is called for both buyer and seller, the buyer will receive the item they won, and the seller will receive the winning bid amount.
Close auction as the buyer or seller
Here’s how you can close your Auction Listing on Marketplace v2 for the buyer and seller.
- Navigate to the thirdweb dashboard.
- Navigate to your marketplace contract directly or by entering your NFT Marketplace contract address in the search bar.
- Select the Explorer tab.
- Connect your wallet.
- Select
closeAuction
function.
- Enter parameters and execute the transaction.
- Listing ID - this is the marketplace listing ID.
- Close For - this is the wallet address involved as the buyer or seller in the auction listing.
Can’t get this working? If you’ve followed the above and still have issues, contact our support team for help.