Commit f1a52e94 authored by smartcontracts's avatar smartcontracts Committed by Adrian Sutton

feat: create deploy script for fp updates (#292)

Creates a deploy script to deploy the implementations for the
FaultDisputeGame and PermissionedDisputeGame contracts being
updated as part of Granite. Based on the original FPACOPS script
with modifications to remove actions that are not necessary for
an upgrade.
parent 344c266e
......@@ -41,7 +41,7 @@
"requiredProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
"recommendedProtocolVersion": "0x0000000000000000000000000000000000000004000000000000000000000001",
"fundDevAccounts": false,
"faultGameAbsolutePrestate": "0x0385c3f8ee78491001d92b90b07d0cf387b7b52ab9b83b4d87c994e92cf823ba",
"faultGameAbsolutePrestate": "0x030de10d9da911a2b180ecfae2aeaba8758961fc28262ce989458c6f9a547922",
"faultGameMaxDepth": 73,
"faultGameClockExtension": 10800,
"faultGameMaxClockDuration": 302400,
......
......@@ -208,6 +208,32 @@ library ChainAssertions {
}
}
/// @notice Asserts that the permissioned DelayedWETH is setup correctly
function checkPermissionedDelayedWETH(
Types.ContractSet memory _contracts,
DeployConfig _cfg,
bool _isProxy,
address _expectedOwner
)
internal
view
{
console.log("Running chain assertions on the permissioned DelayedWETH");
DelayedWETH weth = DelayedWETH(payable(_contracts.PermissionedDelayedWETH));
// Check that the contract is initialized
assertSlotValueIsOne({ _contractAddress: address(weth), _slot: 0, _offset: 0 });
if (_isProxy) {
require(weth.owner() == _expectedOwner);
require(weth.delay() == _cfg.faultGameWithdrawalDelay());
require(weth.config() == SuperchainConfig(_contracts.SuperchainConfig));
} else {
require(weth.owner() == _expectedOwner);
require(weth.delay() == _cfg.faultGameWithdrawalDelay());
}
}
/// @notice Asserts that the L2OutputOracle is setup correctly
function checkL2OutputOracle(
Types.ContractSet memory _contracts,
......
......@@ -151,6 +151,7 @@ contract Deploy is Deployer {
L2OutputOracle: mustGetAddress("L2OutputOracleProxy"),
DisputeGameFactory: mustGetAddress("DisputeGameFactoryProxy"),
DelayedWETH: mustGetAddress("DelayedWETHProxy"),
PermissionedDelayedWETH: mustGetAddress("PermissionedDelayedWETHProxy"),
AnchorStateRegistry: mustGetAddress("AnchorStateRegistryProxy"),
OptimismMintableERC20Factory: mustGetAddress("OptimismMintableERC20FactoryProxy"),
OptimismPortal: mustGetAddress("OptimismPortalProxy"),
......@@ -170,6 +171,7 @@ contract Deploy is Deployer {
L2OutputOracle: getAddress("L2OutputOracleProxy"),
DisputeGameFactory: getAddress("DisputeGameFactoryProxy"),
DelayedWETH: getAddress("DelayedWETHProxy"),
PermissionedDelayedWETH: getAddress("PermissionedDelayedWETHProxy"),
AnchorStateRegistry: getAddress("AnchorStateRegistryProxy"),
OptimismMintableERC20Factory: getAddress("OptimismMintableERC20FactoryProxy"),
OptimismPortal: getAddress("OptimismPortalProxy"),
......@@ -369,6 +371,7 @@ contract Deploy is Deployer {
deployERC1967Proxy("DisputeGameFactoryProxy");
deployERC1967Proxy("L2OutputOracleProxy");
deployERC1967Proxy("DelayedWETHProxy");
deployERC1967Proxy("PermissionedDelayedWETHProxy");
deployERC1967Proxy("AnchorStateRegistryProxy");
transferAddressManagerOwnership(); // to the ProxyAdmin
......@@ -413,6 +416,7 @@ contract Deploy is Deployer {
initializeL2OutputOracle();
initializeDisputeGameFactory();
initializeDelayedWETH();
initializePermissionedDelayedWETH();
initializeAnchorStateRegistry();
}
......@@ -959,6 +963,29 @@ contract Deploy is Deployer {
});
}
function initializePermissionedDelayedWETH() public broadcast {
console.log("Upgrading and initializing permissioned DelayedWETH proxy");
address delayedWETHProxy = mustGetAddress("PermissionedDelayedWETHProxy");
address delayedWETH = mustGetAddress("DelayedWETH");
address superchainConfigProxy = mustGetAddress("SuperchainConfigProxy");
_upgradeAndCallViaSafe({
_proxy: payable(delayedWETHProxy),
_implementation: delayedWETH,
_innerCallData: abi.encodeCall(DelayedWETH.initialize, (msg.sender, SuperchainConfig(superchainConfigProxy)))
});
string memory version = DelayedWETH(payable(delayedWETHProxy)).version();
console.log("DelayedWETH version: %s", version);
ChainAssertions.checkPermissionedDelayedWETH({
_contracts: _proxiesUnstrict(),
_cfg: cfg,
_isProxy: true,
_expectedOwner: msg.sender
});
}
function initializeAnchorStateRegistry() public broadcast {
console.log("Upgrading and initializing AnchorStateRegistry proxy");
address anchorStateRegistryProxy = mustGetAddress("AnchorStateRegistryProxy");
......@@ -1348,6 +1375,25 @@ contract Deploy is Deployer {
ChainAssertions.checkDelayedWETH({ _contracts: _proxies(), _cfg: cfg, _isProxy: true, _expectedOwner: safe });
}
/// @notice Transfer ownership of the permissioned DelayedWETH contract to the final system owner
function transferPermissionedDelayedWETHOwnership() public broadcast {
console.log("Transferring permissioned DelayedWETH ownership to Safe");
DelayedWETH weth = DelayedWETH(mustGetAddress("PermissionedDelayedWETHProxy"));
address owner = weth.owner();
address safe = mustGetAddress("SystemOwnerSafe");
if (owner != safe) {
weth.transferOwnership(safe);
console.log("DelayedWETH ownership transferred to Safe at: %s", safe);
}
ChainAssertions.checkPermissionedDelayedWETH({
_contracts: _proxies(),
_cfg: cfg,
_isProxy: true,
_expectedOwner: safe
});
}
/// @notice Loads the mips absolute prestate from the prestate-proof for devnets otherwise
/// from the config.
function loadMipsAbsolutePrestate() internal returns (Claim mipsAbsolutePrestate_) {
......@@ -1401,7 +1447,7 @@ contract Deploy is Deployer {
function setPermissionedCannonFaultGameImplementation(bool _allowUpgrade) public broadcast {
console.log("Setting Cannon PermissionedDisputeGame implementation");
DisputeGameFactory factory = DisputeGameFactory(mustGetAddress("DisputeGameFactoryProxy"));
DelayedWETH weth = DelayedWETH(mustGetAddress("DelayedWETHProxy"));
DelayedWETH weth = DelayedWETH(mustGetAddress("PermissionedDelayedWETHProxy"));
// Set the Cannon FaultDisputeGame implementation in the factory.
_setFaultGameImplementation({
......
// SPDX-License-Identifier: MIT
pragma solidity 0.8.15;
import { Proxy } from "src/universal/Proxy.sol";
import { IDisputeGame } from "src/dispute/interfaces/IDisputeGame.sol";
import { AnchorStateRegistry, IAnchorStateRegistry } from "src/dispute/AnchorStateRegistry.sol";
import { IDelayedWETH } from "src/dispute/interfaces/IDelayedWETH.sol";
import { StdAssertions } from "forge-std/StdAssertions.sol";
import "src/dispute/lib/Types.sol";
import "scripts/deploy/Deploy.s.sol";
/// @notice Deploys new implementations of the FaultDisputeGame contract and its dependencies
/// assuming that the DisputeGameFactory contract does not need to be modified. Assumes
/// that the System Owner will update the DisputeGameFactory to point to these new
/// contracts at a later point in time.
contract FPACOPS2 is Deploy, StdAssertions {
////////////////////////////////////////////////////////////////
// ENTRYPOINTS //
////////////////////////////////////////////////////////////////
/// @notice Deploys an updated FP system with new FaultDisputeGame contracts, new DelayedWETH,
/// and a new AnchorStateRegistry. Does not deploy a new DisputeGameFactory. System
/// Owner is responsible for updating implementations inside of DGF later.
/// @param _proxyAdmin Address of the ProxyAdmin contract to transfer ownership to.
/// @param _systemOwnerSafe Address of the SystemOwner.
/// @param _superchainConfigProxy Address of the SuperchainConfig proxy contract.
/// @param _disputeGameFactoryProxy Address of the DisputeGameFactory proxy contract.
function deployFPAC2(
address _proxyAdmin,
address _systemOwnerSafe,
address _superchainConfigProxy,
address _disputeGameFactoryProxy
)
public
{
console.log("Deploying updated FP contracts.");
// Prank required deployments.
prankDeployment("ProxyAdmin", msg.sender);
prankDeployment("SystemOwnerSafe", msg.sender);
prankDeployment("SuperchainConfigProxy", _superchainConfigProxy);
prankDeployment("DisputeGameFactoryProxy", _disputeGameFactoryProxy);
// Deploy the proxies.
deployERC1967Proxy("DelayedWETHProxy");
deployERC1967Proxy("PermissionedDelayedWETHProxy");
deployERC1967Proxy("AnchorStateRegistryProxy");
// Deploy implementations.
deployDelayedWETH();
deployAnchorStateRegistry();
deployPreimageOracle();
deployMips();
// Initialize the proxies.
initializeDelayedWETHProxy();
initializePermissionedDelayedWETHProxy();
initializeAnchorStateRegistryProxy();
// Deploy the new game implementations.
deployCannonDisputeGame();
deployPermissionedDisputeGame();
// Transfer ownership of DelayedWETH and AnchorStateRegistry to ProxyAdmin.
transferWethOwnershipFinal({ _proxyAdmin: _proxyAdmin, _systemOwnerSafe: _systemOwnerSafe });
transferPermissionedWETHOwnershipFinal({ _proxyAdmin: _proxyAdmin, _systemOwnerSafe: _systemOwnerSafe });
transferAnchorStateOwnershipFinal({ _proxyAdmin: _proxyAdmin });
// Run post-deployment assertions.
postDeployAssertions({ _proxyAdmin: _proxyAdmin, _systemOwnerSafe: _systemOwnerSafe });
// Print overview.
printConfigReview();
}
////////////////////////////////////////////////////////////////
// HELPERS //
////////////////////////////////////////////////////////////////
/// @notice Deploys the standard Cannon version of the FaultDisputeGame.
function deployCannonDisputeGame() internal broadcast {
console.log("Deploying CannonFaultDisputeGame implementation");
save(
"CannonFaultDisputeGame",
address(
new FaultDisputeGame({
_gameType: GameTypes.CANNON,
_absolutePrestate: loadMipsAbsolutePrestate(),
_maxGameDepth: cfg.faultGameMaxDepth(),
_splitDepth: cfg.faultGameSplitDepth(),
_clockExtension: Duration.wrap(uint64(cfg.faultGameClockExtension())),
_maxClockDuration: Duration.wrap(uint64(cfg.faultGameMaxClockDuration())),
_vm: IBigStepper(mustGetAddress("Mips")),
_weth: DelayedWETH(mustGetAddress("DelayedWETHProxy")),
_anchorStateRegistry: AnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")),
_l2ChainId: cfg.l2ChainID()
})
)
);
}
/// @notice Deploys the PermissionedDisputeGame.
function deployPermissionedDisputeGame() internal broadcast {
console.log("Deploying PermissionedDisputeGame implementation");
save(
"PermissionedDisputeGame",
address(
new PermissionedDisputeGame({
_gameType: GameTypes.PERMISSIONED_CANNON,
_absolutePrestate: loadMipsAbsolutePrestate(),
_maxGameDepth: cfg.faultGameMaxDepth(),
_splitDepth: cfg.faultGameSplitDepth(),
_clockExtension: Duration.wrap(uint64(cfg.faultGameClockExtension())),
_maxClockDuration: Duration.wrap(uint64(cfg.faultGameMaxClockDuration())),
_vm: IBigStepper(mustGetAddress("Mips")),
_weth: DelayedWETH(mustGetAddress("PermissionedDelayedWETHProxy")),
_anchorStateRegistry: AnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy")),
_l2ChainId: cfg.l2ChainID(),
_proposer: cfg.l2OutputOracleProposer(),
_challenger: cfg.l2OutputOracleChallenger()
})
)
);
}
/// @notice Initializes the DelayedWETH proxy.
function initializeDelayedWETHProxy() internal broadcast {
console.log("Initializing DelayedWETHProxy with DelayedWETH.");
address wethProxy = mustGetAddress("DelayedWETHProxy");
address superchainConfigProxy = mustGetAddress("SuperchainConfigProxy");
Proxy(payable(wethProxy)).upgradeToAndCall(
mustGetAddress("DelayedWETH"),
abi.encodeCall(DelayedWETH.initialize, (msg.sender, SuperchainConfig(superchainConfigProxy)))
);
}
/// @notice Initializes the permissioned DelayedWETH proxy.
function initializePermissionedDelayedWETHProxy() internal broadcast {
console.log("Initializing permissioned DelayedWETHProxy with DelayedWETH.");
address wethProxy = mustGetAddress("PermissionedDelayedWETHProxy");
address superchainConfigProxy = mustGetAddress("SuperchainConfigProxy");
Proxy(payable(wethProxy)).upgradeToAndCall(
mustGetAddress("DelayedWETH"),
abi.encodeCall(DelayedWETH.initialize, (msg.sender, SuperchainConfig(superchainConfigProxy)))
);
}
/// @notice Initializes the AnchorStateRegistry proxy.
function initializeAnchorStateRegistryProxy() internal broadcast {
console.log("Initializing AnchorStateRegistryProxy with AnchorStateRegistry.");
AnchorStateRegistry.StartingAnchorRoot[] memory roots = new AnchorStateRegistry.StartingAnchorRoot[](2);
roots[0] = AnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.CANNON,
outputRoot: OutputRoot({
root: Hash.wrap(cfg.faultGameGenesisOutputRoot()),
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});
roots[1] = AnchorStateRegistry.StartingAnchorRoot({
gameType: GameTypes.PERMISSIONED_CANNON,
outputRoot: OutputRoot({
root: Hash.wrap(cfg.faultGameGenesisOutputRoot()),
l2BlockNumber: cfg.faultGameGenesisBlock()
})
});
address asrProxy = mustGetAddress("AnchorStateRegistryProxy");
Proxy(payable(asrProxy)).upgradeToAndCall(
mustGetAddress("AnchorStateRegistry"), abi.encodeCall(AnchorStateRegistry.initialize, (roots))
);
}
/// @notice Transfers admin rights of the `DelayedWETHProxy` to the `ProxyAdmin` and sets the
/// `DelayedWETH` owner to the `SystemOwnerSafe`.
function transferWethOwnershipFinal(address _proxyAdmin, address _systemOwnerSafe) internal broadcast {
console.log("Transferring ownership of DelayedWETHProxy");
DelayedWETH weth = DelayedWETH(mustGetAddress("DelayedWETHProxy"));
// Transfer the ownership of the DelayedWETH to the SystemOwnerSafe.
weth.transferOwnership(_systemOwnerSafe);
// Transfer the admin rights of the DelayedWETHProxy to the ProxyAdmin.
Proxy prox = Proxy(payable(address(weth)));
prox.changeAdmin(_proxyAdmin);
}
/// @notice Transfers admin rights of the permissioned `DelayedWETHProxy` to the `ProxyAdmin`
/// and sets the `DelayedWETH` owner to the `SystemOwnerSafe`.
function transferPermissionedWETHOwnershipFinal(address _proxyAdmin, address _systemOwnerSafe) internal broadcast {
console.log("Transferring ownership of permissioned DelayedWETHProxy");
DelayedWETH weth = DelayedWETH(mustGetAddress("PermissionedDelayedWETHProxy"));
// Transfer the ownership of the DelayedWETH to the SystemOwnerSafe.
weth.transferOwnership(_systemOwnerSafe);
// Transfer the admin rights of the DelayedWETHProxy to the ProxyAdmin.
Proxy prox = Proxy(payable(address(weth)));
prox.changeAdmin(_proxyAdmin);
}
/// @notice Transfers admin rights of the `AnchorStateRegistryProxy` to the `ProxyAdmin`.
function transferAnchorStateOwnershipFinal(address _proxyAdmin) internal broadcast {
console.log("Transferring ownership of AnchorStateRegistry");
AnchorStateRegistry asr = AnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy"));
// Transfer the admin rights of the AnchorStateRegistryProxy to the ProxyAdmin.
Proxy prox = Proxy(payable(address(asr)));
prox.changeAdmin(_proxyAdmin);
}
/// @notice Checks that the deployed system is configured correctly.
function postDeployAssertions(address _proxyAdmin, address _systemOwnerSafe) internal view {
Types.ContractSet memory contracts = _proxiesUnstrict();
// Ensure that `useFaultProofs` is set to `true`.
assertTrue(cfg.useFaultProofs());
// Verify that the DGF is owned by the ProxyAdmin.
address dgfProxyAddr = mustGetAddress("DisputeGameFactoryProxy");
assertEq(address(uint160(uint256(vm.load(dgfProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
// Verify that DelayedWETH is owned by the ProxyAdmin.
address wethProxyAddr = mustGetAddress("DelayedWETHProxy");
assertEq(address(uint160(uint256(vm.load(wethProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
// Verify that permissioned DelayedWETH is owned by the ProxyAdmin.
address soyWethProxyAddr = mustGetAddress("PermissionedDelayedWETHProxy");
assertEq(address(uint160(uint256(vm.load(soyWethProxyAddr, Constants.PROXY_OWNER_ADDRESS)))), _proxyAdmin);
// Run standard assertions for DGF and DelayedWETH.
ChainAssertions.checkDisputeGameFactory(contracts, _systemOwnerSafe);
ChainAssertions.checkDelayedWETH(contracts, cfg, true, _systemOwnerSafe);
ChainAssertions.checkPermissionedDelayedWETH(contracts, cfg, true, _systemOwnerSafe);
// Verify PreimageOracle configuration.
PreimageOracle oracle = PreimageOracle(mustGetAddress("PreimageOracle"));
assertEq(oracle.minProposalSize(), cfg.preimageOracleMinProposalSize());
assertEq(oracle.challengePeriod(), cfg.preimageOracleChallengePeriod());
// Verify MIPS configuration.
MIPS mips = MIPS(mustGetAddress("Mips"));
assertEq(address(mips.oracle()), address(oracle));
// Verify AnchorStateRegistry configuration.
AnchorStateRegistry asr = AnchorStateRegistry(mustGetAddress("AnchorStateRegistryProxy"));
(Hash root1, uint256 l2BlockNumber1) = asr.anchors(GameTypes.CANNON);
(Hash root2, uint256 l2BlockNumber2) = asr.anchors(GameTypes.PERMISSIONED_CANNON);
assertEq(root1.raw(), cfg.faultGameGenesisOutputRoot());
assertEq(root2.raw(), cfg.faultGameGenesisOutputRoot());
assertEq(l2BlockNumber1, cfg.faultGameGenesisBlock());
assertEq(l2BlockNumber2, cfg.faultGameGenesisBlock());
// Verify FaultDisputeGame configuration.
address gameAddr = mustGetAddress("CannonFaultDisputeGame");
FaultDisputeGame gameImpl = FaultDisputeGame(payable(gameAddr));
assertEq(gameImpl.maxGameDepth(), cfg.faultGameMaxDepth());
assertEq(gameImpl.splitDepth(), cfg.faultGameSplitDepth());
assertEq(gameImpl.clockExtension().raw(), cfg.faultGameClockExtension());
assertEq(gameImpl.maxClockDuration().raw(), cfg.faultGameMaxClockDuration());
assertEq(gameImpl.absolutePrestate().raw(), bytes32(cfg.faultGameAbsolutePrestate()));
assertEq(address(gameImpl.weth()), wethProxyAddr);
assertEq(address(gameImpl.anchorStateRegistry()), address(asr));
assertEq(address(gameImpl.vm()), address(mips));
// Verify security override yoke configuration.
address soyGameAddr = mustGetAddress("PermissionedDisputeGame");
PermissionedDisputeGame soyGameImpl = PermissionedDisputeGame(payable(soyGameAddr));
assertEq(soyGameImpl.proposer(), cfg.l2OutputOracleProposer());
assertEq(soyGameImpl.challenger(), cfg.l2OutputOracleChallenger());
assertEq(soyGameImpl.maxGameDepth(), cfg.faultGameMaxDepth());
assertEq(soyGameImpl.splitDepth(), cfg.faultGameSplitDepth());
assertEq(soyGameImpl.clockExtension().raw(), cfg.faultGameClockExtension());
assertEq(soyGameImpl.maxClockDuration().raw(), cfg.faultGameMaxClockDuration());
assertEq(soyGameImpl.absolutePrestate().raw(), bytes32(cfg.faultGameAbsolutePrestate()));
assertEq(address(soyGameImpl.weth()), soyWethProxyAddr);
assertEq(address(soyGameImpl.anchorStateRegistry()), address(asr));
assertEq(address(soyGameImpl.vm()), address(mips));
}
/// @notice Prints a review of the fault proof configuration section of the deploy config.
function printConfigReview() internal view {
console.log(unicode"📖 FaultDisputeGame Config Overview (chainid: %d)", block.chainid);
console.log(" 0. Use Fault Proofs: %s", cfg.useFaultProofs() ? "true" : "false");
console.log(" 1. Absolute Prestate: %x", cfg.faultGameAbsolutePrestate());
console.log(" 2. Max Depth: %d", cfg.faultGameMaxDepth());
console.log(" 3. Output / Execution split Depth: %d", cfg.faultGameSplitDepth());
console.log(" 4. Clock Extension (seconds): %d", cfg.faultGameClockExtension());
console.log(" 5. Max Clock Duration (seconds): %d", cfg.faultGameMaxClockDuration());
console.log(" 6. L2 Genesis block number: %d", cfg.faultGameGenesisBlock());
console.log(" 7. L2 Genesis output root: %x", uint256(cfg.faultGameGenesisOutputRoot()));
console.log(" 8. Proof Maturity Delay (seconds): ", cfg.proofMaturityDelaySeconds());
console.log(" 9. Dispute Game Finality Delay (seconds): ", cfg.disputeGameFinalityDelaySeconds());
console.log(" 10. Respected Game Type: ", cfg.respectedGameType());
console.log(" 11. Preimage Oracle Min Proposal Size (bytes): ", cfg.preimageOracleMinProposalSize());
console.log(" 12. Preimage Oracle Challenge Period (seconds): ", cfg.preimageOracleChallengePeriod());
}
}
......@@ -23,4 +23,9 @@ cannon-prestate: # Generate the cannon prestate, and tar the `op-program` + `can
.PHONY: deploy-fresh
deploy-fresh: cannon-prestate # Deploy a fresh version of the FPAC contracts. Pass `--broadcast` to send to the network.
forge script FPACOPS.sol --sig "deployFPAC(address,address)" $(proxy-admin) $(system-owner-safe) --chain $(chain) -vvv $(args)
forge script FPACOPS.s.sol --sig "deployFPAC(address,address,address)" $(proxy-admin) $(system-owner-safe) $(superchain-config-proxy) --chain $(chain) -vvv $(args)
# TODO: Convert this whole file to a justfile
.PHONY: deploy-upgrade
deploy-upgrade: cannon-prestate # Deploy upgraded FP contracts. Pass `--broadcast` to send to the network.
forge script FPACOPS2.s.sol --sig "deployFPAC2(address,address,address,address)" $(proxy-admin) $(system-owner-safe) $(superchain-config-proxy) $(dispute-game-factory-proxy) --chain $(chain) -vvv $(args)
......@@ -9,6 +9,7 @@ library Types {
address L2OutputOracle;
address DisputeGameFactory;
address DelayedWETH;
address PermissionedDelayedWETH;
address AnchorStateRegistry;
address OptimismMintableERC20Factory;
address OptimismPortal;
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,7 +14,7 @@ contract DeploymentSummary is DeploymentSummaryCode {
address internal constant addressManagerAddress = 0x50EEf481cae4250d252Ae577A09bF514f224C6C4;
address internal constant anchorStateRegistryAddress = 0xE2a80256d1dAFe06683F231F8e9561639Aa0e9b9;
address internal constant anchorStateRegistryProxyAddress = 0xd6EAF4c146261653EE059077B78ED088Add54309;
address internal constant anchorStateRegistryProxyAddress = 0x970670459734a83899773A0fd45941B5afC1200e;
address internal constant delayedWETHAddress = 0x90b505357aFad15A1fb8F1098B3295b7cfac1c24;
address internal constant delayedWETHProxyAddress = 0xEF179756ea6525AFade217cA5aB0b1b5CfE0fd92;
address internal constant disputeGameFactoryAddress = 0x20B168142354Cee65a32f6D8cf3033E592299765;
......@@ -33,6 +33,7 @@ contract DeploymentSummary is DeploymentSummaryCode {
address internal constant optimismPortalAddress = 0xbdD90485FCbcac869D5b5752179815a3103d8131;
address internal constant optimismPortal2Address = 0xae5DadFc48928543f706a9E6Ce25c682aaD2b63b;
address internal constant optimismPortalProxyAddress = 0x1c23A6d89F95ef3148BCDA8E242cAb145bf9c0E4;
address internal constant permissionedDelayedWETHProxyAddress = 0xd6EAF4c146261653EE059077B78ED088Add54309;
address internal constant preimageOracleAddress = 0x5A996D7C1b5De7C21121F06D99ADFa088d4b779e;
address internal constant protocolVersionsAddress = 0xfbfD64a6C0257F613feFCe050Aa30ecC3E3d7C3F;
address internal constant protocolVersionsProxyAddress = 0x4C52a6277b1B84121b3072C0c92b6Be0b7CC10F1;
......@@ -44,8 +45,8 @@ contract DeploymentSummary is DeploymentSummaryCode {
address internal constant systemConfigAddress = 0x67866A5052E5302aaD08e9f352331fd8622eB6DC;
address internal constant systemConfigProxyAddress = 0x0c8b5822b6e02CDa722174F19A1439A7495a3fA6;
address internal constant systemOwnerSafeAddress = 0x7C0c8a15773ED7B50E7c738D1aF4c5e3a2b210BD;
address internal constant acc32Address = 0x357A483a8923686E7fA454Ee93bbc11aFB114743;
address internal constant acc33Address = 0xb6b1579AA54e2F61e621a40d5F2704D717B3544F;
address internal constant acc34Address = 0x59B99034FBdd5E554661a2100cB2b6b7C5d495F8;
function recreateDeployment() public {
bytes32 slot;
......@@ -200,6 +201,10 @@ contract DeploymentSummary is DeploymentSummaryCode {
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(delayedWETHProxyAddress, slot, value);
vm.etch(permissionedDelayedWETHProxyAddress, permissionedDelayedWETHProxyCode);
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
vm.etch(anchorStateRegistryProxyAddress, anchorStateRegistryProxyCode);
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
......@@ -722,6 +727,30 @@ contract DeploymentSummary is DeploymentSummaryCode {
value = hex"000000000000000000000000000000000000000000000000000000000000000f";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"00000000000000000000000090b505357afad15a1fb8f1098b3295b7cfac1c24";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000101";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"0000000000000000000000001804c8ab1f12e6bbf3894d4083f33e07309d1f38";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000068";
value = hex"0000000000000000000000004f559f30f5eb88d635fde1548c4267db8fab0351";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000005";
value = hex"0000000000000000000000000000000000000000000000000000000000000010";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"000000000000000000000000e2a80256d1dafe06683f231f8e9561639aa0e9b9";
vm.store(anchorStateRegistryProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
......@@ -748,13 +777,13 @@ contract DeploymentSummary is DeploymentSummaryCode {
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(anchorStateRegistryProxyAddress, slot, value);
vm.etch(acc32Address, acc32Code);
vm.etch(acc33Address, acc33Code);
slot = hex"ffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b";
value = hex"000000000000000000000000357a483a8923686e7fa454ee93bbc11afb114743";
value = hex"000000000000000000000000b6b1579aa54e2f61e621a40d5f2704d717b3544f";
vm.store(disputeGameFactoryProxyAddress, slot, value);
vm.etch(acc33Address, acc33Code);
vm.etch(acc34Address, acc34Code);
slot = hex"4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e";
value = hex"000000000000000000000000b6b1579aa54e2f61e621a40d5f2704d717b3544f";
value = hex"00000000000000000000000059b99034fbdd5e554661a2100cb2b6b7c5d495f8";
vm.store(disputeGameFactoryProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"0000000000000000000000007c0c8a15773ed7b50e7c738d1af4c5e3a2b210bd";
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -14,7 +14,7 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
address internal constant addressManagerAddress = 0x50EEf481cae4250d252Ae577A09bF514f224C6C4;
address internal constant anchorStateRegistryAddress = 0xE2a80256d1dAFe06683F231F8e9561639Aa0e9b9;
address internal constant anchorStateRegistryProxyAddress = 0xd6EAF4c146261653EE059077B78ED088Add54309;
address internal constant anchorStateRegistryProxyAddress = 0x970670459734a83899773A0fd45941B5afC1200e;
address internal constant delayedWETHAddress = 0x90b505357aFad15A1fb8F1098B3295b7cfac1c24;
address internal constant delayedWETHProxyAddress = 0xEF179756ea6525AFade217cA5aB0b1b5CfE0fd92;
address internal constant disputeGameFactoryAddress = 0x20B168142354Cee65a32f6D8cf3033E592299765;
......@@ -33,6 +33,7 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
address internal constant optimismPortalAddress = 0xbdD90485FCbcac869D5b5752179815a3103d8131;
address internal constant optimismPortal2Address = 0xae5DadFc48928543f706a9E6Ce25c682aaD2b63b;
address internal constant optimismPortalProxyAddress = 0x1c23A6d89F95ef3148BCDA8E242cAb145bf9c0E4;
address internal constant permissionedDelayedWETHProxyAddress = 0xd6EAF4c146261653EE059077B78ED088Add54309;
address internal constant preimageOracleAddress = 0x5A996D7C1b5De7C21121F06D99ADFa088d4b779e;
address internal constant protocolVersionsAddress = 0xfbfD64a6C0257F613feFCe050Aa30ecC3E3d7C3F;
address internal constant protocolVersionsProxyAddress = 0x4C52a6277b1B84121b3072C0c92b6Be0b7CC10F1;
......@@ -44,8 +45,8 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
address internal constant systemConfigAddress = 0x67866A5052E5302aaD08e9f352331fd8622eB6DC;
address internal constant systemConfigProxyAddress = 0x0c8b5822b6e02CDa722174F19A1439A7495a3fA6;
address internal constant systemOwnerSafeAddress = 0x7C0c8a15773ED7B50E7c738D1aF4c5e3a2b210BD;
address internal constant acc32Address = 0x357A483a8923686E7fA454Ee93bbc11aFB114743;
address internal constant acc33Address = 0xb6b1579AA54e2F61e621a40d5F2704D717B3544F;
address internal constant acc34Address = 0x59B99034FBdd5E554661a2100cB2b6b7C5d495F8;
function recreateDeployment() public {
bytes32 slot;
......@@ -200,6 +201,10 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(delayedWETHProxyAddress, slot, value);
vm.etch(permissionedDelayedWETHProxyAddress, permissionedDelayedWETHProxyCode);
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
vm.etch(anchorStateRegistryProxyAddress, anchorStateRegistryProxyCode);
slot = hex"b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
......@@ -725,6 +730,30 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
value = hex"000000000000000000000000000000000000000000000000000000000000000f";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"00000000000000000000000090b505357afad15a1fb8f1098b3295b7cfac1c24";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000101";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"00000000000000000000000062c20aa1e0272312bc100b4e23b4dc1ed96dd7d1";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"0000000000000000000000001804c8ab1f12e6bbf3894d4083f33e07309d1f38";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000068";
value = hex"0000000000000000000000004f559f30f5eb88d635fde1548c4267db8fab0351";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(permissionedDelayedWETHProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000005";
value = hex"0000000000000000000000000000000000000000000000000000000000000010";
vm.store(systemOwnerSafeAddress, slot, value);
slot = hex"360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc";
value = hex"000000000000000000000000e2a80256d1dafe06683f231f8e9561639aa0e9b9";
vm.store(anchorStateRegistryProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
......@@ -751,13 +780,13 @@ contract DeploymentSummaryFaultProofs is DeploymentSummaryFaultProofsCode {
slot = hex"0000000000000000000000000000000000000000000000000000000000000000";
value = hex"0000000000000000000000000000000000000000000000000000000000000001";
vm.store(anchorStateRegistryProxyAddress, slot, value);
vm.etch(acc32Address, acc32Code);
vm.etch(acc33Address, acc33Code);
slot = hex"ffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b";
value = hex"000000000000000000000000357a483a8923686e7fa454ee93bbc11afb114743";
value = hex"000000000000000000000000b6b1579aa54e2f61e621a40d5f2704d717b3544f";
vm.store(disputeGameFactoryProxyAddress, slot, value);
vm.etch(acc33Address, acc33Code);
vm.etch(acc34Address, acc34Code);
slot = hex"4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e";
value = hex"000000000000000000000000b6b1579aa54e2f61e621a40d5f2704d717b3544f";
value = hex"00000000000000000000000059b99034fbdd5e554661a2100cb2b6b7c5d495f8";
vm.store(disputeGameFactoryProxyAddress, slot, value);
slot = hex"0000000000000000000000000000000000000000000000000000000000000033";
value = hex"0000000000000000000000007c0c8a15773ed7b50e7c738d1af4c5e3a2b210bd";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment