-
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 Edit: Added caller ( |
Seaport 1.6 and Immutable Signed Zone V3
authorizeOrderfunction)Note
Introduces Immutable Seaport 1.6 with zone allowlisting and a new Immutable Signed Zone V3 (SIP‑7 substandards 1,3,4,6,7,8), plus comprehensive tests and CI/tooling updates.
contracts/trading/seaport16/ImmutableSeaport.solenforcing restricted-order fulfillment andallowedZonesallowlist across all fulfillment/match paths.seaport16/conduit/ConduitController.soland validator facades underseaport16/validators/*.seaport16/zones/immutable-signed-zone/v3/ImmutableSignedZoneV3.solimplementing SIP‑7 (withauthorizeOrderandvalidateOrder), EIP‑712 signing, access control, and substandards1, 3, 4, 6, 7, 8.seaport16, integrate@nomicfoundation/hardhat-foundry.forge installin publish/test workflows.Written by Cursor Bugbot for commit 4239203. This will update automatically on new commits. Configure here.