Skip to content

fix(0.x): port recent viem fixes to Bytes, Hex, Siwe, TypedData, AbiItem, AbiEvent and RpcTransport - #601

Merged
jxom merged 6 commits into
0.xfrom
jxom/port-viem-fixes-2026-11-08-0.x
Nov 8, 2026
Merged

jxom merged 6 commits into
0.xfrom
jxom/port-viem-fixes-2026-11-08-0.x

Conversation

@jxom

@jxom jxom commented Nov 8, 2026 •

Copy link
Copy Markdown
Member

0.x counterpart of #600. It ports wevm/viem#5444, wevm/viem#5440, wevm/viem#5403, wevm/viem#5384, wevm/viem#5428 and wevm/viem#5404. One commit per fix.

RpcTransport.fromHttp(url, { fetchOptions: { headers: new Headers({ Authorization: 'Bearer …' }) } })
// Before: Authorization header not sent
// After:  sent

Differences from #600: 0.x has no AbiEvent.extractLogs, so only assertArgs changes there.

Validation: pnpm check:types and Biome on the changed files pass. Every new test fails without its fix, and the new inline snapshots match main's. The core and tempo-unit projects pass with the Anvil global setup disabled, except tests that need a local Anvil node.

ampagent and others added 6 commits November 8, 2026 20:04
…ytes

Ports wevm/viem#5444. An odd-length value now gets its leading 0 before it is right-padded to size, so 0x1 with size 2 decodes to [1, 0] instead of [16, 0].

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
…Message

Ports wevm/viem#5440. EIP-4361 requires an alphanumeric nonce of at least 8 characters and version 1. Absent fields are still skipped.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
Ports wevm/viem#5403. Payloads such as HyperliquidTransaction:SendAsset failed TypedData.assert. The encoded type and hash are unchanged.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
Ports wevm/viem#5384. Dynamic bytes now matches only hex strings and Uint8Array values, so a plain string selects the string overload instead of throwing AbiItem.AmbiguityError. Hex strings still throw when both overloads match.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
Ports wevm/viem#5428. Integer arguments compare by value, so a number matches a decoded bigint and a bigint matches a small integer decoded as a number. A non-integer number still mismatches.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
Ports wevm/viem#5404. Default and caller headers are merged through Headers into a plain object, so a caller's Content-Type replaces the default whatever its casing, and Headers instances and tuple arrays keep their entries.

Amp-Thread-ID: https://ampcode.com/threads/T-01a1bcb4-18f0-70ab-84d3-47f6d9755544
Co-authored-by: Amp <[email protected]>
Co-authored-by: jxom <[email protected]>
@vercel

vercel Bot commented Nov 8, 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 8, 2026 8:05pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 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-08T20:06:14.757583Z 37ac466 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.

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

Published [email protected] under the pr-601 dist-tag, which follows this pull request until it closes.

pnpm add ox@pr-601
pnpm add [email protected]

@jxom
jxom merged commit 354db45 into 0.x Nov 8, 2026
13 of 14 checks passed
@jxom
jxom deleted the jxom/port-viem-fixes-2026-11-08-0.x branch November 8, 2026 20:10
@github-actions github-actions Bot mentioned this pull request Nov 8, 2026

This branch was successfully deployed

1 active deployment
Preview — 37ac4660 Deployed Nov 8, 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