Repository navigation
fix: map OutOfFunds node errors to InsufficientFundsError - #5303
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FhL2ZU1f8edFyQXTZ33uq5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 4896e0b 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 |
Codex Review SummaryThis 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. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0ce1addddd
ℹ️ 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".
… phases Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FhL2ZU1f8edFyQXTZ33uq5
commit: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 4896e0b1aa
ℹ️ 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".
| encodeFunctionResult, | ||
| type Hex, | ||
| http, | ||
| InsufficientFundsError, |
There was a problem hiding this comment.
Import the error through the package alias
Import InsufficientFundsError from 'viem' instead of adding it to the relative ../../index.js import. Public-surface tests are required to use package aliases rather than relative imports, which keeps this assertion aligned with the consumer-facing module resolution path.
AGENTS.md reference: AGENTS.md:L186-L188
Useful? React with 👍 / 👎.
Supersedes #5293 by @mortezashojaei; their two commits are kept as-is, plus one commit that fixes the fork test #5293 missed.
reth reports an insufficient balance in
eth_callas-32003 EVM error: OutOfFunds(confirmed againsthttps://ethereum.reth.rs/rpc, reth v2.8.1).InsufficientFundsError.nodeMessagedidn't match it, so the error fell through toUnknownNodeErrorand the mainnet forkinsufficient fundstests failed on unrelated PRs.src/errors/node.ts: addsoutoffundstoInsufficientFundsError.nodeMessage.getNodeErrorlowercases details before matching; revert text such asexecution reverted: OutOfFundsstill resolves toExecutionRevertedErrorfirst.src/utils/errors/getNodeError.test.ts: newOutOfFundscase.src/actions/public/call.test.tsandsrc/actions/public/simulateContract.test.ts: the fork assertions checked Geth's rawinsufficient funds for gas * price + valuetext; they now assert the error chain ends inInsufficientFundsError. ThesimulateContractone is what failed fix: mapOutOfFundsnode errors toInsufficientFundsError#5293's CI (Test Local (http, multicall: true, 3/3)).Both fork assertions were run against live reth: they pass with the matcher and fail without it.
Generated by Claude Code