Models
This page enumerates the models used within Seaport.
Field | Description | Type |
---|---|---|
parameters | the order specifications | OrderParameters |
signature | either standard 65-byte EDCSA, 64-byte EIP-2098 | bytes |
Struct Representation
struct Order {
struct OrderParameters parameters;
bytes signature;
}
Field | Description | Type |
---|---|---|
offerer | The offerer of the order supplies all offered items and must either fulfill the order personally (i.e. msg.sender == offerer ) or approve the order via signature (either standard 65-byte EDCSA, 64-byte EIP-2098, or an EIP-1271 isValidSignature check) or by listing the order on-chain (i.e. calling validate ) | address |
zone | The zone of the order is an optional secondary account attached to the order with two additional privileges:1. The zone may cancel orders where it is named as the zone by calling cancel . (Note that offerers can also cancel their own orders, either individually or for all orders signed with their current counter at once by calling incrementCounter ).2. "Restricted" orders (as specified by the order type) can be executed by anyone but must be approved by the zone indicated by a call to validateOrder on the zone. | address |
offer | an array of items that may be transferred from the offerer's account | OfferItem[] |
consideration | an array of items that must be received in order to fulfill the order | ConsiderationItem[] |
orderType | designates one of four types for the order | OrderType |
startTime | block timestamp at which the order becomes active | uint256 |
endTime | block timestamp at which the order expires | uint256 |
zoneHash | an arbitrary 32-byte value that will be supplied to the zone when fulfilling restricted orders that the zone can utilize when making a determination on whether to authorize the order | bytes32 |
salt | an arbitrary source of entropy for the order | uint256 |
conduitKey | indicates what conduit, if any, should be utilized as a source for token approvals when performing transfers. By default (i.e. when conduitKey is set to the zero hash), the offerer will grant ERC20, ERC721, and ERC1155 token approvals to Seaport directly so that it can perform any transfers specified by the order during fulfillment | bytes32 |
counter | a value that must match the current counter for the given offerer. | uint256 |
Struct Representation
struct OrderComponents {
address offerer;
address zone;
struct OfferItem[] offer;
struct ConsiderationItem[] consideration;
enum OrderType orderType;
uint256 startTime;
uint256 endTime;
bytes32 zoneHash;
uint256 salt;
bytes32 conduitKey;
uint256 counter;
}
Field | Description | Type |
---|---|---|
itemType | the type of item, with valid types being Ether (or other native token for the given chain), ERC20, ERC721, ERC1155, ERC721 with "criteria" (explained below), and ERC1155 with criteria | ItemType |
token | designates the address of the item's token contract (with the null address used for Ether or other native tokens) | address |
identifierOrCriteria | represents either the ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier | uint256 |
startAmount | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
endAmount | the amount of the item in question that will be required should the order be fulfilled at the moment the order expires. If this value differs from the item's startAmount , the realized amount is calculated linearly based on the time elapsed since the order became active. | uint256 |
Struct Representation
struct OfferItem {
enum ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
}
Field | Description | Type |
---|---|---|
itemType | the type of item, with valid types being Ether (or other native token for the given chain), ERC20, ERC721, ERC1155, ERC721 with "criteria" (explained below), and ERC1155 with criteria | ItemType |
token | designates the address of the item's token contract (with the null address used for Ether or other native tokens) | address |
identifierOrCriteria | represents either the ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier | uint256 |
startAmount | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
endAmount | the amount of the item in question that will be required should the order be fulfilled at the moment the order expires. If this value differs from the item's startAmount , the realized amount is calculated linearly based on the time elapsed since the order became active. | uint256 |
recipient | the address that will receive the consideration item upon fulfillment | address |
Struct Representation
struct ConsiderationItem {
enum ItemType itemType;
address token;
uint256 identifierOrCriteria;
uint256 startAmount;
uint256 endAmount;
address payable recipient;
}
Field | Description | Type |
---|---|---|
parameters | the order specifications | OrderParameters |
numerator | supply for partial fills | uint120 |
denominator | supply for partial fills | uint120 |
signature | either standard 65-byte EDCSA, 64-byte EIP-2098 | bytes |
extraData | supplied as part of a call to the validateOrder function on the zone when fulfilling restricted order types | bytes |
Struct Representation
struct AdvancedOrder {
struct OrderParameters parameters;
uint120 numerator;
uint120 denominator;
bytes signature;
bytes extraData;
}
Field | Description | Type |
---|---|---|
itemType | the type of item, with valid types being Ether (or other native token for the given chain), ERC20, ERC721, ERC1155, ERC721 with "criteria" (explained below), and ERC1155 with criteria | ItemType |
token | designates the address of the item's token contract (with the null address used for Ether or other native tokens) | address |
identifier | represents either the ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier | uint256 |
amount | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
Struct Representation
struct SpentItem {
enum ItemType itemType;
address token;
uint256 identifier;
uint256 amount;
}
Field | Description | Type |
---|---|---|
itemType | the type of item, with valid types being Ether (or other native token for the given chain), ERC20, ERC721, ERC1155, ERC721 with "criteria" (explained below), and ERC1155 with criteria | ItemType |
token | designates the address of the item's token contract (with the null address used for Ether or other native tokens) | address |
identifier | represents either the ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier | uint256 |
amount | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
Struct Representation
struct ReceivedItem {
enum ItemType itemType;
address token;
uint256 identifier;
uint256 amount;
address payable recipient;
}
Field | Description | Type |
---|---|---|
considerationToken | designates the address of the consideration item | address |
considerationIdentifier | represents either the ERC721 or ERC1155 token identifier or, in the case of a criteria-based item type, a merkle root composed of the valid set of token identifiers for the item. This value will be ignored for Ether and ERC20 item types, and can optionally be zero for criteria-based item types to allow for any identifier | uint256 |
considerationAmount | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
offerer | The offerer of the order supplies all offered items and must either fulfill the order personally (i.e. msg.sender == offerer ) or approve the order via signature (either standard 65-byte EDCSA, 64-byte EIP-2098, or an EIP-1271 isValidSignature check) or by listing the order on-chain (i.e. calling validate ) | uint256 |
zone | The zone of the order is an optional secondary account attached to the order with two additional privileges:1. The zone may cancel orders where it is named as the zone by calling cancel . (Note that offerers can also cancel their own orders, either individually or for all orders signed with their current counter at once by calling incrementCounter ).2. "Restricted" orders (as specified by the order type) can be executed by anyone but must be approved by the zone indicated by a call to validateOrder on the zone. | address |
offerToken | address of the token in the orders offer | address |
offerIdentifier | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
basicOrderType | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | BasicOrderType |
startTime | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
endTime | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
zoneHash | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | bytes32 |
offererConduitKey | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | bytes32 |
fulfillerConduitKey | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | bytes32 |
totalOriginalAdditionalRecipients | the amount of the item in question that will be required should the order be fulfilled at the moment the order becomes active | uint256 |
totalOriginalAdditionalRecipients | total number of additional recipients | uint256 |
additionalRecipients | additional recipients of the conisderation items | AdditionalRecipient[] |
signature | client signature | bytes32 |
Struct Representation
struct BasicOrderParameters {
address considerationToken;
uint256 considerationIdentifier;
uint256 considerationAmount;
address payable offerer;
address zone;
address offerToken;
uint256 offerIdentifier;
uint256 offerAmount;
enum BasicOrderType basicOrderType;
uint256 startTime;
uint256 endTime;
bytes32 zoneHash;
uint256 salt;
bytes32 offererConduitKey;
bytes32 fulfillerConduitKey;
uint256 totalOriginalAdditionalRecipients;
struct AdditionalRecipient[] additionalRecipients;
bytes signature;
}
Field | Description | Type |
---|---|---|
amount | the amount of the item that will be sent to this additional recipient | uint256 |
recipient | designates the address of this additional recipient | address |
Struct Representation
struct AdditionalRecipient {
uint256 amount;
address payable recipient;
}
Field | Description | Type |
---|---|---|
isValidated | -- | bool |
isCancelled | -- | bool |
numerator | -- | uint120 |
denominator | -- | uint120 |
Struct Representation
struct OrderStatus {
bool isValidated;
bool isCancelled;
uint120 numerator;
uint120 denominator;
}
Field | Description | Type |
---|---|---|
orderIndex | -- | uint256 |
side | -- | Side |
index | -- | uint256 |
identifier | -- | uint256 |
criteriaProof | -- | bytes32[] |
Struct Representation
struct CriteriaResolver {
uint256 orderIndex;
enum Side side;
uint256 index;
uint256 identifier;
bytes32[] criteriaProof;
}
Field | Description | Type |
---|---|---|
amount | the amount of the item that will be sent to this additional recipient | uint256 |
recipient | designates the address of this additional recipient | address |
Struct Representation
struct Fulfillment {
struct FulfillmentComponent[] offerComponents;
struct FulfillmentComponent[] considerationComponents;
}
Field | Description | Type |
---|---|---|
amount | the amount of the item that will be sent to this additional recipient | uint256 |
recipient | designates the address of this additional recipient | address |
Struct Representation
struct FulfillmentComponent {
uint256 orderIndex;
uint256 itemIndex;
}
Field | Description | Type |
---|---|---|
amount | the amount of the item that will be sent to this additional recipient | uint256 |
recipient | designates the address of this additional recipient | address |
Struct Representation
struct Execution {
struct ReceivedItem item;
address offerer;
bytes32 conduitKey;
}
struct ZoneParameters {
bytes32 orderHash;
address fulfiller;
address offerer;
SpentItem[] offer;
ReceivedItem[] consideration;
bytes extraData;
bytes32[] orderHashes;
uint256 startTime;
uint256 endTime;
bytes32 zoneHash;
}
Updated 6 months ago