Skip to content

chore: merge main into v3 - #5007

Merged
jxom merged 11 commits into
v3from
jxom/merge-main-into-v3-2026-08-14
Aug 14, 2026
Merged

jxom merged 11 commits into
v3from
jxom/merge-main-into-v3-2026-08-14

Conversation

@jxom

@jxom jxom commented Aug 14, 2026

Copy link
Copy Markdown
Member

Merges current main into v3, adapting upstream watcher, multicall asset discovery, Tempo encrypted-deposit sender binding, dependency security overrides, and deployment workflow changes to the v3 architecture.

jxom and others added 11 commits August 12, 2026 08:28
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(tempo): bind encrypted deposits to sender

Co-authored-by: Derek Cofausper <[email protected]>

* ci: test sender-bound zone deposits

* ci: align Tempo and Zone fixtures

* test(tempo): routed T10 fixtures through encrypted deposits

* chore: logged local Zone provisioning stall

* chore: ignored unpatched extract-zip advisory

* fix(tempo): defaulted encrypted deposit sender

* ci: skipped Wagmi verification

* chore: remove friction log

---------

Co-authored-by: 0xrusowsky <[email protected]>
Co-authored-by: Derek Cofausper <[email protected]>
Co-authored-by: Steven Truong <[email protected]>
Co-authored-by: jxom <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* fix(siwe): reject unparseable expirationTime and notBefore

