Repository navigation
fix: pass fulfillOrder extraData to the zone instead of dropping it - #1057
Closed
erkancamli wants to merge 1 commit into
Closed
erkancamli wants to merge 1 commit into
erkancamli wants to merge 1 commit into
Conversation
fulfillOrder takes an extraData argument, but only fulfillAdvancedOrder can carry it. When the order qualified for the basic route, or for plain fulfillOrder (no units to fill, no criteria items, no gift recipient), the SDK picked that route and the caller's extraData never reached Seaport. Both of those entry points hand the zone an empty extraData. For an open order that goes unnoticed, but a restricted order whose zone reads extraData, such as a signed zone that expects its signature there, reverts in authorizeOrder even though the caller supplied the right bytes. Treat non-empty extraData like the other inputs that need the advanced route: skip the basic route and call fulfillAdvancedOrder. Fills without extraData are unchanged. fulfillOrders already submits through fulfillAvailableAdvancedOrders and was not affected. The new test deploys a zone that rejects empty extraData and records what it receives, and fulfills a restricted single ERC721 listing (the basic route) and a restricted two item bundle (the fulfillOrder route) with extraData. Both reverted with MissingExtraData before this change.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1057 +/- ##
==========================================
+ Coverage 98.27% 99.14% +0.86%
==========================================
Files 35 58 +23
Lines 14526 21323 +6797
Branches 660 1210 +550
==========================================
+ Hits 14276 21141 +6865
+ Misses 245 175 -70
- Partials 5 7 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This was referenced Oct 30, 2026
Collaborator
|
Thanks @erkancamli. Confirmed: reverting the basic-route gate fails the single ERC721 case with This was stacked with the other open PRs in #1058 with your commit unchanged, and it shipped in v4.5.0. Closing this one in favor of #1058. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
fulfillOrderacceptsextraData, but onlyfulfillAdvancedOrdercan carry it to Seaport. When an order qualifies for the basic route, or for plainfulfillOrder(nounitsToFill, no criteria items, no gift recipient), the SDK takes that route and the caller'sextraDatais silently dropped. Seaport then calls the zone with emptyextraDataon both of those entry points: the basic route builds the zone call in_assertRestrictedBasicOrderAuthorization, andfulfillOrderdecodes theOrderas anAdvancedOrderwhoseextraDatais empty bytes.For an open order nothing notices, but a restricted order whose zone reads
extraData, for example a signed zone that expects its signature there, reverts inauthorizeOrdereven though the caller passed the right bytes. The most common case is the hottest one: a restricted single ERC721 listing for ETH, which always goes through the basic route.Solution
Treat non empty
extraDatalike the other inputs that already force the advanced route:fulfillOrderskips the basic route whenextraDatais non empty.fulfillStandardOrderusesfulfillAdvancedOrderwhenextraDatais non empty.A small
hasExtraDatahelper decides this, so"0x",""andundefinedkeep today's behavior and fills withoutextraDatastill use the cheaper routes.fulfillOrdersalready goes throughfulfillAvailableAdvancedOrdersand was not affected.Tests:
test/fulfill-extra-data.spec.tsdeploys a smallTestExtraDataZonethat rejects emptyextraDataand records what it receives, then fulfills a restricted single ERC721 listing (basic route) and a restricted two item bundle (fulfillOrderroute) withextraData. Both reverted withMissingExtraData()before this change and pass after it.hasExtraDataalso gets unit coverage intest/fulfill-utils.spec.ts.npm test: 283 passing.npm run check-typesandbiome check .are clean.