Interface

Method definitions for the Seaport contract

fulfillBasicOrder

Fulfill an order that offers ether (the native token for the given chain) or ERC20 to ERC721/ERC1155 or ERC721/ERC1155 to ERC20. An arbitrary number of "additional recipients" may also be supplied which will each receive native tokens from the fulfiller as consideration.

function fulfillBasicOrder(struct BasicOrderParameters parameters) 
  external payable returns (bool fulfilled)
NameTypeDescription
parametersBasicOrderParametersAdditional information on the fulfilled order. Note that the offerer must first approve this contract (or their preferred conduit if indicated by the order) for their offered ERC20/ERC721/ERC1155 token to be transferred.
NameTypeDescription
fulfilledboolA boolean indicating whether the order has been successfully fulfilled.

fulfillOrder

Fulfill an order with an arbitrary number of items for offer and consideration. Note that this function does not support criteria-based orders or partial filling of orders (though filling the remainder of a partially-filled order is supported).

function fulfillOrder(struct Order order, bytes32 fulfillerConduitKey) 
  external payable returns (bool fulfilled)
NameTypeDescription
orderOrderThe order to fulfill. Note that both the offerer and the fulfiller must first approve this contract (or the corresponding conduit if indicated) to transfer any relevant tokens on their behalf and that contracts must implement onERC1155Received to receive ERC1155 tokens as consideration.
fulfillerConduitKeybytes32A bytes32 value indicating what conduit, if any, to source the fulfiller's token approvals from. The zero hash signifies that no conduit should be used, with direct approvals set on Seaport.
NameTypeDescription
fulfilledboolA boolean indicating whether the order has been successfully fulfilled.

fulfillAdvancedOrder

Fill an order, fully or partially, with an arbitrary number of items for offer and consideration alongside criteria resolvers containing specific token identifiers and associated proofs.

function fulfillAdvancedOrder(
  struct AdvancedOrder advancedOrder, 
  struct CriteriaResolver[] criteriaResolvers, 
  bytes32 fulfillerConduitKey, 
  address recipient) 
external payable returns (bool fulfilled)
NameTypeDescription
advancedOrderAdvancedOrderThe order to fulfill along with the fraction of the order to attempt to fill. Note that both the offerer and the fulfiller must first approve this contract (or their preferred conduit if indicated by the order) to transfer any relevant tokens on their behalf and that contracts must implement onERC1155Received to receive ERC1155 tokens as consideration. Also note that all offer and consideration components must have no remainder after multiplication of the respective amount with the supplied fraction for the partial fill to be considered valid.
criteriaResolversCriteriaResolver[]An array where each element contains a reference to a specific offer or consideration, a token identifier, and a proof that the supplied token identifier is contained in the merkle root held by the item in question's criteria element. Note that an empty criteria indicates that any (transferable) token identifier on the token in question is valid and that no associated proof needs to be supplied.
fulfillerConduitKeybytes32A bytes32 value indicating what conduit, if any, to source the fulfiller's token approvals from. The zero hash signifies that no conduit should be used, with direct approvals set on Seaport.
recipientaddressThe intended recipient for all received items, with address(0) indicating that the caller should receive the items.
NameTypeDescription
fulfilledboolA boolean indicating whether the order has been successfully fulfilled.

fulfillAvailableOrders

Attempt to fill a group of orders, each with an arbitrary number of items for offer and consideration. Any order that is not currently active, has already been fully filled, or has been cancelled will be omitted. Remaining offer and consideration items will then be aggregated where possible as indicated by the supplied offer and consideration component arrays and aggregated items will be transferred to the fulfiller or to each intended recipient, respectively. Note that a failing item transfer or an issue with order formatting will cause the entire batch to fail. Note that this function does not support criteria-based orders or partial filling of orders (though filling the remainder of a partially-filled order is supported).

function fulfillAvailableOrders(struct Order[] orders, struct FulfillmentComponent[][] offerFulfillments, struct FulfillmentComponent[][] considerationFulfillments, bytes32 fulfillerConduitKey, uint256 maximumFulfilled) external payable returns (bool[] availableOrders, struct Execution[] executions)
NameTypeDescription
ordersOrder[]The orders to fulfill. Note that both the offerer and the fulfiller must first approve this contract (or the corresponding conduit if indicated) to transfer any relevant tokens on their behalf and that contracts must implement onERC1155Received to receive ERC1155 tokens as consideration.
offerFulfillmentsFulfillmentComponent[][]An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.
considerationFulfillmentsstruct FulfillmentComponent[][]An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.
fulfillerConduitKeybytes32A bytes32 value indicating what conduit, if any, to source the fulfiller's token approvals from. The zero hash signifies that no conduit should be used, with direct approvals set on this contract.
maximumFulfilleduint256The maximum number of orders to fulfill.
NameTypeDescription
availableOrdersbool[]An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.
executionsExecution[]An array of elements indicating the sequence of transfers performed as part of matching the given orders.

fulfillAvailableAdvancedOrders

Attempt to fill a group of orders, fully or partially, with an arbitrary number of items for offer and consideration per order alongside criteria resolvers containing specific token identifiers and associated proofs. Any order that is not currently active, has already been fully filled, or has been cancelled will be omitted. Remaining offer and consideration items will then be aggregated where possible as indicated by the supplied offer and consideration component arrays and aggregated items will be transferred to the fulfiller or to each intended recipient, respectively. Note that a failing item transfer or an issue with order formatting will cause the entire batch to fail.

function fulfillAvailableAdvancedOrders(
  struct AdvancedOrder[] advancedOrders, 
  struct CriteriaResolver[] criteriaResolvers, 
  struct FulfillmentComponent[][] offerFulfillments, 
  struct FulfillmentComponent[][] considerationFulfillments, 
  bytes32 fulfillerConduitKey, 
  address recipient, 
  uint256 maximumFulfilled) 
  external payable returns (bool[] availableOrders, struct Execution[] executions)
NameTypeDescription
advancedOrdersAdvancedOrder[]The orders to fulfill along with the fraction of those orders to attempt to fill. Note that both the offerer and the fulfiller must first approve this contract (or their preferred conduit if indicated by the order) to transfer any relevant tokens on their behalf and that contracts must implement onERC1155Received to enable receipt of ERC1155 tokens as consideration. Also note that all offer and consideration components must have no remainder after multiplication of the respective amount with the supplied fraction for an order's partial fill amount to be considered valid.
criteriaResolversCriteriaResolver[]An array where each element contains a reference to a specific offer or consideration, a token identifier, and a proof that the supplied token identifier is contained in the merkle root held by the item in question's criteria element. Note that an empty criteria indicates that any (transferable) token identifier on the token in question is valid and that no associated proof needs to be supplied.
offerFulfillmentsFulfillmentComponent[][]An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.
considerationFulfillmentsFulfillmentComponent[][]An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.
fulfillerConduitKeybytes32A bytes32 value indicating what conduit, if any, to source the fulfiller's token approvals from. The zero hash signifies that no conduit should be used, with direct approvals set on this contract.
recipientaddressThe intended recipient for all received items, with address(0) indicating that the caller should receive the items.
maximumFulfilleduint256The maximum number of orders to fulfill.
NameTypeDescription
availableOrdersbool[]An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.
executionsExecution[]An array of elements indicating the sequence of transfers performed as part of matching the given orders.

matchOrders

Match an arbitrary number of orders, each with an arbitrary number of items for offer and consideration along with a set of fulfillments allocating offer components to consideration components. Note that this function does not support criteria-based or partial filling of orders (though filling the remainder of a partially-filled order is supported).

function matchOrders(
  struct Order[] orders, 
  struct Fulfillment[] fulfillments) 
 external payable returns (struct Execution[] executions)
NameTypeDescription
ordersOrder[]The orders to match. Note that both the offerer and fulfiller on each order must first approve this contract (or their conduit if indicated by the order) to transfer any relevant tokens on their behalf and each consideration recipient must implement onERC1155Received to enable ERC1155 token receipt.
fulfillmentsFulfillment[]An array of elements allocating offer components to consideration components. Note that each consideration component must be fully met for the match operation to be valid.
NameTypeDescription
executionsExecution[]An array of elements indicating the sequence of transfers performed as part of matching the given orders.

matchAdvancedOrders

Match an arbitrary number of full or partial orders, each with an arbitrary number of items for offer and consideration, supplying criteria resolvers containing specific token identifiers and associated proofs as well as fulfillments allocating offer components to consideration components.

