Seaport is a generalized ETH/ERC20/ERC721/ERC1155 marketplace. It minimizes external calls to the greatest extent possible and provides lightweight methods for common routes as well as more flexible methods for composing advanced orders.
SeaportInterface contains all external function interfaces for Seaport.
fulfillBasicOrder
function fulfillBasicOrder(struct BasicOrderParameters parameters) external payable returns (bool fulfilled)
Fulfill an order offering an ERC721 token by supplying Ether (or the native token for the given chain) as consideration for the order. An arbitrary number of "additional recipients" may also be supplied which will each receive native tokens from the fulfiller as consideration.
Name
Type
Description
parameters
struct BasicOrderParameters
Additional 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 ERC721 token to be transferred.
Name
Type
Description
fulfilled
bool
A boolean indicating whether the order has been successfully fulfilled.
fulfillOrder
function fulfillOrder(struct Order order, bytes32 fulfillerConduitKey) external payable returns (bool fulfilled)
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).
Name
Type
Description
order
struct Order
The 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.
fulfillerConduitKey
bytes32
A 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.
Name
Type
Description
fulfilled
bool
A boolean indicating whether the order has been successfully fulfilled.
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.
Name
Type
Description
advancedOrder
struct AdvancedOrder
The 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.
criteriaResolvers
struct CriteriaResolver[]
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.
fulfillerConduitKey
bytes32
A 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.
recipient
address
The intended recipient for all received items, with `address(0)` indicating that the caller should receive the items.
Name
Type
Description
fulfilled
bool
A boolean indicating whether the order has been successfully fulfilled.
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).
Name
Type
Description
orders
struct Order[]
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.
offerFulfillments
struct FulfillmentComponent[][]
An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.
considerationFulfillments
struct FulfillmentComponent[][]
An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.
fulfillerConduitKey
bytes32
A 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.
maximumFulfilled
uint256
The maximum number of orders to fulfill.
Name
Type
Description
availableOrders
bool[]
An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.
executions
struct Execution[]
An array of elements indicating the sequence of transfers performed as part of matching the given orders.
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.
Name
Type
Description
advancedOrders
struct AdvancedOrder[]
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.
criteriaResolvers
struct CriteriaResolver[]
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.
offerFulfillments
struct FulfillmentComponent[][]
An array of FulfillmentComponent arrays indicating which offer items to attempt to aggregate when preparing executions.
considerationFulfillments
struct FulfillmentComponent[][]
An array of FulfillmentComponent arrays indicating which consideration items to attempt to aggregate when preparing executions.
fulfillerConduitKey
bytes32
A 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.
recipient
address
The intended recipient for all received items, with `address(0)` indicating that the caller should receive the items.
maximumFulfilled
uint256
The maximum number of orders to fulfill.
Name
Type
Description
availableOrders
bool[]
An array of booleans indicating if each order with an index corresponding to the index of the returned boolean was fulfillable or not.
executions
struct Execution[]
An array of elements indicating the sequence of transfers performed as part of matching the given orders.
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).
Name
Type
Description
orders
struct Order[]
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.
fulfillments
struct Fulfillment[]
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.
Name
Type
Description
executions
struct Execution[]
An array of elements indicating the sequence of transfers performed as part of matching the given orders.
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.
Name
Type
Description
orders
struct AdvancedOrder[]
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.
criteriaResolvers
struct CriteriaResolver[]
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.
fulfillments
struct Fulfillment[]
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.
recipient
address
The intended recipient for all unspent offer item amounts, or the caller if the null addressis supplied.
Name
Type
Description
executions
struct Execution[]
An array of elements indicating the sequence of transfers performed as part of matching the given orders.
cancel
function cancel(struct OrderComponents[] orders) external returns (bool cancelled)
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`.
Name
Type
Description
orders
struct OrderComponents[]
The orders to cancel.
Name
Type
Description
cancelled
bool
A boolean indicating whether the supplied orders have been successfully cancelled.
validate
function validate(struct Order[] orders) external returns (bool validated)
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.
Name
Type
Description
orders
struct Order[]
The orders to validate.
Name
Type
Description
validated
bool
A boolean indicating whether the supplied orders have been successfully validated.
incrementCounter
function incrementCounter() external returns (uint256 newCounter)
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.
Name
Type
Description
newCounter
uint256
The new counter.
getOrderHash
function getOrderHash(struct OrderComponents order) external view returns (bytes32 orderHash)
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.
Name
Type
Description
orderHash
bytes32
The order hash in question.
Name
Type
Description
isValidated
bool
A boolean indicating whether the order in question has been validated (i.e. previously approved or partially filled).
isCancelled
bool
A boolean indicating whether the order in question has been cancelled.
totalFilled
uint256
The total portion of the order that has been filled (i.e. the "numerator").
totalSize
uint256
The total size of the order that is either filled or unfilled (i.e. the "denominator").
getCounter
function getCounter(address offerer) external view returns (uint256 counter)