feat: Smart contract signature support in SpokePoolPeriphery#1382
feat: Smart contract signature support in SpokePoolPeriphery#1382
Conversation
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0cb8ee83c5
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| bytes32 nonce, | ||
| bytes calldata signature | ||
| ) private { | ||
| if (signature.length == 65) { |
There was a problem hiding this comment.
Dispatch auth overload by signer type, not signature length
The new branch on signature.length == 65 misclassifies smart-contract wallets that produce 65-byte signatures, so depositWithAuthorization/swapAndBridgeWithAuthorization will call the (v,r,s) overload instead of the bytes-signature overload intended for ERC-1271. In that case, contract-owned authorizations can revert on tokens where ERC-1271 validation is only wired through the bytes variant, which breaks the feature this commit adds for a non-trivial class of smart wallets.
Useful? React with 👍 / 👎.
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
|
@codex re-review |
|
@codex re-review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4842085096
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| bytes32 nonce, | ||
| bytes calldata signature | ||
| ) private { | ||
| if (!_isContract(from)) { |
There was a problem hiding this comment.
Preserve v/r/s authorization path for contract signers
Routing by extcodesize(from) forces every contract wallet through the bytes-signature receiveWithAuthorization overload, which regresses compatibility with ERC-3009 tokens that only expose the legacy (v,r,s) selector but still validate ERC-1271 signatures there. Before this change, those tokens could be used with 65-byte contract-wallet signatures; now depositWithAuthorization and swapAndBridgeWithAuthorization will revert for that case because the bytes overload is missing. Choose overload based on signature format (or add a fallback) instead of assuming all contract signers require the new selector.
Useful? React with 👍 / 👎.
Signed-off-by: Faisal Usmani <faisal.of.usmani@gmail.com>
|
@codex review |
|
@claude review |
|
Claude finished @fusmanii's task in 2m 48s —— View job Code Review: Smart contract signature support in SpokePoolPeriphery
This PR adds ERC-1271 / smart contract wallet support to the ERC-3009 authorization flow in Design:
|
| Core routing approach | ✅ Correct — extcodesize > signature length |
| EIP-7702 handling | ✅ Correct and well-guarded |
| Witness-based nonce binding | ✅ Secure replay protection |
| Token compatibility assumption | bytes overload is required for contract wallets |
| Test coverage |
The approach is sound. The main action items are documentation and an additional edge-case test.
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
No description provided.