Skip to content

Conversation

@lfportal
Copy link
Contributor

@lfportal lfportal commented Oct 29, 2025

Seaport 1.6 and Immutable Signed Zone V3

  • Adds Seaport 1.6 contract (Immutable fork with zone restrictions)
  • Adds Immutable Signed Zone V3, notable differences compared to V2:

Note

Introduce Seaport 1.6 (Immutable fork) with zone allowlisting and add Immutable Signed Zone v3 with SIP‑7 substandards and 1.6 Zone interface support, plus tooling/CI and tests.

  • Contracts:
    • Add contracts/trading/seaport16/ImmutableSeaport.sol (Seaport 1.6 fork): enforces restricted orders and allowed zone allowlist across fulfill/match flows; emits AllowedZoneSet.
    • Add zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol: SIP‑7 zone with substandards 1,3,4,6,7,8, EIP‑712 signing, authorizeOrder/validateOrder, role-based management (ZoneAccessControl), transfer validator hooks (substandards 7/8).
    • Add adapters: conduit/ConduitController.sol (seaport-core-16), validators (SeaportValidator*, ReadOnlyOrderValidator).
  • Tests:
    • New Seaport 1.6 test suite and integration tests for Signed Zone v3; extensive unit tests for access control, EIP‑712, substandards, and operational flows.
  • Tooling/Config:
    • Hardhat: add @nomicfoundation/hardhat-foundry, compiler 0.8.24 (Cancún), overrides for seaport16; network hardfork set to cancun.
    • CI: install Foundry in publish/test workflows; add Forge steps; dry‑run publish job compiles/builds.
  • Dependencies/Repo:
    • Add seaport-16, seaport-core-16, seaport-types-16, @limitbreak/creator-token-standards; update remappings, foundry.lock, and docs (DEPS.md).
    • Update .gitignore (e.g., cache_hardhat) and lockfiles.

Written by Cursor Bugbot for commit 6bc039f. This will update automatically on new commits. Configure here.

@lfportal lfportal marked this pull request as ready for review November 6, 2025 02:25
@lfportal lfportal requested review from a team as code owners November 6, 2025 02:25
@lfportal lfportal changed the title Seaport 1.6 Seaport 1.6 and Immutable Signed Zone V3 Nov 6, 2025
@lfportal lfportal requested a review from drinkcoffee November 6, 2025 02:41
Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

This PR is being reviewed by Cursor Bugbot

Details

Your team is on the Bugbot Free tier. On this plan, Bugbot will review limited PRs each billing cycle for each member of your team.

To receive Bugbot reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

bytes32 orderHash = zoneParameters.orderHash;

// Revert with an error if the extraData is empty.
if (extraData.length == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest removing this check, and have a new error, InvalidExtraDataLength(string _msg, bytes32 _orderHash, uint256 _length)
The new error could be used in the places where InvalidExtraData is being thrown to indicate invalid length.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

InvalidExtraData is an error defined by the SIP-7 spec, required when extraData is of an unexpected length:

If the extraData component is unable to to be parsed properly due to unexpected size or format, the zone or contract offerer MUST revert with error InvalidExtraData(string reason, bytes32 orderHash).

) external override returns (bytes4 validOrderMagicValue) {
// Put the extraData and orderHash on the stack for cheaper access.
bytes calldata extraData = zoneParameters.extraData;

Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this check so a meaningful error is produced if the length is incorrect.

    // Revert with an error if the extraData does not have valid length.
    if (extraData.length < 93) {
        revert InvalidExtraDataLength("extraData length must be at least 93 bytes", orderHash, extraData.length);
    }

Copy link
Contributor Author

@lfportal lfportal Nov 7, 2025

Choose a reason for hiding this comment

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

The validateOrder function intentionally avoids redundant checks already validated as part of the authorizeOrder function (which is guaranteed to execute before validateOrder during order fulfilment) to reduce overhead.

@lfportal
Copy link
Contributor Author

lfportal commented Nov 7, 2025

Note for discussion: The authorizeOrder and validateOrder functions are assumed to be called together in that order which Seaport will guarantee. The functions are not view or pure (to support SIP-7 substandards 7 and 8 creator token standard callbacks), so they may change state. The functions are also currently not restricted to any particular caller - this was fine for previous versions of this zone which designated validateOrder as view function. Given the assumptions, the functions should be caller restricted to preserve the semantics of the creator token standard. What options do we have to apply restrictions?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants