diff --git a/foundry.toml b/foundry.toml index 0f2032038..89f4ead34 100644 --- a/foundry.toml +++ b/foundry.toml @@ -20,7 +20,7 @@ remappings = [ '@solady/=lib/optimism/packages/contracts-bedrock/lib/solady/src/', '@lib-keccak/=lib/optimism/packages/contracts-bedrock/lib/lib-keccak/contracts/lib/', 'ds-test/=lib/optimism/packages/contracts-bedrock/lib/forge-std/lib/ds-test/src', - 'forge-std/=lib/forge-std/src/', + 'forge-std/=lib/forge-std/src/' ] [profile.ci] diff --git a/src/justfile b/src/justfile index 20695cf62..cb900f8f4 100644 --- a/src/justfile +++ b/src/justfile @@ -70,28 +70,53 @@ simulate-stack NETWORK="" TASK="" CHILD_SAFE_NAME_DEPTH_1="" CHILD_SAFE_NAME_DEP [ -z "{{NETWORK}}" ] && { echo -e "\n\033[31mError: No network specified\033[0m"; show_usage; exit 1; } ETH_RPC_URL=$("$root_dir"/src/script/get-rpc-url.sh "{{NETWORK}}") + + # Load FORK_BLOCK_NUMBER from the task's .env file if available + if [ -n "{{TASK}}" ]; then + task_env_file="${root_dir}/src/tasks/{{NETWORK}}/{{TASK}}/.env" + if [ -f "$task_env_file" ]; then + set -a + source "$task_env_file" + set +a + fi + else + # For full stack simulations, find the first .env file that contains FORK_BLOCK_NUMBER + # Search through .env files in numerical order by task number + for env_file in $(find "${root_dir}/src/tasks/{{NETWORK}}" -name ".env" -type f | sort -V); do + if grep -q "FORK_BLOCK_NUMBER" "$env_file" 2>/dev/null; then + set -a + source "$env_file" + set +a + break + fi + done + fi + + # Get fork block arguments - will be used for all tasks in the stack + fork_block_args=$(just --justfile "$root_just_file" _get-fork-block-args) + echo -e "\n⏳ Stacked Task simulation in progress..." if [ -z "{{TASK}}" ]; then echo -e "⏳ You are simulating all tasks for network: {{NETWORK}}\n" just list-stack {{NETWORK}} - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string)" {{NETWORK}} --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string)" {{NETWORK}} --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} elif [ -z "{{CHILD_SAFE_NAME_DEPTH_1}}" ] && [ -z "{{CHILD_SAFE_NAME_DEPTH_2}}" ]; then echo -e "⏳ You are simulating the task: {{TASK}} for network: '{{NETWORK}}' on the root safe\n" just list-stack {{NETWORK}} {{TASK}} - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string)" "{{NETWORK}}" "{{TASK}}" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string)" "{{NETWORK}}" "{{TASK}}" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} else task_dir_path="${root_dir}/src/tasks/{{NETWORK}}/{{TASK}}" child_safe_depth_1=$(just --justfile "$root_just_file" _fetch-safe "$task_dir_path" "{{CHILD_SAFE_NAME_DEPTH_1}}") child_safe_depth_2=$(just --justfile "$root_just_file" _fetch-safe "$task_dir_path" "{{CHILD_SAFE_NAME_DEPTH_2}}") just list-stack {{NETWORK}} {{TASK}} - + if [ "$child_safe_depth_2" != "$ZERO_ADDRESS" ]; then echo -e "⏳ You are simulating the task: {{TASK}} for network: '{{NETWORK}}' on the nested safe: $child_safe_depth_2\n" - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_2" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_2" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} else echo -e "⏳ You are simulating the task: {{TASK}} for network: '{{NETWORK}}' on the nested safe: $child_safe_depth_1\n" - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} fi fi echo -e "\n⚠️ Please note: Some Tenderly links may not work when running a stacked simulation. Check out Tenderly's Virtual TestNets as a workaround.⚠️" @@ -119,6 +144,17 @@ sign-stack NETWORK="" TASK="" CHILD_SAFE_NAME_DEPTH_1="" CHILD_SAFE_NAME_DEPTH_2 child_safe_depth_1=$(just --justfile "$root_just_file" _fetch-safe "$task_dir_path" "{{CHILD_SAFE_NAME_DEPTH_1}}") child_safe_depth_2=$(just --justfile "$root_just_file" _fetch-safe "$task_dir_path" "{{CHILD_SAFE_NAME_DEPTH_2}}") + # Load FORK_BLOCK_NUMBER from the task's .env file if available + task_env_file="$task_dir_path/.env" + if [ -f "$task_env_file" ]; then + set -a + source "$task_env_file" + set +a + fi + + # Get fork block arguments + fork_block_args=$(just --justfile "$root_just_file" _get-fork-block-args) + HD_PATH=${HD_PATH:-0} USE_KEYSTORE=${USE_KEYSTORE:-} signer_info=$(just --justfile "$root_just_file" _get-signer-args "$HD_PATH" "$USE_KEYSTORE") @@ -126,20 +162,20 @@ sign-stack NETWORK="" TASK="" CHILD_SAFE_NAME_DEPTH_1="" CHILD_SAFE_NAME_DEPTH_2 export SIGNING_MODE_IN_PROGRESS=true export STACKED_SIGNING_MODE=true - + if [ "$child_safe_depth_2" != "$ZERO_ADDRESS" ]; then echo -e "⏳ You are signing the task: {{TASK}} for network: '{{NETWORK}}' on the nested safe: $child_safe_depth_2\n" ${root_dir}/bin/eip712sign ${signer_args} -- \ - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_2" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_2" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} elif [ -z "{{CHILD_SAFE_NAME_DEPTH_1}}" ] && [ -z "{{CHILD_SAFE_NAME_DEPTH_2}}" ]; then echo -e "⏳ You are signing the task: {{TASK}} for network: '{{NETWORK}}' on the root safe\n" just list-stack {{NETWORK}} {{TASK}} ${root_dir}/bin/eip712sign ${signer_args} -- \ - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string)" "{{NETWORK}}" "{{TASK}}" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string)" "{{NETWORK}}" "{{TASK}}" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} else echo -e "⏳ You are signing the task: {{TASK}} for network: '{{NETWORK}}' on the nested safe: $child_safe_depth_1\n" ${root_dir}/bin/eip712sign ${signer_args} -- \ - forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} + forge script ${root_dir}/src/tasks/StackedSimulator.sol:StackedSimulator --sig "simulateStack(string,string,address)" "{{NETWORK}}" "{{TASK}}" "$child_safe_depth_1" --ffi --fork-url $ETH_RPC_URL --fork-retries {{forge_fork_retries}} --fork-retry-backoff {{forge_fork_retry_backoff}} ${fork_block_args} fi echo -e "\n⚠️ Please note: Some Tenderly links may not work when running a stacked simulation. Check out Tenderly's Virtual TestNets as a workaround.⚠️" diff --git a/src/tasks/TaskManager.sol b/src/tasks/TaskManager.sol index c260dab88..bcc31c366 100644 --- a/src/tasks/TaskManager.sol +++ b/src/tasks/TaskManager.sol @@ -105,7 +105,7 @@ contract TaskManager is Script { string memory formattedRootSafe = vm.toString(config.rootSafe).green().bold(); - setTenderlyGasEnv(config.basePath); + setEnv(config.basePath); string[] memory parts = vm.split(config.basePath, "/"); string memory taskName = parts[parts.length - 1]; @@ -234,25 +234,34 @@ contract TaskManager is Script { ); } - /// @notice Sets the TENDERLY_GAS environment variable for the task if it exists. - function setTenderlyGasEnv(string memory basePath) public { + /// @notice Sets environment variables from the task's .env file if it exists. + function setEnv(string memory basePath) public { string memory envFile = string.concat(basePath, "/", ".env"); if (vm.isFile(envFile)) { string memory envContent = vm.readFile(envFile); string[] memory lines = vm.split(envContent, "\n"); for (uint256 i = 0; i < lines.length; i++) { - if (lines[i].contains("TENDERLY_GAS=")) { + // Skip empty lines and comments + if (bytes(lines[i]).length == 0 || lines[i].startsWith("#")) { + continue; + } + + // Parse key=value pairs + if (lines[i].contains("=")) { string[] memory keyValue = vm.split(lines[i], "="); - if (keyValue.length == 2) { - vm.setEnv("TENDERLY_GAS", keyValue[1]); - return; + if (keyValue.length >= 2) { + // Trim whitespace from key and value, then set the environment variable + string memory key = vm.trim(keyValue[0]); + string memory value = vm.trim(keyValue[1]); + vm.setEnv(key, value); } } } + } else { + // If no .env file exists, set TENDERLY_GAS to empty for backwards compatibility + vm.setEnv("TENDERLY_GAS", ""); } - // If no TENDERLY_GAS is found, set it as empty. - vm.setEnv("TENDERLY_GAS", ""); } /// @notice Useful function to tell if a task is nested or not based on the task config. diff --git a/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/.env b/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/.env index adf17d369..205f6ffe6 100644 --- a/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/.env +++ b/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/.env @@ -1 +1,2 @@ TENDERLY_GAS=15000000 +FORK_BLOCK_NUMBER=23491327 diff --git a/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/README.md b/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/README.md index d32a8453f..cfb02dd2f 100644 --- a/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/README.md +++ b/src/tasks/eth/022-U16a-opcm-upgrade-v410-base/README.md @@ -25,7 +25,7 @@ cd superchain-ops git pull ``` -## Step 3. Install & Configure Mise +## Step 3. Install & Configure Mise Install Mise by executing the following commands. When the Bash script runs, follow the instructions in the log output to activate mise in your shell. @@ -57,12 +57,12 @@ Base has a doubly-nested safe architecture which is supported by superchain-ops. ```bash # # ┌─────────────────────────────────────────────┐ ┌─────────────────────────────────────────────┐ ┌─────────────────────────────────────────────┐ -# │ Base Council │ │ Base Operations │ │ Foundation Operations (FOS) │ +# │ Base Council │ │ Base Operations │ │ Foundation Operations (FOS) │ # │ (7 of 10) │ │ (3 of 6) │ │ (5 of 7) │ # │ 0x20AcF55A3DCfe07fC4cecaCFa1628F788EC8A4Dd │ │ 0x9C4a57Feb77e294Fd7BF5EBE9AB01CAA0a90A110 │ │ 0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A │ # └─────────────────────┬───────────────────────┘ └─────────────────────┬───────────────────────┘ └─────────────────────┬───────────────────────┘ # │ │ │ -# └─────────────────┬───────────────────────────────────┘ │ +# └─────────────────┬───────────────────────────────────┘ │ # ▼ │ # ┌─────────────────────────────────────────────┐ │ # │ Base Nested │ │ @@ -87,48 +87,48 @@ First, simulate the upgrade transaction using the command below corresponding to cd tasks/eth/022-U16a-opcm-upgrade-v410-base # Base Council: 0x20AcF55A3DCfe07fC4cecaCFa1628F788EC8A4Dd -# ┌────────────────────┐ +# ┌────────────────────┐ # │ Child Safe Depth 2 │ # │ 'base-council' │ -# └────────────────────┘ -# │ +# └────────────────────┘ +# │ # └─────────────────┬ -# ▼ +# ▼ # ┌────────────────────┐ # │ Child Safe Depth 1 │ # │ 'base-nested' │ # └────────────────────┘ -# │ +# │ # └──────────┬ # ▼ # ┌─────────────────┐ # │ ProxyAdminOwner │ # └─────────────────┘ -SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path $(pwd)/.env simulate base-nested base-council +SIMULATE_WITHOUT_LEDGER=1 SKIP_DECODE_AND_PRINT=1 just --dotenv-path $(pwd)/.env simulate base-nested base-council # Expected Hashes # Domain Hash: 0x1fbfdc61ceb715f63cb17c56922b88c3a980f1d83873df2b9325a579753e8aa3 # Message Hash: 0x520aeeb85997f9db884ae07d1da74b5251550f49ab662b9ada3fa34572ece772 # Normalized Hash: 0x1040a2a57a0fc30a1ff18d3c0e35898dbf98c89dc172945b99a0f3b65508c659 # Base Operations: 0x9C4a57Feb77e294Fd7BF5EBE9AB01CAA0a90A110 -# ┌────────────────────┐ +# ┌────────────────────┐ # │ Child Safe Depth 2 │ # │ 'base-operations' │ -# └────────────────────┘ -# │ +# └────────────────────┘ +# │ # └─────────────────┬ -# ▼ +# ▼ # ┌────────────────────┐ # │ Child Safe Depth 1 │ # │ 'base-nested' │ # └────────────────────┘ -# │ +# │ # └──────────┬ # ▼ # ┌─────────────────┐ # │ ProxyAdminOwner │ # └─────────────────┘ -SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path $(pwd)/.env simulate base-nested base-operations +SIMULATE_WITHOUT_LEDGER=1 SKIP_DECODE_AND_PRINT=1 just --dotenv-path $(pwd)/.env simulate base-nested base-operations # Expected Hashes # Domain Hash: 0xfb308368b8deca582e84a807d31c1bfcec6fda754061e2801b4d6be5cb52a8ac # Message Hash: 0x5ae6e3b8fe66bd6cbe5fae6374222b43a874c13ca850745926ecc430cafdb21a @@ -140,13 +140,13 @@ SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path $(pwd)/.env simulate base-nested ba # │ Child Safe Depth 1 │ # │ 'FOS' │ # └────────────────────┘ -# │ +# │ # └──────────┬ # ▼ # ┌─────────────────┐ # │ ProxyAdminOwner │ # └─────────────────┘ -SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path $(pwd)/.env simulate foundation-operations +SIMULATE_WITHOUT_LEDGER=1 SKIP_DECODE_AND_PRINT=1 just --dotenv-path $(pwd)/.env simulate foundation-operations # Expected Hashes # Domain Hash: 0x4e6a6554de0308f5ece8ff736beed8a1b876d16f5c27cac8e466d7de0c703890 # Message Hash: 0x2b7f17c0100e6766aaac289acba0122860a51bdd64810626948b0f986f88efa5 @@ -217,7 +217,7 @@ Now, perform the signing for whichever of the safes you are a member of: ```bash cd src/tasks/eth/022-U16a-opcm-upgrade-v410-base -just --dotenv-path $(pwd)/.env sign base-nested base-council +just --dotenv-path $(pwd)/.env sign base-nested base-council # Expected Hashes # Domain Hash: 0x1fbfdc61ceb715f63cb17c56922b88c3a980f1d83873df2b9325a579753e8aa3 # Message Hash: 0x520aeeb85997f9db884ae07d1da74b5251550f49ab662b9ada3fa34572ece772 diff --git a/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/.env b/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/.env index 16c732040..ec1f573a1 100644 --- a/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/.env +++ b/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/.env @@ -1 +1,2 @@ TENDERLY_GAS=32000000 +FORK_BLOCK_NUMBER=23491327 diff --git a/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/README.md b/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/README.md index dd2913447..12100f664 100644 --- a/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/README.md +++ b/src/tasks/eth/023-U16a-opcm-upgrade-v410-op-soneium-ink/README.md @@ -1,6 +1,6 @@ # 023-U16a-opcm-upgrade-v410-op-soneium-ink: Upgrade 16a: OP, Soneium, Ink on Mainnet -Status: [READY TO SIGN]() +Status: [EXECUTED](https://etherscan.io/tx/0x744cf7d28324729cace731ac736872da669439a0d380f1f52b8d31af203f7329) ## Objective @@ -44,4 +44,4 @@ just --dotenv-path $(pwd)/.env sign foundation # Security Council - Simulate and Sign SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path $(pwd)/.env simulate council just --dotenv-path $(pwd)/.env sign council -``` \ No newline at end of file +``` diff --git a/src/tasks/eth/024-U16a-opcm-upgrade-v410-unichain/README.md b/src/tasks/eth/024-U16a-opcm-upgrade-v410-unichain/README.md index a13b10499..d1ec5bb71 100644 --- a/src/tasks/eth/024-U16a-opcm-upgrade-v410-unichain/README.md +++ b/src/tasks/eth/024-U16a-opcm-upgrade-v410-unichain/README.md @@ -1,6 +1,6 @@ # 024-U16a-opcm-upgrade-v410-unichain: Upgrade 16a: Unichain -Status: [READY TO SIGN]() +Status: [EXECUTED](https://etherscan.io/tx/0xc98240172fa3950ec9c62f32cc09d0eb0ed21684b02f1b2677357674cda64ca5) ## Objective diff --git a/src/template/L1PortalExecuteL2Call.sol b/src/template/L1PortalExecuteL2Call.sol new file mode 100644 index 000000000..cfedd993b --- /dev/null +++ b/src/template/L1PortalExecuteL2Call.sol @@ -0,0 +1,118 @@ +// SPDX-License-Identifier: MIT +pragma solidity 0.8.15; + +import {VmSafe} from "forge-std/Vm.sol"; +import {stdToml} from "forge-std/StdToml.sol"; + +import {MultisigTaskPrinter} from "src/libraries/MultisigTaskPrinter.sol"; +import {Action} from "src/libraries/MultisigTypes.sol"; +import {L2TaskBase} from "src/tasks/types/L2TaskBase.sol"; +import {SuperchainAddressRegistry} from "src/SuperchainAddressRegistry.sol"; + +/// @notice Interface for the OptimismPortal2 contract on L1. +interface IOptimismPortal2 { + function depositTransaction(address _to, uint256 _value, uint64 _gasLimit, bool _isCreation, bytes memory _data) + external + payable; +} + +/// @notice Template to execute an L2 call via the L1 Optimism Portal from a nested L1 Safe. +/// Sends an L2 transaction using OptimismPortal.depositTransaction with config-driven params. +/// Supports: op-contracts/v4.6.0 +contract L1PortalExecuteL2Call is L2TaskBase { + using stdToml for string; + + // -------- Config inputs -------- + /// @notice The address of the L2 target contract. + address public l2Target; + /// @notice The calldata to be executed on l2Target. + bytes public l2Data; + /// @notice The L2 gas limit. + uint64 public gasLimit; + /// @notice Whether to create a contract on L2. + bool public isCreation; + + /// @notice Default Safe name. Can be overridden via `safeAddressString` in config.toml. + function safeAddressString() public pure override returns (string memory) { + return "ProxyAdminOwner"; + } + + /// @notice The contracts expected to have storage writes during execution. + /// Allowlist the OptimismPortal since it will mutate state (queue/event) on deposit. + function _taskStorageWrites() internal pure override returns (string[] memory) { + string[] memory _storageWrites = new string[](1); + _storageWrites[0] = "OptimismPortalProxy"; + return _storageWrites; + } + + /// @notice The contracts expected to have balance changes during execution. + function _taskBalanceChanges() internal pure override returns (string[] memory) {} + + /// @notice Parse config and initialize template variables. + /// Expected TOML keys: + /// - l2Target: address (L2 target address) + /// - l2Data: hex string (e.g. 0x1234...) + /// - gasLimit: uint (will be cast to uint64) + /// - isCreation: bool (optional, default false) + function _templateSetup(string memory _taskConfigFilePath, address) internal override { + string memory _toml = vm.readFile(_taskConfigFilePath); + + l2Target = _toml.readAddress(".l2Target"); + require(l2Target != address(0), "l2Target must be set"); + + // Read hex string and parse to bytes. + l2Data = _toml.readBytes(".l2Data"); + require(l2Data.length > 0, "l2Data must be set"); + + uint256 _gasLimitTmp = _toml.readUint(".gasLimit"); + require(_gasLimitTmp > 0 && _gasLimitTmp <= type(uint64).max, "invalid gasLimit"); + gasLimit = uint64(_gasLimitTmp); + + // Optional fields + isCreation = false; + try vm.parseTomlBool(_toml, ".isCreation") returns (bool _b) { + isCreation = _b; + } catch {} + + // early revert in case of attempted contract creation with a non-zero target + require(isCreation && l2Target == address(0) || !isCreation, "contract creation requires zero target address"); + } + + /// @notice Build the portal deposit action. WARNING: State changes here are reverted after capture. + function _build(address) internal override { + SuperchainAddressRegistry.ChainInfo[] memory chains = superchainAddrRegistry.getChains(); + for (uint256 _i = 0; _i < chains.length; _i++) { + IOptimismPortal2(superchainAddrRegistry.getAddress("OptimismPortalProxy", chains[_i].chainId)) + .depositTransaction(l2Target, 0, gasLimit, isCreation, l2Data); + } + } + + /// @notice Validate that exactly one action to the portal with the expected calldata was captured. + function _validate(VmSafe.AccountAccess[] memory, Action[] memory _actions, address) internal view override { + bytes memory _expected = + abi.encodeCall(IOptimismPortal2.depositTransaction, (l2Target, 0, gasLimit, isCreation, l2Data)); + + bool _found; + uint256 _matches; + SuperchainAddressRegistry.ChainInfo[] memory chains = superchainAddrRegistry.getChains(); + for (uint256 _i = 0; _i < chains.length; _i++) { + for (uint256 _j = 0; _j < _actions.length; _j++) { + if ( + _actions[_j].target == superchainAddrRegistry.getAddress("OptimismPortalProxy", chains[_i].chainId) + && _actions[_j].value == 0 + ) { + if (keccak256(_actions[_j].arguments) == keccak256(_expected)) { + _found = true; + _matches++; + } + } + } + } + + require(_found && _matches == chains.length, "expected one portal deposit action for each chain"); + MultisigTaskPrinter.printTitle("Validated portal deposit action"); + } + + /// @notice No code exceptions required for this template. + function _getCodeExceptions() internal view override returns (address[] memory) {} +} diff --git a/test/tasks/Regression.t.sol b/test/tasks/Regression.t.sol index 95172d57b..fd2ad7f4f 100644 --- a/test/tasks/Regression.t.sol +++ b/test/tasks/Regression.t.sol @@ -40,6 +40,7 @@ import {OPCMUpgradeSuperchainConfigV410} from "src/template/OPCMUpgradeSuperchai import {RevenueShareV100UpgradePath} from "src/template/RevenueShareUpgradePath.sol"; import {DeployFeesDepositor} from "src/template/DeployFeesDepositor.sol"; import {LateOptInRevenueShare} from "src/template/LateOptInRevenueShare.sol"; +import {L1PortalExecuteL2Call} from "src/template/L1PortalExecuteL2Call.sol"; /// @notice Ensures that simulating the task consistently produces the same call data and data to sign. /// This guarantees determinism if a bug is introduced in the task logic, the call data or data to sign @@ -840,14 +841,14 @@ contract RegressionTest is Test { _assertDataToSignNestedMultisig(multisigTask, actions, expectedDataToSign, MULTICALL3_ADDRESS, rootSafe); } - /// @notice Expected call data and data to sign generated by manually running the DeployFeesDepositor template at block 23197819 on mainnet. - /// Simulate from task directory (test/tasks/example/eth/016-deploy-fees-depositor/config.toml) with: + /// @notice Expected call data and data to sign generated by manually running the L1PortalExecuteL2CallUpgradeGovernor template at block 23197819 on mainnet. + /// Simulate from task directory (test/tasks/example/eth/014-noop-call-optimismportal/config.toml) with: /// just --dotenv-path $(pwd)/.env --justfile ../../../../../src/improvements/justfile simulate (foundation|council) - function testRegressionCallDataMatches_DeployFeesDepositor() public { - string memory taskConfigFilePath = "test/tasks/example/eth/016-deploy-fees-depositor/config.toml"; + function testRegressionCallDataMatches_L1PortalExecuteL2CallUpgradeGovernor() public { + string memory taskConfigFilePath = "test/tasks/example/eth/014-noop-call-optimismportal/config.toml"; string memory expectedCallData = - "0x174dea7100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000001e8000000000000000000000000013b0d85ccb8bf860b6b79af3029fca081ae9bef20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000f2466cfa0570000000000000000000000000000000000000000000000000000000000000000666565732d6465706f7369746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000e9660a060405234801561001057600080fd5b50600160805261001e610023565b6100e3565b600054610100900460ff161561008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100e1576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051610d9161010560003960008181610274015261048e0152610d916000f3fe6080604052600436106100cb5760003560e01c8063645006ca11610074578063a2a956171161004e578063a2a9561714610425578063dad544e014610445578063f68016b71461045a57600080fd5b8063645006ca1461038657806366125607146103c85780637b11936e146103e857600080fd5b80633e47158c116100a55780633e47158c146102fb57806352d84c621461031057806354fd4d501461033057600080fd5b80630de2db4d1461024057806338d38c97146102605780633cb747bf146102a357600080fd5b3661023b576040805134815247602082018190529133917f363f315f930a17d1266b86a20d6dd34b1cfbc5a9db9f13a65d06a689c3a2af8a910160405180910390a26001546bffffffffffffffffffffffff16811061023957600154600080546002546040517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000090950485166004820181905260606024830152606482019490945263ffffffff90911660448201529192620100009091041690633dbb202b9084906084016000604051808303818588803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b50505050508073ffffffffffffffffffffffffffffffffffffffff167f2acaf92365a0b69fb3570802396f62d51aabccd684036b72c3ce78699425e7ee8360405161022f91815260200190565b60405180910390a2505b005b600080fd5b34801561024c57600080fd5b5061023961025b366004610bde565b61048c565b34801561026c57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020015b60405180910390f35b3480156102af57600080fd5b506000546102d69062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029a565b34801561030757600080fd5b506102d661069e565b34801561031c57600080fd5b5061023961032b366004610c36565b6108a9565b34801561033c57600080fd5b506103796040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161029a9190610c58565b34801561039257600080fd5b506001546103ab906bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161029a565b3480156103d457600080fd5b506102396103e3366004610ccb565b610928565b3480156103f457600080fd5b506001546102d6906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b34801561043157600080fd5b50610239610440366004610ce8565b6109af565b34801561045157600080fd5b506102d6610a2e565b34801561046657600080fd5b506002546104779063ffffffff1681565b60405163ffffffff909116815260200161029a565b7f0000000000000000000000000000000000000000000000000000000000000000600054610100900460ff161580156104cc575060005460ff8083169116105b61055c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff831617610100179055610595610aab565b6000805473ffffffffffffffffffffffffffffffffffffffff8681166c01000000000000000000000000026bffffffffffffffffffffffff8916176001556002805463ffffffff87167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009091161790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9086166201000002167fffffffffffffffffffff000000000000000000000000000000000000000000ff9091161790556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061068f90839060ff91909116815260200190565b60405180910390a15050505050565b6000806106c97fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905073ffffffffffffffffffffffffffffffffffffffff8116156106ec57919050565b6040518060400160405280601a81526020017f4f564d5f4c3143726f7373446f6d61696e4d657373656e67657200000000000081525051600261072f9190610d03565b604080513060208201526000918101919091527f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572000000000000919091179061078a906060015b604051602081830303815290604052805190602001205490565b146107c1576040517f54e433cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080513060208201526001918101919091526000906107e390606001610770565b905073ffffffffffffffffffffffffffffffffffffffff811615610877578073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561084c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108709190610d67565b9250505090565b6040517f332144db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1610b2e565b6002805463ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000083168117909355604080519190921680825260208201939093527f84858bb3fb3ecf87e268ebef250ef9ad9cd53ef7973ef7a0ec9d89470bb00a8091015b60405180910390a15050565b610930610b2e565b6001805473ffffffffffffffffffffffffffffffffffffffff8381166c010000000000000000000000008181026bffffffffffffffffffffffff85161790945560408051949093049091168084526020840191909152917f158f04d12e0403fdd63fbced694e8f70d3b87d04d8e2dfad526f5fcf6e49bbcf910161091c565b6109b7610b2e565b600180546bffffffffffffffffffffffff8381167fffffffffffffffffffffffffffffffffffffffff00000000000000000000000083168117909355604080519190921680825260208201939093527f132832be4270c0d1573ca543c41517dd443fe9daf5f21a9c74940e6db282e229910161091c565b6000610a3861069e565b73ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa69190610d67565b905090565b33610ab461069e565b73ffffffffffffffffffffffffffffffffffffffff1614158015610af5575033610adc610a2e565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610b2c576040517fc4050a2600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b33610b37610a2e565b73ffffffffffffffffffffffffffffffffffffffff1614610b2c576040517f7f12c64b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356bffffffffffffffffffffffff81168114610ba057600080fd5b919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bc757600080fd5b50565b803563ffffffff81168114610ba057600080fd5b60008060008060808587031215610bf457600080fd5b610bfd85610b84565b93506020850135610c0d81610ba5565b92506040850135610c1d81610ba5565b9150610c2b60608601610bca565b905092959194509250565b600060208284031215610c4857600080fd5b610c5182610bca565b9392505050565b600060208083528351808285015260005b81811015610c8557858101830151858201604001528201610c69565b81811115610c97576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600060208284031215610cdd57600080fd5b8135610c5181610ba5565b600060208284031215610cfa57600080fd5b610c5182610b84565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b600060208284031215610d7957600080fd5b8151610c5181610ba556fea164736f6c634300080f000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013b0d85ccb8bf860b6b79af3029fca081ae9bef20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000d8466cfa0570000000000000000000000000000000000000000000000000000000000000000666565732d6465706f7369746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ce760806040523480156200001157600080fd5b5060405162000cc738038062000cc783398181016040528101906200003791906200016f565b62000048816200004f60201b60201c565b50620001df565b600062000061620000ce60201b60201c565b905060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508281557f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f8284604051620000c1929190620001b2565b60405180910390a1505050565b60008060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b905080549150819250505090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000137826200010a565b9050919050565b62000149816200012a565b81146200015557600080fd5b50565b60008151905062000169816200013e565b92915050565b60006020828403121562000188576200018762000105565b5b6000620001988482850162000158565b91505092915050565b620001ac816200012a565b82525050565b6000604082019050620001c96000830185620001a1565b620001d86020830184620001a1565b9392505050565b610ad880620001ef6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100675780634f1ef286146100905780635c60da1b146100c05780638f283970146100eb578063f851a440146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e60048036038101906100899190610715565b6101dc565b005b6100aa60048036038101906100a591906107a7565b610268565b6040516100b791906108a0565b60405180910390f35b3480156100cc57600080fd5b506100d56103ae565b6040516100e291906108d1565b60405180910390f35b3480156100f757600080fd5b50610112600480360381019061010d9190610715565b61043d565b005b34801561012057600080fd5b506101296104c9565b60405161013691906108d1565b60405180910390f35b6000610149610558565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036101ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b19061096f565b60405180910390fd5b3660008037600080366000845af43d6000803e806101d7573d6000fd5b3d6000f35b6101e461058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102495750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561025c57610257816105c6565b610265565b61026461013f565b5b50565b606061027261058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102d75750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561039e576102e5846105c6565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161030f9291906109ce565b600060405180830381855af49150503d806000811461034a576040519150601f19603f3d011682016040523d82523d6000602084013e61034f565b606091505b509150915081610394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038b90610a59565b60405180910390fd5b80925050506103a7565b6103a661013f565b5b9392505050565b60006103b861058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061041d5750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156104315761042a610558565b905061043a565b61043961013f565b5b90565b61044561058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806104aa5750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156104bd576104b881610638565b6104c6565b6104c561013f565b5b50565b60006104d361058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806105385750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561054c5761054561058f565b9050610555565b61055461013f565b5b90565b60008060007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905080549150819250505090565b60008060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b905080549150819250505090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b90508181558173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25050565b600061064261058f565b905060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508281557f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f82846040516106a0929190610a79565b60405180910390a1505050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106e2826106b7565b9050919050565b6106f2816106d7565b81146106fd57600080fd5b50565b60008135905061070f816106e9565b92915050565b60006020828403121561072b5761072a6106ad565b5b600061073984828501610700565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261076757610766610742565b5b8235905067ffffffffffffffff81111561078457610783610747565b5b6020830191508360018202830111156107a05761079f61074c565b5b9250929050565b6000806000604084860312156107c0576107bf6106ad565b5b60006107ce86828701610700565b935050602084013567ffffffffffffffff8111156107ef576107ee6106b2565b5b6107fb86828701610751565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610841578082015181840152602081019050610826565b83811115610850576000848401525b50505050565b6000601f19601f8301169050919050565b600061087282610807565b61087c8185610812565b935061088c818560208601610823565b61089581610856565b840191505092915050565b600060208201905081810360008301526108ba8184610867565b905092915050565b6108cb816106d7565b82525050565b60006020820190506108e660008301846108c2565b92915050565b600082825260208201905092915050565b7f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160008201527f6c697a6564000000000000000000000000000000000000000000000000000000602082015250565b60006109596025836108ec565b9150610964826108fd565b604082019050919050565b600060208201905081810360008301526109888161094c565b9050919050565b600081905092915050565b82818337600083830152505050565b60006109b5838561098f565b93506109c283858461099a565b82840190509392505050565b60006109db8284866109a9565b91508190509392505050565b7f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560008201527f6d656e746174696f6e20636f6e7472616374206661696c656400000000000000602082015250565b6000610a436039836108ec565b9150610a4e826109e7565b604082019050919050565b60006020820190508181036000830152610a7281610a36565b9050919050565b6000604082019050610a8e60008301856108c2565b610a9b60208301846108c2565b939250505056fea2646970667358221220e170e6bf8ee3cc199be5ea3ca30084b98725d89b560e407f600f4a174236633364736f6c634300080f00330000000000000000000000005a0aae59d09fccbddb6c6cceb07b7279367c3d2a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa7da4552791535ae416525d695a85743f40624300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001044f1ef28600000000000000000000000090a79d28ad7f6d472ad1cfe3bad65204ab2969a2000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000840de2db4d0000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000beb5fc579115071764c7423a4f12edde41f106ed00000000000000000000000000000000000000000000000000000000000493e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; - MultisigTask multisigTask = new DeployFeesDepositor(); + "0x174dea71000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000beb5fc579115071764c7423a4f12edde41f106ed0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000104e9e05c42000000000000000000000000cdf27f107725988f2261ce2256bdfcde8b382b100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007a120000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000243659cfe6000000000000000000000000ecbf4ed9f47302f00f0f039a691e7db83bdd26240000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + MultisigTask multisigTask = new L1PortalExecuteL2Call(); address rootSafe = address(0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A); // L1PAO address securityCouncilChildMultisig = address(0xc2819DC788505Aac350142A7A707BF9D03E3Bd03); address[] memory allSafes = MultisigTaskTestHelper.getAllSafes(rootSafe, securityCouncilChildMultisig); @@ -859,10 +860,10 @@ contract RegressionTest is Test { string[] memory expectedDataToSign = new string[](2); // Foundation expectedDataToSign[0] = - "0x1901a4a9c312badf3fcaa05eafe5dc9bee8bd9316c78ee8b0bebe3115bb21b7326728b096f6bceaab1716dfe8e85bae705192df4b5dae6e3b94d58bdf567edb6bfef"; + "0x1901a4a9c312badf3fcaa05eafe5dc9bee8bd9316c78ee8b0bebe3115bb21b73267229ea72d29d343d55ff76a6ce84cc8514d45683b4339b10bef5e956955bfe65c9"; // Security Council expectedDataToSign[1] = - "0x1901df53d510b56e539b90b369ef08fce3631020fbf921e3136ea5f8747c20bce967e5d2666095a6ced42244873f800e6714389265e35cf0e8e9e5236e720601e2b6"; + "0x1901df53d510b56e539b90b369ef08fce3631020fbf921e3136ea5f8747c20bce9672b811a78d33f39e928848432a404247a2ab7c4a596b8586797a2e86b284b3b8b"; _assertDataToSignNestedMultisig(multisigTask, actions, expectedDataToSign, MULTICALL3_ADDRESS, rootSafe); } @@ -892,6 +893,32 @@ contract RegressionTest is Test { _assertDataToSignNestedMultisig(multisigTask, actions, expectedDataToSign, MULTICALL3_ADDRESS, rootSafe); } + /// @notice Expected call data and data to sign generated by manually running the DeployFeesDepositor template at block 23197819 on mainnet. + /// Simulate from task directory (test/tasks/example/eth/016-deploy-fees-depositor/config.toml) with: + /// just --dotenv-path $(pwd)/.env --justfile ../../../../../src/improvements/justfile simulate (foundation|council) + function testRegressionCallDataMatches_DeployFeesDepositor() public { + string memory taskConfigFilePath = "test/tasks/example/eth/016-deploy-fees-depositor/config.toml"; + string memory expectedCallData = + "0x174dea7100000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000003000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000010400000000000000000000000000000000000000000000000000000000000001e8000000000000000000000000013b0d85ccb8bf860b6b79af3029fca081ae9bef20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000f2466cfa0570000000000000000000000000000000000000000000000000000000000000000666565732d6465706f7369746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000e9660a060405234801561001057600080fd5b50600160805261001e610023565b6100e3565b600054610100900460ff161561008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff90811610156100e1576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b608051610d9161010560003960008181610274015261048e0152610d916000f3fe6080604052600436106100cb5760003560e01c8063645006ca11610074578063a2a956171161004e578063a2a9561714610425578063dad544e014610445578063f68016b71461045a57600080fd5b8063645006ca1461038657806366125607146103c85780637b11936e146103e857600080fd5b80633e47158c116100a55780633e47158c146102fb57806352d84c621461031057806354fd4d501461033057600080fd5b80630de2db4d1461024057806338d38c97146102605780633cb747bf146102a357600080fd5b3661023b576040805134815247602082018190529133917f363f315f930a17d1266b86a20d6dd34b1cfbc5a9db9f13a65d06a689c3a2af8a910160405180910390a26001546bffffffffffffffffffffffff16811061023957600154600080546002546040517f3dbb202b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff6c0100000000000000000000000090950485166004820181905260606024830152606482019490945263ffffffff90911660448201529192620100009091041690633dbb202b9084906084016000604051808303818588803b1580156101ce57600080fd5b505af11580156101e2573d6000803e3d6000fd5b50505050508073ffffffffffffffffffffffffffffffffffffffff167f2acaf92365a0b69fb3570802396f62d51aabccd684036b72c3ce78699425e7ee8360405161022f91815260200190565b60405180910390a2505b005b600080fd5b34801561024c57600080fd5b5061023961025b366004610bde565b61048c565b34801561026c57600080fd5b5060405160ff7f00000000000000000000000000000000000000000000000000000000000000001681526020015b60405180910390f35b3480156102af57600080fd5b506000546102d69062010000900473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161029a565b34801561030757600080fd5b506102d661069e565b34801561031c57600080fd5b5061023961032b366004610c36565b6108a9565b34801561033c57600080fd5b506103796040518060400160405280600581526020017f312e302e3000000000000000000000000000000000000000000000000000000081525081565b60405161029a9190610c58565b34801561039257600080fd5b506001546103ab906bffffffffffffffffffffffff1681565b6040516bffffffffffffffffffffffff909116815260200161029a565b3480156103d457600080fd5b506102396103e3366004610ccb565b610928565b3480156103f457600080fd5b506001546102d6906c01000000000000000000000000900473ffffffffffffffffffffffffffffffffffffffff1681565b34801561043157600080fd5b50610239610440366004610ce8565b6109af565b34801561045157600080fd5b506102d6610a2e565b34801561046657600080fd5b506002546104779063ffffffff1681565b60405163ffffffff909116815260200161029a565b7f0000000000000000000000000000000000000000000000000000000000000000600054610100900460ff161580156104cc575060005460ff8083169116105b61055c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a6564000000000000000000000000000000000000606482015260840160405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00001660ff831617610100179055610595610aab565b6000805473ffffffffffffffffffffffffffffffffffffffff8681166c01000000000000000000000000026bffffffffffffffffffffffff8916176001556002805463ffffffff87167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000009091161790557fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff9086166201000002167fffffffffffffffffffff000000000000000000000000000000000000000000ff9091161790556040517f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989061068f90839060ff91909116815260200190565b60405180910390a15050505050565b6000806106c97fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b905073ffffffffffffffffffffffffffffffffffffffff8116156106ec57919050565b6040518060400160405280601a81526020017f4f564d5f4c3143726f7373446f6d61696e4d657373656e67657200000000000081525051600261072f9190610d03565b604080513060208201526000918101919091527f4f564d5f4c3143726f7373446f6d61696e4d657373656e676572000000000000919091179061078a906060015b604051602081830303815290604052805190602001205490565b146107c1576040517f54e433cd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b604080513060208201526001918101919091526000906107e390606001610770565b905073ffffffffffffffffffffffffffffffffffffffff811615610877578073ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa15801561084c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108709190610d67565b9250505090565b6040517f332144db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6108b1610b2e565b6002805463ffffffff8381167fffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000000083168117909355604080519190921680825260208201939093527f84858bb3fb3ecf87e268ebef250ef9ad9cd53ef7973ef7a0ec9d89470bb00a8091015b60405180910390a15050565b610930610b2e565b6001805473ffffffffffffffffffffffffffffffffffffffff8381166c010000000000000000000000008181026bffffffffffffffffffffffff85161790945560408051949093049091168084526020840191909152917f158f04d12e0403fdd63fbced694e8f70d3b87d04d8e2dfad526f5fcf6e49bbcf910161091c565b6109b7610b2e565b600180546bffffffffffffffffffffffff8381167fffffffffffffffffffffffffffffffffffffffff00000000000000000000000083168117909355604080519190921680825260208201939093527f132832be4270c0d1573ca543c41517dd443fe9daf5f21a9c74940e6db282e229910161091c565b6000610a3861069e565b73ffffffffffffffffffffffffffffffffffffffff16638da5cb5b6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa69190610d67565b905090565b33610ab461069e565b73ffffffffffffffffffffffffffffffffffffffff1614158015610af5575033610adc610a2e565b73ffffffffffffffffffffffffffffffffffffffff1614155b15610b2c576040517fc4050a2600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b565b33610b37610a2e565b73ffffffffffffffffffffffffffffffffffffffff1614610b2c576040517f7f12c64b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80356bffffffffffffffffffffffff81168114610ba057600080fd5b919050565b73ffffffffffffffffffffffffffffffffffffffff81168114610bc757600080fd5b50565b803563ffffffff81168114610ba057600080fd5b60008060008060808587031215610bf457600080fd5b610bfd85610b84565b93506020850135610c0d81610ba5565b92506040850135610c1d81610ba5565b9150610c2b60608601610bca565b905092959194509250565b600060208284031215610c4857600080fd5b610c5182610bca565b9392505050565b600060208083528351808285015260005b81811015610c8557858101830151858201604001528201610c69565b81811115610c97576000604083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016929092016040019392505050565b600060208284031215610cdd57600080fd5b8135610c5181610ba5565b600060208284031215610cfa57600080fd5b610c5182610b84565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615610d62577f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b500290565b600060208284031215610d7957600080fd5b8151610c5181610ba556fea164736f6c634300080f000a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000013b0d85ccb8bf860b6b79af3029fca081ae9bef20000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000000000000000000000000000000000000000000000000000000000000d8466cfa0570000000000000000000000000000000000000000000000000000000000000000666565732d6465706f7369746f7200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000ce760806040523480156200001157600080fd5b5060405162000cc738038062000cc783398181016040528101906200003791906200016f565b62000048816200004f60201b60201c565b50620001df565b600062000061620000ce60201b60201c565b905060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508281557f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f8284604051620000c1929190620001b2565b60405180910390a1505050565b60008060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b905080549150819250505090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600062000137826200010a565b9050919050565b62000149816200012a565b81146200015557600080fd5b50565b60008151905062000169816200013e565b92915050565b60006020828403121562000188576200018762000105565b5b6000620001988482850162000158565b91505092915050565b620001ac816200012a565b82525050565b6000604082019050620001c96000830185620001a1565b620001d86020830184620001a1565b9392505050565b610ad880620001ef6000396000f3fe60806040526004361061004e5760003560e01c80633659cfe6146100675780634f1ef286146100905780635c60da1b146100c05780638f283970146100eb578063f851a440146101145761005d565b3661005d5761005b61013f565b005b61006561013f565b005b34801561007357600080fd5b5061008e60048036038101906100899190610715565b6101dc565b005b6100aa60048036038101906100a591906107a7565b610268565b6040516100b791906108a0565b60405180910390f35b3480156100cc57600080fd5b506100d56103ae565b6040516100e291906108d1565b60405180910390f35b3480156100f757600080fd5b50610112600480360381019061010d9190610715565b61043d565b005b34801561012057600080fd5b506101296104c9565b60405161013691906108d1565b60405180910390f35b6000610149610558565b9050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036101ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016101b19061096f565b60405180910390fd5b3660008037600080366000845af43d6000803e806101d7573d6000fd5b3d6000f35b6101e461058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102495750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561025c57610257816105c6565b610265565b61026461013f565b5b50565b606061027261058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806102d75750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561039e576102e5846105c6565b6000808573ffffffffffffffffffffffffffffffffffffffff16858560405161030f9291906109ce565b600060405180830381855af49150503d806000811461034a576040519150601f19603f3d011682016040523d82523d6000602084013e61034f565b606091505b509150915081610394576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161038b90610a59565b60405180910390fd5b80925050506103a7565b6103a661013f565b5b9392505050565b60006103b861058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16148061041d5750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156104315761042a610558565b905061043a565b61043961013f565b5b90565b61044561058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806104aa5750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b156104bd576104b881610638565b6104c6565b6104c561013f565b5b50565b60006104d361058f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614806105385750600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1561054c5761054561058f565b9050610555565b61055461013f565b5b90565b60008060007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b905080549150819250505090565b60008060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b905080549150819250505090565b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b90508181558173ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a25050565b600061064261058f565b905060007fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610360001b90508281557f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f82846040516106a0929190610a79565b60405180910390a1505050565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006106e2826106b7565b9050919050565b6106f2816106d7565b81146106fd57600080fd5b50565b60008135905061070f816106e9565b92915050565b60006020828403121561072b5761072a6106ad565b5b600061073984828501610700565b91505092915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261076757610766610742565b5b8235905067ffffffffffffffff81111561078457610783610747565b5b6020830191508360018202830111156107a05761079f61074c565b5b9250929050565b6000806000604084860312156107c0576107bf6106ad565b5b60006107ce86828701610700565b935050602084013567ffffffffffffffff8111156107ef576107ee6106b2565b5b6107fb86828701610751565b92509250509250925092565b600081519050919050565b600082825260208201905092915050565b60005b83811015610841578082015181840152602081019050610826565b83811115610850576000848401525b50505050565b6000601f19601f8301169050919050565b600061087282610807565b61087c8185610812565b935061088c818560208601610823565b61089581610856565b840191505092915050565b600060208201905081810360008301526108ba8184610867565b905092915050565b6108cb816106d7565b82525050565b60006020820190506108e660008301846108c2565b92915050565b600082825260208201905092915050565b7f50726f78793a20696d706c656d656e746174696f6e206e6f7420696e6974696160008201527f6c697a6564000000000000000000000000000000000000000000000000000000602082015250565b60006109596025836108ec565b9150610964826108fd565b604082019050919050565b600060208201905081810360008301526109888161094c565b9050919050565b600081905092915050565b82818337600083830152505050565b60006109b5838561098f565b93506109c283858461099a565b82840190509392505050565b60006109db8284866109a9565b91508190509392505050565b7f50726f78793a2064656c656761746563616c6c20746f206e657720696d706c6560008201527f6d656e746174696f6e20636f6e7472616374206661696c656400000000000000602082015250565b6000610a436039836108ec565b9150610a4e826109e7565b604082019050919050565b60006020820190508181036000830152610a7281610a36565b9050919050565b6000604082019050610a8e60008301856108c2565b610a9b60208301846108c2565b939250505056fea2646970667358221220e170e6bf8ee3cc199be5ea3ca30084b98725d89b560e407f600f4a174236633364736f6c634300080f00330000000000000000000000005a0aae59d09fccbddb6c6cceb07b7279367c3d2a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000fa7da4552791535ae416525d695a85743f40624300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000001044f1ef28600000000000000000000000090a79d28ad7f6d472ad1cfe3bad65204ab2969a2000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000840de2db4d0000000000000000000000000000000000000000000000004563918244f400000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000beb5fc579115071764c7423a4f12edde41f106ed00000000000000000000000000000000000000000000000000000000000493e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"; + MultisigTask multisigTask = new DeployFeesDepositor(); + address rootSafe = address(0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A); // L1PAO + address securityCouncilChildMultisig = address(0xc2819DC788505Aac350142A7A707BF9D03E3Bd03); + address[] memory allSafes = MultisigTaskTestHelper.getAllSafes(rootSafe, securityCouncilChildMultisig); + + (Action[] memory actions, uint256[] memory allOriginalNonces) = + _setupAndSimulate(taskConfigFilePath, 23197819, "mainnet", multisigTask, allSafes); + _assertCallDataMatches(multisigTask, actions, allSafes, allOriginalNonces, expectedCallData); + + string[] memory expectedDataToSign = new string[](2); + // Foundation + expectedDataToSign[0] = + "0x1901a4a9c312badf3fcaa05eafe5dc9bee8bd9316c78ee8b0bebe3115bb21b7326728b096f6bceaab1716dfe8e85bae705192df4b5dae6e3b94d58bdf567edb6bfef"; + // Security Council + expectedDataToSign[1] = + "0x1901df53d510b56e539b90b369ef08fce3631020fbf921e3136ea5f8747c20bce967e5d2666095a6ced42244873f800e6714389265e35cf0e8e9e5236e720601e2b6"; + _assertDataToSignNestedMultisig(multisigTask, actions, expectedDataToSign, MULTICALL3_ADDRESS, rootSafe); + } + /// @notice Expected call data and data to sign generated by manually running the GnosisSafeRotateSigner at block 9264006 on sepolia using script: /// forge script GnosisSafeRotateSigner --sig "simulate(string)" test/tasks/example/sep/016-gnosis-safe-remove-owner/config.toml --rpc-url sepolia --fork-block-number 9264006 -vv function testRegressionCallDataMatches_GnosisSafeRotateSigner() public { @@ -939,6 +966,7 @@ contract RegressionTest is Test { (Action[] memory actions, uint256[] memory allOriginalNonces) = _setupAndSimulate(taskConfigFilePath, 23197819, "mainnet", multisigTask, allSafes); + _assertCallDataMatches(multisigTask, actions, allSafes, allOriginalNonces, expectedCallData); string[] memory expectedDataToSign = new string[](2); diff --git a/test/tasks/TaskManager.t.sol b/test/tasks/TaskManager.t.sol index ff1ee8afb..0e9ba7538 100644 --- a/test/tasks/TaskManager.t.sol +++ b/test/tasks/TaskManager.t.sol @@ -26,23 +26,28 @@ contract TaskManagerUnitTest is StateOverrideManager, Test { function testSetTenderlyGasEnv() public { TaskManager tm = new TaskManager(); - tm.setTenderlyGasEnv("./src/tasks/sep/000-opcm-upgrade-v200/"); + tm.setEnv("./src/tasks/sep/000-opcm-upgrade-v200/"); assertEq(vm.envString("TENDERLY_GAS"), "30000000"); - tm.setTenderlyGasEnv("./src/tasks/sep/001-opcm-upgrade-v200/"); + tm.setEnv("./src/tasks/sep/001-opcm-upgrade-v200/"); assertEq(vm.envString("TENDERLY_GAS"), "16000000"); - tm.setTenderlyGasEnv("./src/tasks/sep/002-unichain-superchain-config-fix/"); + tm.setEnv("./src/tasks/sep/002-unichain-superchain-config-fix/"); assertEq(vm.envString("TENDERLY_GAS"), ""); - tm.setTenderlyGasEnv("./src/tasks/sep/003-opcm-upgrade-v200/"); + tm.setEnv("./src/tasks/sep/003-opcm-upgrade-v200/"); assertEq(vm.envString("TENDERLY_GAS"), "16000000"); - tm.setTenderlyGasEnv("./src/tasks/eth/000-opcm-upgrade-v200/"); + tm.setEnv("./src/tasks/eth/000-opcm-upgrade-v200/"); assertEq(vm.envString("TENDERLY_GAS"), "30000000"); - tm.setTenderlyGasEnv("./src/tasks/eth/002-opcm-upgrade-v200/"); + tm.setEnv("./src/tasks/eth/002-opcm-upgrade-v200/"); assertEq(vm.envString("TENDERLY_GAS"), "16000000"); + + // Test loading multiple environment variables including FORK_BLOCK_NUMBER + tm.setEnv("./src/tasks/eth/022-U16a-opcm-upgrade-v410-base/"); + assertEq(vm.envString("TENDERLY_GAS"), "15000000"); + assertEq(vm.envString("FORK_BLOCK_NUMBER"), "23491327"); } function createStateDiff(address who, bytes32 slot, bytes32 oldValue, bytes32 newValue) diff --git a/test/tasks/example/eth/013-U16-base/.env b/test/tasks/example/eth/013-U16-base/.env index b4b63fd55..3504c5992 100644 --- a/test/tasks/example/eth/013-U16-base/.env +++ b/test/tasks/example/eth/013-U16-base/.env @@ -1,3 +1,4 @@ TENDERLY_GAS=27000000 NESTED_SAFE_NAME_DEPTH_1=base-nested NESTED_SAFE_NAME_DEPTH_2=base-council +FORK_BLOCK_NUMBER=23491327 diff --git a/test/tasks/example/eth/014-noop-call-optimismportal/.env b/test/tasks/example/eth/014-noop-call-optimismportal/.env new file mode 100644 index 000000000..d4a7b7605 --- /dev/null +++ b/test/tasks/example/eth/014-noop-call-optimismportal/.env @@ -0,0 +1,3 @@ +TENDERLY_GAS=10000000 +NESTED_SAFE_NAME_DEPTH_1=council +FORK_BLOCK_NUMBER=23197819 \ No newline at end of file diff --git a/test/tasks/example/eth/014-noop-call-optimismportal/config.toml b/test/tasks/example/eth/014-noop-call-optimismportal/config.toml new file mode 100644 index 000000000..318a8809d --- /dev/null +++ b/test/tasks/example/eth/014-noop-call-optimismportal/config.toml @@ -0,0 +1,9 @@ +templateName = "L1PortalExecuteL2Call" + +l2chains = [{name = "OP Mainnet", chainId = 10}] + +# L2 call params +l2Target = "0xcDF27F107725988f2261Ce2256bDfCdE8B382B10" # OptimismGovernor Proxy +l2Data = "0x3659cfe6000000000000000000000000ecbf4ed9f47302f00f0f039a691e7db83bdd2624" # upgradeTo(currentImpl) -> 0xecbf4ed9f47302f00f0f039a691e7db83bdd2624 +gasLimit = 500000 +isCreation = false