Skip to content

fix(chains): add disputeGameFactory for fault-proof op stack chains - #5547

Merged
jxom merged 1 commit into
wevm:mainfrom
gomesalexandre:fix_chain_contract_metadata
Nov 16, 2026
Merged

jxom merged 1 commit into
wevm:mainfrom
gomesalexandre:fix_chain_contract_metadata

Conversation

@gomesalexandre

Copy link
Copy Markdown
Contributor

fix(chains): add disputeGameFactory for fault-proof op stack chains

Ancient8, BOB, Metal L2, Shape and Zircuit, plus the Ancient8 Sepolia, Mode Testnet, Superseed Sepolia, Zircuit Garfield and Zora Sepolia testnets, only define the legacy l2OutputOracle. That satisfies the types of getWithdrawalStatus, waitToProve and getTimeToProve. But their L1 portals are on version 5.x, so at runtime those actions take the fault-proof path, and getGames reads targetChain.contracts.disputeGameFactory[chain.id]. For any withdrawal that isn't finalized yet this throws TypeError: Cannot read properties of undefined (reading '1').

Superseed does define a factory, but it's the one from before an OPCM upgrade and has 0 games, so every withdrawal stays waiting-to-prove. The portal now uses 0x657c...c7E7, created at block 22973334.

Each address comes from the chain's own portal on L1, disputeGameFactory() (0xf2b4e617 on the portal address in the chain file), and every one of those factories has games (209 to 57k). For the chains in the superchain registry (BOB, Metal L2, Mode Testnet, Shape, Superseed, Zora Sepolia) it also matches the registry's DisputeGameFactoryProxy. Ancient8 and Zircuit (mainnet and testnet) and Superseed Sepolia aren't in the registry, so the portal is the only source for them. This is the same shape as #4385, which did it for Lisk, Mode and Zora, and l2OutputOracle stays as it did there.

Real calls against publicnode L1 and each chain's default L2 RPC, main vs this branch:

getGames({ targetChain })                 main: TypeError on all 10, 0 games on superseed   branch: returns games (limit 3)
getWithdrawalStatus bob     0x21cbe21c... main: TypeError   branch: waiting-to-finalize
getWithdrawalStatus metalL2 0x214cb594... main: TypeError   branch: ready-to-prove
getWithdrawalStatus zircuit 0xe92efebe... main: TypeError   branch: waiting-to-prove

The bob one checks out on the portal: provenWithdrawals has a proof and finalizedWithdrawals is false. Finalized withdrawals return before the games lookup, so those worked already.

No test, since the repo has no chain-definition test pattern and #4385 and #5512 shipped data-only too.

🤖 Generated with Claude Code

These chains' L1 portals are on version 5.x, so getWithdrawalStatus,
waitToProve and getTimeToProve take the fault-proof path and read
contracts.disputeGameFactory. Without it they throw "Cannot read
properties of undefined". Superseed pointed at a factory with no games,
so every withdrawal stayed waiting-to-prove.

Each address is what the chain's own portal returns from
disputeGameFactory() on L1, and matches the superchain registry where
the chain is listed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown

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

A member of the Team first needs to authorize it.

@changeset-bot

changeset-bot Bot commented Nov 16, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: fcd4770

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

@jxom
jxom merged commit 73f5149 into wevm:main Nov 16, 2026
22 of 33 checks passed
This was referenced Nov 16, 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