IMarketplace
Methods
acceptOffer
Lets a listing's creator accept an offer to their direct listing.
Parameters
_listingId
uint256
The unique ID of the listing for which to accept the offer.
_offeror
address
The address of the buyer whose offer is to be accepted.
_currency
address
The currency of the offer that is to be accepted.
_totalPrice
uint256
The total price of the offer that is to be accepted.
buy
Lets someone buy a given quantity of tokens from a direct listing by paying the fixed price.
A sale will fail to execute if either: (1) buyer does not own or has not approved Marketplace to transfer the appropriate amount of currency (or hasn't sent the appropriate amount of native tokens) (2) the lister does not own or has removed Markeplace's approval to transfer the tokens listed for sale.
Parameters
_listingId
uint256
The uid of the direct lisitng to buy from.
_buyFor
address
The receiver of the NFT being bought.
_quantity
uint256
The amount of NFTs to buy from the direct listing.
_currency
address
The currency to pay the price in.
_totalPrice
uint256
The total price to pay for the tokens being bought.
cancelDirectListing
Lets a direct listing creator cancel their listing.
Parameters
_listingId
uint256
The unique Id of the lisitng to cancel.
closeAuction
Lets any account close an auction on behalf of either the (1) auction's creator, or (2) winning bidder. For (1): The auction creator is sent the the winning bid amount. For (2): The winning bidder is sent the auctioned NFTs.
Parameters
_listingId
uint256
The uid of the listing (the auction to close).
_closeFor
address
For whom the auction is being closed - the auction creator or winning bidder.
contractType
Returns the module type of the contract.
Returns
_0
bytes32
undefined
contractURI
Returns the metadata URI of the contract.
Returns
_0
string
undefined
contractVersion
Returns the version of the contract.
Returns
_0
uint8
undefined
createListing
Parameters
_params
IMarketplace.ListingParameters
undefined
getPlatformFeeInfo
Returns the platform fee bps and recipient.
Returns
_0
address
undefined
_1
uint16
undefined
offer
Lets someone make an offer to a direct listing, or bid in an auction.
Each (address, listing ID) pair maps to a single unique offer. So e.g. if a buyer makes makes two offers to the same direct listing, the last offer is counted as the buyer's offer to that listing.
Parameters
_listingId
uint256
The unique ID of the lisitng to make an offer/bid to.
_quantityWanted
uint256
For auction listings: the 'quantity wanted' is the total amount of NFTs being auctioned, regardless of the value of _quantityWanted
passed. For direct listings: _quantityWanted
is the quantity of NFTs from the listing, for which the offer is being made.
_currency
address
For auction listings: the 'currency of the bid' is the currency accepted by the auction, regardless of the value of _currency
passed. For direct listings: this is the currency in which the offer is made.
_pricePerToken
uint256
For direct listings: offered price per token. For auction listings: the bid amount per token. The total offer/bid amount is _quantityWanted * _pricePerToken
.
_expirationTimestamp
uint256
For aution listings: inapplicable. For direct listings: The timestamp after which the seller can no longer accept the offer.
setContractURI
Sets contract URI for the storefront-level metadata of the contract. Only module admin can call this function.
Parameters
_uri
string
undefined
setPlatformFeeInfo
Lets a module admin update the fees on primary sales.
Parameters
_platformFeeRecipient
address
undefined
_platformFeeBps
uint256
undefined
updateListing
Lets a listing's creator edit the listing's parameters. A direct listing can be edited whenever. An auction listing cannot be edited after the auction has started.
Parameters
_listingId
uint256
The uid of the lisitng to edit.
_quantityToList
uint256
The amount of NFTs to list for sale in the listing. For direct lisitngs, the contract only checks whether the listing creator owns and has approved Marketplace to transfer _quantityToList
amount of NFTs to list for sale. For auction listings, the contract ensures that exactly _quantityToList
amount of NFTs to list are escrowed.
_reservePricePerToken
uint256
For direct listings: this value is ignored. For auctions: the minimum bid amount of the auction is reservePricePerToken * quantityToList
_buyoutPricePerToken
uint256
For direct listings: interpreted as 'price per token' listed. For auctions: if buyoutPricePerToken
is greater than 0, and a bidder's bid is at least as great as buyoutPricePerToken * quantityToList
, the bidder wins the auction, and the auction is closed.
_currencyToAccept
address
For direct listings: the currency in which a buyer must pay the listing's fixed price to buy the NFT(s). For auctions: the currency in which the bidders must make bids.
_startTime
uint256
The unix timestamp after which listing is active. For direct listings: 'active' means NFTs can be bought from the listing. For auctions, 'active' means bids can be made in the auction.
_secondsUntilEndTime
uint256
No. of seconds after the provided _startTime
, after which the listing is inactive. For direct listings: 'inactive' means NFTs cannot be bought from the listing. For auctions: 'inactive' means bids can no longer be made in the auction.
Events
AuctionBuffersUpdated
Emitted when auction buffers are updated.
Parameters
timeBuffer
uint256
undefined
bidBufferBps
uint256
undefined
AuctionClosed
Emitted when an auction is closed.
Parameters
listingId indexed
uint256
undefined
closer indexed
address
undefined
cancelled indexed
bool
undefined
auctionCreator
address
undefined
winningBidder
address
undefined
ListingAdded
Emitted when a new listing is created.
Parameters
listingId indexed
uint256
undefined
assetContract indexed
address
undefined
lister indexed
address
undefined
listing
IMarketplace.Listing
undefined
ListingRemoved
Emitted when a listing is cancelled.
Parameters
listingId indexed
uint256
undefined
listingCreator indexed
address
undefined
ListingUpdated
Emitted when the parameters of a listing are updated.
Parameters
listingId indexed
uint256
undefined
listingCreator indexed
address
undefined
NewOffer
Emitted when (1) a new offer is made to a direct listing, or (2) when a new bid is made in an auction.
Parameters
listingId indexed
uint256
undefined
offeror indexed
address
undefined
listingType indexed
enum IMarketplace.ListingType
undefined
quantityWanted
uint256
undefined
totalOfferAmount
uint256
undefined
currency
address
undefined
NewSale
Emitted when a buyer buys from a direct listing, or a lister accepts some buyer's offer to their direct listing.
Parameters
listingId indexed
uint256
undefined
assetContract indexed
address
undefined
lister indexed
address
undefined
buyer
address
undefined
quantityBought
uint256
undefined
totalPricePaid
uint256
undefined
PlatformFeeInfoUpdated
Parameters
platformFeeRecipient indexed
address
undefined
platformFeeBps
uint256
undefined
Last updated