From 5f51f107482abdd3c27071150180b32c8cc2329e Mon Sep 17 00:00:00 2001 From: 0xchin <77933451+0xChin@users.noreply.github.com> Date: Wed, 10 Dec 2025 16:33:54 -0300 Subject: [PATCH 1/5] feat: add production task --- src/tasks/eth/037-rev-share-ink-soneium/.env | 1 + .../eth/037-rev-share-ink-soneium/README.md | 32 +++++++++++++++++ .../037-rev-share-ink-soneium/VALIDATION.md | 29 +++++++++++++++ .../eth/037-rev-share-ink-soneium/config.toml | 36 +++++++++++++++++++ 4 files changed, 98 insertions(+) create mode 100644 src/tasks/eth/037-rev-share-ink-soneium/.env create mode 100644 src/tasks/eth/037-rev-share-ink-soneium/README.md create mode 100644 src/tasks/eth/037-rev-share-ink-soneium/VALIDATION.md create mode 100644 src/tasks/eth/037-rev-share-ink-soneium/config.toml diff --git a/src/tasks/eth/037-rev-share-ink-soneium/.env b/src/tasks/eth/037-rev-share-ink-soneium/.env new file mode 100644 index 000000000..11c1fb015 --- /dev/null +++ b/src/tasks/eth/037-rev-share-ink-soneium/.env @@ -0,0 +1 @@ +TENDERLY_GAS=24000000 \ No newline at end of file diff --git a/src/tasks/eth/037-rev-share-ink-soneium/README.md b/src/tasks/eth/037-rev-share-ink-soneium/README.md new file mode 100644 index 000000000..50e3ff604 --- /dev/null +++ b/src/tasks/eth/037-rev-share-ink-soneium/README.md @@ -0,0 +1,32 @@ +# 037-rev-share-ink-soneium: RevShare Upgrade and Setup for Ink and Soneium Mainnets + +Status: [DRAFT, NOT READY TO SIGN]() + +## Objective + +Upgrade proxies and setup RevShare contracts for Ink and Soneium Mainnets. This task: + +1. Upgrades the fee vault proxy implementations (SequencerFeeVault, BaseFeeVault, L1FeeVault, OperatorFeeVault) on Ink and Soneium L2s and the FeeSplitter +2. Initializes the FeeSplitter with the RevShareCalculator and L1Withdrawer addresses +3. Configures the fee distribution to send the Optimism Collective's 15% revenue share to the FeesDepositor on L1 + +Target chains: + +- Ink Mainnet (chainId: 57073) +- Soneium Mainnet (chainId: 1868) + +## Simulation & Signing + +Simulation commands for each safe: + +```bash +cd src/tasks/eth/037-rev-share-ink-soneium +SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile simulate +``` + +Signing commands for each safe: + +```bash +cd src/tasks/eth/037-rev-share-ink-soneium +SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile sign +``` diff --git a/src/tasks/eth/037-rev-share-ink-soneium/VALIDATION.md b/src/tasks/eth/037-rev-share-ink-soneium/VALIDATION.md new file mode 100644 index 000000000..d87008cab --- /dev/null +++ b/src/tasks/eth/037-rev-share-ink-soneium/VALIDATION.md @@ -0,0 +1,29 @@ +# Validation + +This document can be used to validate the inputs and result of the execution of the upgrade transaction which you are +signing. + +## Expected Domain and Message Hashes + +Validate the domain and message hashes. These values should match both the values on your ledger and +the values printed to the terminal when you run the task. + +> [!CAUTION] +> +> Before signing, ensure the below hashes match what is on your ledger. +> +> ### Nested Safe 1 (Foundation): `0x847B5c174615B1B7fDF770882256e2D3E95b9D92` +> +> - Domain Hash: `0xa4a9c312badf3fcaa05eafe5dc9bee8bd9316c78ee8b0bebe3115bb21b732672` +> - Message Hash: `0xdd737ad6dfb9e5cf0d3bda4b051450e4a1d7b8c38c158ed4b57712a70f50707a` +> +> ### Nested Safe 2 (Security Council): `0xc2819DC788505Aac350142A7A707BF9D03E3Bd03` +> +> - Domain Hash: `0xdf53d510b56e539b90b369ef08fce3631020fbf921e3136ea5f8747c20bce967` +> - Message Hash: `0xddd5bfdade4e3e69c2a1055039c1f159b6fc48e52a21206cbaf0828ec7f06008` + +## Task Calldata + +``` +0x82ad56cb00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000071241bbae674967dd523e621c272ea32cf33119a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001841a80dc38000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005d66c1782664115999c47c9fa5cd031f495d3e4f0000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000ed9b99a703bad32ac96fddc313c0652e379251fd00000000000000000000000000000000000000000000000000000000000c35000000000000000000000000005f077b4c3509c2c192e50b6654d924fcb8126a6000000000000000000000000088e529a6ccd302c948689cd5156c83d4614fae920000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000ed9b99a703bad32ac96fddc313c0652e379251fd00000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000f07b3169fff67a8aecdbb18d9761aeee3459111200000000000000000000000000000000000000000000000000000000 +``` diff --git a/src/tasks/eth/037-rev-share-ink-soneium/config.toml b/src/tasks/eth/037-rev-share-ink-soneium/config.toml new file mode 100644 index 000000000..b34a42568 --- /dev/null +++ b/src/tasks/eth/037-rev-share-ink-soneium/config.toml @@ -0,0 +1,36 @@ +# RevShare Upgrade And Setup Configuration + +templateName = "RevShareUpgradeAndSetup" + +# L2 chains to target +l2chains = [{name = "Ink", chainId = 57073}, {name = "Soneium", chainId = 1868}] + +safeAddress = "ProxyAdminOwner" + +# RevShareContractsUpgrader address +revShareUpgrader = "0x71241bbae674967dd523e621c272ea32cf33119a" + +# RevShare configurations (one per chain) - flattened arrays +portals = [ + "0x5d66C1782664115999C47c9fA5cd031f495D3e4F", # Ink Mainnet Portal + "0x88e529A6ccd302c948689Cd5156C83D4614FAE92" # Soneium Mainnet Portal +] + +chainFeesRecipients = [ + "0x5f077b4c3509C2c192e50B6654d924Fcb8126A60", # L1Withdrawer to send funds in Mainnet to address 0xa6f0F94C13C4255231958079E7331694205F6c93 + "0xF07b3169ffF67A8AECdBb18d9761AEeE34591112" +] + +# 2 ether +l1WithdrawerMinWithdrawalAmounts = [2000000000000000000, 2000000000000000000] + +# FeesDepositor address in mainnet +l1WithdrawerRecipients = [ + "0xed9B99a703BaD32AC96FDdc313c0652e379251Fd", + "0xed9B99a703BaD32AC96FDdc313c0652e379251Fd" +] +l1WithdrawerGasLimits = [800000, 800000] + +[addresses] +ProxyAdminOwner = "0x5a0Aae59D09fccBdDb6C6CcEB07B7279367C3d2A" + From 216305d8c4359cecd4a9b5171d8f19bc2c38da09 Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:49:36 -0300 Subject: [PATCH 2/5] feat: add sepolia prod tasks * fix: minors --- src/tasks/eth/037-rev-share-ink-soneium/.env | 2 +- .../eth/037-rev-share-ink-soneium/README.md | 10 +++-- src/tasks/sep/047-rev-share-ink-soneium/.env | 1 + .../sep/047-rev-share-ink-soneium/README.md | 36 ++++++++++++++++++ .../047-rev-share-ink-soneium/VALIDATION.md | 29 ++++++++++++++ .../sep/047-rev-share-ink-soneium/config.toml | 38 +++++++++++++++++++ .../.env | 2 +- .../tasks/example/sep/031-revshare-setup/.env | 2 +- .../sep/031-revshare-setup/config.toml | 2 +- 9 files changed, 115 insertions(+), 7 deletions(-) create mode 100644 src/tasks/sep/047-rev-share-ink-soneium/.env create mode 100644 src/tasks/sep/047-rev-share-ink-soneium/README.md create mode 100644 src/tasks/sep/047-rev-share-ink-soneium/VALIDATION.md create mode 100644 src/tasks/sep/047-rev-share-ink-soneium/config.toml diff --git a/src/tasks/eth/037-rev-share-ink-soneium/.env b/src/tasks/eth/037-rev-share-ink-soneium/.env index 11c1fb015..ae8dbf4b3 100644 --- a/src/tasks/eth/037-rev-share-ink-soneium/.env +++ b/src/tasks/eth/037-rev-share-ink-soneium/.env @@ -1 +1 @@ -TENDERLY_GAS=24000000 \ No newline at end of file +TENDERLY_GAS=16000000 \ No newline at end of file diff --git a/src/tasks/eth/037-rev-share-ink-soneium/README.md b/src/tasks/eth/037-rev-share-ink-soneium/README.md index 50e3ff604..0298d85dc 100644 --- a/src/tasks/eth/037-rev-share-ink-soneium/README.md +++ b/src/tasks/eth/037-rev-share-ink-soneium/README.md @@ -6,9 +6,13 @@ Status: [DRAFT, NOT READY TO SIGN]() Upgrade proxies and setup RevShare contracts for Ink and Soneium Mainnets. This task: -1. Upgrades the fee vault proxy implementations (SequencerFeeVault, BaseFeeVault, L1FeeVault, OperatorFeeVault) on Ink and Soneium L2s and the FeeSplitter -2. Initializes the FeeSplitter with the RevShareCalculator and L1Withdrawer addresses -3. Configures the fee distribution to send the Optimism Collective's 15% revenue share to the FeesDepositor on L1 +1. Deploys all needed contract implementations: + - FeeVaults + - FeeSplitter + - L1Withdrawer (pointing to the FeesDepositor on L1) + - RevShareCalculator (pointing to the L1Withdrawer and the ChainFeesRecipient) +2. Upgrades the fee vault proxy implementations (SequencerFeeVault, BaseFeeVault, L1FeeVault, OperatorFeeVault) on Ink and Soneium L2s +3. Sets FeeSplitter predeploy to point to the new FeeSplitter implementation and initializes it with the RevShareCalculator address Target chains: diff --git a/src/tasks/sep/047-rev-share-ink-soneium/.env b/src/tasks/sep/047-rev-share-ink-soneium/.env new file mode 100644 index 000000000..cb1a6be6f --- /dev/null +++ b/src/tasks/sep/047-rev-share-ink-soneium/.env @@ -0,0 +1 @@ +TENDERLY_GAS=16000000 diff --git a/src/tasks/sep/047-rev-share-ink-soneium/README.md b/src/tasks/sep/047-rev-share-ink-soneium/README.md new file mode 100644 index 000000000..915b63d89 --- /dev/null +++ b/src/tasks/sep/047-rev-share-ink-soneium/README.md @@ -0,0 +1,36 @@ +# 047-rev-share-ink-soneium: RevShare Upgrade and Setup for Ink Sepolia and Soneium Minato + +Status: [DRAFT, NOT READY TO SIGN]() + +## Objective + +Upgrade proxies and setup RevShare contracts for Ink Sepolia and Soneium Testnet Minato. This task: + +1. Deploys all needed contract implementations: + - FeeVaults + - FeeSplitter + - L1Withdrawer (pointing to the FeesDepositor on L1) + - RevShareCalculator (pointing to the L1Withdrawer and the ChainFeesRecipient) +2. Upgrades the fee vault proxy implementations (SequencerFeeVault, BaseFeeVault, L1FeeVault, OperatorFeeVault) on Ink Sepolia and Soneium Minato L2s +3. Sets FeeSplitter predeploy to point to the new FeeSplitter implementation and initializes it with the RevShareCalculator address + +Target chains: + +- Ink Sepolia (chainId: 763373) +- Soneium Testnet Minato (chainId: 1946) + +## Simulation & Signing + +Simulation commands for each safe: + +```bash +cd src/tasks/sep/047-rev-share-ink-soneium +SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile simulate +``` + +Signing commands for each safe: + +```bash +cd src/tasks/sep/047-rev-share-ink-soneium +just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile sign +``` diff --git a/src/tasks/sep/047-rev-share-ink-soneium/VALIDATION.md b/src/tasks/sep/047-rev-share-ink-soneium/VALIDATION.md new file mode 100644 index 000000000..271fd9f00 --- /dev/null +++ b/src/tasks/sep/047-rev-share-ink-soneium/VALIDATION.md @@ -0,0 +1,29 @@ +# Validation + +This document can be used to validate the inputs and result of the execution of the upgrade transaction which you are +signing. + +## Expected Domain and Message Hashes + +Validate the domain and message hashes. These values should match both the values on your ledger and +the values printed to the terminal when you run the task. + +> [!CAUTION] +> +> Before signing, ensure the below hashes match what is on your ledger. +> +> ### Nested Safe 1 (Foundation): `0xDEe57160aAfCF04c34C887B5962D0a69676d3C8B` +> +> - Domain Hash: `0x37e1f5dd3b92a004a23589b741196c8a214629d4ea3a690ec8e41ae45c689cbb` +> - Message Hash: `0x48bc25353b26df29df127a047c7bc5f4e68b717ff69cdd72a85caf9b6d2740c8` +> +> ### Nested Safe 2 (Security Council): `0xf64bc17485f0B4Ea5F06A96514182FC4cB561977` +> +> - Domain Hash: `0xbe081970e9fc104bd1ea27e375cd21ec7bb1eec56bfe43347c3e36c5d27b8533` +> - Message Hash: `0xa1bb7dbd920e5f69e3932f20c6869a0eb6be1c88c1ce5003eb641222c112e69a` + +## Task Calldata + +``` +0x82ad56cb00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000071241bbae674967dd523e621c272ea32cf33119a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000001841a80dc38000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000020000000000000000000000005c1d29c6c9c8b0800692acc95d700bcb4966a1d70000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000ed9b99a703bad32ac96fddc313c0652e379251fd00000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000bea2bc852a160b8547273660e22f4f08c2fa9bbb00000000000000000000000065ea1489741a5d72ffdd8e6485b216bbdcc15af30000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000ed9b99a703bad32ac96fddc313c0652e379251fd00000000000000000000000000000000000000000000000000000000000c3500000000000000000000000000660203dd7e933646905dfdc2c3c0bb156d51000a00000000000000000000000000000000000000000000000000000000 +``` diff --git a/src/tasks/sep/047-rev-share-ink-soneium/config.toml b/src/tasks/sep/047-rev-share-ink-soneium/config.toml new file mode 100644 index 000000000..20e2830b1 --- /dev/null +++ b/src/tasks/sep/047-rev-share-ink-soneium/config.toml @@ -0,0 +1,38 @@ +# RevShare Upgrade and Setup Configuration + +templateName = "RevShareUpgradeAndSetup" + +# L2 chains to target +l2chains = [ + {name = "Ink Sepolia", chainId = 763373}, + {name = "Soneium Testnet Minato", chainId = 1946} +] + +safeAddress = "ProxyAdminOwner" + +# RevShareContractsUpgrader address +revShareUpgrader = "0x71241bbae674967dD523e621c272Ea32cf33119A" + +# RevShare configurations (one per chain) - flattened arrays +portals = [ + "0x5c1d29C6c9C8b0800692acC95D700bcb4966A1d7", # Ink Sepolia Portal + "0x65ea1489741A5D72fFdD8e6485B216bBdcC15Af3" # Soneium Testnet Minato Portal +] + +chainFeesRecipients = [ + "0xBeA2Bc852a160B8547273660E22F4F08C2fa9Bbb", + "0x660203DD7E933646905DfDc2C3c0Bb156d51000A" +] + +# 2 ether +l1WithdrawerMinWithdrawalAmounts = [2000000000000000000, 2000000000000000000] + +# FeesDepositor address in mainnet +l1WithdrawerRecipients = [ + "0xed9B99a703BaD32AC96FDdc313c0652e379251Fd", + "0xed9B99a703BaD32AC96FDdc313c0652e379251Fd" +] +l1WithdrawerGasLimits = [800000, 800000] + +[addresses] +ProxyAdminOwner = "0x1Eb2fFc903729a0F03966B917003800b145F56E2" diff --git a/test/tasks/example/eth/017-revshare-upgrade-and-setup-sony-ink/.env b/test/tasks/example/eth/017-revshare-upgrade-and-setup-sony-ink/.env index f6c3be04b..0de0d7719 100644 --- a/test/tasks/example/eth/017-revshare-upgrade-and-setup-sony-ink/.env +++ b/test/tasks/example/eth/017-revshare-upgrade-and-setup-sony-ink/.env @@ -1,3 +1,3 @@ -TENDERLY_GAS=24000000 +TENDERLY_GAS=16000000 NESTED_SAFE_NAME_DEPTH_1=foundation FORK_BLOCK_NUMBER=23919922 \ No newline at end of file diff --git a/test/tasks/example/sep/031-revshare-setup/.env b/test/tasks/example/sep/031-revshare-setup/.env index a65fc3916..abeb38b77 100644 --- a/test/tasks/example/sep/031-revshare-setup/.env +++ b/test/tasks/example/sep/031-revshare-setup/.env @@ -1,3 +1,3 @@ -TENDERLY_GAS=24000000 +TENDERLY_GAS=16000000 FORK_BLOCK_NUMBER=9747318 NESTED_SAFE_NAME_DEPTH_1=foundation diff --git a/test/tasks/example/sep/031-revshare-setup/config.toml b/test/tasks/example/sep/031-revshare-setup/config.toml index 3adb5d0d5..4b55f7f03 100644 --- a/test/tasks/example/sep/031-revshare-setup/config.toml +++ b/test/tasks/example/sep/031-revshare-setup/config.toml @@ -1,5 +1,5 @@ # RevShare Setup Configuration - +# NOTE: This task is not used in the pipeline, it is only for reference templateName = "RevShareSetup" # L2 chains to target (OP Sepolia only - proxies already upgraded) From 9cc51666e2f149ecc1b1f6c87becabd057df76b3 Mon Sep 17 00:00:00 2001 From: 0xDiscotech <131301107+0xDiscotech@users.noreply.github.com> Date: Wed, 10 Dec 2025 20:51:40 -0300 Subject: [PATCH 3/5] chore: comment --- test/tasks/example/sep/031-revshare-setup/config.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/tasks/example/sep/031-revshare-setup/config.toml b/test/tasks/example/sep/031-revshare-setup/config.toml index 4b55f7f03..aee7093d9 100644 --- a/test/tasks/example/sep/031-revshare-setup/config.toml +++ b/test/tasks/example/sep/031-revshare-setup/config.toml @@ -1,5 +1,5 @@ # RevShare Setup Configuration -# NOTE: This task is not used in the pipeline, it is only for reference +# NOTE: The example task with OP as input is for reference only. templateName = "RevShareSetup" # L2 chains to target (OP Sepolia only - proxies already upgraded) From dab87c93ee97b3c09cf34b6662c6007d5f940af8 Mon Sep 17 00:00:00 2001 From: 0xchin <77933451+0xChin@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:04:41 -0300 Subject: [PATCH 4/5] chore: trigger approval From 0e62215b0965e027df114e8babc9e90f22ff2b68 Mon Sep 17 00:00:00 2001 From: 0xchin <77933451+0xChin@users.noreply.github.com> Date: Thu, 11 Dec 2025 11:08:45 -0300 Subject: [PATCH 5/5] chore: improve comments --- test/integration/IntegrationBase.t.sol | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/IntegrationBase.t.sol b/test/integration/IntegrationBase.t.sol index ea179cff1..2e5c8cc6e 100644 --- a/test/integration/IntegrationBase.t.sol +++ b/test/integration/IntegrationBase.t.sol @@ -18,7 +18,7 @@ import {ISuperchainRevSharesCalculator} from "src/interfaces/ISuperchainRevShare /// @title IntegrationBase /// @notice Base contract for integration tests with L1->L2 deposit transaction relay functionality abstract contract IntegrationBase is Test { - // Events for testing + // Event for testing event WithdrawalInitiated(address indexed recipient, uint256 amount); // Fork IDs