Repository navigation
fix: port recent viem fixes to TypedData, transaction envelopes, and AbiItem - #560
Conversation
Ports wevm/viem#5308 and wevm/viem#5370. A struct name must contain only letters, digits, `_` and `$`, and must not be a Solidity type. A field type must be a struct in `types` or an EIP-712 atomic or dynamic type, so `uint`, `uint7` and `bytes0` throw the new `TypedData.InvalidTypeError`. Every struct is checked, including structs referenced only as array elements. `findTypeDependencies` strips only the array suffix, so struct names with `$` are encoded. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3nmWgFaNg3t1E6VyYCzXq
Ports wevm/viem#5318 and wevm/viem#5319. `TxEnvelopeEip1559.assert` and `TxEnvelopeTempo.assert` compared fees only when both were truthy, so a zero `maxFeePerGas` skipped the check. `deserialize` for EIP-1559, EIP-4844, EIP-7702, and Tempo envelopes reads an empty `maxFeePerGas` as zero when a tip is set. `TipAboveFeeCapError` and `FeeCapTooHighError` now show zero values. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3nmWgFaNg3t1E6VyYCzXq
Ports wevm/viem#5339. Distinct types that both match an argument, such as `bytes32` and `bytes` or `uint256` and `int256`, and arrays of the same element type with different shapes now throw `AbiItem.AmbiguityError` instead of resolving to the last match. An integer overload matches only a value in its range, and a fixed bytes overload matches only a value of its size. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01D3nmWgFaNg3t1E6VyYCzXq
|
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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 91566d2c16
ℹ️ 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".
|
Published pnpm add ox@pr-560
pnpm add [email protected] |
Ports the viem fixes from the past week that ox did not have yet.
TypedData(fix(typedData): validate struct names invalidateTypedDataviem#5308, fix(typedData): reject invalid field types in validateTypedData viem#5370):TypedData.assertandTypedData.validatenow reject invalid struct names, such asuint7,bytes32orFoo.Bar, and invalid field types, such asuint,uint7,bytes0or an undefined struct. This also covers structs that appear only as array elements. AddsTypedData.InvalidTypeError.maxFeePerGasviem#5319): a tip above a zeromaxFeePerGasnow throwsTransactionEnvelope.TipAboveFeeCapErrorinassertanddeserializefor EIP-1559, EIP-4844, EIP-7702 and Tempo envelopes.AbiItem.fromAbi(fix: treat indistinguishable ABI overloads as ambiguous viem#5339): overloads that the arguments cannot distinguish (bytes32/bytes,uint256/int256,uint256[]/uint256[2]) now throwAbiItem.AmbiguityErrorinstead of resolving to the last match.The other viem changes from this period are viem-only, already in ox, or not applicable here. That includes wevm/viem#5300, #5304 and #5371, and the recovery-side
yParitycheck, whichSignature.assertalready enforces.0.xcounterpart: wevm/oxjxom/vigilant-wozniak-jc79tl-0.x.Validation:
pnpm check:typespasses. The offline suites for each changed module pass. Tests that need anvil did not run in the authoring environment.Generated by Claude Code