Skip to main content

ListingERC20

Supports bids in ETH/ERC20s and supports Listing Fee.


note

All deployed addresses can be found on the Auctions introduction page.

Check out the Key Considerations 🔑 section before getting started.

Auction Structure#

  • seller: The address of the seller
  • reservePrice: The reserve price to start the auction
  • sellerFundsRecipient: The address where funds are sent after the auction
  • highestBid: The highest bid of the auction
  • highestBidder: The address of the highest bidder
  • duration: The length of time that the auction runs after the first bid is placed
  • startTime: The time that the first bid can be placed
  • firstBidTime: The time that the first bid is placed
  • currency: The address of the ERC-20 token, or address(0) for ETH, required for a bid
  • listingFeeRecipient: The address that listed the auction
  • listingFeeBps: The fee that is sent to the lister of the auction
struct Auction {    address seller;    uint96 reservePrice;    address sellerFundsRecipient;    uint96 highestBid;    address highestBidder;    uint96 startTime;    uint80 duration;    uint96 firstBidTime;    address currency;    address listingFeeRecipient;    uint16 listingFeeBps;}

Functions#

supportsInterface#

Implements EIP-165 for standard interface detection.

function supportsInterface(bytes4 _interfaceId) returns (bool)

Functions#

createAuction#

Creates an auction for a given ERC-721 NFT. There can only be one auction at a time for a given NFT.

function createAuction(    address _tokenContract,    uint256 _tokenId,    uint256 _duration,    uint256 _reservePrice,    address _sellerFundsRecipient,    uint256 _startTime,    address _bidCurrency,    uint256 _listingFeeBps,    address _listingFeeRecipient)

setAuctionReservePrice#

Updates the auction reserve price for a given NFT

function setAuctionReservePrice(    address _tokenContract,    uint256 _tokenId,    uint256 _reservePrice) 

cancelAuction#

Cancels the auction for a given NFT.

function cancelAuction(address _tokenContract, uint256 _tokenId)

createBid#

Places a bid on the auction for a given NFT. The bid percentage difference must be greater than or equal to 10% of the previous bid.

function createBid(    address _tokenContract,    uint256 _tokenId,    uint256 _amount)

settleAuction#

Ends the auction for a given NFT by sending the NFT to the highest bidder and the funds to the seller. Note, that this module honors royalty payouts.

function settleAuction(address _tokenContract, uint256 _tokenId)