Skip to content

fix(chains): preserve OP predeploy contracts on Zircuit#4526

Merged
jxom merged 2 commits intowevm:mainfrom
mk0walsk:zircuit-preserve-op-predeploy-contracts
Apr 21, 2026
Merged

fix(chains): preserve OP predeploy contracts on Zircuit#4526
jxom merged 2 commits intowevm:mainfrom
mk0walsk:zircuit-preserve-op-predeploy-contracts

Conversation

@mk0walsk
Copy link
Copy Markdown
Contributor

This PR fixes a silent config-loss bug in Zircuit OP Stack chain definitions.

What is this PR solving?

zircuit and zircuitGarfieldTestnet spread ...chainConfig at the top level, but their contracts objects did not spread ...chainConfig.contracts, which overwrote OP predeploy defaults (for example gasPriceOracle, l1Block, and l2ToL1MessagePasser).

This change adds ...chainConfig.contracts in:

  • src/chains/definitions/zircuit.ts
  • src/chains/definitions/zircuitGarfieldTestnet.ts

Related: #4423

What alternatives were explored?

  • Deep-merging contracts inside defineChain was considered, but it would change merge semantics globally.
  • Copying OP predeploy entries directly into Zircuit files was considered, but it duplicates source-of-truth and increases drift risk.
  • Changing src/op-stack/contracts.ts was unnecessary because defaults there are already correct.

What should reviewers pay extra attention to?

  • Confirm Zircuit-specific contract entries still override inherited defaults where keys overlap.
  • Confirm this is a minimal, scoped fix with no behavior changes outside the two Zircuit chain definitions.

Documentation

No documentation update is needed because this is an internal chain-definition correctness fix with no public API change.

Tests

Please run:

  • pnpm test:chains
  • pnpm check:types

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 17, 2026

@mk0walsk is attempting to deploy a commit to the Wevm Team on Vercel.

A member of the Team first needs to authorize it.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 17, 2026

🦋 Changeset detected

Latest commit: c01c587

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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Apr 17, 2026

Open in StackBlitz

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

commit: 0778bba

@mk0walsk mk0walsk force-pushed the zircuit-preserve-op-predeploy-contracts branch from 863dd90 to 0778bba Compare April 20, 2026 13:03
@jxom jxom merged commit 28fcb0d into wevm:main Apr 21, 2026
18 of 25 checks passed
@github-actions github-actions Bot mentioned this pull request Apr 21, 2026
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