From b94c30de31aa410d617bc445b589e96a61a2ef7f Mon Sep 17 00:00:00 2001 From: Jack Chuma Date: Mon, 14 Apr 2025 15:10:06 -0400 Subject: [PATCH 1/3] set up FP upgrade task --- sepolia/2025-04-14-upgrade-fault-proofs/.env | 10 + .../2025-04-14-upgrade-fault-proofs/Makefile | 70 +++++++ .../2025-04-14-upgrade-fault-proofs/README.md | 177 ++++++++++++++++++ .../VALIDATION.md | 26 +++ .../foundry.toml | 21 +++ .../script/DeployDisputeGames.s.sol | 145 ++++++++++++++ .../script/UpgradeDGF.s.sol | 128 +++++++++++++ 7 files changed, 577 insertions(+) create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/.env create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/Makefile create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/README.md create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/script/DeployDisputeGames.s.sol create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/.env b/sepolia/2025-04-14-upgrade-fault-proofs/.env new file mode 100644 index 00000000..618bf13d --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/.env @@ -0,0 +1,10 @@ +OP_COMMIT=6f68dc35e103278e366d2b8ba178ca87bbaacb0c +BASE_CONTRACTS_COMMIT=c17a305379423f022c54a3c240ef4120590109ae + +ABSOLUTE_PRESTATE=0x03394563dd4a36e95e6d51ce7267ecceeb05fad23e68d2f9eed1affa73e5641a + +SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194 +OWNER_SAFE=0x0fe884546476dDd290eC46318785046ef68a0BA9 +COORDINATOR_SAFE_ADDR=0x646132a1667ca7ad00d36616afba1a28116c770a +CB_SIGNER_SAFE_ADDR=0x5873d69cd7cd6f1040aa87e6107eb6516e9f5359 +OP_SIGNER_SAFE_ADDR=0x6af0674791925f767060dd52f7fb20984e8639d8 diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/Makefile b/sepolia/2025-04-14-upgrade-fault-proofs/Makefile new file mode 100644 index 00000000..b5220544 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/Makefile @@ -0,0 +1,70 @@ +include ../../Makefile +include ../.env +include .env + +ifndef LEDGER_ACCOUNT +override LEDGER_ACCOUNT = 1 +endif + +.PHONY: deploy +deploy: + forge script --rpc-url $(L1_RPC_URL) DeployDisputeGames \ + --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv + +.PHONY: sign-op +sign-op: + $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "sign(address)" $(OP_SIGNER_SAFE_ADDR) + +.PHONY: approve-op +approve-op: + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "approve(address,bytes)" $(OP_SIGNER_SAFE_ADDR) $(SIGNATURES) \ + --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast + +# This step is run once after all children safes have approved and can be run by anyone (doesn't have to be a signer) +.PHONY: execute +execute: + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "run()" --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast + +## +# DoubleNestedMultisigBuilder commands +# The following commands can be used for tasks that utilize the DoubleNestedMultisigBuilder. +# Note that --ledger --hd-paths can be replaced with --private-key $(PRIVATE_KEY) +# in any command when using a local key. +# See more documentation on the various steps in DoubleNestedMultisigBuilder.sol. +# Note: All NestedMultisigBuilder commands above can also be used with the DoubleNestedMultisigBuilder. +# In this case, we have an `ADMIN_SAFE` owned by `PARENT_SAFE`s. The `PARENT_SAFE`s are owned by `CHILD_SAFE`s. +## + +.PHONY: sign +sign: + $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "sign(address,address)" $(CB_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) + +.PHONY: sign-op-a +sign-op-a: + $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "sign(address,address)" $(OP_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) + +.PHONY: approve-cb +approve-cb: + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(CB_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ + --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv + +.PHONY: approve-op-a +approve-op-a: + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(OP_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ + --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv + +.PHONY: approve-coordinator +approve-coordinator: + forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ + --sig "approveOnBehalfOfIntermediateSafe(address)" $(COORDINATOR_SAFE_ADDR) \ + --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/README.md b/sepolia/2025-04-14-upgrade-fault-proofs/README.md new file mode 100644 index 00000000..3a1707f3 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/README.md @@ -0,0 +1,177 @@ +# Upgrade Fault Proofs + +Status: READY TO DEPLOY + +## Description + +This task contains two scripts. One for deploying new versions of the `FaultDisputeGame` and `PermissionedDisputeGame` contracts, and one for updating the `DisputeGameFactory` contract to reference the new dispute game contracts. + +## Procedure + +### 1. Update repo: + +```bash +cd contract-deployments +git pull +cd sepolia/2025-04-14-upgrade-fault-proofs +make deps +``` + +### 2. Setup Ledger + +Your Ledger needs to be connected and unlocked. The Ethereum +application needs to be opened on Ledger with the message "Application +is ready". + +### 3. Run relevant script(s) + +#### 3.1 Deploy new Dispute Game Implementations + +```bash +make deploy +``` + +This will output the new addresses of the `FaultDisputeGame` and `PermissionedDisputeGame` contracts to an `addresses.json` file. You will need to commit this file to the repo before signers can sign. + +#### 3.2 Sign the transaction + +```bash +make sign +``` + +You will see a "Simulation link" from the output. + +Paste this URL in your browser. A prompt may ask you to choose a +project, any project will do. You can create one if necessary. + +Click "Simulate Transaction". + +We will be performing 3 validations and extract the domain hash and message hash to approve on your Ledger: + +1. Validate integrity of the simulation. +2. Validate correctness of the state diff. +3. Validate and extract domain hash and message hash to approve. + +##### 3.2.1 Validate integrity of the simulation. + +Make sure you are on the "Overview" tab of the tenderly simulation, to +validate integrity of the simulation, we need to check the following: + +1. "Network": Check the network is Sepolia. +2. "Timestamp": Check the simulation is performed on a block with a + recent timestamp (i.e. close to when you run the script). +3. "Sender": Check the address shown is your signer account. If not see the derivation path Note above. + +##### 3.2.2. Validate correctness of the state diff. + +Now click on the "State" tab, and refer to the [State Validations](./VALIDATION.md) instructions for the transaction you are signing. +Once complete return to this document to complete the signing. + +##### 3.2.3. Extract the domain hash and the message hash to approve. + +Now that we have verified the transaction performs the right +operation, we need to extract the domain hash and the message hash to +approve. + +Go back to the "Overview" tab, and find the +`GnosisSafe.checkSignatures` call. This call's `data` parameter +contains both the domain hash and the message hash that will show up +in your Ledger. + +It will be a concatenation of `0x1901`, the domain hash, and the +message hash: `0x1901[domain hash][message hash]`. + +Note down this value. You will need to compare it with the ones +displayed on the Ledger screen at signing. + +Once the validations are done, it's time to actually sign the +transaction. + +> [!WARNING] +> This is the most security critical part of the playbook: make sure the +> domain hash and message hash in the following two places match: +> +> 1. On your Ledger screen. +> 2. In the Tenderly simulation. You should use the same Tenderly +> simulation as the one you used to verify the state diffs, instead +> of opening the new one printed in the console. +> +> There is no need to verify anything printed in the console. There is +> no need to open the new Tenderly simulation link either. + +After verification, sign the transaction. You will see the `Data`, +`Signer` and `Signature` printed in the console. Format should be +something like this: + +```shell +Data: +Signer:
+Signature: +``` + +Double check the signer address is the right one. + +##### 3.2.4 Send the output to Facilitator(s) + +Nothing has occurred onchain - these are offchain signatures which +will be collected by Facilitators for execution. Execution can occur +by anyone once a threshold of signatures are collected, so a +Facilitator will do the final execution for convenience. + +Share the `Data`, `Signer` and `Signature` with the Facilitator, and +congrats, you are done! + +### [For Facilitator ONLY] How to execute + +#### Execute the transaction + +1. IMPORTANT: Ensure op-challenger has been updated before executing. +1. Collect outputs from all participating signers. +1. Concatenate all signatures and export it as the `SIGNATURES` + environment variable, i.e. `export +SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`. +1. Run the `make execute` or `make approve` command as described below to execute the transaction. + +For example, if the quorum is 2 and you get the following outputs: + +```shell +Data: 0xDEADBEEF +Signer: 0xC0FFEE01 +Signature: AAAA +``` + +```shell +Data: 0xDEADBEEF +Signer: 0xC0FFEE02 +Signature: BBBB +``` + +If on mainnet, then you should run: + +Coinbase facilitator: + +```bash +SIGNATURES=AAAABBBB make approve-cb +``` + +```bash +SIGNATURES=AAAABBBB make approve-op-a +``` + +Optimism facilitator: + +```bash +SIGNATURES=AAAABBBB make approve-op +``` + +```bash +SIGNATURES=AAAABBBB make approve-coordinator +``` + +#### Execute the transaction + +Once the signatures have been submitted approving the transaction for all nested Safes run: + +```bash +make execute +``` diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md b/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md new file mode 100644 index 00000000..7f9abc45 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md @@ -0,0 +1,26 @@ +# Validation + +This document can be used to validate the state diff resulting from the execution of the upgrade transactions. + +For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: + +- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. +- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. +- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. + +## Sepolia State Changes + +### `0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1` (`DisputeGameFactory`) + +- **Key**: `0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e`
+ **Before**: `0x00000000000000000000000068f600e592799c16d1b096616edbf1681fb9c0de`
+ **After**: Newly deployed `PermissionedDisputeGame` address converted to bytes32
+ **Meaning**: Updates the `PermissionedDisputeGame` implementation address from `0x68f600e592799c16D1b096616eDbf1681FB9c0De` to the newly deployed contract address. + **Verify**: You can verify the key derivation by running `cast index uint32 1 101` in your terminal. +- **Key**: `0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b`
+ **Before**: `0x000000000000000000000000b7fb44a61fde2b9db28a84366e168b14d1a1b103`
+ **After**: Newly deployed `FaultDisputeGame` address converted to bytes32
+ **Meaning**: Updates the `FaultDisputeGame` implementation address from `0xB7fB44a61fdE2b9DB28a84366e168b14D1a1b103` to the newly deployed contract address. + **Verify**: You can verify the key derivation by running `cast index uint32 0 101` in your terminal. + +You should also see nonce updates for the `ProxyAdminOwner` (`0x0fe884546476dDd290eC46318785046ef68a0BA9`) and the address you're signing with. diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml b/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml new file mode 100644 index 00000000..6b321021 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml @@ -0,0 +1,21 @@ +[profile.default] +src = 'src' +out = 'out' +libs = ['lib'] +broadcast = 'records' +fs_permissions = [{ access = "read-write", path = "./" }] +optimizer = true +optimizer_runs = 999999 +solc_version = "0.8.15" +via-ir = false +remappings = [ + '@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/', + '@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', + '@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', + '@rari-capital/solmate/=lib/solmate/', + '@base-contracts/=lib/base-contracts', + 'solady/=lib/solady/src/', + '@lib-keccak/=lib/lib-keccak/contracts/lib', +] + +# See more config options https://github.com/foundry-rs/foundry/tree/master/config diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/script/DeployDisputeGames.s.sol b/sepolia/2025-04-14-upgrade-fault-proofs/script/DeployDisputeGames.s.sol new file mode 100644 index 00000000..a2280d1c --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/script/DeployDisputeGames.s.sol @@ -0,0 +1,145 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.15; + +import {Script} from "forge-std/Script.sol"; + +import {IAnchorStateRegistry, IDelayedWETH, IBigStepper} from "@eth-optimism-bedrock/src/dispute/FaultDisputeGame.sol"; +import { + PermissionedDisputeGame, FaultDisputeGame +} from "@eth-optimism-bedrock/src/dispute/PermissionedDisputeGame.sol"; +import {GameTypes, GameType, Duration, Claim} from "@eth-optimism-bedrock/src/dispute/lib/Types.sol"; +import {LibGameType, LibDuration} from "@eth-optimism-bedrock/src/dispute/lib/LibUDT.sol"; +import {DisputeGameFactory} from "@eth-optimism-bedrock/src/dispute/DisputeGameFactory.sol"; +import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; +import {console} from "forge-std/console.sol"; + +/// @notice This script deploys new versions of FaultDisputeGame and PermissionedDisputeGame with all the same +/// parameters as the existing implementations excluding the absolute prestate. +contract DeployDisputeGames is Script { + using Strings for address; + using LibDuration for Duration; + using LibGameType for GameType; + + string public constant EXPECTED_VERSION = "1.4.1"; + + SystemConfig internal _SYSTEM_CONFIG = SystemConfig(vm.envAddress("SYSTEM_CONFIG")); + Claim immutable absolutePrestate; + + FaultDisputeGame.GameConstructorParams fdgParams; + FaultDisputeGame.GameConstructorParams pdgParams; + address proposer; + address challenger; + + constructor() { + absolutePrestate = Claim.wrap(vm.envBytes32("ABSOLUTE_PRESTATE")); + } + + function setUp() public { + DisputeGameFactory dgfProxy = DisputeGameFactory(_SYSTEM_CONFIG.disputeGameFactory()); + FaultDisputeGame currentFdg = FaultDisputeGame(address(dgfProxy.gameImpls(GameTypes.CANNON))); + PermissionedDisputeGame currentPdg = + PermissionedDisputeGame(address(dgfProxy.gameImpls(GameTypes.PERMISSIONED_CANNON))); + + uint256 maxGameDepth = currentFdg.maxGameDepth(); + uint256 splitDepth = currentFdg.splitDepth(); + Duration clockExtension = currentFdg.clockExtension(); + Duration maxClockDuration = currentFdg.maxClockDuration(); + IBigStepper bigStepper = currentFdg.vm(); + IAnchorStateRegistry anchorStateRegistry = currentFdg.anchorStateRegistry(); + uint256 l2ChainId = currentFdg.l2ChainId(); + + proposer = currentPdg.proposer(); + challenger = currentPdg.challenger(); + + fdgParams = FaultDisputeGame.GameConstructorParams({ + gameType: GameTypes.CANNON, + absolutePrestate: absolutePrestate, + maxGameDepth: maxGameDepth, + splitDepth: splitDepth, + clockExtension: clockExtension, + maxClockDuration: maxClockDuration, + vm: bigStepper, + weth: currentFdg.weth(), + anchorStateRegistry: anchorStateRegistry, + l2ChainId: l2ChainId + }); + pdgParams = FaultDisputeGame.GameConstructorParams({ + gameType: GameTypes.PERMISSIONED_CANNON, + absolutePrestate: absolutePrestate, + maxGameDepth: maxGameDepth, + splitDepth: splitDepth, + clockExtension: clockExtension, + maxClockDuration: maxClockDuration, + vm: bigStepper, + weth: currentPdg.weth(), + anchorStateRegistry: anchorStateRegistry, + l2ChainId: l2ChainId + }); + } + + function _postCheck(address fdgImpl, address pdgImpl) private view { + FaultDisputeGame fdg = FaultDisputeGame(fdgImpl); + PermissionedDisputeGame pdg = PermissionedDisputeGame(pdgImpl); + + require(Strings.equal(fdg.version(), EXPECTED_VERSION), "Postcheck version 1"); + require(Strings.equal(pdg.version(), EXPECTED_VERSION), "Postcheck version 2"); + + require(fdg.gameType().raw() == GameTypes.CANNON.raw(), "Postcheck 1"); + require(fdg.absolutePrestate().raw() == absolutePrestate.raw(), "Postcheck 2"); + require(fdg.maxGameDepth() == fdgParams.maxGameDepth, "Postcheck 3"); + require(fdg.splitDepth() == fdgParams.splitDepth, "Postcheck 4"); + require(fdg.clockExtension().raw() == fdgParams.clockExtension.raw(), "Postcheck 5"); + require(fdg.maxClockDuration().raw() == fdgParams.maxClockDuration.raw(), "Postcheck 6"); + require(fdg.vm() == fdgParams.vm, "Postcheck 7"); + require(fdg.weth() == fdgParams.weth, "Postcheck 8"); + require(fdg.anchorStateRegistry() == fdgParams.anchorStateRegistry, "Postcheck 9"); + require(fdg.l2ChainId() == fdgParams.l2ChainId, "Postcheck 10"); + + require(pdg.gameType().raw() == GameTypes.PERMISSIONED_CANNON.raw(), "Postcheck 11"); + require(pdg.absolutePrestate().raw() == absolutePrestate.raw(), "Postcheck 12"); + require(pdg.maxGameDepth() == pdgParams.maxGameDepth, "Postcheck 13"); + require(pdg.splitDepth() == pdgParams.splitDepth, "Postcheck 14"); + require(pdg.clockExtension().raw() == pdgParams.clockExtension.raw(), "Postcheck 15"); + require(pdg.maxClockDuration().raw() == pdgParams.maxClockDuration.raw(), "Postcheck 16"); + require(pdg.vm() == pdgParams.vm, "Postcheck 17"); + require(pdg.weth() == pdgParams.weth, "Postcheck 18"); + require(pdg.anchorStateRegistry() == pdgParams.anchorStateRegistry, "Postcheck 19"); + require(pdg.l2ChainId() == pdgParams.l2ChainId, "Postcheck 20"); + require(pdg.proposer() == proposer, "Postcheck 21"); + require(pdg.challenger() == challenger, "Postcheck 22"); + } + + function run() public { + (address fdg, address pdg) = _deployContracts(); + _postCheck(fdg, pdg); + + vm.writeFile( + "addresses.json", + string.concat( + "{", + "\"faultDisputeGame\": \"", + fdg.toHexString(), + "\",", + "\"permissionedDisputeGame\": \"", + pdg.toHexString(), + "\"" "}" + ) + ); + } + + function _deployContracts() private returns (address, address) { + console.log("FaultDisputeGame params:"); + console.logBytes(abi.encode(fdgParams)); + + console.log("PermissionedDisputeGame params:"); + console.logBytes(abi.encode(pdgParams, proposer, challenger)); + + vm.startBroadcast(); + address fdg = address(new FaultDisputeGame(fdgParams)); + address pdg = address(new PermissionedDisputeGame(pdgParams, proposer, challenger)); + vm.stopBroadcast(); + + return (fdg, pdg); + } +} diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol b/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol new file mode 100644 index 00000000..60bd8b8a --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.15; + +import {Vm} from "forge-std/Vm.sol"; +import {stdJson} from "forge-std/StdJson.sol"; +import {IMulticall3} from "forge-std/interfaces/IMulticall3.sol"; +import {console} from "forge-std/console.sol"; + +import {DoubleNestedMultisigBuilder} from "@base-contracts/script/universal/DoubleNestedMultisigBuilder.sol"; +import {Simulation} from "@base-contracts/script/universal/Simulation.sol"; +import {DisputeGameFactory, IDisputeGame} from "@eth-optimism-bedrock/src/dispute/DisputeGameFactory.sol"; +import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol"; +import {GameTypes, GameType, Duration, Hash} from "@eth-optimism-bedrock/src/dispute/lib/Types.sol"; +import {FaultDisputeGame} from "@eth-optimism-bedrock/src/dispute/FaultDisputeGame.sol"; +import {PermissionedDisputeGame} from "@eth-optimism-bedrock/src/dispute/PermissionedDisputeGame.sol"; +import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; + +/// @notice This script updates the FaultDisputeGame and PermissionedDisputeGame implementations in the +/// DisputeGameFactory contract. +contract UpgradeDGF is DoubleNestedMultisigBuilder { + using stdJson for string; + + address public immutable OWNER_SAFE; + string public constant EXPECTED_VERSION = "1.4.1"; + + DisputeGameFactory public dgfProxy; + address public fdgImpl; + address public pdgImpl; + + constructor() { + OWNER_SAFE = vm.envAddress("OWNER_SAFE"); + } + + function setUp() public { + string memory rootPath = vm.projectRoot(); + string memory path = string.concat(rootPath, "/addresses.json"); + string memory addresses = vm.readFile(path); + + dgfProxy = DisputeGameFactory(SystemConfig(vm.envAddress("SYSTEM_CONFIG")).disputeGameFactory()); + fdgImpl = addresses.readAddress(".faultDisputeGame"); + pdgImpl = addresses.readAddress(".permissionedDisputeGame"); + + _precheckDisputeGameImplementation(GameTypes.CANNON, fdgImpl); + _precheckDisputeGameImplementation(GameTypes.PERMISSIONED_CANNON, pdgImpl); + } + + // Checks that the new game being set has the same configuration as the existing implementation with the exception + // of the absolutePrestate. This is the most common scenario where the game implementation is upgraded to provide an + // updated fault proof program that supports an upcoming hard fork. + function _precheckDisputeGameImplementation(GameType targetGameType, address newImpl) internal view { + console.log("pre-check new game implementations", targetGameType.raw()); + + FaultDisputeGame currentImpl = FaultDisputeGame(address(dgfProxy.gameImpls(GameType(targetGameType)))); + // No checks are performed if there is no prior implementation. + // When deploying the first implementation, it is recommended to implement custom checks. + if (address(currentImpl) == address(0)) { + return; + } + FaultDisputeGame faultDisputeGame = FaultDisputeGame(newImpl); + require(Strings.equal(currentImpl.version(), EXPECTED_VERSION), "00"); + require(address(currentImpl.vm()) == address(faultDisputeGame.vm()), "10"); + require(address(currentImpl.weth()) == address(faultDisputeGame.weth()), "20"); + require(address(currentImpl.anchorStateRegistry()) == address(faultDisputeGame.anchorStateRegistry()), "30"); + require(currentImpl.l2ChainId() == faultDisputeGame.l2ChainId(), "40"); + require(currentImpl.splitDepth() == faultDisputeGame.splitDepth(), "50"); + require(currentImpl.maxGameDepth() == faultDisputeGame.maxGameDepth(), "60"); + require( + uint64(Duration.unwrap(currentImpl.maxClockDuration())) + == uint64(Duration.unwrap(faultDisputeGame.maxClockDuration())), + "70" + ); + require( + uint64(Duration.unwrap(currentImpl.clockExtension())) + == uint64(Duration.unwrap(faultDisputeGame.clockExtension())), + "80" + ); + + if (targetGameType.raw() == GameTypes.PERMISSIONED_CANNON.raw()) { + PermissionedDisputeGame currentPDG = PermissionedDisputeGame(address(currentImpl)); + PermissionedDisputeGame permissionedDisputeGame = PermissionedDisputeGame(address(faultDisputeGame)); + require(address(currentPDG.proposer()) == address(permissionedDisputeGame.proposer()), "90"); + require(address(currentPDG.challenger()) == address(permissionedDisputeGame.challenger()), "100"); + } + } + + // Confirm the stored implementations are updated and the anchor states still exist. + function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override { + require(address(dgfProxy.gameImpls(GameTypes.CANNON)) == fdgImpl, "post-110"); + require(address(dgfProxy.gameImpls(GameTypes.PERMISSIONED_CANNON)) == pdgImpl, "post-120"); + _postcheckHasAnchorState(GameTypes.CANNON); + _postcheckHasAnchorState(GameTypes.PERMISSIONED_CANNON); + } + + // Checks the anchor state for the source game type still exists after re-initialization. The actual anchor state + // may have been updated since the task was defined so just assert it exists, not that it has a specific value. + function _postcheckHasAnchorState(GameType gameType) internal view { + console.log("check anchor state exists", gameType.raw()); + + FaultDisputeGame impl = FaultDisputeGame(address(dgfProxy.gameImpls(GameType(gameType)))); + (Hash root, uint256 rootBlockNumber) = FaultDisputeGame(address(impl)).anchorStateRegistry().anchors(gameType); + + require(root.raw() != bytes32(0), "check-300"); + require(rootBlockNumber != 0, "check-310"); + } + + function _buildCalls() internal view override returns (IMulticall3.Call3[] memory) { + IMulticall3.Call3[] memory calls = new IMulticall3.Call3[](2); + + calls[0] = IMulticall3.Call3({ + target: address(dgfProxy), + allowFailure: false, + callData: abi.encodeCall(DisputeGameFactory.setImplementation, (GameTypes.CANNON, IDisputeGame(fdgImpl))) + }); + calls[1] = IMulticall3.Call3({ + target: address(dgfProxy), + allowFailure: false, + callData: abi.encodeCall( + DisputeGameFactory.setImplementation, (GameTypes.PERMISSIONED_CANNON, IDisputeGame(pdgImpl)) + ) + }); + + return calls; + } + + function _ownerSafe() internal view override returns (address) { + return OWNER_SAFE; + } +} From 4a7dee6d709124d204df7e1f4a5e637ca88b8c7c Mon Sep 17 00:00:00 2001 From: Jack Chuma Date: Tue, 15 Apr 2025 16:25:28 -0400 Subject: [PATCH 2/3] deploy dispute game contracts and update scripts / validation files --- sepolia/2025-04-14-upgrade-fault-proofs/.env | 6 +- .../2025-04-14-upgrade-fault-proofs/Makefile | 45 +++--- .../2025-04-14-upgrade-fault-proofs/README.md | 31 ++-- .../VALIDATION.md | 26 ---- .../addresses.json | 4 + .../foundry.toml | 3 +- .../11155111/run-1744743721.json | 86 ++++++++++++ .../script/UpgradeDGF.s.sol | 112 ++++++++------- .../validations/NestedSafeB.md | 132 ++++++++++++++++++ .../validations/SafeA.md | 132 ++++++++++++++++++ .../validations/SafeB.md | 128 +++++++++++++++++ 11 files changed, 586 insertions(+), 119 deletions(-) delete mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/addresses.json create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/records/DeployDisputeGames.s.sol/11155111/run-1744743721.json create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md create mode 100644 sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/.env b/sepolia/2025-04-14-upgrade-fault-proofs/.env index 618bf13d..06a58487 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/.env +++ b/sepolia/2025-04-14-upgrade-fault-proofs/.env @@ -1,10 +1,10 @@ OP_COMMIT=6f68dc35e103278e366d2b8ba178ca87bbaacb0c BASE_CONTRACTS_COMMIT=c17a305379423f022c54a3c240ef4120590109ae -ABSOLUTE_PRESTATE=0x03394563dd4a36e95e6d51ce7267ecceeb05fad23e68d2f9eed1affa73e5641a +ABSOLUTE_PRESTATE=0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6 SYSTEM_CONFIG=0xf272670eb55e895584501d564AfEB048bEd26194 OWNER_SAFE=0x0fe884546476dDd290eC46318785046ef68a0BA9 COORDINATOR_SAFE_ADDR=0x646132a1667ca7ad00d36616afba1a28116c770a -CB_SIGNER_SAFE_ADDR=0x5873d69cd7cd6f1040aa87e6107eb6516e9f5359 -OP_SIGNER_SAFE_ADDR=0x6af0674791925f767060dd52f7fb20984e8639d8 +SAFE_A=0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f +SAFE_B=0x6af0674791925f767060dd52f7fb20984e8639d8 diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/Makefile b/sepolia/2025-04-14-upgrade-fault-proofs/Makefile index b5220544..5b098ed5 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/Makefile +++ b/sepolia/2025-04-14-upgrade-fault-proofs/Makefile @@ -9,58 +9,47 @@ endif .PHONY: deploy deploy: forge script --rpc-url $(L1_RPC_URL) DeployDisputeGames \ - --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv + --account testnet-admin --broadcast -vvvv -.PHONY: sign-op -sign-op: +.PHONY: sign-b +sign-b: $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "sign(address)" $(OP_SIGNER_SAFE_ADDR) + --sig "sign(address)" $(SAFE_B) -.PHONY: approve-op -approve-op: +.PHONY: approve-b +approve-b: forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "approve(address,bytes)" $(OP_SIGNER_SAFE_ADDR) $(SIGNATURES) \ + --sig "approve(address,bytes)" $(SAFE_B) $(SIGNATURES) \ --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -# This step is run once after all children safes have approved and can be run by anyone (doesn't have to be a signer) .PHONY: execute execute: forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ --sig "run()" --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -## -# DoubleNestedMultisigBuilder commands -# The following commands can be used for tasks that utilize the DoubleNestedMultisigBuilder. -# Note that --ledger --hd-paths can be replaced with --private-key $(PRIVATE_KEY) -# in any command when using a local key. -# See more documentation on the various steps in DoubleNestedMultisigBuilder.sol. -# Note: All NestedMultisigBuilder commands above can also be used with the DoubleNestedMultisigBuilder. -# In this case, we have an `ADMIN_SAFE` owned by `PARENT_SAFE`s. The `PARENT_SAFE`s are owned by `CHILD_SAFE`s. -## - .PHONY: sign sign: $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "sign(address,address)" $(CB_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) + --sig "sign(address,address)" $(SAFE_A) $(COORDINATOR_SAFE_ADDR) -.PHONY: sign-op-a -sign-op-a: +.PHONY: sign-nested-b +sign-nested-b: $(GOPATH)/bin/eip712sign --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" -- \ forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "sign(address,address)" $(OP_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) + --sig "sign(address,address)" $(SAFE_B) $(COORDINATOR_SAFE_ADDR) -.PHONY: approve-cb -approve-cb: +.PHONY: approve +approve: forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(CB_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ + --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(SAFE_A) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv -.PHONY: approve-op-a -approve-op-a: +.PHONY: approve-nested-b +approve-nested-b: forge script --rpc-url $(L1_RPC_URL) UpgradeDGF \ - --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(OP_SIGNER_SAFE_ADDR) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ + --sig "approveOnBehalfOfSignerSafe(address,address,bytes)" $(SAFE_B) $(COORDINATOR_SAFE_ADDR) $(SIGNATURES) \ --ledger --hd-paths "m/44'/60'/$(LEDGER_ACCOUNT)'/0/0" --broadcast -vvvv .PHONY: approve-coordinator diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/README.md b/sepolia/2025-04-14-upgrade-fault-proofs/README.md index 3a1707f3..1c90c47c 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/README.md +++ b/sepolia/2025-04-14-upgrade-fault-proofs/README.md @@ -1,10 +1,10 @@ # Upgrade Fault Proofs -Status: READY TO DEPLOY +Status: READY TO SIGN ## Description -This task contains two scripts. One for deploying new versions of the `FaultDisputeGame` and `PermissionedDisputeGame` contracts, and one for updating the `DisputeGameFactory` contract to reference the new dispute game contracts. +This task contains two scripts for our required onchain updates for the OP Stack's [Upgrade 15](https://docs.optimism.io/notices/upgrade-15). One for deploying new versions of the `FaultDisputeGame` and `PermissionedDisputeGame` contracts, and one for updating the `DisputeGameFactory` contract to reference the new dispute game contracts. ## Procedure @@ -64,7 +64,7 @@ validate integrity of the simulation, we need to check the following: ##### 3.2.2. Validate correctness of the state diff. -Now click on the "State" tab, and refer to the [State Validations](./VALIDATION.md) instructions for the transaction you are signing. +Now click on the "State" tab, and refer to the [State Validations](./validations/SafeA.md) instructions for the transaction you are signing. Once complete return to this document to complete the signing. ##### 3.2.3. Extract the domain hash and the message hash to approve. @@ -123,14 +123,13 @@ congrats, you are done! ### [For Facilitator ONLY] How to execute -#### Execute the transaction +#### Approve the transaction -1. IMPORTANT: Ensure op-challenger has been updated before executing. 1. Collect outputs from all participating signers. 1. Concatenate all signatures and export it as the `SIGNATURES` environment variable, i.e. `export SIGNATURES="[SIGNATURE1][SIGNATURE2]..."`. -1. Run the `make execute` or `make approve` command as described below to execute the transaction. +1. Run the `make approve` command as described below to approve the transaction. For example, if the quorum is 2 and you get the following outputs: @@ -146,30 +145,36 @@ Signer: 0xC0FFEE02 Signature: BBBB ``` -If on mainnet, then you should run: +```bash +SIGNATURES=AAAABBBB make approve +``` -Coinbase facilitator: +As the facilitator, you are then expected to sign / approve on behalf of the rest of our testnet multisigs that mirror our mainnet hierarchy. ```bash -SIGNATURES=AAAABBBB make approve-cb +make sign-b ``` ```bash -SIGNATURES=AAAABBBB make approve-op-a +SIGNATURES=AAAA make approve-b ``` -Optimism facilitator: +```bash +make sign-nested-b +``` ```bash -SIGNATURES=AAAABBBB make approve-op +SIGNATURES=AAAA make approve-nested-b ``` ```bash -SIGNATURES=AAAABBBB make approve-coordinator +make approve-coordinator ``` #### Execute the transaction +IMPORTANT: Ensure op-challenger has been updated before executing. + Once the signatures have been submitted approving the transaction for all nested Safes run: ```bash diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md b/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md deleted file mode 100644 index 7f9abc45..00000000 --- a/sepolia/2025-04-14-upgrade-fault-proofs/VALIDATION.md +++ /dev/null @@ -1,26 +0,0 @@ -# Validation - -This document can be used to validate the state diff resulting from the execution of the upgrade transactions. - -For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: - -- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. -- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. -- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. - -## Sepolia State Changes - -### `0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1` (`DisputeGameFactory`) - -- **Key**: `0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e`
- **Before**: `0x00000000000000000000000068f600e592799c16d1b096616edbf1681fb9c0de`
- **After**: Newly deployed `PermissionedDisputeGame` address converted to bytes32
- **Meaning**: Updates the `PermissionedDisputeGame` implementation address from `0x68f600e592799c16D1b096616eDbf1681FB9c0De` to the newly deployed contract address. - **Verify**: You can verify the key derivation by running `cast index uint32 1 101` in your terminal. -- **Key**: `0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b`
- **Before**: `0x000000000000000000000000b7fb44a61fde2b9db28a84366e168b14d1a1b103`
- **After**: Newly deployed `FaultDisputeGame` address converted to bytes32
- **Meaning**: Updates the `FaultDisputeGame` implementation address from `0xB7fB44a61fdE2b9DB28a84366e168b14D1a1b103` to the newly deployed contract address. - **Verify**: You can verify the key derivation by running `cast index uint32 0 101` in your terminal. - -You should also see nonce updates for the `ProxyAdminOwner` (`0x0fe884546476dDd290eC46318785046ef68a0BA9`) and the address you're signing with. diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/addresses.json b/sepolia/2025-04-14-upgrade-fault-proofs/addresses.json new file mode 100644 index 00000000..b7b2b43c --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/addresses.json @@ -0,0 +1,4 @@ +{ + "faultDisputeGame": "0xcfce7dd673fbbbffd16ab936b7245a2f2db31c9a", + "permissionedDisputeGame": "0xf0102ffe22649a5421d53acc96e309660960cf44" +} diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml b/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml index 6b321021..7a443d45 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml +++ b/sepolia/2025-04-14-upgrade-fault-proofs/foundry.toml @@ -5,8 +5,7 @@ libs = ['lib'] broadcast = 'records' fs_permissions = [{ access = "read-write", path = "./" }] optimizer = true -optimizer_runs = 999999 -solc_version = "0.8.15" +optimizer_runs = 200 via-ir = false remappings = [ '@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/', diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/records/DeployDisputeGames.s.sol/11155111/run-1744743721.json b/sepolia/2025-04-14-upgrade-fault-proofs/records/DeployDisputeGames.s.sol/11155111/run-1744743721.json new file mode 100644 index 00000000..a9854683 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/records/DeployDisputeGames.s.sol/11155111/run-1744743721.json @@ -0,0 +1,86 @@ +{ + "transactions": [ + { + "hash": "0x8c759a253375b2b62743268cd133da994dacae821ed82ff57fd52a77a4ffa8fe", + "transactionType": "CREATE", + "contractName": "FaultDisputeGame", + "contractAddress": "0xcfce7dd673fbbbffd16ab936b7245a2f2db31c9a", + "function": null, + "arguments": [ + "(0, 0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6, 73, 30, 10800, 302400, 0xF027F4A985560fb13324e943edf55ad6F1d15Dc1, 0x489c2E5ebe0037bDb2DC039C5770757b8E54eA1F, 0x0729957c92A1F50590A84cb2D65D761093f3f8eB, 84532)" + ], + "transaction": { + "from": "0x8c1a617bdb47342f9c17ac8750e0b070c372c721", + "gas": "0x528b6f", + "value": "0x0", + "input": "0x6101c06040523480156200001257600080fd5b50604051620052163803806200521683398101604081905262000035916200052d565b620000436001607e62000600565b60ff16816040015111156200006b57604051633beff19960e11b815260040160405180910390fd5b60001981606001511480620000955750604081015160608201516200009290600162000626565b10155b15620000b45760405163e62ccf3960e01b815260040160405180910390fd5b600281606001511015620000db5760405163e62ccf3960e01b815260040160405180910390fd5b6001600160401b0380168160c001516001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000128573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014e919062000641565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200018c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b2919062000661565b1115620001d25760405163b4e1243360e01b815260040160405180910390fd5b6000620001f782608001516001600160401b03166200048060201b62000b7f1760201c565b6200020d906001600160401b031660026200067b565b905060008260c001516001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000254573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027a919062000641565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002b8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002de919062000661565b6200030184608001516001600160401b03166200048060201b62000b7f1760201c565b6001600160401b031662000316919062000626565b905060006200033183836200048360201b620030a61760201c565b90506001600160401b038111156200035c5760405163235dfb2b60e21b815260040160405180910390fd5b6200037f8460a001516001600160401b03166200048060201b62000b7f1760201c565b6001600160401b0316816001600160401b03161115620003b25760405163235dfb2b60e21b815260040160405180910390fd5b63ffffffff8016620003d9856000015163ffffffff166200048060201b62000b7f1760201c565b63ffffffff1603620003fe5760405163073ed16760e31b815260040160405180910390fd5b5050815163ffffffff1661012090815260208301516080908152604084015160a0908152606085015160c0908152918501516001600160401b039081166101a052908501511660e0908152908401516001600160a01b03908116610100908152918501518116610140529084015116610160529091015161018052506200069d565b90565b600081831162000494578162000496565b825b9392505050565b60405161014081016001600160401b0381118282101715620004cf57634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620004ea57600080fd5b919050565b80516001600160401b0381168114620004ea57600080fd5b6001600160a01b03811681146200051d57600080fd5b50565b8051620004ea8162000507565b600061014082840312156200054157600080fd5b6200054b6200049d565b6200055683620004d5565b81526020830151602082015260408301516040820152606083015160608201526200058460808401620004ef565b60808201526200059760a08401620004ef565b60a0820152620005aa60c0840162000520565b60c0820152620005bd60e0840162000520565b60e0820152610100620005d281850162000520565b90820152610120928301519281019290925250919050565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff8416808210156200061d576200061d620005ea565b90039392505050565b600082198211156200063c576200063c620005ea565b500190565b6000602082840312156200065457600080fd5b8151620004968162000507565b6000602082840312156200067457600080fd5b5051919050565b6000816000190483118215151615620006985762000698620005ea565b500290565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516149de620008386000396000818161068c01528181611a3401528181611a9e0152611ad001526000818161098b0152612ffe01526000818161060f01528181611f960152818161203e015281816120b4015281816121ce0152612522015260008181610515015281816114b00152818161157a01528181611e1a015261245a01526000818161081c015281816124f9015261306a0152600081816104c10152818161194d01528181612bab0152612d640152600081816109de01528181610d63015281816118d601528181611aff01528181611b5a015281816126f80152612738015260008181610a11015281816117930152818161185f01528181611a6f01528181612a5401528181612ee5015281816134e401528181613a1401528181613b2f01528181613b8d0152613bd8015260008181610ab80152818161181b015281816119210152818161277c015281816127e9015281816129ed0152612a750152600081816107410152612af801526149de6000f3fe6080604052600436106102e45760003560e01c80636f03440911610190578063c395e1ca116100dc578063dabd396d11610095578063f8f43ff61161006f578063f8f43ff614610a65578063fa24f74314610a85578063fa315aa914610aa9578063fe2bbeb214610adc57600080fd5b8063dabd396d146109cf578063ec5e630814610a02578063eff0f59214610a3557600080fd5b8063c395e1ca146108a8578063c6f0308c146108c8578063cf09e0d01461093c578063d5d44d801461095c578063d6ae3cd51461097c578063d8cc1a3c146109af57600080fd5b80638b85902b11610149578063bbdc02db11610123578063bbdc02db14610805578063bcef3b5514610846578063bd8da9561461085b578063c0d8bb741461087b57600080fd5b80638b85902b1461071d5780638d450a9514610732578063a445ece61461076557600080fd5b80636f034409146106b057806370872aa5146106c3578063786b844b146106d85780637b0f0adc146106ed5780638129fc1c146107005780638980e0cc1461070857600080fd5b80633a7684631161024f57806357da950e11610208578063609d3334116101e2578063609d33341461063357806360e27464146106485780636361506d146106685780636b6716c01461067d57600080fd5b806357da950e146105b05780635a5fa2d9146105e05780635c0cba331461060057600080fd5b80633a768463146104b25780633e3ac912146104e55780633fc8cef314610506578063472777c614610539578063529d6a8c1461054c57806354fd4d501461057957600080fd5b806325fc2ace116102a157806325fc2ace146103f75780632810e1d6146104165780632ad69aeb1461042b57806330dbe5701461044b578063378dd48c1461048357806337b1b2291461049d57600080fd5b806301935130146102e957806303c2924d1461030b57806319effeb41461032b578063200d2ed21461036f578063222abf451461039d578063250e69bd146103dd575b600080fd5b3480156102f557600080fd5b506103096103043660046142bd565b610b0c565b005b34801561031757600080fd5b50610309610326366004614317565b610cea565b34801561033757600080fd5b5060005461035290600160401b90046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b34801561037b57600080fd5b5060005461039090600160801b900460ff1681565b6040516103669190614370565b3480156103a957600080fd5b506103cd6103b8366004614398565b600c6020526000908152604090205460ff1681565b6040519015158152602001610366565b3480156103e957600080fd5b50600a546103cd9060ff1681565b34801561040357600080fd5b506008545b604051908152602001610366565b34801561042257600080fd5b50610390611195565b34801561043757600080fd5b50610408610446366004614317565b611315565b34801561045757600080fd5b5060015461046b906001600160a01b031681565b6040516001600160a01b039091168152602001610366565b34801561048f57600080fd5b50600d546103909060ff1681565b3480156104a957600080fd5b5061046b611346565b3480156104be57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061046b565b3480156104f157600080fd5b506000546103cd90600160901b900460ff1681565b34801561051257600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061046b565b6103096105473660046143b5565b611357565b34801561055857600080fd5b50610408610567366004614398565b60036020526000908152604090205481565b34801561058557600080fd5b50604080518082019091526005815264312e342e3160d81b60208201525b604051610366919061442e565b3480156105bc57600080fd5b506008546009546105cb919082565b60408051928352602083019190915201610366565b3480156105ec57600080fd5b506104086105fb366004614441565b611369565b34801561060c57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061046b565b34801561063f57600080fd5b506105a36113a3565b34801561065457600080fd5b50610309610663366004614398565b6113b1565b34801561067457600080fd5b5061040861164c565b34801561068957600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610352565b6103096106be366004614468565b611658565b3480156106cf57600080fd5b50600954610408565b3480156106e457600080fd5b50610309611ec9565b6103096106fb3660046143b5565b612192565b61030961219f565b34801561071457600080fd5b50600254610408565b34801561072957600080fd5b506104086125b5565b34801561073e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610408565b34801561077157600080fd5b506107c7610780366004614441565b6007602052600090815260409020805460019091015460ff821691610100810463ffffffff1691650100000000009091046001600160801b0316906001600160a01b031684565b60408051941515855263ffffffff90931660208501526001600160801b03909116918301919091526001600160a01b03166060820152608001610366565b34801561081157600080fd5b5060405163ffffffff7f0000000000000000000000000000000000000000000000000000000000000000168152602001610366565b34801561085257600080fd5b506104086125c1565b34801561086757600080fd5b50610352610876366004614441565b6125cd565b34801561088757600080fd5b50610408610896366004614398565b600b6020526000908152604090205481565b3480156108b457600080fd5b506104086108c33660046144a9565b612760565b3480156108d457600080fd5b506108e86108e3366004614441565b6128a0565b6040805163ffffffff90981688526001600160a01b03968716602089015295909416948601949094526001600160801b039182166060860152608085015291821660a08401521660c082015260e001610366565b34801561094857600080fd5b50600054610352906001600160401b031681565b34801561096857600080fd5b50610408610977366004614398565b612913565b34801561098857600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610408565b3480156109bb57600080fd5b506103096109ca3660046144d2565b61296b565b3480156109db57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610352565b348015610a0e57600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610408565b348015610a4157600080fd5b506103cd610a50366004614441565b60046020526000908152604090205460ff1681565b348015610a7157600080fd5b50610309610a803660046143b5565b612cfc565b348015610a9157600080fd5b50610a9a613068565b6040516103669392919061455d565b348015610ab557600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610408565b348015610ae857600080fd5b506103cd610af7366004614441565b60066020526000908152604090205460ff1681565b60008054600160801b900460ff166002811115610b2b57610b2b614339565b14610b495760405163067fe19560e41b815260040160405180910390fd5b600054600160901b900460ff1615610b745760405163075173a960e11b815260040160405180910390fd5b610b82610b7f6125c1565b90565b610b99610b9436869003860186614598565b6130c0565b14610bb757604051639cc00b5b60e01b815260040160405180910390fd5b82606001358282604051610bcc92919061460b565b604051809103902014610bf25760405163d81d583b60e01b815260040160405180910390fd5b6000610c3b610c3684848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061311c92505050565b613170565b90506000610c6282600881518110610c5557610c5561461b565b60200260200101516132f4565b9050602081511115610c875760405163d81d583b60e01b815260040160405180910390fd5b602081810151825190910360031b1c610c9e6125b5565b8103610cbd57604051630b8ed88360e41b815260040160405180910390fd5b5050600180546001600160a01b0319163317905550506000805460ff60901b1916600160901b1790555050565b60008054600160801b900460ff166002811115610d0957610d09614339565b14610d275760405163067fe19560e41b815260040160405180910390fd5b600060028381548110610d3c57610d3c61461b565b906000526020600020906005020190506000610d57846125cd565b90506001600160401b037f000000000000000000000000000000000000000000000000000000000000000081169082161015610da65760405163f2440b5360e01b815260040160405180910390fd5b60008481526006602052604090205460ff1615610dd65760405163f1a9458160e01b815260040160405180910390fd5b6000848152600560205260409020805480158015610df357508515155b15610e55578354600160201b90046001600160a01b031660008115610e185781610e27565b60018601546001600160a01b03165b9050610e338187613376565b505050600094855250506006602052505060409020805460ff19166001179055565b6000868152600760209081526040918290208251608081018452815460ff81161515808352610100820463ffffffff16948301949094526501000000000090046001600160801b031693810193909352600101546001600160a01b03166060830152610ed9576001600160801b036040820152600181526000869003610ed9578195505b600086826020015163ffffffff16610ef19190614647565b90506000838211610f025781610f04565b835b602084015190915063ffffffff165b8181101561100a576000868281548110610f2f57610f2f61461b565b6000918252602080832090910154808352600690915260409091205490915060ff16610f6e57604051634d03b32360e11b815260040160405180910390fd5b600060028281548110610f8357610f8361461b565b600091825260209091206005909102018054909150600160201b90046001600160a01b0316158015610fc95750600481015460408701516001600160801b039182169116115b15610ff55760018101546001600160a01b0316606087015260048101546001600160801b031660408701525b505080806110029061465f565b915050610f13565b5063ffffffff818116602085810191825260008c815260079091526040908190208651815493519288015164ffffffffff1990941690151564ffffffff00191617610100929094169182029390931774ffffffffffffffffffffffffffffffff00000000001916650100000000006001600160801b03909316929092029190911782556060850151600190920180546001600160a01b0319166001600160a01b039093169290921790915584900361118a57606083015160008a8152600660205260409020805460ff19166001179055891580156110f15750600054600160901b900460ff165b15611137576001546001600160a01b031661110c818a613376565b88546001600160a01b03909116600160201b02640100000000600160c01b0319909116178855611188565b6111646001600160a01b0382161561114f578161115e565b60018901546001600160a01b03165b89613376565b8754640100000000600160c01b031916600160201b6001600160a01b038316021788555b505b505050505050505050565b600080600054600160801b900460ff1660028111156111b6576111b6614339565b146111d45760405163067fe19560e41b815260040160405180910390fd5b6000805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f85460ff1661121f57604051634d03b32360e11b815260040160405180910390fd5b60006001600160a01b0316600260008154811061123e5761123e61461b565b6000918252602090912060059091020154600160201b90046001600160a01b03161461126b57600161126e565b60025b600080546001600160401b034216600160401b026fffffffffffffffff000000000000000019821681178355929350839260ff60801b191670ffffffffffffffffff00000000000000001990911617600160801b8360028111156112d4576112d4614339565b0217905560028111156112e9576112e9614339565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b6005602052816000526040600020818154811061133157600080fd5b90600052602060002001600091509150505481565b600061135260006133b8565b905090565b6113648383836001611658565b505050565b6000818152600760209081526040808320600590925282208054825461139a90610100900463ffffffff1682614678565b95945050505050565b6060611352605460206133db565b6113b9611ec9565b60006002600d5460ff1660028111156113d4576113d4614339565b036113f857506001600160a01b0381166000908152600b602052604090205461144e565b6001600d5460ff16600281111561141157611411614339565b0361143557506001600160a01b03811660009081526003602052604090205461144e565b6040516301e28f7d60e21b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff16611512576001600160a01b038281166000818152600c602052604090819020805460ff1916600117905551637eee288d60e01b81526004810191909152602481018390527f000000000000000000000000000000000000000000000000000000000000000090911690637eee288d90604401600060405180830381600087803b1580156114f657600080fd5b505af115801561150a573d6000803e3d6000fd5b505050505050565b80600003611533576040516317bfe5f760e01b815260040160405180910390fd5b6001600160a01b038281166000818152600b602090815260408083208390556003909152808220919091555163f3fef3a360e01b81526004810191909152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063f3fef3a390604401600060405180830381600087803b1580156115c057600080fd5b505af11580156115d4573d6000803e3d6000fd5b505050506000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611625576040519150601f19603f3d011682016040523d82523d6000602084013e61162a565b606091505b5050905080611364576040516383e6cc6b60e01b815260040160405180910390fd5b6000611352603461341d565b60008054600160801b900460ff16600281111561167757611677614339565b146116955760405163067fe19560e41b815260040160405180910390fd5b6000600284815481106116aa576116aa61461b565b60009182526020918290206040805160e0810182526005909302909101805463ffffffff811684526001600160a01b03600160201b90910481169484019490945260018101549093169082015260028201546001600160801b03908116606083015260038301546080830181905260049093015480821660a0840152600160801b90041660c0820152915085146117545760405163180a019960e11b815260040160405180910390fd5b60a0810151600083156001600160801b0383161760011b90506000611781826001600160801b031661343d565b60ff1690508615806117bc57506117b97f00000000000000000000000000000000000000000000000000000000000000006002614647565b81145b80156117c6575084155b156117e4576040516329098def60e21b815260040160405180910390fd5b600054600160901b900460ff1680156117fb575086155b156118195760405163075173a960e11b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081111561185a576040516356f57b2b60e01b815260040160405180910390fd5b6118857f00000000000000000000000000000000000000000000000000000000000000006001614647565b810361189757611897868885886134a9565b346118a183612760565b146118bf57604051638620aa1960e01b815260040160405180910390fd5b60006118ca886125cd565b90506001600160401b037f000000000000000000000000000000000000000000000000000000000000000081169082160361191857604051630ce0744560e21b815260040160405180910390fd5b600061194560017f0000000000000000000000000000000000000000000000000000000000000000614678565b8303611a68577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa1580156119a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119cd919061468f565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a0a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a2e91906146ac565b611a61907f00000000000000000000000000000000000000000000000000000000000000006001600160401b03166146c5565b9050611af9565b611a9360017f0000000000000000000000000000000000000000000000000000000000000000614678565b8303611acd57611a617f00000000000000000000000000000000000000000000000000000000000000006001600160401b031660026146f0565b507f00000000000000000000000000000000000000000000000000000000000000006001600160401b03165b611b2c817f00000000000000000000000000000000000000000000000000000000000000006001600160401b031661471f565b6001600160401b0316611b45836001600160401b031690565b6001600160401b03161115611b8a57611b87817f00000000000000000000000000000000000000000000000000000000000000006001600160401b031661471f565b91505b6000604083901b421760008a8152608087901b6001600160801b038d1617602052604081209192509060008181526004602052604090205490915060ff1615611be6576040516380497e3b60e01b815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060026040518060e001604052808d63ffffffff16815260200160006001600160a01b03168152602001336001600160a01b03168152602001346001600160801b031681526020018c8152602001886001600160801b03168152602001846001600160801b0316815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160020160006101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816003015560a08201518160040160006101000a8154816001600160801b0302191690836001600160801b0316021790555060c08201518160040160106101000a8154816001600160801b0302191690836001600160801b031602179055505050600560008c81526020019081526020016000206001600280549050611ddd9190614678565b81546001810183556000928352602080842090910191909155338252600b9052604081208054349290611e11908490614647565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015611e7357600080fd5b505af1158015611e87573d6000803e3d6000fd5b50506040513393508d92508e91507f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be90600090a4505050505050505050505050565b6002600d5460ff166002811115611ee257611ee2614339565b1480611f0457506001600d5460ff166002811115611f0257611f02614339565b145b15611f0b57565b6000600d5460ff166002811115611f2457611f24614339565b14611f42576040516301e28f7d60e21b815260040160405180910390fd5b600054600160401b90046001600160401b03166001600160401b0316600003611f7e57604051636082930560e11b815260040160405180910390fd5b604051630314d2b360e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630314d2b390602401602060405180830381865afa158015611fe5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120099190614747565b90508061202957604051634851bd9b60e01b815260040160405180910390fd5b6040516317cf21a960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906317cf21a990602401600060405180830381600087803b15801561208a57600080fd5b505af192505050801561209b575060015b506040516324b5ce0b60e11b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063496b9c1690602401602060405180830381865afa158015612103573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121279190614747565b9050801561214157600d805460ff1916600117905561214f565b600d805460ff191660021790555b600d546040517f9908eaac0645df9d0704d06adc9e07337c951de2f06b5f2836151d48d5e4722f916121869160ff90911690614370565b60405180910390a15050565b6113648383836000611658565b600054600160881b900460ff16156121c95760405162dc149f60e41b815260040160405180910390fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d83ef2676040518163ffffffff1660e01b81526004016040805180830381865afa158015612229573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061224d9190614764565b90925090508161227057604051633535e1d960e11b815260040160405180910390fd5b604080518082019091528281526020018190526008829055600981905536607a146122a357639824bdab6000526004601cfd5b806122ac6125b5565b116122de576122b96125c1565b60405163f40239db60e01b81526004016122d591815260200190565b60405180910390fd5b6040805160e08101825263ffffffff8152600060208201526002918101612303611346565b6001600160a01b03168152602001346001600160801b031681526020016123286125c1565b815260016020820152604001426001600160801b0390811690915282546001808201855560009485526020808620855160059094020180549186015163ffffffff9094166001600160c01b031990921691909117600160201b6001600160a01b0394851602178155604085015191810180546001600160a01b031916929093169190911790915560608301516002820180546fffffffffffffffffffffffffffffffff19169184169190911790556080830151600382015560a083015160c090930151928216600160801b9390921692909202176004909101558054600160881b60ff60881b199091161781553490600b90612422611346565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546124519190614647565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156124b357600080fd5b505af11580156124c7573d6000803e3d6000fd5b50506000805467ffffffffffffffff1916426001600160401b0316179055505060408051630f27ce5f60e21b815290517f000000000000000000000000000000000000000000000000000000000000000063ffffffff1692507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633c9f397c9160048083019260209291908290030181865afa158015612575573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125999190614788565b600a805460ff191663ffffffff92909216929092141790555050565b6000611352605461341d565b6000611352601461341d565b600080600054600160801b900460ff1660028111156125ee576125ee614339565b1461260c5760405163067fe19560e41b815260040160405180910390fd5b6000600283815481106126215761262161461b565b600091825260208220600590910201805490925063ffffffff9081161461268757815460028054909163ffffffff1690811061265f5761265f61461b565b906000526020600020906005020160040160109054906101000a90046001600160801b031690505b60048201546000906126b090600160801b90046001600160401b03165b6001600160401b031690565b6126c3906001600160401b031642614678565b6126d96126a4846001600160801b031660401c90565b6001600160401b03166126ec9190614647565b90506001600160401b037f0000000000000000000000000000000000000000000000000000000000000000166001600160401b0316816001600160401b031611612736578061139a565b7f000000000000000000000000000000000000000000000000000000000000000095945050505050565b600080612775836001600160801b031661343d565b60ff1690507f00000000000000000000000000000000000000000000000000000000000000008111156127bb576040516356f57b2b60e01b815260040160405180910390fd5b642e90edd00062061a806311e1a30060006127d683836147c4565b9050670de0b6b3a7640000600061280d827f00000000000000000000000000000000000000000000000000000000000000006147d8565b9050600061282b612826670de0b6b3a7640000866147d8565b61359e565b9050600061283984846137b4565b905060006128478383613803565b9050600061285482613831565b905060006128738261286e670de0b6b3a76400008f6147d8565b6139ae565b905060006128818b83613803565b905061288d818d6147d8565b9f9e505050505050505050505050505050565b600281815481106128b057600080fd5b60009182526020909120600590910201805460018201546002830154600384015460049094015463ffffffff84169550600160201b9093046001600160a01b03908116949216926001600160801b03918216929180821691600160801b90041687565b60006002600d5460ff16600281111561292e5761292e614339565b0361294f57506001600160a01b03166000908152600b602052604090205490565b506001600160a01b031660009081526003602052604090205490565b60008054600160801b900460ff16600281111561298a5761298a614339565b146129a85760405163067fe19560e41b815260040160405180910390fd5b6000600287815481106129bd576129bd61461b565b6000918252602082206005919091020160048101549092506001600160801b0316908715821760011b9050612a137f00000000000000000000000000000000000000000000000000000000000000006001614647565b612a25826001600160801b031661343d565b60ff1614612a4657604051630bea7bb360e31b815260040160405180910390fd5b6000808915612b2257612a997f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000614678565b6001901b612aaf846001600160801b03166139df565b6001600160801b0316612ac291906147f7565b15612af657612aed612ade60016001600160801b03871661480b565b865463ffffffff1660006139fd565b60030154612b18565b7f00000000000000000000000000000000000000000000000000000000000000005b9150849050612b43565b60038501549150612b40612ade6001600160801b038616600161482b565b90505b600882901b60088a8a604051612b5a92919061460b565b6040518091039020901b14612b825760405163696550ff60e01b815260040160405180910390fd5b6000612b8d8c613ac6565b90506000612b9c836003015490565b6040516370a6769960e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e14ced3290612bf0908f908f908f908f908a90600401614876565b6020604051808303816000875af1158015612c0f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c3391906146ac565b600485015491149150600090600290612c54906001600160801b031661343d565b612c66896001600160801b031661343d565b612c7091906148b0565b612c7a91906148d3565b60ff161590508115158103612ca25760405163fb4e40dd60e01b815260040160405180910390fd5b8754600160201b90046001600160a01b031615612cd257604051639071e6af60e01b815260040160405180910390fd5b50508554640100000000600160c01b03191633600160201b02179095555050505050505050505050565b60008054600160801b900460ff166002811115612d1b57612d1b614339565b14612d395760405163067fe19560e41b815260040160405180910390fd5b600080600080612d4886613af5565b93509350935093506000612d5e85858585613d64565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015612dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612de4919061468f565b905060018903612e8e576001600160a01b0381166352f0f3ad8a84612e0a610b7f61164c565b6040516001600160e01b031960e086901b16815260048101939093526024830191909152604482015260206064820152608481018a905260a4015b6020604051808303816000875af1158015612e64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612e8891906146ac565b5061118a565b60028903612ead576001600160a01b0381166352f0f3ad8a8489612e0a565b60038903612ecc576001600160a01b0381166352f0f3ad8a8487612e0a565b60048903612fd9576000612f096001600160801b0385167f0000000000000000000000000000000000000000000000000000000000000000613e03565b600954612f169190614647565b612f21906001614647565b9050612f2b6125b5565b8110612f3e57612f396125b5565b612f40565b805b90506001600160a01b0382166352f0f3ad8b8560405160e084901b6001600160e01b03191681526004810192909252602482015260c084901b604482015260086064820152608481018b905260a4016020604051808303816000875af1158015612fae573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612fd291906146ac565b505061118a565b6005890361304c576040516352f0f3ad60e01b8152600481018a9052602481018390527f000000000000000000000000000000000000000000000000000000000000000060c01b604482015260086064820152608481018890526001600160a01b038216906352f0f3ad9060a401612e45565b604051600162ec819b60e01b0319815260040160405180910390fd5b7f0000000000000000000000000000000000000000000000000000000000000000600060606130956125c1565b915061309f6113a3565b9050909192565b60008183116130b557816130b7565b825b90505b92915050565b600081600001518260200151836040015184606001516040516020016130ff949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6040805180820190915260008082526020820152815160000361315257604051635ab458fb60e01b815260040160405180910390fd5b50604080518082019091528151815260209182019181019190915290565b6060600080600061318085613e30565b91945092509050600181600181111561319b5761319b614339565b146131b9576040516325ce355f60e11b815260040160405180910390fd5b84516131c58385614647565b146131e357604051630b8aa6f760e31b815260040160405180910390fd5b604080516020808252610420820190925290816020015b60408051808201909152600080825260208201528152602001906001900390816131fa5790505093506000835b86518110156132e85760008061326d6040518060400160405280858c600001516132519190614678565b8152602001858c602001516132669190614647565b9052613e30565b5091509150604051806040016040528083836132899190614647565b8152602001848b6020015161329e9190614647565b8152508885815181106132b3576132b361461b565b60209081029190910101526132c9600185614647565b93506132d58183614647565b6132df9084614647565b92505050613227565b50845250919392505050565b6060600080600061330485613e30565b91945092509050600081600181111561331f5761331f614339565b1461333d576040516307fe6cb960e21b815260040160405180910390fd5b6133478284614647565b85511461336757604051630b8aa6f760e31b815260040160405180910390fd5b61139a85602001518484614126565b60028101546001600160a01b038316600090815260036020526040812080546001600160801b03909316929091906133af908490614647565b90915550505050565b6000806133cd3660011981013560f01c900390565b929092013560601c92915050565b606060006133f13660011981013560f01c900390565b905060405191508282528284820160208401378260208301016000815260208101604052505092915050565b6000806134323660011981013560f01c900390565b929092013592915050565b7e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f6307c4acdd60e01b6001600160401b03831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b60006134bf6001600160801b038416600161482b565b905060006134cf828660016139fd565b9050600086901a8380613531575061350860027f00000000000000000000000000000000000000000000000000000000000000006147f7565b6004830154600290613522906001600160801b031661343d565b61352c91906148d3565b60ff16145b156135705760ff81166001148061354b575060ff81166002145b61356b5760405163f40239db60e01b8152600481018890526024016122d5565b613595565b60ff8116156135955760405163f40239db60e01b8152600481018890526024016122d5565b50505050505050565b6001600160801b03811160071b81811c6001600160401b031060061b1781811c63ffffffff1060051b1781811c61ffff1060041b1781811c60ff1060031b17600082136135f357631615e6386000526004601cfd5b7ff8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff6f8421084210842108cc6318c6db6d54be83831c1c601f161a1890811b609f90811c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd1901909102780a09507084cc699bb0e71ea869ffffffffffffffffffffffff190105711340daa0d5f769dba1915cef59f0815a5506029190037d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b302017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d90565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218311670de0b6b3a7640000021582026137f157637c5f487d6000526004601cfd5b50670de0b6b3a7640000919091020490565b6000816000190483118202156138215763bac65e5b6000526004601cfd5b50670de0b6b3a764000091020490565b600068023f2fa8f6da5b9d2819821361384957919050565b680755bf798b4a1bf1e582126138675763a37bfec96000526004601cfd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60006130b7670de0b6b3a7640000836139c68661359e565b6139d091906148f5565b6139da919061497a565b613831565b6000806139eb8361343d565b600160ff919091161b90920392915050565b60008082613a3d57613a386001600160801b0386167f00000000000000000000000000000000000000000000000000000000000000006141ba565b613a4f565b613a4f856001600160801b0316614229565b905060028481548110613a6457613a6461461b565b906000526020600020906005020191505b60048201546001600160801b03828116911614613abe57815460028054909163ffffffff16908110613aa957613aa961461b565b90600052602060002090600502019150613a75565b509392505050565b6000806000806000613ad786613af5565b9350935093509350613aeb84848484613d64565b9695505050505050565b6000806000806000859050600060028281548110613b1557613b1561461b565b6000918252602090912060059091020160048101549091507f000000000000000000000000000000000000000000000000000000000000000090613b61906001600160801b031661343d565b60ff1611613b82576040516359a5ae1160e11b815260040160405180910390fd5b6000815b60048301547f000000000000000000000000000000000000000000000000000000000000000090613bbf906001600160801b031661343d565b60ff169250821115613c3457825463ffffffff16613bfe7f00000000000000000000000000000000000000000000000000000000000000006001614647565b8303613c08578391505b60028181548110613c1b57613c1b61461b565b9060005260206000209060050201935080945050613b86565b600481810154908401546001600160801b0391821691166000816001600160801b0316613c79613c6d856001600160801b031660011c90565b6001600160801b031690565b6001600160801b03161490508015613d12576000613c9f836001600160801b03166139df565b6001600160801b03161115613cef576000613ccf613cc760016001600160801b03861661480b565b8960016139fd565b6003810154600490910154909c506001600160801b03169a50613cf59050565b6008549a505b600386015460048701549099506001600160801b03169750613d56565b6000613d2b613cc76001600160801b038516600161482b565b6003808901546004808b015492840154930154909e506001600160801b039182169d50919b50169850505b505050505050509193509193565b60006001600160801b03841615613dbf5760408051602081018790526001600160801b038087169282019290925260608101859052908316608082015260a0016040516020818303038152906040528051906020012061139a565b8282604051602001613de49291909182526001600160801b0316602082015260400190565b6040516020818303038152906040528051906020012095945050505050565b600080613e0f8461343d565b60ff1690508083036001841b600180831b0386831b17039250505092915050565b60008060008360000151600003613e5a57604051635ab458fb60e01b815260040160405180910390fd5b6020840151805160001a607f8111613e7f57600060016000945094509450505061411f565b60b78111613f17576000613e94608083614678565b905080876000015111613eba576040516366c9448560e01b815260040160405180910390fd5b6001838101516001600160f81b0319169082148015613ee65750600160ff1b6001600160f81b03198216105b15613f045760405163babb01dd60e01b815260040160405180910390fd5b506001955093506000925061411f915050565b60bf8111613ff9576000613f2c60b783614678565b905080876000015111613f52576040516366c9448560e01b815260040160405180910390fd5b60018301516001600160f81b0319166000819003613f835760405163babb01dd60e01b815260040160405180910390fd5b600184015160088302610100031c60378111613fb25760405163babb01dd60e01b815260040160405180910390fd5b613fbc8184614647565b895111613fdc576040516366c9448560e01b815260040160405180910390fd5b613fe7836001614647565b975095506000945061411f9350505050565b60f7811161404557600061400e60c083614678565b905080876000015111614034576040516366c9448560e01b815260040160405180910390fd5b60019550935084925061411f915050565b600061405260f783614678565b905080876000015111614078576040516366c9448560e01b815260040160405180910390fd5b60018301516001600160f81b03191660008190036140a95760405163babb01dd60e01b815260040160405180910390fd5b600184015160088302610100031c603781116140d85760405163babb01dd60e01b815260040160405180910390fd5b6140e28184614647565b895111614102576040516366c9448560e01b815260040160405180910390fd5b61410d836001614647565b975095506001945061411f9350505050565b9193909250565b6060816001600160401b0381111561414057614140614582565b6040519080825280601f01601f19166020018201604052801561416a576020820181803683370190505b50905081156141b357600061417f8486614647565b90506020820160005b848110156141a0578281015182820152602001614188565b848111156141af576000858301525b5050505b9392505050565b6000816141cf846001600160801b031661343d565b60ff16116141e55763b34b5c226000526004601cfd5b6141ee83614229565b905081614203826001600160801b031661343d565b60ff16116130ba576130b7614219836001614647565b6001600160801b0383169061424d565b6000811960018301168161423c8261343d565b60ff169390931c8015179392505050565b6000806142598461343d565b60ff169050808303600180821b0385821b179250505092915050565b60008083601f84011261428757600080fd5b5081356001600160401b0381111561429e57600080fd5b6020830191508360208285010111156142b657600080fd5b9250929050565b600080600083850360a08112156142d357600080fd5b60808112156142e157600080fd5b5083925060808401356001600160401b038111156142fe57600080fd5b61430a86828701614275565b9497909650939450505050565b6000806040838503121561432a57600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6003811061436d57634e487b7160e01b600052602160045260246000fd5b50565b6020810161437d8361434f565b91905290565b6001600160a01b038116811461436d57600080fd5b6000602082840312156143aa57600080fd5b81356141b381614383565b6000806000606084860312156143ca57600080fd5b505081359360208301359350604090920135919050565b6000815180845260005b81811015614407576020818501810151868301820152016143eb565b81811115614419576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006130b760208301846143e1565b60006020828403121561445357600080fd5b5035919050565b801515811461436d57600080fd5b6000806000806080858703121561447e57600080fd5b843593506020850135925060408501359150606085013561449e8161445a565b939692955090935050565b6000602082840312156144bb57600080fd5b81356001600160801b03811681146141b357600080fd5b600080600080600080608087890312156144eb57600080fd5b8635955060208701356144fd8161445a565b945060408701356001600160401b038082111561451957600080fd5b6145258a838b01614275565b9096509450606089013591508082111561453e57600080fd5b5061454b89828a01614275565b979a9699509497509295939492505050565b63ffffffff8416815282602082015260606040820152600061139a60608301846143e1565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156145aa57600080fd5b604051608081018181106001600160401b03821117156145da57634e487b7160e01b600052604160045260246000fd5b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561465a5761465a614631565b500190565b60006001820161467157614671614631565b5060010190565b60008282101561468a5761468a614631565b500390565b6000602082840312156146a157600080fd5b81516141b381614383565b6000602082840312156146be57600080fd5b5051919050565b60006001600160401b038083168185168083038211156146e7576146e7614631565b01949350505050565b60006001600160401b038083168185168183048111821515161561471657614716614631565b02949350505050565b60006001600160401b038381169083168181101561473f5761473f614631565b039392505050565b60006020828403121561475957600080fd5b81516141b38161445a565b6000806040838503121561477757600080fd5b505080516020909101519092909150565b60006020828403121561479a57600080fd5b815163ffffffff811681146141b357600080fd5b634e487b7160e01b600052601260045260246000fd5b6000826147d3576147d36147ae565b500490565b60008160001904831182151516156147f2576147f2614631565b500290565b600082614806576148066147ae565b500690565b60006001600160801b038381169083168181101561473f5761473f614631565b60006001600160801b038083168185168083038211156146e7576146e7614631565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b60608152600061488a60608301878961484d565b828103602084015261489d81868861484d565b9150508260408301529695505050505050565b600060ff821660ff8416808210156148ca576148ca614631565b90039392505050565b600060ff8316806148e6576148e66147ae565b8060ff84160691505092915050565b60006001600160ff1b038184138284138082168684048611161561491b5761491b614631565b600160ff1b600087128281168783058912161561493a5761493a614631565b6000871292508782058712848416161561495657614956614631565b8785058712818416161561496c5761496c614631565b505050929093029392505050565b600082614989576149896147ae565b600160ff1b8214600019841416156149a3576149a3614631565b50059056fea264697066735822122042af6780a7c8dda46d8b2a5e18225ee0551564fb98a13883feff792f9f9e94d364736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000000003682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b60000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000f027f4a985560fb13324e943edf55ad6f1d15dc1000000000000000000000000489c2e5ebe0037bdb2dc039c5770757b8e54ea1f0000000000000000000000000729957c92a1f50590a84cb2d65d761093f3f8eb0000000000000000000000000000000000000000000000000000000000014a34", + "nonce": "0x45", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + }, + { + "hash": "0x9259bdb6ae2ebec1a4fba4d98b340c18c197df19ef747eab54d108e8e341b3a2", + "transactionType": "CREATE", + "contractName": "PermissionedDisputeGame", + "contractAddress": "0xf0102ffe22649a5421d53acc96e309660960cf44", + "function": null, + "arguments": [ + "(1, 0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6, 73, 30, 10800, 302400, 0xF027F4A985560fb13324e943edf55ad6F1d15Dc1, 0x27A6128F707de3d99F89Bf09c35a4e0753E1B808, 0x0729957c92A1F50590A84cb2D65D761093f3f8eB, 84532)", + "0x037637067c1DbE6d2430616d8f54Cb774Daa5999", + "0x8b8c52B04A38f10515C52670fcb23f3C4C44474F" + ], + "transaction": { + "from": "0x8c1a617bdb47342f9c17ac8750e0b070c372c721", + "gas": "0x54c770", + "value": "0x0", + "input": "0x6102006040523480156200001257600080fd5b50604051620054a0380380620054a083398101604081905262000035916200053b565b82620000446001607e6200064a565b60ff16816040015111156200006c57604051633beff19960e11b815260040160405180910390fd5b60001981606001511480620000965750604081015160608201516200009390600162000670565b10155b15620000b55760405163e62ccf3960e01b815260040160405180910390fd5b600281606001511015620000dc5760405163e62ccf3960e01b815260040160405180910390fd5b6001600160401b0380168160c001516001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000129573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200014f91906200068b565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200018d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620001b39190620006ab565b1115620001d35760405163b4e1243360e01b815260040160405180910390fd5b6000620001f882608001516001600160401b03166200048e60201b62000c1b1760201c565b6200020e906001600160401b03166002620006c5565b905060008260c001516001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000255573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200027b91906200068b565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa158015620002b9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620002df9190620006ab565b6200030284608001516001600160401b03166200048e60201b62000c1b1760201c565b6001600160401b031662000317919062000670565b905060006200033283836200049160201b620022951760201c565b90506001600160401b038111156200035d5760405163235dfb2b60e21b815260040160405180910390fd5b620003808460a001516001600160401b03166200048e60201b62000c1b1760201c565b6001600160401b0316816001600160401b03161115620003b35760405163235dfb2b60e21b815260040160405180910390fd5b63ffffffff8016620003da856000015163ffffffff166200048e60201b62000c1b1760201c565b63ffffffff1603620003ff5760405163073ed16760e31b815260040160405180910390fd5b5050815163ffffffff1661012090815260208301516080908152604084015160a0908152606085015160c0908152918501516001600160401b039081166101a052908501511660e0908152908401516001600160a01b03908116610100908152918501518116610140529084015181166101605292015161018052509182166101c052166101e05250620006e7565b90565b6000818311620004a25781620004a4565b825b9392505050565b60405161014081016001600160401b0381118282101715620004dd57634e487b7160e01b600052604160045260246000fd5b60405290565b805163ffffffff81168114620004f857600080fd5b919050565b80516001600160401b0381168114620004f857600080fd5b6001600160a01b03811681146200052b57600080fd5b50565b8051620004f88162000515565b60008060008385036101808112156200055357600080fd5b610140808212156200056457600080fd5b6200056e620004ab565b91506200057b86620004e3565b8252602086015160208301526040860151604083015260608601516060830152620005a960808701620004fd565b6080830152620005bc60a08701620004fd565b60a0830152620005cf60c087016200052e565b60c0830152620005e260e087016200052e565b60e0830152610100620005f78188016200052e565b8184015250610120808701518184015250819450620006188187016200052e565b935050506200062b61016085016200052e565b90509250925092565b634e487b7160e01b600052601160045260246000fd5b600060ff821660ff84168082101562000667576200066762000634565b90039392505050565b6000821982111562000686576200068662000634565b500190565b6000602082840312156200069e57600080fd5b8151620004a48162000515565b600060208284031215620006be57600080fd5b5051919050565b6000816000190483118215151615620006e257620006e262000634565b500290565b60805160a05160c05160e05161010051610120516101405161016051610180516101a0516101c0516101e051614be5620008bb600039600081816105be015281816117310152611e9e01526000818161087d015281816116ff01528181611a630152611e6c0152600081816106f501528181612a0801528181612a720152612aa4015260008181610a2701526121ed0152600081816106780152818161184f015281816118f70152818161196d01528181612ecc015261322001526000818161054b0152818161154c0152818161161601528181612dee01526131580152600081816108b80152818161225901526131f70152600081816104f701528181611f530152818161292101526139a0015260008181610a7a01528181610dff01528181611bee01528181611c2e015281816128aa01528181612ad30152612b2e015260008181610aad015281816120d4015281816127670152818161283301528181612a430152818161384901528181613b2b01528181613b8901528181613bd4015281816141f101526142e0015260008181610b5401528181611c7201528181611cdf015281816127ef015281816128f5015281816137e2015261386a0152600081816107aa01526138ed0152614be56000f3fe60806040526004361061031a5760003560e01c80636f034409116101ab578063c0d8bb74116100f7578063dabd396d11610095578063f8f43ff61161006f578063f8f43ff614610b01578063fa24f74314610b21578063fa315aa914610b45578063fe2bbeb214610b7857600080fd5b8063dabd396d14610a6b578063ec5e630814610a9e578063eff0f59214610ad157600080fd5b8063cf09e0d0116100d1578063cf09e0d0146109d8578063d5d44d80146109f8578063d6ae3cd514610a18578063d8cc1a3c14610a4b57600080fd5b8063c0d8bb7414610917578063c395e1ca14610944578063c6f0308c1461096457600080fd5b80638b85902b11610164578063a8e4fb901161013e578063a8e4fb901461086e578063bbdc02db146108a1578063bcef3b55146108e2578063bd8da956146108f757600080fd5b80638b85902b146107865780638d450a951461079b578063a445ece6146107ce57600080fd5b80636f0344091461071957806370872aa51461072c578063786b844b146107415780637b0f0adc146107565780638129fc1c146107695780638980e0cc1461077157600080fd5b80633e3ac9121161026a57806357da950e11610223578063609d3334116101fd578063609d33341461069c57806360e27464146106b15780636361506d146106d15780636b6716c0146106e657600080fd5b806357da950e146106195780635a5fa2d9146106495780635c0cba331461066957600080fd5b80633e3ac9121461051b5780633fc8cef31461053c578063472777c61461056f578063529d6a8c14610582578063534db0e2146105af57806354fd4d50146105e257600080fd5b806325fc2ace116102d757806330dbe570116102b157806330dbe57014610481578063378dd48c146104b957806337b1b229146104d35780633a768463146104e857600080fd5b806325fc2ace1461042d5780632810e1d61461044c5780632ad69aeb1461046157600080fd5b8063019351301461031f57806303c2924d1461034157806319effeb414610361578063200d2ed2146103a5578063222abf45146103d3578063250e69bd14610413575b600080fd5b34801561032b57600080fd5b5061033f61033a3660046144c4565b610ba8565b005b34801561034d57600080fd5b5061033f61035c36600461451e565b610d86565b34801561036d57600080fd5b5060005461038890600160401b90046001600160401b031681565b6040516001600160401b0390911681526020015b60405180910390f35b3480156103b157600080fd5b506000546103c690600160801b900460ff1681565b60405161039c9190614577565b3480156103df57600080fd5b506104036103ee36600461459f565b600c6020526000908152604090205460ff1681565b604051901515815260200161039c565b34801561041f57600080fd5b50600a546104039060ff1681565b34801561043957600080fd5b506008545b60405190815260200161039c565b34801561045857600080fd5b506103c6611231565b34801561046d57600080fd5b5061043e61047c36600461451e565b6113b1565b34801561048d57600080fd5b506001546104a1906001600160a01b031681565b6040516001600160a01b03909116815260200161039c565b3480156104c557600080fd5b50600d546103c69060ff1681565b3480156104df57600080fd5b506104a16113e2565b3480156104f457600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a1565b34801561052757600080fd5b5060005461040390600160901b900460ff1681565b34801561054857600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a1565b61033f61057d3660046145bc565b6113f3565b34801561058e57600080fd5b5061043e61059d36600461459f565b60036020526000908152604090205481565b3480156105bb57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a1565b3480156105ee57600080fd5b50604080518082019091526005815264312e342e3160d81b60208201525b60405161039c9190614635565b34801561062557600080fd5b50600854600954610634919082565b6040805192835260208301919091520161039c565b34801561065557600080fd5b5061043e610664366004614648565b611405565b34801561067557600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a1565b3480156106a857600080fd5b5061060c61143f565b3480156106bd57600080fd5b5061033f6106cc36600461459f565b61144d565b3480156106dd57600080fd5b5061043e6116e8565b3480156106f257600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610388565b61033f61072736600461466f565b6116f4565b34801561073857600080fd5b5060095461043e565b34801561074d57600080fd5b5061033f611782565b61033f6107643660046145bc565b611a4b565b61033f611a58565b34801561077d57600080fd5b5060025461043e565b34801561079257600080fd5b5061043e611aab565b3480156107a757600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061043e565b3480156107da57600080fd5b506108306107e9366004614648565b6007602052600090815260409020805460019091015460ff821691610100810463ffffffff1691650100000000009091046001600160801b0316906001600160a01b031684565b60408051941515855263ffffffff90931660208501526001600160801b03909116918301919091526001600160a01b0316606082015260800161039c565b34801561087a57600080fd5b507f00000000000000000000000000000000000000000000000000000000000000006104a1565b3480156108ad57600080fd5b5060405163ffffffff7f000000000000000000000000000000000000000000000000000000000000000016815260200161039c565b3480156108ee57600080fd5b5061043e611ab7565b34801561090357600080fd5b50610388610912366004614648565b611ac3565b34801561092357600080fd5b5061043e61093236600461459f565b600b6020526000908152604090205481565b34801561095057600080fd5b5061043e61095f3660046146b0565b611c56565b34801561097057600080fd5b5061098461097f366004614648565b611d96565b6040805163ffffffff90981688526001600160a01b03968716602089015295909416948601949094526001600160801b039182166060860152608085015291821660a08401521660c082015260e00161039c565b3480156109e457600080fd5b50600054610388906001600160401b031681565b348015610a0457600080fd5b5061043e610a1336600461459f565b611e09565b348015610a2457600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061043e565b348015610a5757600080fd5b5061033f610a663660046146d9565b611e61565b348015610a7757600080fd5b507f0000000000000000000000000000000000000000000000000000000000000000610388565b348015610aaa57600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061043e565b348015610add57600080fd5b50610403610aec366004614648565b60046020526000908152604090205460ff1681565b348015610b0d57600080fd5b5061033f610b1c3660046145bc565b611eeb565b348015610b2d57600080fd5b50610b36612257565b60405161039c93929190614764565b348015610b5157600080fd5b507f000000000000000000000000000000000000000000000000000000000000000061043e565b348015610b8457600080fd5b50610403610b93366004614648565b60066020526000908152604090205460ff1681565b60008054600160801b900460ff166002811115610bc757610bc7614540565b14610be55760405163067fe19560e41b815260040160405180910390fd5b600054600160901b900460ff1615610c105760405163075173a960e11b815260040160405180910390fd5b610c1e610c1b611ab7565b90565b610c35610c303686900386018661479f565b6122af565b14610c5357604051639cc00b5b60e01b815260040160405180910390fd5b82606001358282604051610c68929190614812565b604051809103902014610c8e5760405163d81d583b60e01b815260040160405180910390fd5b6000610cd7610cd284848080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061230b92505050565b61235f565b90506000610cfe82600881518110610cf157610cf1614822565b60200260200101516124e3565b9050602081511115610d235760405163d81d583b60e01b815260040160405180910390fd5b602081810151825190910360031b1c610d3a611aab565b8103610d5957604051630b8ed88360e41b815260040160405180910390fd5b5050600180546001600160a01b0319163317905550506000805460ff60901b1916600160901b1790555050565b60008054600160801b900460ff166002811115610da557610da5614540565b14610dc35760405163067fe19560e41b815260040160405180910390fd5b600060028381548110610dd857610dd8614822565b906000526020600020906005020190506000610df384611ac3565b90506001600160401b037f000000000000000000000000000000000000000000000000000000000000000081169082161015610e425760405163f2440b5360e01b815260040160405180910390fd5b60008481526006602052604090205460ff1615610e725760405163f1a9458160e01b815260040160405180910390fd5b6000848152600560205260409020805480158015610e8f57508515155b15610ef1578354600160201b90046001600160a01b031660008115610eb45781610ec3565b60018601546001600160a01b03165b9050610ecf8187612565565b505050600094855250506006602052505060409020805460ff19166001179055565b6000868152600760209081526040918290208251608081018452815460ff81161515808352610100820463ffffffff16948301949094526501000000000090046001600160801b031693810193909352600101546001600160a01b03166060830152610f75576001600160801b036040820152600181526000869003610f75578195505b600086826020015163ffffffff16610f8d919061484e565b90506000838211610f9e5781610fa0565b835b602084015190915063ffffffff165b818110156110a6576000868281548110610fcb57610fcb614822565b6000918252602080832090910154808352600690915260409091205490915060ff1661100a57604051634d03b32360e11b815260040160405180910390fd5b60006002828154811061101f5761101f614822565b600091825260209091206005909102018054909150600160201b90046001600160a01b03161580156110655750600481015460408701516001600160801b039182169116115b156110915760018101546001600160a01b0316606087015260048101546001600160801b031660408701525b5050808061109e90614866565b915050610faf565b5063ffffffff818116602085810191825260008c815260079091526040908190208651815493519288015164ffffffffff1990941690151564ffffffff00191617610100929094169182029390931774ffffffffffffffffffffffffffffffff00000000001916650100000000006001600160801b03909316929092029190911782556060850151600190920180546001600160a01b0319166001600160a01b039093169290921790915584900361122657606083015160008a8152600660205260409020805460ff191660011790558915801561118d5750600054600160901b900460ff165b156111d3576001546001600160a01b03166111a8818a612565565b88546001600160a01b03909116600160201b02640100000000600160c01b0319909116178855611224565b6112006001600160a01b038216156111eb57816111fa565b60018901546001600160a01b03165b89612565565b8754640100000000600160c01b031916600160201b6001600160a01b038316021788555b505b505050505050505050565b600080600054600160801b900460ff16600281111561125257611252614540565b146112705760405163067fe19560e41b815260040160405180910390fd5b6000805260066020527f54cdd369e4e8a8515e52ca72ec816c2101831ad1f18bf44102ed171459c9b4f85460ff166112bb57604051634d03b32360e11b815260040160405180910390fd5b60006001600160a01b031660026000815481106112da576112da614822565b6000918252602090912060059091020154600160201b90046001600160a01b03161461130757600161130a565b60025b600080546001600160401b034216600160401b026fffffffffffffffff000000000000000019821681178355929350839260ff60801b191670ffffffffffffffffff00000000000000001990911617600160801b83600281111561137057611370614540565b02179055600281111561138557611385614540565b6040517f5e186f09b9c93491f14e277eea7faa5de6a2d4bda75a79af7a3684fbfb42da6090600090a290565b600560205281600052604060002081815481106113cd57600080fd5b90600052602060002001600091509150505481565b60006113ee60006125a7565b905090565b61140083838360016116f4565b505050565b6000818152600760209081526040808320600590925282208054825461143690610100900463ffffffff168261487f565b95945050505050565b60606113ee605460206125ca565b611455611782565b60006002600d5460ff16600281111561147057611470614540565b0361149457506001600160a01b0381166000908152600b60205260409020546114ea565b6001600d5460ff1660028111156114ad576114ad614540565b036114d157506001600160a01b0381166000908152600360205260409020546114ea565b6040516301e28f7d60e21b815260040160405180910390fd5b6001600160a01b0382166000908152600c602052604090205460ff166115ae576001600160a01b038281166000818152600c602052604090819020805460ff1916600117905551637eee288d60e01b81526004810191909152602481018390527f000000000000000000000000000000000000000000000000000000000000000090911690637eee288d90604401600060405180830381600087803b15801561159257600080fd5b505af11580156115a6573d6000803e3d6000fd5b505050505050565b806000036115cf576040516317bfe5f760e01b815260040160405180910390fd5b6001600160a01b038281166000818152600b602090815260408083208390556003909152808220919091555163f3fef3a360e01b81526004810191909152602481018390527f00000000000000000000000000000000000000000000000000000000000000009091169063f3fef3a390604401600060405180830381600087803b15801561165c57600080fd5b505af1158015611670573d6000803e3d6000fd5b505050506000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146116c1576040519150601f19603f3d011682016040523d82523d6000602084013e6116c6565b606091505b5050905080611400576040516383e6cc6b60e01b815260040160405180910390fd5b60006113ee603461260c565b336001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614806117535750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b611770576040516369c3779f60e11b815260040160405180910390fd5b61177c8484848461262c565b50505050565b6002600d5460ff16600281111561179b5761179b614540565b14806117bd57506001600d5460ff1660028111156117bb576117bb614540565b145b156117c457565b6000600d5460ff1660028111156117dd576117dd614540565b146117fb576040516301e28f7d60e21b815260040160405180910390fd5b600054600160401b90046001600160401b03166001600160401b031660000361183757604051636082930560e11b815260040160405180910390fd5b604051630314d2b360e01b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690630314d2b390602401602060405180830381865afa15801561189e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118c29190614896565b9050806118e257604051634851bd9b60e01b815260040160405180910390fd5b6040516317cf21a960e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906317cf21a990602401600060405180830381600087803b15801561194357600080fd5b505af1925050508015611954575060015b506040516324b5ce0b60e11b81523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063496b9c1690602401602060405180830381865afa1580156119bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119e09190614896565b905080156119fa57600d805460ff19166001179055611a08565b600d805460ff191660021790555b600d546040517f9908eaac0645df9d0704d06adc9e07337c951de2f06b5f2836151d48d5e4722f91611a3f9160ff90911690614577565b60405180910390a15050565b61140083838360006116f4565b326001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614611aa1576040516369c3779f60e11b815260040160405180910390fd5b611aa9612e9d565b565b60006113ee605461260c565b60006113ee601461260c565b600080600054600160801b900460ff166002811115611ae457611ae4614540565b14611b025760405163067fe19560e41b815260040160405180910390fd5b600060028381548110611b1757611b17614822565b600091825260208220600590910201805490925063ffffffff90811614611b7d57815460028054909163ffffffff16908110611b5557611b55614822565b906000526020600020906005020160040160109054906101000a90046001600160801b031690505b6004820154600090611ba690600160801b90046001600160401b03165b6001600160401b031690565b611bb9906001600160401b03164261487f565b611bcf611b9a846001600160801b031660401c90565b6001600160401b0316611be2919061484e565b90506001600160401b037f0000000000000000000000000000000000000000000000000000000000000000166001600160401b0316816001600160401b031611611c2c5780611436565b7f000000000000000000000000000000000000000000000000000000000000000095945050505050565b600080611c6b836001600160801b03166132b3565b60ff1690507f0000000000000000000000000000000000000000000000000000000000000000811115611cb1576040516356f57b2b60e01b815260040160405180910390fd5b642e90edd00062061a806311e1a3006000611ccc83836148c9565b9050670de0b6b3a76400006000611d03827f00000000000000000000000000000000000000000000000000000000000000006148dd565b90506000611d21611d1c670de0b6b3a7640000866148dd565b61331f565b90506000611d2f8484613535565b90506000611d3d8383613584565b90506000611d4a826135b2565b90506000611d6982611d64670de0b6b3a76400008f6148dd565b61372f565b90506000611d778b83613584565b9050611d83818d6148dd565b9f9e505050505050505050505050505050565b60028181548110611da657600080fd5b60009182526020909120600590910201805460018201546002830154600384015460049094015463ffffffff84169550600160201b9093046001600160a01b03908116949216926001600160801b03918216929180821691600160801b90041687565b60006002600d5460ff166002811115611e2457611e24614540565b03611e4557506001600160a01b03166000908152600b602052604090205490565b506001600160a01b031660009081526003602052604090205490565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480611ec05750336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016145b611edd576040516369c3779f60e11b815260040160405180910390fd5b6115a6868686868686613760565b60008054600160801b900460ff166002811115611f0a57611f0a614540565b14611f285760405163067fe19560e41b815260040160405180910390fd5b600080600080611f3786613af1565b93509350935093506000611f4d85858585613d60565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa158015611faf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fd391906148fc565b90506001890361207d576001600160a01b0381166352f0f3ad8a84611ff9610c1b6116e8565b6040516001600160e01b031960e086901b16815260048101939093526024830191909152604482015260206064820152608481018a905260a4015b6020604051808303816000875af1158015612053573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120779190614919565b50611226565b6002890361209c576001600160a01b0381166352f0f3ad8a8489611ff9565b600389036120bb576001600160a01b0381166352f0f3ad8a8487611ff9565b600489036121c85760006120f86001600160801b0385167f0000000000000000000000000000000000000000000000000000000000000000613dff565b600954612105919061484e565b61211090600161484e565b905061211a611aab565b811061212d57612128611aab565b61212f565b805b90506001600160a01b0382166352f0f3ad8b8560405160e084901b6001600160e01b03191681526004810192909252602482015260c084901b604482015260086064820152608481018b905260a4016020604051808303816000875af115801561219d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121c19190614919565b5050611226565b6005890361223b576040516352f0f3ad60e01b8152600481018a9052602481018390527f000000000000000000000000000000000000000000000000000000000000000060c01b604482015260086064820152608481018890526001600160a01b038216906352f0f3ad9060a401612034565b604051600162ec819b60e01b0319815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000060006060612284611ab7565b915061228e61143f565b9050909192565b60008183116122a457816122a6565b825b90505b92915050565b600081600001518260200151836040015184606001516040516020016122ee949392919093845260208401929092526040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b6040805180820190915260008082526020820152815160000361234157604051635ab458fb60e01b815260040160405180910390fd5b50604080518082019091528151815260209182019181019190915290565b6060600080600061236f85613e2c565b91945092509050600181600181111561238a5761238a614540565b146123a8576040516325ce355f60e11b815260040160405180910390fd5b84516123b4838561484e565b146123d257604051630b8aa6f760e31b815260040160405180910390fd5b604080516020808252610420820190925290816020015b60408051808201909152600080825260208201528152602001906001900390816123e95790505093506000835b86518110156124d75760008061245c6040518060400160405280858c60000151612440919061487f565b8152602001858c60200151612455919061484e565b9052613e2c565b509150915060405180604001604052808383612478919061484e565b8152602001848b6020015161248d919061484e565b8152508885815181106124a2576124a2614822565b60209081029190910101526124b860018561484e565b93506124c4818361484e565b6124ce908461484e565b92505050612416565b50845250919392505050565b606060008060006124f385613e2c565b91945092509050600081600181111561250e5761250e614540565b1461252c576040516307fe6cb960e21b815260040160405180910390fd5b612536828461484e565b85511461255657604051630b8aa6f760e31b815260040160405180910390fd5b61143685602001518484614122565b60028101546001600160a01b038316600090815260036020526040812080546001600160801b039093169290919061259e90849061484e565b90915550505050565b6000806125bc3660011981013560f01c900390565b929092013560601c92915050565b606060006125e03660011981013560f01c900390565b905060405191508282528284820160208401378260208301016000815260208101604052505092915050565b6000806126213660011981013560f01c900390565b929092013592915050565b60008054600160801b900460ff16600281111561264b5761264b614540565b146126695760405163067fe19560e41b815260040160405180910390fd5b60006002848154811061267e5761267e614822565b60009182526020918290206040805160e0810182526005909302909101805463ffffffff811684526001600160a01b03600160201b90910481169484019490945260018101549093169082015260028201546001600160801b03908116606083015260038301546080830181905260049093015480821660a0840152600160801b90041660c0820152915085146127285760405163180a019960e11b815260040160405180910390fd5b60a0810151600083156001600160801b0383161760011b90506000612755826001600160801b03166132b3565b60ff169050861580612790575061278d7f0000000000000000000000000000000000000000000000000000000000000000600261484e565b81145b801561279a575084155b156127b8576040516329098def60e21b815260040160405180910390fd5b600054600160901b900460ff1680156127cf575086155b156127ed5760405163075173a960e11b815260040160405180910390fd5b7f000000000000000000000000000000000000000000000000000000000000000081111561282e576040516356f57b2b60e01b815260040160405180910390fd5b6128597f0000000000000000000000000000000000000000000000000000000000000000600161484e565b810361286b5761286b868885886141b6565b3461287583611c56565b1461289357604051638620aa1960e01b815260040160405180910390fd5b600061289e88611ac3565b90506001600160401b037f00000000000000000000000000000000000000000000000000000000000000008116908216036128ec57604051630ce0744560e21b815260040160405180910390fd5b600061291960017f000000000000000000000000000000000000000000000000000000000000000061487f565b8303612a3c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316637dc0d1d06040518163ffffffff1660e01b8152600401602060405180830381865afa15801561297d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129a191906148fc565b6001600160a01b031663f3f480d96040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129de573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a029190614919565b612a35907f00000000000000000000000000000000000000000000000000000000000000006001600160401b0316614932565b9050612acd565b612a6760017f000000000000000000000000000000000000000000000000000000000000000061487f565b8303612aa157612a357f00000000000000000000000000000000000000000000000000000000000000006001600160401b0316600261495d565b507f00000000000000000000000000000000000000000000000000000000000000006001600160401b03165b612b00817f00000000000000000000000000000000000000000000000000000000000000006001600160401b031661498c565b6001600160401b0316612b19836001600160401b031690565b6001600160401b03161115612b5e57612b5b817f00000000000000000000000000000000000000000000000000000000000000006001600160401b031661498c565b91505b6000604083901b421760008a8152608087901b6001600160801b038d1617602052604081209192509060008181526004602052604090205490915060ff1615612bba576040516380497e3b60e01b815260040160405180910390fd5b60016004600083815260200190815260200160002060006101000a81548160ff02191690831515021790555060026040518060e001604052808d63ffffffff16815260200160006001600160a01b03168152602001336001600160a01b03168152602001346001600160801b031681526020018c8152602001886001600160801b03168152602001846001600160801b0316815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060608201518160020160006101000a8154816001600160801b0302191690836001600160801b031602179055506080820151816003015560a08201518160040160006101000a8154816001600160801b0302191690836001600160801b0316021790555060c08201518160040160106101000a8154816001600160801b0302191690836001600160801b031602179055505050600560008c81526020019081526020016000206001600280549050612db1919061487f565b81546001810183556000928352602080842090910191909155338252600b9052604081208054349290612de590849061484e565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b158015612e4757600080fd5b505af1158015612e5b573d6000803e3d6000fd5b50506040513393508d92508e91507f9b3245740ec3b155098a55be84957a4da13eaf7f14a8bc6f53126c0b9350f2be90600090a4505050505050505050505050565b600054600160881b900460ff1615612ec75760405162dc149f60e41b815260040160405180910390fd5b6000807f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d83ef2676040518163ffffffff1660e01b81526004016040805180830381865afa158015612f27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f4b91906149b4565b909250905081612f6e57604051633535e1d960e11b815260040160405180910390fd5b604080518082019091528281526020018190526008829055600981905536607a14612fa157639824bdab6000526004601cfd5b80612faa611aab565b11612fdc57612fb7611ab7565b60405163f40239db60e01b8152600401612fd391815260200190565b60405180910390fd5b6040805160e08101825263ffffffff81526000602082015260029181016130016113e2565b6001600160a01b03168152602001346001600160801b03168152602001613026611ab7565b815260016020820152604001426001600160801b0390811690915282546001808201855560009485526020808620855160059094020180549186015163ffffffff9094166001600160c01b031990921691909117600160201b6001600160a01b0394851602178155604085015191810180546001600160a01b031916929093169190911790915560608301516002820180546fffffffffffffffffffffffffffffffff19169184169190911790556080830151600382015560a083015160c090930151928216600160801b9390921692909202176004909101558054600160881b60ff60881b199091161781553490600b906131206113e2565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461314f919061484e565b925050819055507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b1580156131b157600080fd5b505af11580156131c5573d6000803e3d6000fd5b50506000805467ffffffffffffffff1916426001600160401b0316179055505060408051630f27ce5f60e21b815290517f000000000000000000000000000000000000000000000000000000000000000063ffffffff1692507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691633c9f397c9160048083019260209291908290030181865afa158015613273573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061329791906149d8565b600a805460ff191663ffffffff92909216929092141790555050565b7e09010a0d15021d0b0e10121619031e080c141c0f111807131b17061a05041f6307c4acdd60e01b6001600160401b03831160061b83811c63ffffffff1060051b1792831c600181901c17600281901c17600481901c17600881901c17601081901c170260fb1c1a1790565b6001600160801b03811160071b81811c6001600160401b031060061b1781811c63ffffffff1060051b1781811c61ffff1060041b1781811c60ff1060031b176000821361337457631615e6386000526004601cfd5b7ff8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff6f8421084210842108cc6318c6db6d54be83831c1c601f161a1890811b609f90811c6c465772b2bbbb5f824b15207a3081018102606090811d6d0388eaa27412d5aca026815d636e018202811d6d0df99ac502031bf953eff472fdcc018202811d6d13cdffb29d51d99322bdff5f2211018202811d6d0a0f742023def783a307a986912e018202811d6d01920d8043ca89b5239253284e42018202811d6c0b7a86d7375468fac667a0a527016c29508e458543d8aa4df2abee7883018302821d6d0139601a2efabe717e604cbb4894018302821d6d02247f7a7b6594320649aa03aba1018302821d6c8c3f38e95a6b1ff2ab1c3b343619018302821d6d02384773bdf1ac5676facced60901901830290911d6cb9a025d814b29c212b8b1a07cd1901909102780a09507084cc699bb0e71ea869ffffffffffffffffffffffff190105711340daa0d5f769dba1915cef59f0815a5506029190037d0267a36c0c95b3975ab3ee5b203a7614a3f75373f047d803ae7b6687f2b302017d57115e47018c7177eebf7cd370a3356a1b7863008a5ae8028c72b88642840160ae1d90565b60007812725dd1d243aba0e75fe645cc4873f9e65afe688c928e1f218311670de0b6b3a76400000215820261357257637c5f487d6000526004601cfd5b50670de0b6b3a7640000919091020490565b6000816000190483118202156135a25763bac65e5b6000526004601cfd5b50670de0b6b3a764000091020490565b600068023f2fa8f6da5b9d281982136135ca57919050565b680755bf798b4a1bf1e582126135e85763a37bfec96000526004601cfd5b6503782dace9d9604e83901b059150600060606bb17217f7d1cf79abc9e3b39884821b056001605f1b01901d6bb17217f7d1cf79abc9e3b39881029093036c240c330e9fb2d9cbaf0fd5aafb1981018102606090811d6d0277594991cfc85f6e2461837cd9018202811d6d1a521255e34f6a5061b25ef1c9c319018202811d6db1bbb201f443cf962f1a1d3db4a5018202811d6e02c72388d9f74f51a9331fed693f1419018202811d6e05180bb14799ab47a8a8cb2a527d57016d02d16720577bd19bf614176fe9ea6c10fe68e7fd37d0007b713f765084018402831d9081019084016d01d3967ed30fc4f89c02bab5708119010290911d6e0587f503bb6ea29d25fcb740196450019091026d360d7aeea093263ecc6e0ecb291760621b010574029d9dc38563c32e5c2f6dc192ee70ef65f9978af30260c3939093039290921c92915050565b60006122a6670de0b6b3a7640000836137478661331f565b61375191906149fe565b61375b9190614a83565b6135b2565b60008054600160801b900460ff16600281111561377f5761377f614540565b1461379d5760405163067fe19560e41b815260040160405180910390fd5b6000600287815481106137b2576137b2614822565b6000918252602082206005919091020160048101549092506001600160801b0316908715821760011b90506138087f0000000000000000000000000000000000000000000000000000000000000000600161484e565b61381a826001600160801b03166132b3565b60ff161461383b57604051630bea7bb360e31b815260040160405180910390fd5b60008089156139175761388e7f00000000000000000000000000000000000000000000000000000000000000007f000000000000000000000000000000000000000000000000000000000000000061487f565b6001901b6138a4846001600160801b03166142ab565b6001600160801b03166138b79190614ab1565b156138eb576138e26138d360016001600160801b038716614ac5565b865463ffffffff1660006142c9565b6003015461390d565b7f00000000000000000000000000000000000000000000000000000000000000005b9150849050613938565b600385015491506139356138d36001600160801b0386166001614ae5565b90505b600882901b60088a8a60405161394f929190614812565b6040518091039020901b146139775760405163696550ff60e01b815260040160405180910390fd5b60006139828c614392565b90506000613991836003015490565b6040516370a6769960e11b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063e14ced32906139e5908f908f908f908f908a90600401614b30565b6020604051808303816000875af1158015613a04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190613a289190614919565b600485015491149150600090600290613a49906001600160801b03166132b3565b613a5b896001600160801b03166132b3565b613a659190614b6a565b613a6f9190614b8d565b60ff161590508115158103613a975760405163fb4e40dd60e01b815260040160405180910390fd5b8754600160201b90046001600160a01b031615613ac757604051639071e6af60e01b815260040160405180910390fd5b50508554640100000000600160c01b03191633600160201b02179095555050505050505050505050565b6000806000806000859050600060028281548110613b1157613b11614822565b6000918252602090912060059091020160048101549091507f000000000000000000000000000000000000000000000000000000000000000090613b5d906001600160801b03166132b3565b60ff1611613b7e576040516359a5ae1160e11b815260040160405180910390fd5b6000815b60048301547f000000000000000000000000000000000000000000000000000000000000000090613bbb906001600160801b03166132b3565b60ff169250821115613c3057825463ffffffff16613bfa7f0000000000000000000000000000000000000000000000000000000000000000600161484e565b8303613c04578391505b60028181548110613c1757613c17614822565b9060005260206000209060050201935080945050613b82565b600481810154908401546001600160801b0391821691166000816001600160801b0316613c75613c69856001600160801b031660011c90565b6001600160801b031690565b6001600160801b03161490508015613d0e576000613c9b836001600160801b03166142ab565b6001600160801b03161115613ceb576000613ccb613cc360016001600160801b038616614ac5565b8960016142c9565b6003810154600490910154909c506001600160801b03169a50613cf19050565b6008549a505b600386015460048701549099506001600160801b03169750613d52565b6000613d27613cc36001600160801b0385166001614ae5565b6003808901546004808b015492840154930154909e506001600160801b039182169d50919b50169850505b505050505050509193509193565b60006001600160801b03841615613dbb5760408051602081018790526001600160801b038087169282019290925260608101859052908316608082015260a00160405160208183030381529060405280519060200120611436565b8282604051602001613de09291909182526001600160801b0316602082015260400190565b6040516020818303038152906040528051906020012095945050505050565b600080613e0b846132b3565b60ff1690508083036001841b600180831b0386831b17039250505092915050565b60008060008360000151600003613e5657604051635ab458fb60e01b815260040160405180910390fd5b6020840151805160001a607f8111613e7b57600060016000945094509450505061411b565b60b78111613f13576000613e9060808361487f565b905080876000015111613eb6576040516366c9448560e01b815260040160405180910390fd5b6001838101516001600160f81b0319169082148015613ee25750600160ff1b6001600160f81b03198216105b15613f005760405163babb01dd60e01b815260040160405180910390fd5b506001955093506000925061411b915050565b60bf8111613ff5576000613f2860b78361487f565b905080876000015111613f4e576040516366c9448560e01b815260040160405180910390fd5b60018301516001600160f81b0319166000819003613f7f5760405163babb01dd60e01b815260040160405180910390fd5b600184015160088302610100031c60378111613fae5760405163babb01dd60e01b815260040160405180910390fd5b613fb8818461484e565b895111613fd8576040516366c9448560e01b815260040160405180910390fd5b613fe383600161484e565b975095506000945061411b9350505050565b60f7811161404157600061400a60c08361487f565b905080876000015111614030576040516366c9448560e01b815260040160405180910390fd5b60019550935084925061411b915050565b600061404e60f78361487f565b905080876000015111614074576040516366c9448560e01b815260040160405180910390fd5b60018301516001600160f81b03191660008190036140a55760405163babb01dd60e01b815260040160405180910390fd5b600184015160088302610100031c603781116140d45760405163babb01dd60e01b815260040160405180910390fd5b6140de818461484e565b8951116140fe576040516366c9448560e01b815260040160405180910390fd5b61410983600161484e565b975095506001945061411b9350505050565b9193909250565b6060816001600160401b0381111561413c5761413c614789565b6040519080825280601f01601f191660200182016040528015614166576020820181803683370190505b50905081156141af57600061417b848661484e565b90506020820160005b8481101561419c578281015182820152602001614184565b848111156141ab576000858301525b5050505b9392505050565b60006141cc6001600160801b0384166001614ae5565b905060006141dc828660016142c9565b9050600086901a838061423e575061421560027f0000000000000000000000000000000000000000000000000000000000000000614ab1565b600483015460029061422f906001600160801b03166132b3565b6142399190614b8d565b60ff16145b1561427d5760ff811660011480614258575060ff81166002145b6142785760405163f40239db60e01b815260048101889052602401612fd3565b6142a2565b60ff8116156142a25760405163f40239db60e01b815260048101889052602401612fd3565b50505050505050565b6000806142b7836132b3565b600160ff919091161b90920392915050565b60008082614309576143046001600160801b0386167f00000000000000000000000000000000000000000000000000000000000000006143c1565b61431b565b61431b856001600160801b0316614430565b90506002848154811061433057614330614822565b906000526020600020906005020191505b60048201546001600160801b0382811691161461438a57815460028054909163ffffffff1690811061437557614375614822565b90600052602060002090600502019150614341565b509392505050565b60008060008060006143a386613af1565b93509350935093506143b784848484613d60565b9695505050505050565b6000816143d6846001600160801b03166132b3565b60ff16116143ec5763b34b5c226000526004601cfd5b6143f583614430565b90508161440a826001600160801b03166132b3565b60ff16116122a9576122a661442083600161484e565b6001600160801b03831690614454565b60008119600183011681614443826132b3565b60ff169390931c8015179392505050565b600080614460846132b3565b60ff169050808303600180821b0385821b179250505092915050565b60008083601f84011261448e57600080fd5b5081356001600160401b038111156144a557600080fd5b6020830191508360208285010111156144bd57600080fd5b9250929050565b600080600083850360a08112156144da57600080fd5b60808112156144e857600080fd5b5083925060808401356001600160401b0381111561450557600080fd5b6145118682870161447c565b9497909650939450505050565b6000806040838503121561453157600080fd5b50508035926020909101359150565b634e487b7160e01b600052602160045260246000fd5b6003811061457457634e487b7160e01b600052602160045260246000fd5b50565b6020810161458483614556565b91905290565b6001600160a01b038116811461457457600080fd5b6000602082840312156145b157600080fd5b81356141af8161458a565b6000806000606084860312156145d157600080fd5b505081359360208301359350604090920135919050565b6000815180845260005b8181101561460e576020818501810151868301820152016145f2565b81811115614620576000602083870101525b50601f01601f19169290920160200192915050565b6020815260006122a660208301846145e8565b60006020828403121561465a57600080fd5b5035919050565b801515811461457457600080fd5b6000806000806080858703121561468557600080fd5b84359350602085013592506040850135915060608501356146a581614661565b939692955090935050565b6000602082840312156146c257600080fd5b81356001600160801b03811681146141af57600080fd5b600080600080600080608087890312156146f257600080fd5b86359550602087013561470481614661565b945060408701356001600160401b038082111561472057600080fd5b61472c8a838b0161447c565b9096509450606089013591508082111561474557600080fd5b5061475289828a0161447c565b979a9699509497509295939492505050565b63ffffffff8416815282602082015260606040820152600061143660608301846145e8565b634e487b7160e01b600052604160045260246000fd5b6000608082840312156147b157600080fd5b604051608081018181106001600160401b03821117156147e157634e487b7160e01b600052604160045260246000fd5b8060405250823581526020830135602082015260408301356040820152606083013560608201528091505092915050565b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111561486157614861614838565b500190565b60006001820161487857614878614838565b5060010190565b60008282101561489157614891614838565b500390565b6000602082840312156148a857600080fd5b81516141af81614661565b634e487b7160e01b600052601260045260246000fd5b6000826148d8576148d86148b3565b500490565b60008160001904831182151516156148f7576148f7614838565b500290565b60006020828403121561490e57600080fd5b81516141af8161458a565b60006020828403121561492b57600080fd5b5051919050565b60006001600160401b0380831681851680830382111561495457614954614838565b01949350505050565b60006001600160401b038083168185168183048111821515161561498357614983614838565b02949350505050565b60006001600160401b03838116908316818110156149ac576149ac614838565b039392505050565b600080604083850312156149c757600080fd5b505080516020909101519092909150565b6000602082840312156149ea57600080fd5b815163ffffffff811681146141af57600080fd5b60006001600160ff1b0381841382841380821686840486111615614a2457614a24614838565b600160ff1b6000871282811687830589121615614a4357614a43614838565b60008712925087820587128484161615614a5f57614a5f614838565b87850587128184161615614a7557614a75614838565b505050929093029392505050565b600082614a9257614a926148b3565b600160ff1b821460001984141615614aac57614aac614838565b500590565b600082614ac057614ac06148b3565b500690565b60006001600160801b03838116908316818110156149ac576149ac614838565b60006001600160801b0380831681851680830382111561495457614954614838565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b606081526000614b44606083018789614b07565b8281036020840152614b57818688614b07565b9150508260408301529695505050505050565b600060ff821660ff841680821015614b8457614b84614838565b90039392505050565b600060ff831680614ba057614ba06148b3565b8060ff8416069150509291505056fea2646970667358221220f7ed1e8138fabb419e12943b164c707feba00282c8887ea78c4d88e07890192064736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000000103682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b60000000000000000000000000000000000000000000000000000000000000049000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000049d40000000000000000000000000f027f4a985560fb13324e943edf55ad6f1d15dc100000000000000000000000027a6128f707de3d99f89bf09c35a4e0753e1b8080000000000000000000000000729957c92a1f50590a84cb2d65d761093f3f8eb0000000000000000000000000000000000000000000000000000000000014a34000000000000000000000000037637067c1dbe6d2430616d8f54cb774daa59990000000000000000000000008b8c52b04a38f10515c52670fcb23f3c4c44474f", + "nonce": "0x46", + "chainId": "0xaa36a7" + }, + "additionalContracts": [], + "isFixedGasLimit": false + } + ], + "receipts": [ + { + "status": "0x1", + "cumulativeGasUsed": "0x171f817", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x8c759a253375b2b62743268cd133da994dacae821ed82ff57fd52a77a4ffa8fe", + "transactionIndex": "0x45", + "blockHash": "0xc7cbc7977df7a2425e63913159ae44958fa3ca88e1603cef8b0d29f0680df07c", + "blockNumber": "0x7bfb57", + "gasUsed": "0x3f8429", + "effectiveGasPrice": "0x1362d8", + "from": "0x8c1a617bdb47342f9c17ac8750e0b070c372c721", + "to": null, + "contractAddress": "0xcfce7dd673fbbbffd16ab936b7245a2f2db31c9a" + }, + { + "status": "0x1", + "cumulativeGasUsed": "0x1b3bda0", + "logs": [], + "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", + "type": "0x2", + "transactionHash": "0x9259bdb6ae2ebec1a4fba4d98b340c18c197df19ef747eab54d108e8e341b3a2", + "transactionIndex": "0x47", + "blockHash": "0xc7cbc7977df7a2425e63913159ae44958fa3ca88e1603cef8b0d29f0680df07c", + "blockNumber": "0x7bfb57", + "gasUsed": "0x413c56", + "effectiveGasPrice": "0x1362d8", + "from": "0x8c1a617bdb47342f9c17ac8750e0b070c372c721", + "to": null, + "contractAddress": "0xf0102ffe22649a5421d53acc96e309660960cf44" + } + ], + "libraries": [], + "pending": [], + "returns": {}, + "timestamp": 1744743721, + "chain": 11155111, + "commit": "b94c30d" +} \ No newline at end of file diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol b/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol index 60bd8b8a..974aa2c9 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol +++ b/sepolia/2025-04-14-upgrade-fault-proofs/script/UpgradeDGF.s.sol @@ -1,5 +1,5 @@ // SPDX-License-Identifier: MIT -pragma solidity 0.8.15; +pragma solidity 0.8.24; import {Vm} from "forge-std/Vm.sol"; import {stdJson} from "forge-std/StdJson.sol"; @@ -8,22 +8,50 @@ import {console} from "forge-std/console.sol"; import {DoubleNestedMultisigBuilder} from "@base-contracts/script/universal/DoubleNestedMultisigBuilder.sol"; import {Simulation} from "@base-contracts/script/universal/Simulation.sol"; -import {DisputeGameFactory, IDisputeGame} from "@eth-optimism-bedrock/src/dispute/DisputeGameFactory.sol"; -import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol"; -import {GameTypes, GameType, Duration, Hash} from "@eth-optimism-bedrock/src/dispute/lib/Types.sol"; -import {FaultDisputeGame} from "@eth-optimism-bedrock/src/dispute/FaultDisputeGame.sol"; -import {PermissionedDisputeGame} from "@eth-optimism-bedrock/src/dispute/PermissionedDisputeGame.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; +interface IDisputeGameFactory { + function gameImpls(uint32) external view returns (address); + function setImplementation(uint32, address) external; +} + +interface IPermissionedDisputeGame { + function challenger() external view returns (address); + function proposer() external view returns (address); +} + +interface ISystemConfig { + function disputeGameFactory() external view returns (address); +} + +interface IFaultDisputeGame { + function version() external view returns (string memory); + function vm() external view returns (address); + function weth() external view returns (address); + function anchorStateRegistry() external view returns (address); + function l2ChainId() external view returns (uint64); + function splitDepth() external view returns (uint64); + function maxGameDepth() external view returns (uint64); + function maxClockDuration() external view returns (uint64); + function clockExtension() external view returns (uint64); +} + +interface IAnchorStateRegistry { + function anchors(uint32) external view returns (bytes32, uint256); +} + /// @notice This script updates the FaultDisputeGame and PermissionedDisputeGame implementations in the /// DisputeGameFactory contract. contract UpgradeDGF is DoubleNestedMultisigBuilder { using stdJson for string; - address public immutable OWNER_SAFE; string public constant EXPECTED_VERSION = "1.4.1"; + uint32 public constant CANNON = 0; + uint32 public constant PERMISSIONED_CANNON = 1; + + address public immutable OWNER_SAFE; - DisputeGameFactory public dgfProxy; + IDisputeGameFactory public dgfProxy; address public fdgImpl; address public pdgImpl; @@ -36,70 +64,62 @@ contract UpgradeDGF is DoubleNestedMultisigBuilder { string memory path = string.concat(rootPath, "/addresses.json"); string memory addresses = vm.readFile(path); - dgfProxy = DisputeGameFactory(SystemConfig(vm.envAddress("SYSTEM_CONFIG")).disputeGameFactory()); + dgfProxy = IDisputeGameFactory(ISystemConfig(vm.envAddress("SYSTEM_CONFIG")).disputeGameFactory()); fdgImpl = addresses.readAddress(".faultDisputeGame"); pdgImpl = addresses.readAddress(".permissionedDisputeGame"); - _precheckDisputeGameImplementation(GameTypes.CANNON, fdgImpl); - _precheckDisputeGameImplementation(GameTypes.PERMISSIONED_CANNON, pdgImpl); + _precheckDisputeGameImplementation(CANNON, fdgImpl); + _precheckDisputeGameImplementation(PERMISSIONED_CANNON, pdgImpl); } // Checks that the new game being set has the same configuration as the existing implementation with the exception // of the absolutePrestate. This is the most common scenario where the game implementation is upgraded to provide an // updated fault proof program that supports an upcoming hard fork. - function _precheckDisputeGameImplementation(GameType targetGameType, address newImpl) internal view { - console.log("pre-check new game implementations", targetGameType.raw()); + function _precheckDisputeGameImplementation(uint32 targetGameType, address newImpl) internal view { + console.log("pre-check new game implementations", targetGameType); - FaultDisputeGame currentImpl = FaultDisputeGame(address(dgfProxy.gameImpls(GameType(targetGameType)))); + IFaultDisputeGame currentImpl = IFaultDisputeGame(address(dgfProxy.gameImpls(targetGameType))); // No checks are performed if there is no prior implementation. // When deploying the first implementation, it is recommended to implement custom checks. if (address(currentImpl) == address(0)) { return; } - FaultDisputeGame faultDisputeGame = FaultDisputeGame(newImpl); + IFaultDisputeGame faultDisputeGame = IFaultDisputeGame(newImpl); require(Strings.equal(currentImpl.version(), EXPECTED_VERSION), "00"); - require(address(currentImpl.vm()) == address(faultDisputeGame.vm()), "10"); - require(address(currentImpl.weth()) == address(faultDisputeGame.weth()), "20"); - require(address(currentImpl.anchorStateRegistry()) == address(faultDisputeGame.anchorStateRegistry()), "30"); + require(currentImpl.vm() == faultDisputeGame.vm(), "10"); + require(currentImpl.weth() == faultDisputeGame.weth(), "20"); + require(currentImpl.anchorStateRegistry() == faultDisputeGame.anchorStateRegistry(), "30"); require(currentImpl.l2ChainId() == faultDisputeGame.l2ChainId(), "40"); require(currentImpl.splitDepth() == faultDisputeGame.splitDepth(), "50"); require(currentImpl.maxGameDepth() == faultDisputeGame.maxGameDepth(), "60"); - require( - uint64(Duration.unwrap(currentImpl.maxClockDuration())) - == uint64(Duration.unwrap(faultDisputeGame.maxClockDuration())), - "70" - ); - require( - uint64(Duration.unwrap(currentImpl.clockExtension())) - == uint64(Duration.unwrap(faultDisputeGame.clockExtension())), - "80" - ); - - if (targetGameType.raw() == GameTypes.PERMISSIONED_CANNON.raw()) { - PermissionedDisputeGame currentPDG = PermissionedDisputeGame(address(currentImpl)); - PermissionedDisputeGame permissionedDisputeGame = PermissionedDisputeGame(address(faultDisputeGame)); - require(address(currentPDG.proposer()) == address(permissionedDisputeGame.proposer()), "90"); - require(address(currentPDG.challenger()) == address(permissionedDisputeGame.challenger()), "100"); + require(currentImpl.maxClockDuration() == faultDisputeGame.maxClockDuration(), "70"); + require(currentImpl.clockExtension() == faultDisputeGame.clockExtension(), "80"); + + if (targetGameType == PERMISSIONED_CANNON) { + IPermissionedDisputeGame currentPDG = IPermissionedDisputeGame(address(currentImpl)); + IPermissionedDisputeGame permissionedDisputeGame = IPermissionedDisputeGame(address(faultDisputeGame)); + require(currentPDG.proposer() == permissionedDisputeGame.proposer(), "90"); + require(currentPDG.challenger() == permissionedDisputeGame.challenger(), "100"); } } // Confirm the stored implementations are updated and the anchor states still exist. function _postCheck(Vm.AccountAccess[] memory, Simulation.Payload memory) internal view override { - require(address(dgfProxy.gameImpls(GameTypes.CANNON)) == fdgImpl, "post-110"); - require(address(dgfProxy.gameImpls(GameTypes.PERMISSIONED_CANNON)) == pdgImpl, "post-120"); - _postcheckHasAnchorState(GameTypes.CANNON); - _postcheckHasAnchorState(GameTypes.PERMISSIONED_CANNON); + require(dgfProxy.gameImpls(CANNON) == fdgImpl, "post-110"); + require(dgfProxy.gameImpls(PERMISSIONED_CANNON) == pdgImpl, "post-120"); + _postcheckHasAnchorState(CANNON); + _postcheckHasAnchorState(PERMISSIONED_CANNON); } // Checks the anchor state for the source game type still exists after re-initialization. The actual anchor state // may have been updated since the task was defined so just assert it exists, not that it has a specific value. - function _postcheckHasAnchorState(GameType gameType) internal view { - console.log("check anchor state exists", gameType.raw()); + function _postcheckHasAnchorState(uint32 gameType) internal view { + console.log("check anchor state exists", gameType); - FaultDisputeGame impl = FaultDisputeGame(address(dgfProxy.gameImpls(GameType(gameType)))); - (Hash root, uint256 rootBlockNumber) = FaultDisputeGame(address(impl)).anchorStateRegistry().anchors(gameType); + IFaultDisputeGame impl = IFaultDisputeGame(dgfProxy.gameImpls(gameType)); + (bytes32 root, uint256 rootBlockNumber) = IAnchorStateRegistry(impl.anchorStateRegistry()).anchors(gameType); - require(root.raw() != bytes32(0), "check-300"); + require(root != bytes32(0), "check-300"); require(rootBlockNumber != 0, "check-310"); } @@ -109,14 +129,12 @@ contract UpgradeDGF is DoubleNestedMultisigBuilder { calls[0] = IMulticall3.Call3({ target: address(dgfProxy), allowFailure: false, - callData: abi.encodeCall(DisputeGameFactory.setImplementation, (GameTypes.CANNON, IDisputeGame(fdgImpl))) + callData: abi.encodeCall(IDisputeGameFactory.setImplementation, (CANNON, fdgImpl)) }); calls[1] = IMulticall3.Call3({ target: address(dgfProxy), allowFailure: false, - callData: abi.encodeCall( - DisputeGameFactory.setImplementation, (GameTypes.PERMISSIONED_CANNON, IDisputeGame(pdgImpl)) - ) + callData: abi.encodeCall(IDisputeGameFactory.setImplementation, (PERMISSIONED_CANNON, pdgImpl)) }); return calls; diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md new file mode 100644 index 00000000..439d1688 --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md @@ -0,0 +1,132 @@ +# Validation + +This document can be used to validate the inputs and result of the execution of the upgrade transaction which you are signing. + +The steps are: + +1. [Validate the Domain and Message Hashes](#expected-domain-and-message-hashes) +2. [Verifying the state changes](#state-changes) + +## Expected Domain and Message Hashes + +First, we need to validate the domain and message hashes. These values should match both the values on your ledger and the values printed to the terminal when you run the task. + +> [!CAUTION] +> +> Before signing, ensure the below hashes match what is on your ledger. +> +> ### Sepolia Nested Safe B: `0x6af0674791925f767060dd52f7fb20984e8639d8` +> +> - Domain Hash: `0x6f25427e79742a1eb82c103e2bf43c85fc59509274ec258ad6ed841c4a0048aa` +> - Message Hash: `0x96288ea8d1ed0c28d42600176370a14feea0603f1b2bf703c2f0e9c051057d91` + +# State Validations + +For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: + +- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. +- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. +- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. + +## State Overrides + +### Proxy Admin Owner + +`0x0fe884546476dDd290eC46318785046ef68a0BA9` + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +### Nested Safe + +`0x646132a1667ca7ad00d36616afba1a28116c770a` (`Coordinator`) + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the owner count to 1 so the transaction simulation can occur. + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +- **Key**: `0x316a0aac0d94f5824f0b66f5bbe94a8c360a17699a1d3a233aafcf7146e9f11c`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: This is owners[0xca11bde05977b3631167028862be2a173976ca11] -> 1, so the key can be derived from cast index address 0xca11bde05977b3631167028862be2a173976ca11 2. + +- **Key**: `0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0`
+ **Override**: `0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca11`
+ **Meaning**: This is owners[1] -> 0xca11bde05977b3631167028862be2a173976ca11, so the key can be derived from cast index address 0x0000000000000000000000000000000000000001 2. + +## Task State Changes + +
+
+----- DecodedStateDiff[0] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000015
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000016
+  Decoded Kind:      uint256
+  Decoded Old Value: 21
+  Decoded New Value: 22
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[1] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xab950079e3717aa6d08dc27e568f5d265f0191a3c834755df7d524ff90e68e15
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000000
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000001
+  Decoded Kind:      uint256
+  Decoded Old Value: 0
+  Decoded New Value: 1
+
+  Summary:           Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0x1e4a76bbefb5005f1739856d035c83fd7ee77e73d3b38babc4c5847998ce6a1e` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x646132a1667ca7ad00d36616afba1a28116c770a` (the safe linked above).
+
+----- DecodedStateDiff[2] -----
+  Who:               0x646132A1667ca7aD00d36616AFBA1A28116C770A
+  Contract:          Coordinator Safe - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000004
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000005
+  Decoded Kind:      uint256
+  Decoded Old Value: 4
+  Decoded New Value: 5
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[3] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e
+  Raw Old Value:     0x0000000000000000000000006f67e57c143321e266bac32a0d9d22d88ce1b3e5
+  Raw New Value:     0x000000000000000000000000f0102ffe22649a5421d53acc96e309660960cf44
+  Decoded Kind:      address
+  Decoded Old Value: 0x6F67E57C143321e266bac32A0D9D22d88cE1b3e5
+  Decoded New Value: 0xF0102fFe22649A5421D53aCC96E309660960cF44
+
+  Summary:           Updates the `PermissionedDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 1 101` in your terminal.
+
+----- DecodedStateDiff[4] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b
+  Raw Old Value:     0x000000000000000000000000340c1364d299ed55b193d4efcecbad8c3fb104c4
+  Raw New Value:     0x000000000000000000000000cfce7dd673fbbbffd16ab936b7245a2f2db31c9a
+  Decoded Kind:      address
+  Decoded Old Value: 0x340c1364D299ED55B193d4eFcecBAD8c3Fb104c4
+  Decoded New Value: 0xCFcE7DD673fBbbFfD16Ab936B7245A2f2dB31C9a
+
+  Summary:           Updates the `FaultDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 0 101` in your terminal.
+
+----- Additional Nonce Changes -----
+  Details:           You should see a nonce increment for the account you're signing with.
+
diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md new file mode 100644 index 00000000..6af3024f --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md @@ -0,0 +1,132 @@ +# Validation + +This document can be used to validate the inputs and result of the execution of the upgrade transaction which you are signing. + +The steps are: + +1. [Validate the Domain and Message Hashes](#expected-domain-and-message-hashes) +2. [Verifying the state changes](#state-changes) + +## Expected Domain and Message Hashes + +First, we need to validate the domain and message hashes. These values should match both the values on your ledger and the values printed to the terminal when you run the task. + +> [!CAUTION] +> +> Before signing, ensure the below hashes match what is on your ledger. +> +> ### Sepolia Safe A: `0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f` +> +> - Domain Hash: `0x0127bbb910536860a0757a9c0ffcdf9e4452220f566ed83af1f27f9e833f0e23` +> - Message Hash: `0xa09d16a602ff4e764c24e038fb7c11a4256f5bf904dfedd730de0643b16bb24a` + +# State Validations + +For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: + +- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. +- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. +- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. + +## State Overrides + +### Proxy Admin Owner + +`0x0fe884546476dDd290eC46318785046ef68a0BA9` + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +### Nested Safe + +`0x646132a1667ca7ad00d36616afba1a28116c770a` (`Coordinator`) + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the owner count to 1 so the transaction simulation can occur. + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +- **Key**: `0x316a0aac0d94f5824f0b66f5bbe94a8c360a17699a1d3a233aafcf7146e9f11c`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: This is owners[0xca11bde05977b3631167028862be2a173976ca11] -> 1, so the key can be derived from cast index address 0xca11bde05977b3631167028862be2a173976ca11 2. + +- **Key**: `0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0`
+ **Override**: `0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca11`
+ **Meaning**: This is owners[1] -> 0xca11bde05977b3631167028862be2a173976ca11, so the key can be derived from cast index address 0x0000000000000000000000000000000000000001 2. + +## Task State Changes + +
+
+----- DecodedStateDiff[0] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000015
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000016
+  Decoded Kind:      uint256
+  Decoded Old Value: 21
+  Decoded New Value: 22
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[1] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xab950079e3717aa6d08dc27e568f5d265f0191a3c834755df7d524ff90e68e15
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000000
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000001
+  Decoded Kind:      uint256
+  Decoded Old Value: 0
+  Decoded New Value: 1
+
+  Summary:           Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0x1e4a76bbefb5005f1739856d035c83fd7ee77e73d3b38babc4c5847998ce6a1e` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x646132a1667ca7ad00d36616afba1a28116c770a` (the safe linked above).
+
+----- DecodedStateDiff[2] -----
+  Who:               0x646132A1667ca7aD00d36616AFBA1A28116C770A
+  Contract:          Coordinator Safe - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000004
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000005
+  Decoded Kind:      uint256
+  Decoded Old Value: 4
+  Decoded New Value: 5
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[3] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e
+  Raw Old Value:     0x0000000000000000000000006f67e57c143321e266bac32a0d9d22d88ce1b3e5
+  Raw New Value:     0x000000000000000000000000f0102ffe22649a5421d53acc96e309660960cf44
+  Decoded Kind:      address
+  Decoded Old Value: 0x6F67E57C143321e266bac32A0D9D22d88cE1b3e5
+  Decoded New Value: 0xF0102fFe22649A5421D53aCC96E309660960cF44
+
+  Summary:           Updates the `PermissionedDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 1 101` in your terminal.
+
+----- DecodedStateDiff[4] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b
+  Raw Old Value:     0x000000000000000000000000340c1364d299ed55b193d4efcecbad8c3fb104c4
+  Raw New Value:     0x000000000000000000000000cfce7dd673fbbbffd16ab936b7245a2f2db31c9a
+  Decoded Kind:      address
+  Decoded Old Value: 0x340c1364D299ED55B193d4eFcecBAD8c3Fb104c4
+  Decoded New Value: 0xCFcE7DD673fBbbFfD16Ab936B7245A2f2dB31C9a
+
+  Summary:           Updates the `FaultDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 0 101` in your terminal.
+
+----- Additional Nonce Changes -----
+  Details:           You should see a nonce increment for the account you're signing with.
+
diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md new file mode 100644 index 00000000..cf68217c --- /dev/null +++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md @@ -0,0 +1,128 @@ +# Validation + +This document can be used to validate the inputs and result of the execution of the upgrade transaction which you are signing. + +The steps are: + +1. [Validate the Domain and Message Hashes](#expected-domain-and-message-hashes) +2. [Verifying the state changes](#state-changes) + +## Expected Domain and Message Hashes + +First, we need to validate the domain and message hashes. These values should match both the values on your ledger and the values printed to the terminal when you run the task. + +> [!CAUTION] +> +> Before signing, ensure the below hashes match what is on your ledger. +> +> ### Sepolia Safe B: `0x6af0674791925f767060dd52f7fb20984e8639d8` +> +> - Domain Hash: `0x6f25427e79742a1eb82c103e2bf43c85fc59509274ec258ad6ed841c4a0048aa` +> - Message Hash: `0x7d36496183631f74bd08724fe13d8c30ffe9600a334d642e5141ea030ee83dac` + +# State Validations + +For each contract listed in the state diff, please verify that no contracts or state changes shown in the Tenderly diff are missing from this document. Additionally, please verify that for each contract: + +- The following state changes (and none others) are made to that contract. This validates that no unexpected state changes occur. +- All addresses (in section headers and storage values) match the provided name, using the Etherscan and Superchain Registry links provided. This validates the bytecode deployed at the addresses contains the correct logic. +- All key values match the semantic meaning provided, which can be validated using the storage layout links provided. + +## State Overrides + +### Proxy Admin Owner + +`0x0fe884546476dDd290eC46318785046ef68a0BA9` + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +### Nested Safe + +`0x6AF0674791925f767060Dd52f7fB20984E8639d8` (`SafeB`) + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the owner count to 1 so the transaction simulation can occur. + +- **Key**: `0x316a0aac0d94f5824f0b66f5bbe94a8c360a17699a1d3a233aafcf7146e9f11c`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: This is owners[0xca11bde05977b3631167028862be2a173976ca11] -> 1, so the key can be derived from cast index address 0xca11bde05977b3631167028862be2a173976ca11 2. + +- **Key**: `0xe90b7bceb6e7df5418fb78d8ee546e97c83a08bbccc01a0644d599ccd2a7c2e0`
+ **Override**: `0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca11`
+ **Meaning**: This is owners[1] -> 0xca11bde05977b3631167028862be2a173976ca11, so the key can be derived from cast index address 0x0000000000000000000000000000000000000001 2. + +## Task State Changes + +
+
+----- DecodedStateDiff[0] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000015
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000016
+  Decoded Kind:      uint256
+  Decoded Old Value: 21
+  Decoded New Value: 22
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[1] -----
+  Who:               0x0fe884546476dDd290eC46318785046ef68a0BA9
+  Contract:          Proxy Admin Owner - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x817eda31e1518570433e4bc8b57d7ea96fcd5460045124fefb39dba853c8bcf1
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000000
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000001
+  Decoded Kind:      uint256
+  Decoded Old Value: 0
+  Decoded New Value: 1
+
+  Summary:           Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0x1e4a76bbefb5005f1739856d035c83fd7ee77e73d3b38babc4c5847998ce6a1e` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x6af0674791925f767060dd52f7fb20984e8639d8` (the safe linked above).
+
+----- DecodedStateDiff[2] -----
+  Who:               0x6AF0674791925f767060Dd52f7fB20984E8639d8
+  Contract:          Safe B - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000003
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000004
+  Decoded Kind:      uint256
+  Decoded Old Value: 3
+  Decoded New Value: 4
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[3] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x4d5a9bd2e41301728d41c8e705190becb4e74abe869f75bdb405b63716a35f9e
+  Raw Old Value:     0x0000000000000000000000006f67e57c143321e266bac32a0d9d22d88ce1b3e5
+  Raw New Value:     0x000000000000000000000000f0102ffe22649a5421d53acc96e309660960cf44
+  Decoded Kind:      address
+  Decoded Old Value: 0x6F67E57C143321e266bac32A0D9D22d88cE1b3e5
+  Decoded New Value: 0xF0102fFe22649A5421D53aCC96E309660960cF44
+
+  Summary:           Updates the `PermissionedDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 1 101` in your terminal.
+
+----- DecodedStateDiff[4] -----
+  Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
+  Contract:          Dispute Game Factory - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xffdfc1249c027f9191656349feb0761381bb32c9f557e01f419fd08754bf5a1b
+  Raw Old Value:     0x000000000000000000000000340c1364d299ed55b193d4efcecbad8c3fb104c4
+  Raw New Value:     0x000000000000000000000000cfce7dd673fbbbffd16ab936b7245a2f2db31c9a
+  Decoded Kind:      address
+  Decoded Old Value: 0x340c1364D299ED55B193d4eFcecBAD8c3Fb104c4
+  Decoded New Value: 0xCFcE7DD673fBbbFfD16Ab936B7245A2f2dB31C9a
+
+  Summary:           Updates the `FaultDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 0 101` in your terminal.
+
+----- Additional Nonce Changes -----
+  Details:           You should see a nonce increment for the account you're signing with.
+
From 1e2beda60a69adbd314c4e09d90cc082b740d64a Mon Sep 17 00:00:00 2001 From: Jack Chuma Date: Wed, 16 Apr 2025 07:31:58 -0400 Subject: [PATCH 3/3] update Base contracts commmit hash and fix validation files --- sepolia/2025-04-14-upgrade-fault-proofs/.env | 2 +- .../validations/NestedSafeB.md | 44 ++++++++++++++----- .../validations/SafeA.md | 44 +++++++++++++++---- .../validations/SafeB.md | 8 +--- 4 files changed, 73 insertions(+), 25 deletions(-) diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/.env b/sepolia/2025-04-14-upgrade-fault-proofs/.env index 06a58487..e8412958 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/.env +++ b/sepolia/2025-04-14-upgrade-fault-proofs/.env @@ -1,5 +1,5 @@ OP_COMMIT=6f68dc35e103278e366d2b8ba178ca87bbaacb0c -BASE_CONTRACTS_COMMIT=c17a305379423f022c54a3c240ef4120590109ae +BASE_CONTRACTS_COMMIT=e6bfc862e38e96aafdb8610ec8209d9c0fa36aba ABSOLUTE_PRESTATE=0x03682932cec7ce0a3874b19675a6bbc923054a7b321efc7d3835187b172494b6 diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md index 439d1688..12e4c308 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md +++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/NestedSafeB.md @@ -30,26 +30,24 @@ For each contract listed in the state diff, please verify that no contracts or s ## State Overrides -### Proxy Admin Owner - -`0x0fe884546476dDd290eC46318785046ef68a0BA9` +### Proxy Admin Owner (`0x0fe884546476dDd290eC46318785046ef68a0BA9`) - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
**Meaning**: Override the threshold to 1 so the transaction simulation can occur. -### Nested Safe +### Coordinator Safe (`0x646132a1667ca7ad00d36616afba1a28116c770a`) -`0x646132a1667ca7ad00d36616afba1a28116c770a` (`Coordinator`) +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + +### Safe B (`0x6af0674791925f767060dd52f7fb20984e8639d8`) - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
**Meaning**: Override the owner count to 1 so the transaction simulation can occur. -- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
- **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
- **Meaning**: Override the threshold to 1 so the transaction simulation can occur. - - **Key**: `0x316a0aac0d94f5824f0b66f5bbe94a8c360a17699a1d3a233aafcf7146e9f11c`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
**Meaning**: This is owners[0xca11bde05977b3631167028862be2a173976ca11] -> 1, so the key can be derived from cast index address 0xca11bde05977b3631167028862be2a173976ca11 2. @@ -102,6 +100,32 @@ For each contract listed in the state diff, please verify that no contracts or s Summary: Nonce increment. ----- DecodedStateDiff[3] ----- + Who: 0x646132A1667ca7aD00d36616AFBA1A28116C770A + Contract: Coordinator Safe - Sepolia + Chain ID: 11155111 + Raw Slot: 0x2c3020a2a54d72ea6bb5dc07d7fc42853cbd98a60be682e47419bb1909c4b1bd + Raw Old Value: 0x0000000000000000000000000000000000000000000000000000000000000000 + Raw New Value: 0x0000000000000000000000000000000000000000000000000000000000000001 + Decoded Kind: uint256 + Decoded Old Value: 0 + Decoded New Value: 1 + + Summary: Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0xab570f85b64f6cdd9c0676ea0628f2ec677f43261b11766d7ee85e6e9cac3e24` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x6af0674791925f767060dd52f7fb20984e8639d8` (the safe linked above). + +----- DecodedStateDiff[4] ----- + Who: 0x6af0674791925f767060dd52f7fb20984e8639d8 + Contract: Safe B - Sepolia + Chain ID: 11155111 + Raw Slot: 0x0000000000000000000000000000000000000000000000000000000000000005 + Raw Old Value: 0x0000000000000000000000000000000000000000000000000000000000000003 + Raw New Value: 0x0000000000000000000000000000000000000000000000000000000000000004 + Decoded Kind: uint256 + Decoded Old Value: 3 + Decoded New Value: 4 + + Summary: Nonce increment. + +----- DecodedStateDiff[5] ----- Who: 0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1 Contract: Dispute Game Factory - Sepolia Chain ID: 11155111 @@ -114,7 +138,7 @@ For each contract listed in the state diff, please verify that no contracts or s Summary: Updates the `PermissionedDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 1 101` in your terminal. ------ DecodedStateDiff[4] ----- +----- DecodedStateDiff[6] ----- Who: 0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1 Contract: Dispute Game Factory - Sepolia Chain ID: 11155111 diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md index 6af3024f..2c8dd1d1 100644 --- a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md +++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeA.md @@ -30,17 +30,13 @@ For each contract listed in the state diff, please verify that no contracts or s ## State Overrides -### Proxy Admin Owner - -`0x0fe884546476dDd290eC46318785046ef68a0BA9` +### Proxy Admin Owner (`0x0fe884546476dDd290eC46318785046ef68a0BA9`) - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
**Meaning**: Override the threshold to 1 so the transaction simulation can occur. -### Nested Safe - -`0x646132a1667ca7ad00d36616afba1a28116c770a` (`Coordinator`) +### Safe A (`0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f`) - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
@@ -58,6 +54,12 @@ For each contract listed in the state diff, please verify that no contracts or s **Override**: `0x000000000000000000000000ca11bde05977b3631167028862be2a173976ca11`
**Meaning**: This is owners[1] -> 0xca11bde05977b3631167028862be2a173976ca11, so the key can be derived from cast index address 0x0000000000000000000000000000000000000001 2. +### Coordinator Safe (`0x646132A1667ca7aD00d36616AFBA1A28116C770A`) + +- **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004`
+ **Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
+ **Meaning**: Override the threshold to 1 so the transaction simulation can occur. + ## Task State Changes
@@ -89,6 +91,19 @@ For each contract listed in the state diff, please verify that no contracts or s
   Summary:           Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0x1e4a76bbefb5005f1739856d035c83fd7ee77e73d3b38babc4c5847998ce6a1e` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x646132a1667ca7ad00d36616afba1a28116c770a` (the safe linked above).
 
 ----- DecodedStateDiff[2] -----
+  Who:               0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f
+  Contract:          Safe A - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0x0000000000000000000000000000000000000000000000000000000000000005
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000000
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000001
+  Decoded Kind:      uint256
+  Decoded Old Value: 0
+  Decoded New Value: 1
+
+  Summary:           Nonce increment.
+
+----- DecodedStateDiff[3] -----
   Who:               0x646132A1667ca7aD00d36616AFBA1A28116C770A
   Contract:          Coordinator Safe - Sepolia
   Chain ID:          11155111
@@ -101,7 +116,20 @@ For each contract listed in the state diff, please verify that no contracts or s
 
   Summary:           Nonce increment.
 
------ DecodedStateDiff[3] -----
+----- DecodedStateDiff[4] -----
+  Who:               0x646132A1667ca7aD00d36616AFBA1A28116C770A
+  Contract:          Coordinator Safe - Sepolia
+  Chain ID:          11155111
+  Raw Slot:          0xdc2a8b21796295f338f397c162b212b221d214b9394fbe9a571cb58f3ad7c979
+  Raw Old Value:     0x0000000000000000000000000000000000000000000000000000000000000000
+  Raw New Value:     0x0000000000000000000000000000000000000000000000000000000000000001
+  Decoded Kind:      uint256
+  Decoded Old Value: 0
+  Decoded New Value: 1
+
+  Summary:           Sets an approval for this transaction from the signer. Compute the expected raw slot key with `cast index bytes32 $NESTED_HASH $(cast index address $NESTED_SAFE 8)` where `NESTED_HASH` is `0xab570f85b64f6cdd9c0676ea0628f2ec677f43261b11766d7ee85e6e9cac3e24` (you should see this in your terminal after the transaction simulation) and `NESTED_SAFE` is `0x5dfEB066334B67355A15dc9b67317fD2a2e1f77f` (the safe linked above).
+
+----- DecodedStateDiff[5] -----
   Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
   Contract:          Dispute Game Factory - Sepolia
   Chain ID:          11155111
@@ -114,7 +142,7 @@ For each contract listed in the state diff, please verify that no contracts or s
 
   Summary:           Updates the `PermissionedDisputeGame` implementation address. You can verify the key derivation by running `cast index uint32 1 101` in your terminal.
 
------ DecodedStateDiff[4] -----
+----- DecodedStateDiff[6] -----
   Who:               0xd6E6dBf4F7EA0ac412fD8b65ED297e64BB7a06E1
   Contract:          Dispute Game Factory - Sepolia
   Chain ID:          11155111
diff --git a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md
index cf68217c..0e56ddc1 100644
--- a/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md
+++ b/sepolia/2025-04-14-upgrade-fault-proofs/validations/SafeB.md
@@ -30,17 +30,13 @@ For each contract listed in the state diff, please verify that no contracts or s
 
 ## State Overrides
 
-### Proxy Admin Owner
-
-`0x0fe884546476dDd290eC46318785046ef68a0BA9`
+### Proxy Admin Owner (`0x0fe884546476dDd290eC46318785046ef68a0BA9`)
 
 - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000004` 
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`
**Meaning**: Override the threshold to 1 so the transaction simulation can occur. -### Nested Safe - -`0x6AF0674791925f767060Dd52f7fB20984E8639d8` (`SafeB`) +### Safe B (`0x6AF0674791925f767060Dd52f7fB20984E8639d8`) - **Key**: `0x0000000000000000000000000000000000000000000000000000000000000003`
**Override**: `0x0000000000000000000000000000000000000000000000000000000000000001`