Repository navigation
build: compile Seaport from seaport-core instead of the seaport repo - #1079
Merged
Merged
Conversation
The seaport git dependency (pinned to 0801339) only supplied Seaport, the conduit contracts, and ZoneInterface, all of which come from seaport-core 1.6.6 and seaport-types 1.6.3: the exact source verified for the deployed Seaport 1.6. Depending on them directly drops 233 packages that the seaport repo's own package.json pulled in, and keeps seaport-js working as the seaport repo moves off npm. LocalConduitController was an empty wrapper around seaport-core's ConduitController, so tests use ConduitController directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the migration to published seaport-core and seaport-types dependencies.
No open issues 🎉
What changed in this PR
This PR switches seaport-js contract compilation from the Seaport Git dependency to published seaport-core and seaport-types packages, reducing build dependencies while preserving the SDK’s public exports.
Changes:
- Pins
seaport-coreandseaport-typesdirectly and removes dependencies pulled in by the Seaport repository. - Updates Solidity imports, Hardhat compilation targets, and generated TypeChain import paths.
- Updates test fixtures and conduit tests to use
ConduitControllerdirectly.
| File | Description |
|---|---|
test/utils/setup.ts |
Deploys Seaport and ConduitController from core artifacts. |
test/create-bulk-orders.spec.ts |
Uses the ConduitController factory for bulk-order tests. |
test/conduit.spec.ts |
Uses the ConduitController factory for conduit tests. |
src/utils/fulfill.ts |
Updates generated Seaport type imports. |
src/types.ts |
Updates the underlying SeaportContract type import. |
src/contracts/test/TestExtraDataZone.sol |
Imports ZoneInterface from seaport-types. |
src/contracts/Seaport.sol |
Imports Seaport from seaport-core. |
src/contracts/ConduitController.sol |
Imports ConduitController from seaport-core. |
src/contracts/Conduit.sol |
Imports Conduit from seaport-core. |
package.json |
Replaces the Git dependency with exact package pins. |
package-lock.json |
Records direct dependencies and removes unused transitive packages. |
hardhat.config.ts |
Targets seaport-core contracts for compilation. |
Review effort: Balanced
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
seaport-js installs the whole seaport repo as a git npm dependency (pinned to
0801339) for three Solidity files and one interface. The seaport repo is moving off npm (modernization series), and npm git dependencies need apackage.json, so the pin could never move forward after that. The git dependency also pulled in the seaport repo's own dependencies.Solution
Compile Seaport from the packages the seaport repo itself builds from:
seaport-core1.6.6 andseaport-types1.6.3, pinned exactly. They are the source verified onchain for the deployed Seaport 1.6, and they're what the pinned seaport commit compiled anyway: itsSeaport.soland conduit files are thin wrappers that import from seaport-core 1.6.6.npmFilesToBuildand the threesrc/contractswrappers now point at seaport-core, andTestExtraDataZoneimportsZoneInterfacefrom seaport-types.LocalConduitControllerwas an empty wrapper around seaport-core'sConduitController, so the tests now useConduitControllerdirectly.typechain-types/seaport/contracts/Seaporttotypechain-types/seaport-core/src/Seaport. The public exports (Seaport,ItemType,getMaximumSizeForOrder) don't change.The lockfile drops 233 packages, including ethers v5 and ethereumjs, that came in only through the seaport repo's
package.json. Nothing is added.Verification
npm run build(Hardhat compile, typechain, tsc)npm run lint: typecheck and Biome pass. The 3 Biome warnings were already there, in files this PR doesn't touch.npm test: 309 passing, the same asmain🤖 Generated with Claude Code