Skip to content

Commit 11435dd

Browse files
committed
fix(tokamak-deployer): pass DGF proxy address to AnchorStateRegistry constructor
AnchorStateRegistry constructor takes the DisputeGameFactory address as an immutable. The code was incorrectly passing the DGF implementation address (disputeGameFactoryImplAddr) instead of the proxy address (disputeGameFactoryProxyAddr). Since all game state is stored in the proxy via delegatecall, calling DISPUTE_GAME_FACTORY.games() on the implementation always returns address(0). This caused tryUpdateAnchorState() to revert with UnregisteredGame(), which in turn made FaultDisputeGame.resolve() always revert — preventing any game from ever reaching DEFENDER_WINS. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent af05271 commit 11435dd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cmd/tokamak-deployer/internal/deployer/contracts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,13 @@ func Deploy(ctx context.Context, cfg DeployConfig, artifactsFS fs.FS) (*DeployOu
563563
output.AnchorStateRegistryProxy = anchorStateRegistryProxyAddr.Hex()
564564
log.Printf("[deployer] ✓ AnchorStateRegistryProxy deployed: %s", anchorStateRegistryProxyAddr.Hex())
565565

566-
// 31. Deploy AnchorStateRegistry implementation (constructor takes DisputeGameFactory address)
566+
// 31. Deploy AnchorStateRegistry implementation (constructor takes DisputeGameFactory proxy address)
567567
logStep("Deploying AnchorStateRegistry implementation")
568568
anchorStateRegistryArtifact, err := loadArtifact(artifactsFS, "AnchorStateRegistry")
569569
if err != nil {
570570
return nil, err
571571
}
572-
anchorStateRegistryImplAddr, err := deployContract(ctx, client, auth, &nonce, gasPrice, anchorStateRegistryArtifact, disputeGameFactoryImplAddr)
572+
anchorStateRegistryImplAddr, err := deployContract(ctx, client, auth, &nonce, gasPrice, anchorStateRegistryArtifact, disputeGameFactoryProxyAddr)
573573
if err != nil {
574574
return nil, fmt.Errorf("deploy AnchorStateRegistry impl: %w", err)
575575
}

0 commit comments

Comments
 (0)