Marketplace

Methods

DEFAULT_ADMIN_ROLE

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

Returns

Name
Type
Description

_0

bytes32

undefined

MAX_BPS

function MAX_BPS() external view returns (uint64)

The max bps of the contract. So, 10_000 == 100 %

Returns

Name
Type
Description

_0

uint64

undefined

acceptOffer

function acceptOffer(uint256 _listingId, address _offeror, address _currency, uint256 _pricePerToken) external nonpayable

Lets a listing's creator accept an offer for their direct listing.

Parameters

Name
Type
Description

_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

Name
Type
Description

_0

uint64

undefined

buy

Lets an account buy a given quantity of tokens from a listing.

Parameters

Name
Type
Description

_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

Name
Type
Description

_listingId

uint256

undefined

closeAuction

Lets an account close an auction for either the (1) winning bidder, or (2) auction creator.

Parameters

Name
Type
Description

_listingId

uint256

undefined

_closeFor

address

undefined

contractType

Returns the type of the contract.

Returns

Name
Type
Description

_0

bytes32

undefined

contractURI

Contract level metadata.

Returns

Name
Type
Description

_0

string

undefined

contractVersion

Returns the version of the contract.

Returns

Name
Type
Description

_0

uint8

undefined

createListing

Parameters

Name
Type
Description

_params

IMarketplace.ListingParameters

undefined

getPlatformFeeInfo

Returns the platform fee recipient and bps.

Returns

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

index

uint256

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

role

bytes32

undefined

account

address

undefined

hasRole

Returns true if account has been granted role.

Parameters

Name
Type
Description

role

bytes32

undefined

account

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

initialize

Initiliazes the contract, like a constructor.

Parameters

Name
Type
Description

_defaultAdmin

address

undefined

_contractURI

string

undefined

_trustedForwarders

address[]

undefined

_platformFeeRecipient

address

undefined

_platformFeeBps

uint256

undefined

isTrustedForwarder

Parameters

Name
Type
Description

forwarder

address

undefined

Returns

Name
Type
Description

_0

bool

undefined

listings

Mapping from uid of listing => listing info.

Parameters

Name
Type
Description

_0

uint256

undefined

Returns

Name
Type
Description

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

Name
Type
Description

data

bytes[]

undefined

Returns

Name
Type
Description

results

bytes[]

undefined

offer

Lets an account (1) make an offer to a direct listing, or (2) make a bid in an auction.

Parameters

Name
Type
Description

_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

Name
Type
Description

_0

uint256

undefined

_1

address

undefined

Returns

Name
Type
Description

listingId

uint256

undefined

offeror

address

undefined

quantityWanted

uint256

undefined

currency

address

undefined

pricePerToken

uint256

undefined

expirationTimestamp

uint256

undefined

onERC1155BatchReceived

Parameters

Name
Type
Description

_0

address

undefined

_1

address

undefined

_2

uint256[]

undefined

_3

uint256[]

undefined

_4

bytes

undefined

Returns

Name
Type
Description

_0

bytes4

undefined

onERC1155Received

Parameters

Name
Type
Description

_0

address

undefined

_1

address

undefined

_2

uint256

undefined

_3

uint256

undefined

_4

bytes

undefined

Returns

Name
Type
Description

_0

bytes4

undefined

onERC721Received

Parameters

Name
Type
Description

_0

address

undefined

_1

address

undefined

_2

uint256

undefined

_3

bytes

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

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

Name
Type
Description

role

bytes32

undefined

account

address

undefined

setAuctionBuffers

Lets a contract admin set auction buffers.

Parameters

Name
Type
Description

_timeBuffer

uint256

undefined

_bidBufferBps

uint256

undefined

setContractURI

Lets a contract admin set the URI for the contract-level metadata.

Parameters

Name
Type
Description

_uri

string

undefined

setPlatformFeeInfo

Lets a contract admin update platform fee recipient and bps.

Parameters

Name
Type
Description

_platformFeeRecipient

address

undefined

_platformFeeBps

uint256

undefined

supportsInterface

Parameters

Name
Type
Description

interfaceId

bytes4

undefined

Returns

Name
Type
Description

_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

Name
Type
Description

_0

uint64

undefined

totalListings

Total number of listings ever created in the marketplace.

Returns

Name
Type
Description

_0

uint256

undefined

updateListing

Lets a listing's creator edit the listing's parameters.

Parameters

Name
Type
Description

_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

Name
Type
Description

_0

uint256

undefined

Returns

Name
Type
Description

listingId

uint256

undefined

offeror

address

undefined

quantityWanted

uint256

undefined

currency

address

undefined

pricePerToken

uint256

undefined

expirationTimestamp

uint256

undefined

Events

AuctionBuffersUpdated

Parameters

Name
Type
Description

timeBuffer

uint256

undefined

bidBufferBps

uint256

undefined

AuctionClosed

Parameters

Name
Type
Description

listingId indexed

uint256

undefined

closer indexed

address

undefined

cancelled indexed

bool

undefined

auctionCreator

address

undefined

winningBidder

address

undefined

Initialized

Parameters

Name
Type
Description

version

uint8

undefined

ListingAdded

Parameters

Name
Type
Description

listingId indexed

uint256

undefined

assetContract indexed

address

undefined

lister indexed

address

undefined

listing

IMarketplace.Listing

undefined

ListingRemoved

Parameters

Name
Type
Description

listingId indexed

uint256

undefined

listingCreator indexed

address

undefined

ListingUpdated

Parameters

Name
Type
Description

listingId indexed

uint256

undefined

listingCreator indexed

address

undefined

NewOffer

Parameters

Name
Type
Description

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

Name
Type
Description

listingId indexed

uint256

undefined

assetContract indexed

address

undefined

lister indexed

address

undefined

buyer

address

undefined

quantityBought

uint256

undefined

totalPricePaid

uint256

undefined

PlatformFeeInfoUpdated

Parameters

Name
Type
Description

platformFeeRecipient indexed

address

undefined

platformFeeBps

uint256

undefined

RoleAdminChanged

Parameters

Name
Type
Description

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

RoleGranted

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

RoleRevoked

Parameters

Name
Type
Description

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

Last updated