structs
:ERC721Order
for buying/selling ERC721 assetsERC1155Order
for buying/selling ERC1155 assets.ERC1155Order
has one additional field compared to ERC721Order
, used to specify the amount of the ERC1155 being bought or sold. This would be used for fungible ERC1155 assets.TradeDirection
enum is used to indicate whether an order is a bid or an ask:propertyValidator
implements the following function:propertyData
.Property
with propertyValidator = address(0)
, one can create "collection" or "floor" orders ββ these orders can be filled using any NFT from a particular collection.ERC721Order
and ERC1155Order
have a Fee[] fees
field, where Fee
is the following struct
:Fee
specified in an order, the buyer of the NFT will pay the fee recipient the given amount of ETH/ERC20 tokens. This is in addition to the erc20TokenAmount
that the buyer is paying for the NFT itself. There is an optional callback for each fee:Fee
, the recipient
of which is a contract that would handle splitting the fee between multiple recipients using a withdrawal model.transferFrom
functionality to transfer WETH from the maker to the taker. Even so, the taker can choose to receive ETH when filling a WETH sell order by setting the unwrapNativeToken
parameter to true
in sellERC721
or sellERC1155
.buyERC721
and buyERC1155
functions are payable
and the msg.value
can be used to fill a WETH sell order.onERC721Received
and onERC1155Received
data
parameter of a safeTransferFrom
call, the 0x contract will try to fill the given order using the NFT asset transferred to it. This allows takers to fill an NFT buy order without needing to first approving the 0x contract.matchERC721Orders
function can be used to simultaneously fill a sell order and a buy order if:profit = buyOrder.erc20TokenAmount - sellOrder.erc20TokenAmount - sellOrderFees
preSignERC721Order
or preSignERC1155Order
functions.PRESIGNED
signature type (see LibSignature.sol):