On chain Data Structure
ERC20: Order structure
maker
: address of owner of the order. (The user or contract who want to swapmakerAsset
totakerAsset
).taker
: address that can fulfilled this order on chain.taker == 0
: anybody can fill the ordertaker != 0
: during the execution we will verify thatmsg.sender == taker
. (taker needs to be the contract or user who fill an order).
nonceAndMeta
: This field combine nonce value (guarantee uniqueness of the order) and some meta dataexpiry
: expiry timestamp in seconds. Can also be set 0 for an order that never expiresmakerAsset
: address of ERC20 token that maker want to sell to the taker.takerAsset
: address of ERC20 token that maker want to buy from the taker.makerAmount
: amount ofmakerAsset
that maker want to swap to taker.takerAmount
: amount ofmakerAsset
that maker want to swap to taker.signature
: EIP712 Signature of a JSON Object with all above fields signed with the private key of maker.
ERC 20/721/1155: Order structure
Token type encoding
maker
: address of owner of the order. (The user or contract who want to swapmakerAsset
totakerAsset
).taker
: address that can fulfilled this order on chain.taker == 0
: anybody can fill the ordertaker != 0
: during the execution we will verify thatmsg.sender == taker
. (taker needs to be the contract or user who fill an order).
nonceAndMeta
: This field combine nonce value (guarantee uniqueness of the order) and some meta dataexpiry
: expiry timestamp in seconds. Can also be set 0 for an order that never expiresmakerAsset
: Packed field containing address of an ERC20/721/1155 token that maker want to sell to the taker (between0-19 bits
). Token type encoded as show above on20-21 bits
.makerAssetId
: ignored for ERC20. For ERC/721/1155 themaker
token.takerAsset
: Packed field containing address of an ERC20/721/1155 token that maker want to sell to the taker (between0-19 bits
). Token type encoded as show above on20-21 bits
.makerAssetId
: ignored for ERC20. For ERC/721/1155 thetaker
token.makerAmount
: amount ofmakerAsset
(at idmakerAssetId
for ERC/721/1155) that maker want to swap to taker.takerAmount
: amount oftakerAsset
(at idtakerAssetId
for ERC/721/1155) that maker want to swap to taker.signature
: EIP712 Signature of a JSON Object with all above fields signed with the private key of maker.
Last updated