Skip to content

Modernize toolchain, fix npm dependencies, and pass tests on Foundry 1.9.0 - #10

Merged
ryanio merged 8 commits into
mainfrom
ryan/modernize-toolchain
Nov 10, 2026
Merged

ryanio merged 8 commits into
mainfrom
ryan/modernize-toolchain

Conversation

@ryanio

@ryanio ryanio commented Nov 10, 2026 •

Copy link
Copy Markdown
Collaborator

Brings seaport-sol onto the toolchain ProjectOpenSea/seaport adopted in ProjectOpenSea/seaport#1427 through ProjectOpenSea/seaport#1431, fixes the npm dependency metadata, and gets the build and tests passing on Foundry 1.9.0.

Before this PR, forge test on Foundry 1.9.0 ran 64 tests with 12 failures. After it, all 64 pass.

Commits

  1. Submodules and build fixes. forge-std moves from v1.5.6 to v1.17.0, seaport-core from 1.6.0-rc to v1.6.6, and seaport-types from 1.6.0-rc1 to v1.6.3. Those are the release tag commits, and the same ones seaport pins. ds-test is dropped because nothing imports it since forge-std 1.8. remappings.txt is removed: it pointed at a lib/seaport checkout that doesn't exist, and foundry.toml now carries the forge-std remapping. BaseTest's own assertEq(bytes32[], bytes32[]) clashed with forge-std's, so it's gone. The 12 testRetrieveNonexistentDefault failures came from expectRevert on internal library calls, which Foundry 1.0 rejects by default; allow_internal_expect_revert turns that back on.
  2. package.json depended on seaport-core and seaport-types 0.0.1. It now depends on 1.6.6 and 1.6.3, matching the submodules. yarn.lock is regenerated. version stays 1.6.0.
  3. foundry.toml gets seaport's [fmt] settings and a [lint] section. Four lints are excluded because they only matter for deployed contracts: block-timestamp, calls-loop, require-revert-in-loop, and uninitialized-local.
  4. forge fmt over src/ and test/. Whitespace and line wrapping only (checked by comparing each file with all whitespace stripped), so review it with whitespace hidden.
  5. Inline forge-lint disables for 14 intentional findings: truncating casts that pack MatchComponent, rounding to a multiple of the denominator in AmountDeriverHelper, and an ignored getOrderStatus return value.
  6. The pinned lint tooling from seaport: scripts/install-tools.sh (Biome, taplo, lefthook, shellcheck, shfmt, actionlint from GitHub releases, each checked by SHA-256), scripts/lint.sh, lefthook.yml, biome.json, .taplo.toml, and .editorconfig. .gitignore loses its catch-all .*, which hid every new dotfile.
  7. CI. Every action is pinned by commit SHA. test.yml now runs on pushes to main and on pull requests, not only by hand, with build, test, and lint jobs on Foundry v1.9.0 through a cached setup-foundry action. It drops --sizes, since helm and MatchFulfillmentHelper exceed EIP-170 and nothing here is deployed. publish.yml keeps its trigger and NPM_TOKEN, uses Node 26 LTS from .nvmrc, and runs npm publish --provenance --access public with id-token: write. package.json's repository is spelled out in the form provenance checks. tag.yml keeps its triggers, drops the deprecated set-output, and force-pushes only the new tag.
  8. AGENTS.md and a shorter README with install steps for Foundry and npm.

Consumers

seaport pins lib/seaport-sol at 7b480ce, so this PR doesn't affect it. The src/ changes are whitespace and comments, so a later pin bump sees the same API.

Not changed

The npm package ships only src/, LICENSE, README.md, and package.json (52 files). files lists node_modules, which npm never packs, so the entry does nothing. Some helpers import solady and helm.sol imports forge-std, and neither is an npm dependency, so npm users need their own copies. The README says so. Both are left for a separate change.

Verification

With Foundry 1.9.0: forge build, forge test (64 passed), and scripts/lint.sh check are clean locally. The README's usage snippet compiles.

