Marketplace
Methods
DEFAULT_ADMIN_ROLE
Returns
_0
bytes32
undefined
MAX_BPS
The max bps of the contract. So, 10_000 == 100 %
Returns
_0
uint64
undefined
acceptOffer
Lets a listing's creator accept an offer for their direct listing.
Parameters
_listingId
uint256
undefined
_offeror
address
undefined
_currency
address
undefined
_pricePerToken
uint256
undefined
bidBufferBps
The minimum % increase required from the previous winning bid. Default: 5%.
Returns
_0
uint64
undefined
buy
Lets an account buy a given quantity of tokens from a listing.
Parameters
_listingId
uint256
undefined
_buyFor
address
undefined
_quantityToBuy
uint256
undefined
_currency
address
undefined
_totalPrice
uint256
undefined
cancelDirectListing
Lets a direct listing creator cancel their listing.
Parameters
_listingId
uint256
undefined
closeAuction
Lets an account close an auction for either the (1) winning bidder, or (2) auction creator.
Parameters
_listingId
uint256
undefined
_closeFor
address
undefined
contractType
Returns the type of the contract.
Returns
_0
bytes32
undefined
contractURI
Contract level metadata.
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 recipient and bps.
Returns
_0
address
undefined
_1
uint16
undefined
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
role
bytes32
undefined
Returns
_0
bytes32
undefined
getRoleMember
Returns one of the accounts that have role
. index
must be a value between 0 and {getRoleMemberCount}, non-inclusive. Role bearers are not sorted in any particular way, and their ordering may change at any point. WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure you perform all queries on the same block. See the following https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] for more information.
Parameters
role
bytes32
undefined
index
uint256
undefined
Returns
_0
address
undefined
getRoleMemberCount
Returns the number of accounts that have role
. Can be used together with {getRoleMember} to enumerate all bearers of a role.
Parameters
role
bytes32
undefined
Returns
_0
uint256
undefined
grantRole
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role. May emit a {RoleGranted} event.
Parameters
role
bytes32
undefined
account
address
undefined
hasRole
Returns true
if account
has been granted role
.
Parameters
role
bytes32
undefined
account
address
undefined
Returns
_0
bool
undefined
initialize
Initiliazes the contract, like a constructor.
Parameters
_defaultAdmin
address
undefined
_contractURI
string
undefined
_trustedForwarders
address[]
undefined
_platformFeeRecipient
address
undefined
_platformFeeBps
uint256
undefined
isTrustedForwarder
Parameters
forwarder
address
undefined
Returns
_0
bool
undefined
listings
Mapping from uid of listing => listing info.
Parameters
_0
uint256
undefined
Returns
listingId
uint256
undefined
tokenOwner
address
undefined
assetContract
address
undefined
tokenId
uint256
undefined
startTime
uint256
undefined
endTime
uint256
undefined
quantity
uint256
undefined
currency
address
undefined
reservePricePerToken
uint256
undefined
buyoutPricePerToken
uint256
undefined
tokenType
enum IMarketplace.TokenType
undefined
listingType
enum IMarketplace.ListingType
undefined
multicall
Receives and executes a batch of function calls on this contract.
Parameters
data
bytes[]
undefined
Returns
results
bytes[]
undefined
offer
Lets an account (1) make an offer to a direct listing, or (2) make a bid in an auction.
Parameters
_listingId
uint256
undefined
_quantityWanted
uint256
undefined
_currency
address
undefined
_pricePerToken
uint256
undefined
_expirationTimestamp
uint256
undefined
offers
Mapping from uid of a direct listing => offeror address => offer made to the direct listing by the respective offeror.
Parameters
_0
uint256
undefined
_1
address
undefined
Returns
listingId
uint256
undefined
offeror
address
undefined
quantityWanted
uint256
undefined
currency
address
undefined
pricePerToken
uint256
undefined
expirationTimestamp
uint256
undefined
onERC1155BatchReceived
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256[]
undefined
_3
uint256[]
undefined
_4
bytes
undefined
Returns
_0
bytes4
undefined
onERC1155Received
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
uint256
undefined
_4
bytes
undefined
Returns
_0
bytes4
undefined
onERC721Received
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
bytes
undefined
Returns
_0
bytes4
undefined
renounceRole
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
. May emit a {RoleRevoked} event.
Parameters
role
bytes32
undefined
account
address
undefined
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role. May emit a {RoleRevoked} event.
Parameters
role
bytes32
undefined
account
address
undefined
setAuctionBuffers
Lets a contract admin set auction buffers.
Parameters
_timeBuffer
uint256
undefined
_bidBufferBps
uint256
undefined
setContractURI
Lets a contract admin set the URI for the contract-level metadata.
Parameters
_uri
string
undefined
setPlatformFeeInfo
Lets a contract admin update platform fee recipient and bps.
Parameters
_platformFeeRecipient
address
undefined
_platformFeeBps
uint256
undefined
supportsInterface
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
timeBuffer
The amount of time added to an auction's 'endTime', if a bid is made within timeBuffer
seconds of the existing endTime
. Default: 15 minutes.
Returns
_0
uint64
undefined
totalListings
Total number of listings ever created in the marketplace.
Returns
_0
uint256
undefined
updateListing
Lets a listing's creator edit the listing's parameters.
Parameters
_listingId
uint256
undefined
_quantityToList
uint256
undefined
_reservePricePerToken
uint256
undefined
_buyoutPricePerToken
uint256
undefined
_currencyToAccept
address
undefined
_startTime
uint256
undefined
_secondsUntilEndTime
uint256
undefined
winningBid
Mapping from uid of an auction listing => current winning bid in an auction.
Parameters
_0
uint256
undefined
Returns
listingId
uint256
undefined
offeror
address
undefined
quantityWanted
uint256
undefined
currency
address
undefined
pricePerToken
uint256
undefined
expirationTimestamp
uint256
undefined
Events
AuctionBuffersUpdated
Parameters
timeBuffer
uint256
undefined
bidBufferBps
uint256
undefined
AuctionClosed
Parameters
listingId indexed
uint256
undefined
closer indexed
address
undefined
cancelled indexed
bool
undefined
auctionCreator
address
undefined
winningBidder
address
undefined
Initialized
Parameters
version
uint8
undefined
ListingAdded
Parameters
listingId indexed
uint256
undefined
assetContract indexed
address
undefined
lister indexed
address
undefined
listing
IMarketplace.Listing
undefined
ListingRemoved
Parameters
listingId indexed
uint256
undefined
listingCreator indexed
address
undefined
ListingUpdated
Parameters
listingId indexed
uint256
undefined
listingCreator indexed
address
undefined
NewOffer
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
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
RoleAdminChanged
Parameters
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
RoleGranted
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
RoleRevoked
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
Last updated