-
Notifications
You must be signed in to change notification settings - Fork 44
Seaport 1.6 and Immutable Signed Zone V3 #285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…fter hook context
There was a problem hiding this 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.
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Show resolved
Hide resolved
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Show resolved
Hide resolved
| bytes32 orderHash = zoneParameters.orderHash; | ||
|
|
||
| // Revert with an error if the extraData is empty. | ||
| if (extraData.length == 0) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
extraDatacomponent is unable to to be parsed properly due to unexpected size or format, the zone or contract offerer MUST revert witherror InvalidExtraData(string reason, bytes32 orderHash).
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Outdated
Show resolved
Hide resolved
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Outdated
Show resolved
Hide resolved
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Outdated
Show resolved
Hide resolved
| ) external override returns (bytes4 validOrderMagicValue) { | ||
| // Put the extraData and orderHash on the stack for cheaper access. | ||
| bytes calldata extraData = zoneParameters.extraData; | ||
|
|
There was a problem hiding this comment.
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);
}
There was a problem hiding this comment.
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.
contracts/trading/seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol
Show resolved
Hide resolved
|
Note for discussion: The |
Seaport 1.6 and Immutable Signed Zone V3
authorizeOrderfunction)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/trading/seaport16/ImmutableSeaport.sol(Seaport 1.6 fork): enforces restricted orders and allowed zone allowlist across fulfill/match flows; emitsAllowedZoneSet.zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.sol: SIP‑7 zone with substandards1,3,4,6,7,8, EIP‑712 signing,authorizeOrder/validateOrder, role-based management (ZoneAccessControl), transfer validator hooks (substandards 7/8).conduit/ConduitController.sol(seaport-core-16), validators (SeaportValidator*,ReadOnlyOrderValidator).@nomicfoundation/hardhat-foundry, compiler0.8.24(Cancún), overrides for seaport16; network hardfork set tocancun.seaport-16,seaport-core-16,seaport-types-16,@limitbreak/creator-token-standards; update remappings,foundry.lock, and docs (DEPS.md)..gitignore(e.g.,cache_hardhat) and lockfiles.Written by Cursor Bugbot for commit 6bc039f. This will update automatically on new commits. Configure here.