Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Split FaultProof initialization to new function initializeAnchorStateRegistry() #286

Open
wants to merge 13 commits into
base: celo10
Choose a base branch
from
Open
34 changes: 8 additions & 26 deletions packages/contracts-bedrock/scripts/deploy/Deploy.s.sol
Original file line number Diff line number Diff line change
Expand Up @@ -405,13 +405,16 @@ contract Deploy is Deployer {
deployImplementations();
initializeImplementations();

setAlphabetFaultGameImplementation({ _allowUpgrade: false });
palango marked this conversation as resolved.
Show resolved Hide resolved
setFastFaultGameImplementation({ _allowUpgrade: false });
transferDelayedWETHOwnership();
}

function setupFaultGames() public {
setCannonFaultGameImplementation({ _allowUpgrade: false });
setPermissionedCannonFaultGameImplementation({ _allowUpgrade: false });

initializeAnchorStateRegistry();

transferDisputeGameFactoryOwnership();
transferDelayedWETHOwnership();
}

/// @notice Deploy all of the proxies
Expand Down Expand Up @@ -511,7 +514,7 @@ contract Deploy is Deployer {
initializeDisputeGameFactory();
initializeDelayedWETH();
initializePermissionedDelayedWETH();
initializeAnchorStateRegistry();
// initializeAnchorStateRegistry();

ChainAssertions.checkCustomGasTokenOptimismPortal({ _contracts: _proxies(), _cfg: cfg, _isProxy: true });
}
Expand Down Expand Up @@ -1053,7 +1056,7 @@ contract Deploy is Deployer {
address anchorStateRegistry = mustGetAddress("AnchorStateRegistry");
ISuperchainConfig superchainConfig = ISuperchainConfig(mustGetAddress("SuperchainConfigProxy"));

IAnchorStateRegistry.StartingAnchorRoot[] memory roots = new IAnchorStateRegistry.StartingAnchorRoot[](5);
IAnchorStateRegistry.StartingAnchorRoot[] memory roots = new IAnchorStateRegistry.StartingAnchorRoot[](2);
roots[0] = IAnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.CANNON,
outputRoot: OutputRoot({
Expand All @@ -1068,27 +1071,6 @@ contract Deploy is Deployer {
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});
roots[2] = IAnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.ALPHABET,
outputRoot: OutputRoot({
root: Hash.wrap(cfg.faultGameGenesisOutputRoot()),
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});
roots[3] = IAnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.ASTERISC,
outputRoot: OutputRoot({
root: Hash.wrap(cfg.faultGameGenesisOutputRoot()),
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});
roots[4] = IAnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.FAST,
outputRoot: OutputRoot({
root: Hash.wrap(cfg.faultGameGenesisOutputRoot()),
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});

_upgradeAndCallViaSafe({
_proxy: payable(anchorStateRegistryProxy),
Expand Down
Loading