diff --git a/.circleci/config.yml b/.circleci/config.yml index 1e0f1048f6..9e34827aac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -134,57 +134,6 @@ jobs: echo "L2 RPC URL: $L2_RPC_URL" # Use L1_RPC_URL and L2_RPC_URL here. - just_simulate_003-protocol-versions-delta: - docker: - - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.35.0 - - steps: - - checkout - - run: - name: just simulate 003-protocol-versions-delta - command: | - just install - forge clean - forge build - cd tasks/eth/003-protocol-versions-delta - export SIMULATE_WITHOUT_LEDGER=1 - export BUNDLE_NAME=inputs/op - just \ - --dotenv-path .env \ - --justfile ../../../single.just \ - simulate \ - council - just \ - --dotenv-path .env \ - --justfile ../../../single.just \ - simulate \ - foundation - - just_simulate_004_add_superchain_config: - docker: - - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.35.0 - - steps: - - checkout - - run: - name: just simulate 004-add-superchain-config - command: | - just install - forge clean - forge build - cd tasks/eth/004-add-superchainConfig - export SIMULATE_WITHOUT_LEDGER=1 - just \ - --dotenv-path .env \ - --justfile ../../../single.just \ - simulate \ - council - just \ - --dotenv-path .env \ - --justfile ../../../single.just \ - simulate \ - foundation - just_simulate_005-protocol-versions-ecotone: docker: - image: us-docker.pkg.dev/oplabs-tools-artifacts/images/ci-builder:v0.35.0 @@ -199,7 +148,10 @@ jobs: forge build cd tasks/eth/005-protocol-versions-ecotone export SIMULATE_WITHOUT_LEDGER=1 - just simulate + just \ + --dotenv-path .env \ + --justfile ../../../single.just \ + simulate just_simulate_sc_rehearsal_1: docker: @@ -297,8 +249,6 @@ workflows: # expect the ceremony to work continuously), and remove it once # the ceremony is for historical archive only (e.g. the # ceremony is done). - - just_simulate_003-protocol-versions-delta - - just_simulate_004_add_superchain_config - just_simulate_005-protocol-versions-ecotone - just_simulate_sc_rehearsal_1 - just_simulate_sc_rehearsal_2 diff --git a/NESTED.md b/NESTED.md index c12299b3b7..c4694d4c8a 100644 --- a/NESTED.md +++ b/NESTED.md @@ -86,7 +86,8 @@ validate integrity of the simulation, we need to check the following: #### 3.2. Validate correctness of the state diff. -Now click on the "State" tab, and refer to the Validation instructions for the transaction you are signing. +Now click on the "State" tab, and refer to the "State Validations" instructions for the transaction you are signing. +Once complete return to this document to complete the signing. #### 3.3. Extract the domain hash and the message hash to approve. diff --git a/SINGLE.md b/SINGLE.md index 1a4ad43e9b..a16b2591a6 100644 --- a/SINGLE.md +++ b/SINGLE.md @@ -72,7 +72,8 @@ validate integrity of the simulation, we need to check the following: #### 3.2. Validate correctness of the state diff. -Now click on the "State" tab, and refer to the Validation instructions for the transaction you are signing. +Now click on the "State" tab, and refer to the "State Validations" instructions for the transaction you are signing. +Once complete return to this document to complete the signing. #### 3.3. Extract the domain hash and the message hash to approve. diff --git a/tasks/eth/005-protocol-versions-ecotone/README.md b/tasks/eth/005-protocol-versions-ecotone/README.md index 3fd1c8ede7..098b9563ff 100644 --- a/tasks/eth/005-protocol-versions-ecotone/README.md +++ b/tasks/eth/005-protocol-versions-ecotone/README.md @@ -11,82 +11,24 @@ This transaction should be sent on **Mar 11, 2024**, two and a half days prior t Both versions are currently set to 3.1.0 (Regolith), as they were never updated since the deployment of `ProtocolVersions` for Canyon or Delta. [Task-003](../003-protocol-versions-delta/) is scheduled to update these versions to 5.0.0, and this task will then upgrade them to 6.0.0. -## Approving the transaction +## Signing and execution -### 1. Update repo and move to the appropriate folder for this rehearsal task: +Please see the signing and execution instructions in [SINGLE.md](../../../SINGLE.md). -``` -cd superchain-ops -git pull -just install -cd tasks/eth/005-protocol-versions-ecotone -``` - -### 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. Simulate and validate the transaction - -Make sure your ledger is still unlocked and run the following. - -Remember that by default `just` is running with the address derived from -`/0` (first nonce). If you wish to use a different account, run `just -simulate [X]`, where X is the derivation path of the address -that you want to use. - -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.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 mainnet. -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, - you will need to determine which “number” it is in the list of - addresses on your ledger. By default the script will assume the - derivation path is `m/44'/60'/0'/0/0`. By calling the script with - `just simulate 1` it will derive the address using - `m/44'/60'/1'/0/0` instead. - -#### 3.2. Validate correctness of the state diff. +## State Validations Now click on the "State" tab. Verify that: * For the `ProtocolVersions` Proxy at `0x8062AbC286f5e7D9428a0Ccb9AbD71e50d93b935` both the recommended and required storage slots are updated from the encoded form of `3.1.0` to `6.0.0`. * key `0x4aaefe95bd84fd3f32700cf3b7566bc944b73138e41958b5785826df2aecace0` - * before: `0x0000000000000000000000000000000000000003000000010000000000000000` (before execution of task-003) or - * before: `0x0000000000000000000000000000000000000005000000000000000000000000` (after execution of task-003) + * before: `0x0000000000000000000000000000000000000005000000000000000000000000` * after : `0x0000000000000000000000000000000000000006000000000000000000000000` * key `0xe314dfc40f0025322aacc0ba8ef420b62fb3b702cf01e0cdf3d829117ac2ff1a` - * before: `0x0000000000000000000000000000000000000003000000010000000000000000` (before execution of task-003) or - * before: `0x0000000000000000000000000000000000000005000000000000000000000000` (after execution of task-003) + * before: `0x0000000000000000000000000000000000000005000000000000000000000000` * after : `0x0000000000000000000000000000000000000006000000000000000000000000` * All other state changes (2) are a nonce change of the sender account and the multisig. -Note that [task-003](../003-protocol-versions-delta/) is scheduled to update these versions to 5.0.0, -so depending on whether the simulation is run before or after task-003 is executed, the diff will either show -`0x0000000000000000000000000000000000000003000000010000000000000000` or -`0x0000000000000000000000000000000000000005000000000000000000000000` as the value before. - On the "Events" tab, you can verify that two `ConfigUpdate` events were emitted from the `ProtocolVersions` proxy, as well as an `ExecutionSuccess` event by the multisig. @@ -113,99 +55,6 @@ cast keccak protocolversion.recommended # 0xe314dfc40f0025322aacc0ba8ef420b62fb3b702cf01e0cdf3d829117ac2ff1b ``` -#### 3.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. - -Here is an example screenshot. Note that the hash value may be -different: - -![](./images/tenderly-hash.png) - -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. - -### 4. Approve the signature on your ledger - -Once the validations are done, it's time to actually sign the -transaction. Make sure your ledger is still unlocked and run the -following: - -``` shell -just sign # or just sign -``` - -> [!IMPORTANT] 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: - -``` -Data: -Signer:
-Signature: -``` - -Double check the signer address is the right one. - -### 5. 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 the rehearsal - -### [After the rehearsal] Execute the output - -1. Collect outputs from all participating signers. -2. Concatenate all signatures and export it as the `SIGNATURES` - environment variable, i.e. `export - SIGNATURES="0x[SIGNATURE1][SIGNATURE2]..."`. -3. Run `just execute 0 # or 1 or ...` to execute the transaction onchain. - -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 -``` - -Then you should run +## Continue signing -``` shell -export SIGNATURES="0xAAAABBBB" -just execute 0 # or 1 or ... -``` +At this point you may resume following the signing and execution instructions in section 3.3 of [SINGLE.md](../../../SINGLE.md). diff --git a/tasks/eth/005-protocol-versions-ecotone/inputs/op.json b/tasks/eth/005-protocol-versions-ecotone/input.json similarity index 100% rename from tasks/eth/005-protocol-versions-ecotone/inputs/op.json rename to tasks/eth/005-protocol-versions-ecotone/input.json diff --git a/tasks/eth/005-protocol-versions-ecotone/justfile b/tasks/eth/005-protocol-versions-ecotone/justfile deleted file mode 100644 index ac1510bc0f..0000000000 --- a/tasks/eth/005-protocol-versions-ecotone/justfile +++ /dev/null @@ -1,64 +0,0 @@ -set dotenv-load - -export rpcUrl := env_var('ETH_RPC_URL') -export signatures := env_var_or_default('SIGNATURES', '') -export bundle := "inputs/op" -export location := `pwd` -export OWNER_SAFE := env_var('FOUNDATION_SAFE') - -simulate hdPath='0': - #!/usr/bin/env bash - cd ../.. - echo "getting signer address..." - if [ t"$SIMULATE_WITHOUT_LEDGER" == t1 ] - then - signer="0x42d27eEA1AD6e22Af6284F609847CB3Cd56B9c64" - else - signer=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - fi - echo "Simulating with: ${signer}" - echo "" - forge build - forge script SignFromJson \ - --rpc-url ${rpcUrl} \ - --sig "signJson(string)" \ - "${location}/${bundle}.json" \ - --sender ${signer} - -sign hdPath='0': - #!/usr/bin/env bash - cd ../.. - echo "getting signer address..." - signer=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - echo "Signing with: ${signer}" - echo "" - forge build - $(git rev-parse --show-toplevel)/bin/eip712sign --ledger --hd-paths "m/44'/60'/{{hdPath}}'/0/0" -- \ - forge script SignFromJson \ - --rpc-url ${rpcUrl} \ - --sig "signJson(string)" \ - "${location}/${bundle}.json" - -execute hdPath='0': - #!/usr/bin/env bash - cd ../.. - sender=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - forge build - forge script --fork-url ${ETH_RPC_URL} SignFromJson \ - --sig "runJson(string,bytes)" "${location}/${bundle}.json" ${SIGNATURES} \ - --ledger --hd-paths "m/44'/60'/{{hdPath}}'/0/0" --broadcast \ - --sender ${sender} - -add-transaction to sig *params: - #!/usr/bin/env bash - cd ../.. - newbundle="${bundle}-new" - backupbundle="${bundle}-$(date -u '+%Y-%m-%d_%H-%M-%S')" - DATA=$(cast calldata '{{sig}}' {{params}}) - jq --arg to "{{to}}" --arg data "${DATA}" \ - '.transactions += [{"to": $to, "data": $data}]' \ - "${location}/${bundle}.json" \ - > "${location}/${newbundle}.json" - mv "${location}/${bundle}.json" "${location}/${backupbundle}.json" - mv "${location}/${newbundle}.json" "${location}/${bundle}.json" - echo "Old bundle backed up to ${backupbundle}.json" diff --git a/tasks/templates/00-default/README.md b/tasks/templates/00-default/README.md index c8600f3cf8..3c8e4b961a 100644 --- a/tasks/templates/00-default/README.md +++ b/tasks/templates/00-default/README.md @@ -19,66 +19,19 @@ just add-transaction 0xAe851f927Ee40dE99aaBb7461C00f9622ab91d60 'setGasConfig(ui _The old bundle is backed up._ -## Approving the transaction +## Signing and execution -### 1. Update repo and move to the appropriate folder for this rehearsal task: +_TODO: choose one of the following options and delete the other._ -``` -cd superchain-ops -git pull -just install -cd /xx-todo-task -``` +Please see the signing and execution instructions in [SINGLE.md](../../../SINGLE.md). -### 2. Setup Ledger +Please see the signing and execution instructions in [NESTED.md](../../../NESTED.md). Your Ledger needs to be connected and unlocked. The Ethereum application needs to be opened on Ledger with the message "Application is ready". -### 3. Simulate and validate the transaction - -Make sure your ledger is still unlocked and run the following. - -Remember that by default `just` is running with the address derived from -`/0` (first nonce). If you wish to use a different account, run `just -simulate [X]`, where X is the derivation path of the address -that you want to use. - -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.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 . -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, - you will need to determine which “number” it is in the list of - addresses on your ledger. By default the script will assume the - derivation path is m/44'/60'/0'/0/0. By calling the script with - `just simulate 1` it will derive the address using - m/44'/60'/1'/0/0 instead. - -_TODO: Possibly replace following image with recent "Simulated Transaction" screen shot of Tenderly_ - -![](./images/tenderly-overview-network.png) - -#### 3.2. Validate correctness of the state diff. +## State Validations Now click on the "State" tab. Verify that: @@ -86,99 +39,10 @@ _TODO: Describe expected state changes and possibly link out to relevant PRs. [This](../../sep/2-op-extended-pause/README.md#32-validate-correctness-of-the-state-diff) is a good example of how this can look._ -#### 3.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. - -Here is an example screenshot. Note that the hash value may be -different: - -![](./images/tenderly-hash.png) - -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. - -### 4. Approve the signature on your ledger +## Continue signing -Once the validations are done, it's time to actually sign the -transaction. Make sure your ledger is still unlocked and run the -following: +_TODO: choose one of the following options and delete the other._ -``` shell -just sign # or just sign -``` - -> [!IMPORTANT] 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: - -``` -Data: -Signer:
-Signature: -``` - -Double check the signer address is the right one. - -### 5. 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. +At this point you may resume following the signing and execution instructions in section 3.3 of [SINGLE.md](../../../SINGLE.md). -Share the `Data`, `Signer` and `Signature` with the Facilitator, and -congrats, you are done! - -## [For Facilitator ONLY] How to execute the rehearsal - -### [After the rehearsal] Execute the output - -1. Collect outputs from all participating signers. -2. Concatenate all signatures and export it as the `SIGNATURES` - environment variable, i.e. `export - SIGNATURES="0x[SIGNATURE1][SIGNATURE2]..."`. -3. Run `just execute 0 # or 1 or ...` to execute the transaction onchain. - -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 -``` - -Then you should run - -``` shell -export SIGNATURES="0xAAAABBBB" -just execute 0 # or 1 or ... -``` +At this point you may resume following the signing and execution instructions in section 3.3 of [NESTED.md](../../../NESTED.md). diff --git a/tasks/templates/00-protocol-versions/README.md b/tasks/templates/00-protocol-versions/README.md index f949618370..b35dba0cb8 100644 --- a/tasks/templates/00-protocol-versions/README.md +++ b/tasks/templates/00-protocol-versions/README.md @@ -13,8 +13,8 @@ Both versions are currently set to X.Y.0 (Old Forkname TODO). _Transactions can be created using ``` export PV_ENC=$(cd ../../../lib/optimism && go run ./op-chain-ops/cmd/protocol-version encode --major ) -# 0x0000000000000000000000000000000000000005000000000000000000000000 -export PV_ADDR=0x8062AbC286f5e7D9428a0Ccb9AbD71e50d93b935 +# 0x0000000000000000000000000000000000000005000000000000000000000000 +export PV_ADDR=0x8062AbC286f5e7D9428a0Ccb9AbD71e50d93b935 just add-transaction $PV_ADDR 'setRecommended(uint256)' $PV_ENC just add-transaction $PV_ADDR 'setRequired(uint256)' $PV_ENC ``` @@ -22,62 +22,11 @@ This batches setting both, the recommended and required versions in one multical Adapt accordingly if only setting one of require/recommended or if setting different versions._ -## Approving the transaction +## Signing and execution -### 1. Update repo and move to the appropriate folder for this rehearsal task: +Please see the signing and execution instructions in [SINGLE.md](../../../SINGLE.md). -``` -cd superchain-ops -git pull -just install -cd tasks/eth/03-protocol-version -``` - -### 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. Simulate and validate the transaction - -Make sure your ledger is still unlocked and run the following. - -Remember that by default `just` is running with the address derived from -`/0` (first nonce). If you wish to use a different account, run `just -simulate [X]`, where X is the derivation path of the address -that you want to use. - -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.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 mainnet. -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, - you will need to determine which “number” it is in the list of - addresses on your ledger. By default the script will assume the - derivation path is `m/44'/60'/0'/0/0`. By calling the script with - `just simulate 1` it will derive the address using - `m/44'/60'/1'/0/0` instead. - -#### 3.2. Validate correctness of the state diff. +## State Validations Now click on the "State" tab. Verify that: @@ -119,99 +68,6 @@ cast keccak protocolversion.recommended # 0xe314dfc40f0025322aacc0ba8ef420b62fb3b702cf01e0cdf3d829117ac2ff1b ``` -#### 3.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. - -Here is an example screenshot. Note that the hash value may be -different: - -![](./images/tenderly-hash.png) - -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. - -### 4. Approve the signature on your ledger - -Once the validations are done, it's time to actually sign the -transaction. Make sure your ledger is still unlocked and run the -following: +## Continue signing -``` shell -just sign # or just sign -``` - -> [!IMPORTANT] 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: - -``` -Data: -Signer:
-Signature: -``` - -Double check the signer address is the right one. - -### 5. 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 the rehearsal - -### [After the rehearsal] Execute the output - -1. Collect outputs from all participating signers. -2. Concatenate all signatures and export it as the `SIGNATURES` - environment variable, i.e. `export - SIGNATURES="0x[SIGNATURE1][SIGNATURE2]..."`. -3. Run `just execute 0 # or 1 or ...` to execute the transaction onchain. - -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 -``` - -Then you should run - -``` shell -export SIGNATURES="0xAAAABBBB" -just execute 0 # or 1 or ... -``` +At this point you may resume following the signing and execution instructions in section 3.3 of [SINGLE.md](../../../SINGLE.md). diff --git a/tasks/templates/00-protocol-versions/justfile b/tasks/templates/00-protocol-versions/justfile deleted file mode 100644 index ac1510bc0f..0000000000 --- a/tasks/templates/00-protocol-versions/justfile +++ /dev/null @@ -1,64 +0,0 @@ -set dotenv-load - -export rpcUrl := env_var('ETH_RPC_URL') -export signatures := env_var_or_default('SIGNATURES', '') -export bundle := "inputs/op" -export location := `pwd` -export OWNER_SAFE := env_var('FOUNDATION_SAFE') - -simulate hdPath='0': - #!/usr/bin/env bash - cd ../.. - echo "getting signer address..." - if [ t"$SIMULATE_WITHOUT_LEDGER" == t1 ] - then - signer="0x42d27eEA1AD6e22Af6284F609847CB3Cd56B9c64" - else - signer=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - fi - echo "Simulating with: ${signer}" - echo "" - forge build - forge script SignFromJson \ - --rpc-url ${rpcUrl} \ - --sig "signJson(string)" \ - "${location}/${bundle}.json" \ - --sender ${signer} - -sign hdPath='0': - #!/usr/bin/env bash - cd ../.. - echo "getting signer address..." - signer=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - echo "Signing with: ${signer}" - echo "" - forge build - $(git rev-parse --show-toplevel)/bin/eip712sign --ledger --hd-paths "m/44'/60'/{{hdPath}}'/0/0" -- \ - forge script SignFromJson \ - --rpc-url ${rpcUrl} \ - --sig "signJson(string)" \ - "${location}/${bundle}.json" - -execute hdPath='0': - #!/usr/bin/env bash - cd ../.. - sender=$(cast wallet address --ledger --mnemonic-derivation-path "m/44'/60'/{{hdPath}}'/0/0") - forge build - forge script --fork-url ${ETH_RPC_URL} SignFromJson \ - --sig "runJson(string,bytes)" "${location}/${bundle}.json" ${SIGNATURES} \ - --ledger --hd-paths "m/44'/60'/{{hdPath}}'/0/0" --broadcast \ - --sender ${sender} - -add-transaction to sig *params: - #!/usr/bin/env bash - cd ../.. - newbundle="${bundle}-new" - backupbundle="${bundle}-$(date -u '+%Y-%m-%d_%H-%M-%S')" - DATA=$(cast calldata '{{sig}}' {{params}}) - jq --arg to "{{to}}" --arg data "${DATA}" \ - '.transactions += [{"to": $to, "data": $data}]' \ - "${location}/${bundle}.json" \ - > "${location}/${newbundle}.json" - mv "${location}/${bundle}.json" "${location}/${backupbundle}.json" - mv "${location}/${newbundle}.json" "${location}/${bundle}.json" - echo "Old bundle backed up to ${backupbundle}.json"