Repository navigation
fix: bulk orders use the passed account as offerer and reject signatures Seaport cannot parse - #1069
Merged
ryanio merged 3 commits intoNov 6, 2026
Conversation
createOrder uses the account passed in as the offerer and only falls back to the signer's address, but createBulkOrders always used the signer's address. With a signer that signs for another account, bulk orders were built and signed for the signer instead of that account.
Seaport reads a bulk order signature as 64 or 65 bytes followed by the proof. At any other length it checks the whole value against the single order's digest. A contract wallet with more than one owner returns a longer signature (#323), so signBulkOrder and createBulkOrders returned orders whose fill reverts in the wallet's isValidSignature, while the same wallet's signature fills a single order. Throw from signBulkOrder when the signature, after compaction, is not 64 or 65 bytes, and point to signOrder. Single orders are unchanged.
ryanio
deleted the
claude/1793995363-bulk-order-offerer-and-signature-length
branch
November 6, 2026 20:20
This was referenced Nov 6, 2026
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
Two community PRs edit
src/seaport.tsincreateBulkOrdersandsignBulkOrder. This branch stacks them so they land and get checked together. The commits are cherry-picked unchanged, so each contributor keeps authorship of their own commits.This supersedes #1068 and #1061. Both need closing once this merges, pointing at this PR. #1061 fixes #1060.
Solution
From #1068 by furkan3152,
1ca8001and00d01d1:createBulkOrderstakes theaccountAddresspassed in as the offerer, the same ascreateOrder(accountAddress ?? await signer.getAddress()). Before, it always used the signer's address. With a signer that signs for a contract wallet, bulk orders came out with the signer as offerer, the signer's counter, and consideration defaulting to the signer. Line 258 was the only offerer resolution that differed. The fulfill paths use the signer's address on purpose, because the signer sends the transaction.From #1061 by nftpoetrist,
771a194:signBulkOrderthrows when the signature, after compaction, is not 64 or 65 bytes. Seaport only parses a bulk order signature as 64 or 65 bytes followed by the proof (_isValidBulkOrderSizein seaport-coreVerifiers.sol). At any other length it checks the whole value against the single order digest, so a multi-owner wallet's 130 byte signature produced orders that can never fill.createBulkOrderssigns throughsignBulkOrder, and a test covers that path.getMessageToSignonly returns the payload, so no other path builds bulk orders from a signature. The PR adds a test contract,TestERC1271TwoOwnerWallet, and extendsWrappedDigestSignerin a backward-compatible way.The two changes interact: after #1068, a contract wallet can be the offerer of a bulk order. After #1061, that only succeeds when the wallet's signature is 64 or 65 bytes. The #1068 test uses the 65 byte
TestERC1271WrappedWallet, which passes the #1061 check.Verification
All of this ran on this branch, rebased on
mainate635c29:npm run build, thennpm run lint(tsc and Biome): exit 0. The three Biome warnings (useMathMinMaxinbalance.tsanditem.ts) are identical onmain.npm test: 303 passing.create-bulk-orders.spec.tsfails 1 test:AssertionError: expected '0x057Eb9…785f' to equal '0x2279B7…eBe6'. That is the signer's address where the wallet's was expected.sign-order.spec.tsfails 3 tests:expected promise to be rejected with an error including 'Seaport only reads a 64 or 65 byte si…' but it was fulfilled with [ …(2) ].Security direction: #1061 only adds a rejection. #1068 changes which account a bulk order commits. It now matches
createOrderand the caller's stated account, instead of silently committing the signer's assets.Semver: #1061 adds a throw on input that used to return, and #1068 changes the offerer for callers whose
accountAddressdiffers from the signer. Both should ship in a minor, not a patch.Merge order: #1063 touches only
src/utils/fulfill.tsand its tests, so it can merge on its own before this PR.Confidence: high. Both fixes are small, each test fails on its own assertion when its fix is reverted, and the full suite passes.
🤖 Generated with Claude Code