Repository navigation
fix: left-pad odd-length hex in encodeAbiParameters and encodePacked bytes - #5466
Merged
Merged
Conversation
🦋 Changeset detectedLatest commit: 3f36374 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ✅ CompletedThis 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. |
Contributor
|
Published pnpm add viem@pr-5466
pnpm add [email protected] |
jxom
force-pushed
the
fix/odd-hex-encode-bytes
branch
from
November 11, 2026 03:57
ba391e4 to
775cd24
Compare
jxom
force-pushed
the
fix/odd-hex-encode-bytes
branch
from
November 11, 2026 04:16
3749a2a to
3f36374
Compare
Merged
jxom
added a commit
to wevm/ox
that referenced
this pull request
Nov 15, 2026
…encodePacked` (#683) * fix: return false from the ERC-6492 validator when ecrecover yields the zero address Ports wevm/viem#5468. ecrecover returns the zero address for a malformed signature, so the deployless validator accepted any such signature for the zero address. The bytecode is rebuilt from the updated UniversalSigValidator.sol with solc 0.8.26, 200 optimizer runs, the paris EVM version, and no metadata, which reproduces the previous constant from the previous source. Amp-Thread-ID: https://ampcode.com/threads/T-01a1ddd3-d469-72eb-a88c-673c40859557 Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]> * fix: reject odd-length hex for bytes in AbiParameters.encodePacked Ports the encodePacked half of wevm/viem#5466. An odd-length bytes value was concatenated as is, shifting every later value by a nibble. It now throws Hex.InvalidLengthError, matching AbiParameters.encode since #617; viem left-pads instead. Amp-Thread-ID: https://ampcode.com/threads/T-01a1ddd3-d469-72eb-a88c-673c40859557 Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]> --------- Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]>
jxom
added a commit
to wevm/ox
that referenced
this pull request
Nov 15, 2026
…s.encodePacked` and `Address.checksum` (#684) * fix: return false from the ERC-6492 validator when ecrecover yields the zero address Ports wevm/viem#5468. ecrecover returns the zero address for a malformed signature, so the deployless validator accepted any such signature for the zero address. The bytecode is rebuilt from the updated UniversalSigValidator.sol with solc 0.8.26, 200 optimizer runs, the paris EVM version, and no metadata, which reproduces the previous constant from the previous source. Amp-Thread-ID: https://ampcode.com/threads/T-01a1ddd3-d469-72eb-a88c-673c40859557 Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]> * fix: reject odd-length hex for bytes in AbiParameters.encodePacked Ports the encodePacked half of wevm/viem#5466. An odd-length bytes value was concatenated as is, shifting every later value by a nibble. It now throws Hex.InvalidLengthError, matching AbiParameters.encode since #617; viem left-pads instead. Amp-Thread-ID: https://ampcode.com/threads/T-01a1ddd3-d469-72eb-a88c-673c40859557 Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]> * perf: share the Address.checksum result across address casings Ports wevm/viem#5514. The checksum depends only on the lowercase address, so a result computed for one casing is reused for the others instead of hashing again. main already does this. Amp-Thread-ID: https://ampcode.com/threads/T-01a1ddd3-d469-72eb-a88c-673c40859557 Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]> --------- Co-authored-by: Amp <[email protected]> Co-authored-by: jxom <[email protected]>
This was referenced Nov 21, 2026
This was referenced Nov 21, 2026
This branch had an error being deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
encodeAbiParametersnow left-pads odd-length hexbytesandbytesNvalues to whole bytes before sizing and padding, matchinghexToBytes. For example,0xabcasbytes2now encodes as0x0abc….encodePackedapplies the same rule to dynamicbytesvalues.