Contract orders follow different rules than standard off-chain orders in several key areas:
Criteria-based Items
When a collection-wide criteria-based item (identifierOrCriteria = 0) is used in a contract order, the Seaport app has full latitude to choose the identifier mid-flight. Unlike standard orders, Seaport does not expect a CriteriaResolver for contract orders; providing one will cause a revert.
Native Token (ETH) Support
Contract orders allow for the use of native tokens (e.g., Ether) as offer items.
- Direct Transfer: Order generator contracts can send native tokens directly to Seaport during the
generateOrder call. - Reentrancy: Seaport makes exceptions to its normal reentrancy policies for order generators, allowing them to call the
receive hook and provide native tokens. - Availability: Any native tokens sent to Seaport are immediately spendable by the current or next caller.
Security Warning
Because contract orders can modify state during generateOrder, they can potentially lower the value of an offered NFT (e.g., by transferring out attached tokens). To mitigate this, consider using a mirrored order that allows for post-transfer validation.