function matchAdvancedOrders(
  struct AdvancedOrder[] orders, 
  struct CriteriaResolver[] criteriaResolvers, 
  struct Fulfillment[] fulfillments, 
  address recipient) 
 external payable returns (struct Execution[] executions)
NameTypeDescription
ordersAdvancedOrder[]The advanced orders to match. Note that both the offerer and fulfiller on each order must first approve this contract (or a preferred conduit if indicated by the order) to transfer any relevant tokens on their behalf and each consideration recipient must implement onERC1155Received in order to receive ERC1155 tokens. Also note that the offer and consideration components for each order must have no remainder after multiplying the respective amount with the supplied fraction in order for the group of partial fills to be considered valid.
criteriaResolversCriteriaResolver[]An array where each element contains a reference to a specific order as well as that order's offer or consideration, a token identifier, and a proof that the supplied token identifier is contained in the order's merkle root. Note that an empty root indicates that any (transferable) token identifier is valid and that no associated proof needs to be supplied.
fulfillmentsFulfillment[]An array of elements allocating offer components to consideration components. Note that each consideration component must be fully met in order for the match operation to be valid.
recipientaddressThe intended recipient for all unspent offer item amounts, or the caller if the null addressis supplied.
NameTypeDescription
executionsExecution[]An array of elements indicating the sequence of transfers performed as part of matching the given orders.

cancel

Cancel an arbitrary number of orders. Note that only the offerer or the zone of a given order may cancel it. Callers should ensure that the intended order was cancelled by calling getOrderStatus and confirming that isCancelled returns true.

function cancel(struct OrderComponents[] orders) external returns (bool cancelled)
NameTypeDescription
ordersOrderComponentsThe orders to cancel.
NameTypeDescription
cancelledboolA boolean indicating whether the supplied orders have been successfully cancelled.

validate

Validate an arbitrary number of orders, thereby registering their signatures as valid and allowing the fulfiller to skip signature verification on fulfillment. Note that validated orders may still be unfulfillable due to invalid item amounts or other factors; callers should determine whether validated orders are fulfillable by simulating the fulfillment call prior to execution. Also note that anyone can validate a signed order, but only the offerer can validate an order without supplying a signature.

function validate(struct Order[] orders) external returns (bool validated)
NameTypeDescription
ordersOrder[]The orders to validate.
NameTypeDescription
validatedboolA boolean indicating whether the supplied orders have been successfully validated.

incrementCounter

Cancel all orders from a given offerer with a given zone in bulk by incrementing a counter. Note that only the offerer may increment the counter.

function incrementCounter() external returns (uint256 newCounter)
NameTypeDescription
newCounteruint256The new counter.

getOrderHash

Retrieve the order hash for a given order.

function getOrderHash(struct OrderComponents order) external view returns (bytes32 orderHash)
NameTypeDescription
orderOrderComponentsThe components of the order.
NameTypeDescription
orderHashbytes32The order hash.

getOrderStatus

Retrieve the status of a given order by hash, including whether the order has been cancelled or validated and the fraction of the order that has been filled.

function getOrderStatus(bytes32 orderHash) external view returns (bool isValidated, bool isCancelled, uint256 totalFilled, uint256 totalSize)
NameTypeDescription
orderHashbytes32The order hash in question.
NameTypeDescription
isValidatedboolA boolean indicating whether the order in question has been validated (i.e. previously approved or partially filled).
isCancelledboolA boolean indicating whether the order in question has been cancelled.
totalFilleduint256The total portion of the order that has been filled (i.e. the "numerator").
totalSizeuint256The total size of the order that is either filled or unfilled (i.e. the "denominator").

getCounter

Retrieve the current counter for a given offerer.

function getCounter(address offerer) external view returns (uint256 counter)
NameTypeDescription
offereraddressThe offerer in question.
NameTypeDescription
counteruint256The current counter.

information

Retrieve configuration information for this contract.

function information() external view returns (string version, bytes32 domainSeparator, address conduitController)
NameTypeDescription
versionstringThe contract version.
domainSeparatorbytes32The domain separator for this contract.
conduitControlleraddressThe conduit Controller set for this contract.

name

function name() external view returns (string contractName)

Retrieve the name of this contract.

NameTypeDescription
contractNamestringThe name of this contract.