ERC721Orderfor buying/selling ERC721 assets
ERC1155Orderfor buying/selling ERC1155 assets.
ERC1155Orderhas 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.
TradeDirectionenum is used to indicate whether an order is a bid or an ask:
propertyValidatorimplements the following function:
propertyValidator = address(0), one can create "collection" or "floor" orders –– these orders can be filled using any NFT from a particular collection.
Fee feesfield, where
Feeis the following
Feespecified 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
erc20TokenAmountthat the buyer is paying for the NFT itself. There is an optional callback for each fee:
recipientof which is a contract that would handle splitting the fee between multiple recipients using a withdrawal model.
transferFromfunctionality 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
msg.valuecan be used to fill a WETH sell order.
dataparameter of a
safeTransferFromcall, 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.
matchERC721Ordersfunction can be used to simultaneously fill a sell order and a buy order if:
profit = buyOrder.erc20TokenAmount - sellOrder.erc20TokenAmount - sellOrderFees