Skip to content

fix(0.x): port recent viem fixes to SignatureErc6492, AbiParameters.encodePacked and Address.checksum - #684

Merged
jxom merged 3 commits into
0.xfrom
jxom/port-viem-fixes-2026-11-15-0.x
Nov 15, 2026
Merged

jxom merged 3 commits into
0.xfrom
jxom/port-viem-fixes-2026-11-15-0.x

Conversation

@jxom

@jxom jxom commented Nov 15, 2026

Copy link
Copy Markdown
Member

0.x counterpart of #683. One commit per fix.

Differences from #683

The Address.checksum commit is 0.x only. Like main, it checks the caller's exact string first, validates the address, and then looks up the lowercase key, so 0X-prefixed and other invalid inputs still throw.

Validation

The tests match #683, and both new tests fail with the source changes reverted. A scratch check of 2,000 random addresses in uppercase, lowercase, and checksummed casings matched the previous checksum output. It also showed that one casing caches the lowercase key, and that 0X… still throws. pnpm check:types and biome check pass. Full core run: 2,609 passed; the 3 failures are the same Anvil behavior: network transaction tests (TransactionEnvelopeEip1559, Eip4844, Eip7702).

ampagent and others added 3 commits November 15, 2026 06:26
…he 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]>
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]>
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]>
@vercel

vercel Bot commented Nov 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
ox Building Building Preview Nov 15, 2026 6:32am UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-15T06:33:08.290459Z 30f0237 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@jxom
jxom merged commit 0911585 into 0.x Nov 15, 2026
13 of 14 checks passed
@jxom
jxom deleted the jxom/port-viem-fixes-2026-11-15-0.x branch November 15, 2026 06:35
@github-actions github-actions Bot mentioned this pull request Nov 15, 2026

This branch was successfully deployed

1 active deployment
Preview — 30f02373 Deployed Nov 15, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants