Skip to content

fix: handle block 0 in getChainContractAddress - #5474

Merged
jxom merged 1 commit into
mainfrom
fix/chain-contract-block-zero
Nov 11, 2026
Merged

jxom merged 1 commit into
mainfrom
fix/chain-contract-block-zero

Conversation

@jxom

@jxom jxom commented Nov 11, 2026

Copy link
Copy Markdown
Member

getChainContractAddress now treats a blockNumber of 0n like any other block when comparing it with a contract's blockCreated, so it throws ChainDoesNotSupportContract instead of returning the address. With batch.multicall, calls at block 0 now fall back to a direct eth_call as they do at later blocks before the contract existed.

@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 2:45am UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 11, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 6a4c595

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

@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-11T02:43:32.430500Z 6a4c595 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 429c3fc into main Nov 11, 2026
30 of 39 checks passed
@jxom
jxom deleted the fix/chain-contract-block-zero branch November 11, 2026 03:28
@github-actions github-actions Bot mentioned this pull request Nov 11, 2026

This branch had an error being deployed

1 failed deployment
Preview — 6a4c5958 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