Invalid Date values from parseSiweMessage (e.g. Expiration Time: never)
are truthy, so comparisons like `time >= expirationTime` are always
false and lifetime / nbf checks were skipped. Fail closed when either
field is present but not a real date (sibling of thirdweb-dev/js#8875 /
supabase/auth#2688).

* fix(siwe): require EIP-4361 date-time strings and reject invalid time

Validate raw SIWE timestamps against the RFC 3339 profile before Date
coercion, and fail closed when the caller-supplied time is invalid so
lifetime comparisons cannot be skipped.

* fix(siwe): inline date validation

---------

Co-authored-by: jxom <[email protected]>
* fix(simulateCalls): discover assets from simulated logs

* refactor(simulateCalls): align asset discovery with repo conventions

* fix(simulateCalls): pin both asset-tracing passes to one base block

* test(simulateCalls): skip asset tracing on the pinned Anvil

* chore: update accessListHints comment

* fix(simulateCalls): preserve block tags and request errors

* fix(simulateCalls): harden asset trace discovery

* test: use reth for mainnet forks

* test(simulateCalls): run asset tracing against reth

* fix(simulateCalls): align asset trace simulations

* fix(simulateCalls): stabilize asset tracing

* chore: add static call source

* fix(simulateCalls): simplify asset tracing

* fix(simulateCalls): isolate asset balance probes

* fix(simulateCalls): align asset probe callers

* fix(simulateCalls): preserve pending block tag

* fix(simulateCalls): normalize transfer topics

* refactor(simulateCalls): remove redundant asset deduplication

* test(simulateCalls): cover asset tracing edge cases

* docs(simulateCalls): describe pending asset tracing

---------

Co-authored-by: jxom <[email protected]>
…v3-2026-08-14

# Conflicts:
#	.github/workflows/changesets.yml
#	.github/workflows/deploy-docs.yml
#	.github/workflows/verify.yml
#	package.json
#	pnpm-lock.yaml
#	pnpm-workspace.yaml
#	site/pages/docs/actions/public/simulateCalls.md
#	site/pages/docs/actions/public/watchBlocks.md
#	site/pages/tempo/actions/zone.encryptedDeposit.mdx
#	site/vocs.config.ts
#	src/CHANGELOG.md
#	src/actions/index.test.ts
#	src/actions/index.ts
#	src/actions/public/simulateCalls.test.ts
#	src/actions/public/simulateCalls.ts
#	src/clients/createClient.test.ts
#	src/clients/createPublicClient.test.ts
#	src/clients/createTestClient.test.ts
#	src/clients/createWalletClient.test.ts
#	src/clients/decorators/public.test.ts
#	src/clients/decorators/public.ts
#	src/errors/version.ts
#	src/index.ts
#	src/package.json
#	src/tempo/actions/zone.test-d.ts
#	src/tempo/actions/zone.test.ts
#	src/tempo/actions/zone.ts
#	src/tempo/e2e.test.ts
#	src/utils/siwe/parseSiweMessage.test.ts
#	src/utils/siwe/parseSiweMessage.ts
#	src/utils/siwe/validateSiweMessage.test.ts
#	src/utils/siwe/validateSiweMessage.ts
#	test/src/anvil.ts
@changeset-bot

changeset-bot Bot commented Aug 14, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6762204

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
viem Patch

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

@vercel

vercel Bot commented Aug 14, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
viem Building Building Preview Aug 14, 2026 5:47am

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Aug 14, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/viem@5007

commit: 6762204

@jxom jxom changed the title merge main into v3 chore: merge main into v3 Aug 14, 2026
@jxom
jxom marked this pull request as ready for review August 14, 2026 05:50
@jxom
jxom merged commit a4058d9 into v3 Aug 14, 2026
32 of 40 checks passed
@jxom
jxom deleted the jxom/merge-main-into-v3-2026-08-14 branch August 14, 2026 05:50
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
import * from 'viem' (esm) 90.24 KB (+1.14% 🔺) 1.9 s (+1.14% 🔺) 2.7 s (-7.39% 🔽) 4.5 s
import { Actions } from 'viem' 72.37 KB (+1.42% 🔺) 1.5 s (+1.42% 🔺) 3 s (+23.41% 🔺) 4.5 s
import { Client } from 'viem' 20.35 KB (0%) 408 ms (0%) 849 ms (-19.23% 🔽) 1.3 s
import * from 'viem/chains' 85.04 KB (0%) 1.8 s (0%) 3 s (-6.66% 🔽) 4.7 s
import { mainnet } from 'viem/chains' 801 B (0%) 16 ms (0%) 47 ms (+585.17% 🔺) 62 ms
import * from 'viem/erc4337' 67.92 KB (0%) 1.4 s (0%) 3.8 s (-24.17% 🔽) 5.2 s
import * from 'viem/node' 6.79 KB (0%) 136 ms (0%) 124 ms (+277.3% 🔺) 259 ms
import * from 'viem/op-stack' 61.43 KB (+1.01% 🔺) 1.3 s (+1.01% 🔺) 3 s (+17.51% 🔺) 4.2 s
import * from 'viem/tempo' 129.9 KB (+0.86% 🔺) 2.6 s (+0.86% 🔺) 2.4 s (-63.63% 🔽) 5 s
import * from 'viem/tokens' 3.88 KB (0%) 78 ms (0%) 267 ms (+292.66% 🔺) 345 ms
import * from 'viem/utils' 157.55 KB (0%) 3.2 s (0%) 2.4 s (-48.36% 🔽) 5.5 s
import * from 'viem/wasm' 94.91 KB (0%) 1.9 s (0%) 386 ms (+3033.46% 🔺) 2.3 s
import * from 'viem/window' 81 B (0%) 10 ms (0%) 171 ms (+2798.53% 🔺) 181 ms
import * from 'viem/zod' 86.41 KB (0%) 1.8 s (0%) 5.6 s (+6.71% 🔺) 7.3 s

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 67622044d5

ℹ️ 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".

Comment on lines +57 to +58
const staticCallCode =
'0x608060405234801561000f575f5ffd5b5060043610610029575f3560e01c8063fd00430c1461002d575b5f5ffd5b6100476004803603810190610042919061012b565b610049565b005b80825f375f5f825f865afa610060573d5f5f3e3d5ffd5b3d5f5f3e3d5ff35b5f5ffd5b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61009982610070565b9050919050565b6100a98161008f565b81146100b3575f5ffd5b50565b5f813590506100c4816100a0565b92915050565b5f5ffd5b5f5ffd5b5f5ffd5b5f5f83601f8401126100eb576100ea6100ca565b5b8235905067ffffffffffffffff811115610108576101076100ce565b5b602083019150836001820283011115610124576101236100d2565b5b9250929050565b5f5f5f6040848603121561014257610141610068565b5b5f61014f868287016100b6565b935050602084013567ffffffffffffffff8111156101705761016f61006c565b5b61017c868287016100d6565b9250925050925092509256fea2646970667358221220635ed99185cacf3f2acba6921f23687c969cec2bbaf5f9ad599f507e6e105e6964736f6c63430008230033'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Compile the helper for pre-Shanghai forks

When traceAssetChanges targets a pre-Shanghai block or a chain without EIP-3855, this injected runtime contains 0x5f (PUSH0) opcodes, which are invalid under that fork. The static token balance and metadata probes consequently fail, causing ERC-20/ERC-721 changes to be silently omitted from assetChanges; compile the helper for a pre-Shanghai EVM target or otherwise use compatible bytecode.

Useful? React with 👍 / 👎.

: stateOverride,
...(address ? { to: staticCallAddress } : {}),
...(typeof blockNumber === 'bigint' ? { blockNumber } : { blockTag }),
} as never)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Remove the forbidden as never assertion

