Repository navigation
Pin seaport-core to deployed 1.6 and modernize the Foundry toolchain and CI - #1427
Conversation
forge-std no longer depends on ds-test, and nothing in the repo imports it directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rt 1.6 lib/seaport-core was pinned to 1.6.5, which lacks the two _assertNonZeroAmount checks in BasicOrderFulfiller that shipped in the deployed contract. v1.6.6 matches the Etherscan-verified source exactly, and the Hardhat build already used it from npm. The optimized profile now uses the deployment's 9_999_999 optimizer runs and its own cache directory. With both changes it reproduces the deployed init code byte for byte, which DeployedBytecode.t.sol asserts against the CREATE2 address of the canonical deployment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Run the Hardhat jobs on Node 26 from .nvmrc with actions/setup-node v7 and a frozen yarn lockfile, and drop the single-value Node matrices. - Install Foundry v1.9.0 through a cached composite action, as SeaDrop does. - Compile the reference and optimized profiles once in a forge-build job, cached on foundry.toml, the sources, and the submodule commits. The four Forge jobs restore that cache instead of each rebuilding for about four minutes. - Run the deployed bytecode check as its own step in the Forge job. - Bump checkout to v7, codecov to v7.1.1 (pinned by SHA), and stale to v11, and set workflow permissions and timeouts. - Delete docs.yml. It pushes to ProjectOpenSea/developer-docs, which is archived, and its release trigger could never pass its branch check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Prettier wraps the new ternary in TestTransferValidationZoneFuzz. ESLint now ignores all of lib/, since nested submodules such as lib/seaport-sol/lib/solady ship JS files that fail the repo's parser config when submodules are checked out recursively. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟡 Changes recommended
A cache upload failure can leave forge-build successful without publishing the required build, causing all four downstream Forge jobs to fail before running tests.
1 open issue
What changed in this PR
Prepares Seaport for a gradual move to Foundry-only tooling while preserving deployed Seaport 1.6 bytecode compatibility. Hardhat remains in place for this stage.
Changes:
- Aligns optimized compiler settings with deployment and adds an init-code verification test.
- Updates toolchain versions and CI actions, shares cached Forge builds, and removes obsolete documentation publishing.
- Fixes the zone fuzz-test recipient collision and cleans up dependency-related configuration.
| File | Description |
|---|---|
test/foundry/zone/TestTransferValidationZoneFuzz.t.sol |
Keeps the negative-test recipient distinct from the authorized recipient. |
test/foundry/DeployedBytecode.t.sol |
Checks canonical address derivation and optimized init-code compatibility. |
README.md |
Documents Node selection and deployed-bytecode verification. |
foundry.toml |
Aligns optimizer runs, isolates the optimized cache, and removes the ds-test remapping. |
.nvmrc |
Selects Node 26. |
.gitmodules |
Removes the ds-test submodule declaration. |
.gitignore |
Ignores reference and optimized build caches. |
.github/workflows/test.yml |
Modernizes CI and shares precompiled Forge artifacts through caching. |
.github/workflows/stale.yml |
Updates the stale action and adds permissions and a timeout. |
.github/workflows/docs.yml |
Removes obsolete documentation publishing. |
.github/actions/setup-foundry/action.yml |
Adds reusable, cached Foundry installation. |
.eslintignore |
Excludes all dependency submodules from ESLint. |
Review effort: Balanced
actions/cache treats a failed save as a warning, so a cache outage on a new key used to leave forge-build green while every Forge job failed at fail-on-cache-miss. A forge-precompile composite action now restores the cache and compiles whatever is missing. forge-build saves the result, and the test jobs only restore it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Deployed-bytecode equivalence cannot be verified from this snapshot because the pinned submodule contents are absent and the required optimized Foundry v1.9.0 build cannot be run here.
No open issues 🎉
1 resolved since last review
Review effort: Balanced
Seaport 1.6 was verified with 9_999_999 runs, but 4_294_967_295 builds byte-identical init code; the earlier mismatch came entirely from the stale seaport-core pin. Drop the per-profile override so every profile uses the same runs, and DeployedBytecode.t.sol still passes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Looks good to merge. I checked the
🤖 Generated with Claude Code |
From review on #1427: - actions/stale keeps its state in the Actions cache and needs actions: write to save it between runs. - The precompiled-artifact cache key now also covers remappings.txt and .github/actions/**, so a change to the build steps can't hand the deployed bytecode check a stale build. - package.json engines now matches .nvmrc (Node 26). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks @tomhirst, all three were worth acting on. Fixed in e89cb60:
|

