Skip to content

fix(actions): resolve nested actions through getAction - #5495

Merged
jxom merged 1 commit into
mainfrom
fix/nested-action-overrides
Nov 12, 2026
Merged

jxom merged 1 commit into
mainfrom
fix/nested-action-overrides

Conversation

@jxom

@jxom jxom commented Nov 11, 2026

Copy link
Copy Markdown
Member

Replaces #5491 by @mortezashojaei, who is credited as co-author.

deployContract, getDelegation, sendCalls (in the eth_sendTransaction fallback), and signAuthorization called the action they depend on directly. As a result, overriding that action on the client had no effect. They now resolve it through getAction, the same way writeContract, readContract, and sendCallsSync already do.

Changes from #5491:

  • Dropped the getLogs → iterateLogs change. With it, an override of getLogs was no longer applied to each page of a blockRange query, and getLogs and iterateLogs would each resolve the other through the client.
  • Added a regression test (getDelegation with a client getCode override). It fails on main and passes with this change.
  • Added a changeset.

Note: the action found by getAction is the one attached to the client before extend. So overrides of actions further down the chain (for example prepareTransactionRequest under deployContract, or getTransactionCount under signAuthorization) are no longer used by these four actions. writeContract already behaves this way.

deployContract, getDelegation, sendCalls, and signAuthorization now
resolve the action they call through getAction, so overrides of that
action on the client are used.

Co-authored-by: Morteza Shojaei <[email protected]>
Amp-Thread-ID: https://ampcode.com/threads/T-01a1cc30-b235-7259-94bc-81a08c8ea515
Co-authored-by: jxom <[email protected]>
@changeset-bot

changeset-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: d6b5d6e

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 Nov 11, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
viem Error Error Nov 11, 2026 10:03pm UTC

Request Review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 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-11T22:01:54.669847Z d6b5d6e 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

Copy link
Copy Markdown
Contributor

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

pnpm add viem@pr-5495
pnpm add [email protected]

@jxom
jxom enabled auto-merge (squash) November 12, 2026 04:00
@jxom
jxom disabled auto-merge November 12, 2026 04:50
@jxom
jxom merged commit f3fe670 into main Nov 12, 2026
39 of 40 checks passed
@jxom
jxom deleted the fix/nested-action-overrides branch November 12, 2026 04:50
This was referenced Nov 12, 2026

This branch had an error being deployed

1 failed deployment
Preview — d6b5d6e8 Deployed Nov 11, 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