Casting this entire call-options object to never suppresses checking of the newly constructed state and block options, so future field mismatches can pass unnoticed. The block-number/block-tag discriminant is already available here and should be threaded into a properly typed call.Options value instead of bypassing the type system.

AGENTS.md reference: AGENTS.md:L80-L81

Useful? React with 👍 / 👎.

Comment on lines +218 to +220
const mock = Client.create({
transport: custom({
async request({ method, params }: { method: string; params: unknown }) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Exercise asset discovery against a real test chain

This test replaces the node with a custom fake client whose hard-coded RPC responses cannot validate actual eth_simulateV1, state-override, or fork-specific execution semantics. Rework it against the configured test chain or a real ephemeral server, as the repository explicitly prohibits fake clients and requires tests to exercise real behavior.

AGENTS.md reference: AGENTS.md:L206-L209

Useful? React with 👍 / 👎.

Comment on lines +232 to +233
export declare namespace watchHeaders {
type BlockHeader<chain extends Chain.Chain | undefined = undefined> = Omit<

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Document every exported watcher type

The new public namespace exports BlockHeader, callback types, Emitted, Watcher, ReturnType, and ErrorType without TSDoc on the declarations. Add concise TSDoc for each exported type so the public API satisfies the repository's documentation requirement and produces useful generated API documentation.

AGENTS.md reference: AGENTS.md:L174-L176

Useful? React with 👍 / 👎.

Comment on lines +241 to +244
if (blockTag_ === 'latest')
baseBlockNumber = await getNumber(client, { cacheTime: 0 })
else {
const block = await get(client, { blockTag: blockTag_ })

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Thread request options through block resolution

When traceAssetChanges resolves latest, safe, or finalized, these auxiliary block requests omit the supplied requestOptions. In particular, an already-aborted signal cannot cancel a slow block-number/block lookup, and caller-selected retry behavior differs from all subsequent simulation and balance requests; pass the options through these resolution requests as well.

Useful? React with 👍 / 👎.

"viem": patch
---

Fixed `multicall` asset discovery across reverting, state-dependent, malformed, and newly deployed tokens while pinning stable block tags and isolating balance probes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Include all public changes in the changeset

This changeset only records the multicall fix, while the same commit also adds the public Actions.block.watchHeaders API and changes prepared encrypted-deposit payloads to include sender-bound encryption. Those user-visible additions and behavioral changes will therefore be absent from release notes; add or update changesets for them as required for public behavior changes.

AGENTS.md reference: AGENTS.md:L300-L304

Useful? React with 👍 / 👎.

Comment on lines +99 to +102
const blockHeader = (
fromRpc ? fromRpc(rpc) : Block.fromRpc(rpc)
) as Header & Record<string, unknown>
for (const field of fullBlockFields) delete blockHeader[field]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Route header decode failures to onError

If a subscription returns a malformed header or a chain-specific fromRpc codec throws, that exception occurs later inside the onData callback and is not caught by the surrounding asynchronous try block. It escapes through the socket dispatcher instead of reaching the watcher's registered error listeners, potentially leaving consumers waiting indefinitely; catch conversion and listener-preparation failures inside this callback and emit them through onError.

Useful? React with 👍 / 👎.

This branch had an error being deployed

1 failed deployment
Preview — 67622044 Deployed Aug 14, 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.

4 participants