From 5bfffaa8da3c3438a26f69cb15d8c76a368c6ab1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Cuesta=20Ca=C3=B1ada?= Date: Fri, 14 Nov 2025 06:44:08 +0000 Subject: [PATCH] Fix how to obtain the "From" address in the L2 simulation --- src/doc/simulate-l2-ownership-transfer.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/doc/simulate-l2-ownership-transfer.md b/src/doc/simulate-l2-ownership-transfer.md index 7de7429fb9..c5d5028e86 100644 --- a/src/doc/simulate-l2-ownership-transfer.md +++ b/src/doc/simulate-l2-ownership-transfer.md @@ -1,6 +1,7 @@ # Simulating an L2 Deposit Transaction Before Execution -The following steps describe how to simulate an L2 deposit transaction prior to L1 task execution. The [TransferL2PAOFromL1.sol](../template/TransferL2PAOFromL1.sol) template executes an L1 transaction, which is later forwarded to the L2 by the op-node. To gain additional confidence that the L2 deposit transaction works as expected, we manually simulate it and record the results in the task’s VALIDATION.md file. +The following steps describe how to simulate an L2 deposit transaction prior to L1 task execution. The [TransferL2PAOFromL1.sol](../template/TransferL2PAOFromL1.sol) transfers the ownership of a L2PAO from a current aliased L1 address to a new aliased L1 address. +This template executes an L1 transaction, which is later forwarded to the L2 by the op-node. To gain additional confidence that the L2 deposit transaction works as expected, we manually simulate it and record the results in the task’s VALIDATION.md file. ## Steps @@ -32,7 +33,7 @@ The following steps describe how to simulate an L2 deposit transaction prior to ``` We must put `0xf2fde38b0000000000000000000000006b1bae59d09fccbddb6c6cceb07b7279367c4e3b` in the `Enter raw input data` field. ![Enter Raw Input Data](./images/tenderly-raw-input-data.png) -8. Double-check that the address returned from the `cast calldata-decode` step matches the aliased L1 ProxyAdmin owner (L1PAO) for the target chain. In this case, the L1PAO is `0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A`. Confirm this by manually unaliasing the address using [chisel](https://book.getfoundry.sh/chisel/). +8. Double-check that the address returned from the `cast calldata-decode` step matches the aliased new L1 ProxyAdmin owner (L1PAO) for the target chain. In this case, the L1PAO is `0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A`. Confirm this by manually unaliasing the address using [chisel](https://book.getfoundry.sh/chisel/). ```bash > uint160 constant offset = uint160(0x1111000000000000000000000000000000001111) > function undoL1ToL2Alias(address l2Address) internal pure returns (address l1Address) { @@ -43,7 +44,7 @@ The following steps describe how to simulate an L2 deposit transaction prior to > undoL1ToL2Alias(0x6B1BAE59D09fCcbdDB6C6cceb07B7279367C4E3b) # returns: 0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A ``` -9. Next we need to fill out the `Transaction Parameters` section on the right of the UI. Specifically, fill out the `From` address and `Gas` fields. The `From` address should be the aliased L1PAO address obtained in the previous step (i.e. `0x6B1BAE59D09fCcbdDB6C6cceb07B7279367C4E3b`). The `Gas` field should be set to `200000`. You can get this number by further parsing the opaque data and extracting the gas limit. +9. Next we need to fill out the `Transaction Parameters` section on the right of the UI. Specifically, fill out the `From` address and `Gas` fields. The `From` address should be the aliased old L1PAO address obtained as the `from` field in the `TransactionDeposited` event (i.e. `0x6B1BAE59D09fCcbdDB6C6cceb07B7279367C4E3b`). The `Gas` field should be set to `200000`. You can get this number by further parsing the opaque data and extracting the gas limit. ```bash cast --to-dec 0x30d40 # returns: 200000