Models

This page enumerates the models used within Seaport.

Basic Models


Order Model

FieldDescriptionType
parametersthe order specificationsOrderParameters
signatureeither standard 65-byte EDCSA, 64-byte EIP-2098bytes

Struct Representation

struct Order {
  struct OrderParameters parameters;
  bytes signature;
}

OrderParameters Model

FieldDescriptionType
offererThe 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
zoneThe 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
offeran array of items that may be transferred from the offerer's accountOfferItem[]
considerationan array of items that must be received in order to fulfill the orderConsiderationItem[]
orderTypedesignates one of four types for the orderOrderType
startTimeblock timestamp at which the order becomes activeuint256
endTimeblock timestamp at which the order expiresuint256
zoneHashan 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 orderbytes32
saltan arbitrary source of entropy for the orderuint256
conduitKeyindicates 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 fulfillmentbytes32
countera 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;
}

OfferItem Model

FieldDescriptionType
itemTypethe 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 criteriaItemType
tokendesignates the address of the item's token contract (with the null address used for Ether or other native tokens)address
identifierOrCriteriarepresents 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 identifieruint256
startAmountthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
endAmountthe 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;
}

ConsiderationItem Model

FieldDescriptionType
itemTypethe 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 criteriaItemType
tokendesignates the address of the item's token contract (with the null address used for Ether or other native tokens)address
identifierOrCriteriarepresents 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 identifieruint256
startAmountthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
endAmountthe 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
recipientthe address that will receive the consideration item upon fulfillmentaddress

Struct Representation

struct ConsiderationItem {
  enum ItemType itemType;
  address token;
  uint256 identifierOrCriteria;
  uint256 startAmount;
  uint256 endAmount;
  address payable recipient;
}

AdvancedOrder Model

FieldDescriptionType
parametersthe order specificationsOrderParameters
numeratorsupply for partial fillsuint120
denominatorsupply for partial fillsuint120
signatureeither standard 65-byte EDCSA, 64-byte EIP-2098bytes
extraDatasupplied as part of a call to the validateOrder function on the zone when fulfilling restricted order typesbytes

Struct Representation

struct AdvancedOrder {
  struct OrderParameters parameters;
  uint120 numerator;
  uint120 denominator;
  bytes signature;
  bytes extraData;
}

Fulfillment


Spent Item Model

FieldDescriptionType
itemTypethe 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 criteriaItemType
tokendesignates the address of the item's token contract (with the null address used for Ether or other native tokens)address
identifierrepresents 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 identifieruint256
amountthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256

Struct Representation

struct SpentItem {
  enum ItemType itemType;
  address token;
  uint256 identifier;
  uint256 amount;
}

Received Item Model

FieldDescriptionType
itemTypethe 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 criteriaItemType
tokendesignates the address of the item's token contract (with the null address used for Ether or other native tokens)address
identifierrepresents 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 identifieruint256
amountthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256

Struct Representation

struct ReceivedItem {
  enum ItemType itemType;
  address token;
  uint256 identifier;
  uint256 amount;
  address payable recipient;
}

BasicOrderParameters Model

FieldDescriptionType
considerationTokendesignates the address of the consideration itemaddress
considerationIdentifierrepresents 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 identifieruint256
considerationAmountthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
offererThe 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
zoneThe 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
offerTokenaddress of the token in the orders offeraddress
offerIdentifierthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
basicOrderTypethe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeBasicOrderType
startTimethe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
endTimethe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
zoneHashthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activebytes32
offererConduitKeythe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activebytes32
fulfillerConduitKeythe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activebytes32
totalOriginalAdditionalRecipientsthe amount of the item in question that will be required should the order be fulfilled at the moment the order becomes activeuint256
totalOriginalAdditionalRecipientstotal number of additional recipientsuint256
additionalRecipientsadditional recipients of the conisderation itemsAdditionalRecipient[]
signatureclient signaturebytes32

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;
}

AdditionalRecipient Model

FieldDescriptionType
amountthe amount of the item that will be sent to this additional recipientuint256
recipientdesignates the address of this additional recipientaddress

Struct Representation

struct AdditionalRecipient {
  uint256 amount;
  address payable recipient;
}

OrderStatus Model

FieldDescriptionType
isValidated--bool
isCancelled--bool
numerator--uint120
denominator--uint120

Struct Representation

struct OrderStatus {
  bool isValidated;
  bool isCancelled;
  uint120 numerator;
  uint120 denominator;
}

CriteriaResolver Model

FieldDescriptionType
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;
}

Fulfillment Model

FieldDescriptionType
amountthe amount of the item that will be sent to this additional recipientuint256
recipientdesignates the address of this additional recipientaddress

Struct Representation

struct Fulfillment {
  struct FulfillmentComponent[] offerComponents;
  struct FulfillmentComponent[] considerationComponents;
}

FulfillmentComponent Model

FieldDescriptionType
amountthe amount of the item that will be sent to this additional recipientuint256
recipientdesignates the address of this additional recipientaddress

Struct Representation

struct FulfillmentComponent {
  uint256 orderIndex;
  uint256 itemIndex;
}

Execution Model

FieldDescriptionType
amountthe amount of the item that will be sent to this additional recipientuint256
recipientdesignates the address of this additional recipientaddress

Struct Representation

struct Execution {
  struct ReceivedItem item;
  address offerer;
  bytes32 conduitKey;
}

ZoneParameters Model

struct ZoneParameters {
    bytes32 orderHash;
    address fulfiller;
    address offerer;
    SpentItem[] offer;
    ReceivedItem[] consideration;
    bytes extraData;
    bytes32[] orderHashes;
    uint256 startTime;
    uint256 endTime;
    bytes32 zoneHash;
}