Repository navigation
fix: port recent viem fixes to Siwe and Authorization - #530
Conversation
Ports wevm/viem#5299. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
…ion` Ports wevm/viem#5304. EIP-7702 permits any `y_parity` below 2**8 in an authorization tuple. `Authorization.fromRpc`, `Authorization.fromTuple`, and `Authorization.toTuple` now read and encode it as is, and the zod `Authorization` schemas accept an 8-bit `yParity`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a613dfa737
ℹ️ 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".
…Rpc` and `Authorization.fromTuple` Both now reject a `yParity` of 2**8 or more, which EIP-7702 forbids, with the same `Hex.IntegerOutOfRangeError` as `Authorization.toTuple`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
The top-level domain alternation is non-capturing, so the capture groups of the exported regex stay as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
|
Update: Vercel deployed The
The Vercel build logs need access to the Vercel project, which I don't have, so the cause of the earlier failures is unknown. Generated by Claude Code |
`Authorization.toRpc` now rejects a `yParity` of 2**8 or more with the same `Hex.IntegerOutOfRangeError` as the other `Authorization` codecs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5312346329
ℹ️ 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".
`Authorization.toTuple` encoded a `NaN` `yParity` as the zero parity. It now rejects any `yParity` that is not an integer from 0 to 255, like the other `Authorization` codecs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM
Ports the viem
mainfixes of the past day (wevm/viem#5298 to wevm/viem#5304) that apply to Ox. #531 backports the same changes to0.x.Siwe.createMessageaccepts a punycode top-level domain, such asexample.xn--p1ai, and rejects a top-level domain label longer than 63 characters. Same regex as viem, except that the new alternation is non-capturing, so the port stays in group 3 of the exportedSiwe.domainRegex.y_paritybelow 2**8.Authorization.fromRpc,Authorization.fromTuple, andAuthorization.toTuplethrewSignature.InvalidYParityErrorfor ayParityabove 1, soTxEnvelopeEip7702.deserialize,serialize, andhash, andTransaction.fromRpc, failed on valid mainnet transactions. They now read and encodeyParityas is. These three andAuthorization.toRpcreject a value above 255 withHex.IntegerOutOfRangeError.randskeep their validation.Needs a reviewer's attention: the zod
Authorizationschemas (Signed,SignedToRpc,TupleSigned) now accept an 8-bityParityinstead of only 0 or 1, so they stay consistent with the core codecs. Their rejection tests now use0x100. The zodSignatureschemas still accept only 0 or 1. Ox also decodes these tuples, which viem'sparseTransactionstill rejects.Not ported:
errorkeyword innormalizeSignatureviem#5300 (errorkeyword innormalizeSignature): Ox already strips it.OutOfFundsnode errors toInsufficientFundsErrorviem#5303 (OutOfFundstoInsufficientFundsError): Ox has no node error mapping.sendCallsdataSuffix), fix(op-stack): wait for the dispute game in getTimeToFinalize viem#5298, and fix(op-stack): use the withdrawal's L2 timestamp for super-root games viem#5302 (OP Stack): viem actions only.Validation:
pnpm check:typesandvp checkon the changed files pass. Thecoreproject passes withSKIP_GLOBAL_SETUP=1, except tests that need a local Anvil node and fail the same way onmainwithout these changes. The new tests fail without the fixes.🤖 Generated with Claude Code
https://claude.ai/code/session_01VLjvB9RWejr3jdFDh3WjiM