🤖 Generated with Claude Code

ryanio and others added 8 commits November 10, 2026 10:59
- forge-std v1.5.6 -> v1.17.0, seaport-core 1.6.0-rc -> v1.6.6,
  seaport-types 1.6.0-rc1 -> v1.6.3 (the same commits seaport pins)
- drop ds-test (unused since forge-std 1.8) and the stale remappings.txt,
  which pointed at a lib/seaport checkout that doesn't exist
- drop BaseTest's assertEq(bytes32[], bytes32[]), now in forge-std
- allow_internal_expect_revert for the testRetrieveNonexistentDefault tests

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
seaport-core 1.6.6 and seaport-types 1.6.3 replace the 0.0.1 placeholders.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fmt settings match seaport's. lint excludes four lints that only matter
for deployed contracts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Whitespace and line wrapping only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Truncating casts that pack MatchComponent, AmountDeriverHelper's rounding
to a multiple of the denominator, and an ignored getOrderStatus value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
install-tools.sh fetches Biome, taplo, lefthook, shellcheck, shfmt, and
actionlint from GitHub releases, checked by SHA-256, into .tools/bin.
lint.sh runs what CI runs. .gitignore drops its catch-all `.*`, which hid
every new dotfile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- actions pinned by commit SHA, Foundry v1.9.0 through a cached
  setup-foundry action, least-privilege permissions, concurrency
- test.yml runs on push and PR: build, test, and lint
- publish.yml: Node from .nvmrc (26 LTS), npm publish --provenance
- tag.yml: drop deprecated set-output, push only the new tag
- package.json repository in the form npm provenance checks

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ryanio
ryanio requested a balanced review from Copilot November 10, 2026 19:04
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedseaport-core@​0.0.1 ⏵ 1.6.654 +110047 +1180100
Updatedseaport-types@​0.0.1 ⏵ 1.6.355 -310048 +1080100

View full report

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Copilot couldn't confirm that repository approval criteria were applied to this review.

No open issues 🎉

What changed in this PR

Modernizes the development and release tooling for seaport-sol’s Foundry helpers, aligns npm dependencies with the Seaport 1.6 releases, and addresses Foundry 1.9.0 test compatibility without changing the source API.

Changes:

  • Updates dependency metadata, removes obsolete remappings, and resolves assertion and internal-revert compatibility issues.
  • Adds pinned lint tools, formatting configuration, automated CI checks, and provenance-enabled npm publishing.
  • Reformats Solidity sources and tests, adds targeted lint-suppression comments, and documents installation and development workflows.