First PR in a series that moves Seaport to Foundry-only tooling without changing the deployed contract code. This one updates the toolchain and CI and adds a test proving the build still matches the deployed Seaport 1.6. Porting the Hardhat suite comes in later PRs.
The build now reproduces deployed Seaport 1.6
lib/seaport-corewas pinned to 1.6.5. That tag is missing the two_assertNonZeroAmount(amount)checks inBasicOrderFulfillerthat shipped in the deployed contract. seaport-core v1.6.6 matches the verified source file for file. The Hardhat build already compiled 1.6.6 from npm, so until now the Foundry and Hardhat suites tested slightly different code.With the pin corrected,
FOUNDRY_PROFILE=optimized forge buildproduces the deployed init code byte for byte. 1.6 was verified on Etherscan with 9,999,999 optimizer runs, but the repo's default of 4,294,967,295 builds identical bytecode, so every profile stays on the max.test/foundry/DeployedBytecode.t.solasserts the match in two steps:Any later toolchain, dependency or config change that alters the bytecode fails CI at this step.
Toolchain
ds-testsubmodule and its remapping are removed, since nothing imports them..nvmrc(previously 16.15.1 in.nvmrcand 18.15.0 in CI), withenginesupdated to match.CI
forge-buildjob, cached on the Foundry version,foundry.toml,remappings.txt,contracts/,reference/,.github/actions/and every submodule commit. The four Forge jobs restore that cache through aforge-precompilecomposite action, which rebuilds only if the cache is unavailable. They used to spend about 3.5 minutes each recompiling before running any test.actions/checkoutv7,actions/setup-nodev7 with a frozen lockfile,codecov/codecov-actionv7.1.1 pinned by SHA, andactions/stalev11 (with theactions: writeit needs for its cached state). Every job now has a timeout, and the workflows set explicit permissions.(18.15.0). The repo has no branch protection, so no required check names change.docs.ymlis deleted. It pushes toProjectOpenSea/developer-docs, which has been archived since February, and itsgithub.ref == 'refs/heads/main'check never passes on a release event. That makes Fix docs release workflow trigger obsolete.Included from #1426
Foundry 1.9's fuzzer found the collision described in prevent recipient collision in zone fuzz test:
offerRecipient = 0xdeafbeefwith a specified recipient makes the "stranger" address authorized, sotestFulfillAvailableAdvancedFuzzfailed. The fix is cherry-picked with its author kept, plus a prettier fix in a separate commit. Either PR can merge first.Verification
All runs used Foundry 1.9.0 and Node 26.
testprofile: 484 tests passed, including the bytecode check. The only failure before the test: prevent recipient collision in zone fuzz test #1426 commit was the fuzz collision.referenceprofile: 484 passed. Forgeofferersprofile: 39 passed.yarn test: 402 passing, 1 pending.yarn test:ref: 376 passing, 15 pending.yarn lint:checkpasses for prettier and eslint.lib/is now ignored by ESLint, because recursively checked-out submodules contain JS files its parser rejects.Notes for review
secrets.CODECOV_TOKEN. I can't see the repo secrets. If the token is missing, the upload fails without failing the job, as it does today.🤖 Generated with Claude Code