File Description
yarn.lock Locks matching Seaport core and types releases.
test/​lib/​SpentItemLib.t.sol Reformats existing tests.
test/​lib/​ReceivedItemLib.t.sol Reformats existing tests.
test/​lib/​OrderParametersLib.t.sol Reformats existing tests.
test/​lib/​OrderLib.t.sol Reformats existing tests.
test/​lib/​OrderComponentsLib.t.sol Reformats existing tests.
test/​lib/​OfferItemLib.t.sol Reformats existing tests.
test/​lib/​FulfillmentLib.t.sol Reformats existing tests.
test/​lib/​FulfillmentComponentLib.t.sol Reformats existing tests.
test/​lib/​ExecutionsLib.t.sol Reformats existing tests.
test/​lib/​CriteriaResolverLib.t.sol Reformats existing tests.
test/​lib/​ConsiderationItemLib.t.sol Reformats existing tests.
test/​lib/​BasicOrderParametersLib.t.sol Reformats existing tests.
test/​lib/​AdvancedOrderLib.t.sol Reformats existing tests.
test/​lib/​AdditionalRecipientLib.t.sol Reformats existing tests.
test/​BaseTest.sol Removes the conflicting array assertion and reformats helpers.
src/​SpaceEnums.sol Removes extra blank lines.
src/​SeaportSol.sol Reformats re-export imports.
src/​SeaportInterface.sol Reformats the interface import.
src/​README.md Cleans up Markdown spacing.
src/​lib/​ZoneParametersLib.sol Reformats code and documents an intentional ignored return value.
src/​lib/​types/​MatchComponentType.sol Reformats struct construction.
src/​lib/​StructCopier.sol Reformats assignments and declarations.
src/​lib/​SeaportEnumsLib.sol Reformats assembly expressions.
src/​lib/​OrderParametersLib.sol Reformats declarations and assembly.
src/​lib/​OrderLib.sol Reformats order helpers.
src/​lib/​OrderComponentsLib.sol Reformats declarations and assignments.
src/​lib/​FulfillmentLib.sol Reformats a chained call.
src/​lib/​FulfillmentComponentLib.sol Reformats imports and storage declarations.
src/​lib/​fulfillment/​AmountDeriverHelper.sol Documents and suppresses intentional rounding warnings.
src/​lib/​CriteriaResolverLib.sol Reformats imports and mapping declarations.
src/​lib/​ConsiderationItemLib.sol Reformats mapping declarations.
src/​lib/​BasicOrderParametersLib.sol Reformats struct and mapping declarations.
src/​lib/​AdvancedOrderLib.sol Reformats advanced-order helpers.
src/​lib/​AdditionalRecipientLib.sol Reformats imports and storage declarations.
src/​helm.sol Reformats logging function signatures.
src/​fulfillments/​match/​MatchFulfillmentLib.sol Reformats matching logic without functional changes.
src/​fulfillments/​match/​MatchFulfillmentLayout.sol Reformats nested mapping declarations.
src/​fulfillments/​match/​MatchFulfillmentHelper.sol Reformats helpers and adds cast-warning suppressions.
src/​fulfillments/​lib/​Structs.sol Reformats storage mappings.
src/​fulfillments/​lib/​MatchArrays.sol Reformats assembly calls.
src/​fulfillments/​lib/​FulfillmentLib.sol Reformats fulfillment builders and adds cast-warning suppressions.
src/​fulfillments/​available/​FulfillAvailableLayout.sol Reformats mapping access and declarations.
src/​fulfillments/​available/​FulfillAvailableHelper.sol Reformats fulfillment helpers.
src/​executions/​FulfillmentComponentSortLib.sol Reformats a function-type declaration.
src/​executions/​ExecutionHelper.sol Reformats execution helpers.
src/​ContractOffererInterface.sol Reformats the interface import.
src/​ConduitInterface.sol Reformats the interface import.
src/​ConduitControllerInterface.sol Reformats the interface import.
scripts/​lint.sh Adds unified local check and formatting commands.
scripts/​install-tools.sh Installs pinned tools with checksum verification.
remappings.txt Removes obsolete remappings.
README.md Documents installation, usage, and development requirements.
package.json Corrects dependencies and repository metadata for provenance.
lefthook.yml Adds staged-file formatting hooks.
foundry.toml Enables internal revert expectations and configures formatting and linting.
biome.json Configures formatting, linting, and exclusions.
AGENTS.md Documents repository conventions and contributor commands.
.taplo.toml Configures TOML formatting.
.nvmrc Selects Node 26 for publishing.
.gitmodules Removes the unused ds-test submodule declaration.
.gitignore Replaces the blanket dotfile exclusion with specific ignores.
.github/​workflows/​test.yml Automates pinned Foundry build, test, and lint jobs.
.github/​workflows/​tag.yml Modernizes tagging and limits force-pushes to the target tag.
.github/​workflows/​publish.yml Updates Node setup and enables npm provenance.
.github/​pull_request_template.md Adds contribution and PR-description guidance.
.github/​actions/​setup-foundry/​action.yml Adds reusable cached Foundry installation.
.editorconfig Defines shared whitespace and indentation settings.

Review effort: Balanced

@ryanio
ryanio merged commit 43e7d03 into main Nov 10, 2026
5 checks passed
@ryanio
ryanio deleted the ryan/modernize-toolchain branch November 10, 2026 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants