Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/tasks/eth/037-rev-share-ink-soneium/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TENDERLY_GAS=16000000
36 changes: 36 additions & 0 deletions src/tasks/eth/037-rev-share-ink-soneium/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 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. 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:

- 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 <council|foundation>
```

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 <council|foundation>
```
29 changes: 29 additions & 0 deletions src/tasks/eth/037-rev-share-ink-soneium/VALIDATION.md
Original file line number Diff line number Diff line change
@@ -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
```
36 changes: 36 additions & 0 deletions src/tasks/eth/037-rev-share-ink-soneium/config.toml
Original file line number Diff line number Diff line change
@@ -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"

1 change: 1 addition & 0 deletions src/tasks/sep/047-rev-share-ink-soneium/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
TENDERLY_GAS=16000000
36 changes: 36 additions & 0 deletions src/tasks/sep/047-rev-share-ink-soneium/README.md
Original file line number Diff line number Diff line change
@@ -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 <council|foundation>
```

Signing commands for each safe:

```bash
cd src/tasks/sep/047-rev-share-ink-soneium
just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile sign <council|foundation>
```
29 changes: 29 additions & 0 deletions src/tasks/sep/047-rev-share-ink-soneium/VALIDATION.md
Original file line number Diff line number Diff line change
@@ -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
```
38 changes: 38 additions & 0 deletions src/tasks/sep/047-rev-share-ink-soneium/config.toml
Original file line number Diff line number Diff line change
@@ -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"
2 changes: 1 addition & 1 deletion test/integration/IntegrationBase.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TENDERLY_GAS=24000000
TENDERLY_GAS=16000000
NESTED_SAFE_NAME_DEPTH_1=foundation
FORK_BLOCK_NUMBER=23919922
2 changes: 1 addition & 1 deletion test/tasks/example/sep/031-revshare-setup/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
TENDERLY_GAS=24000000
TENDERLY_GAS=16000000
FORK_BLOCK_NUMBER=9747318
NESTED_SAFE_NAME_DEPTH_1=foundation
2 changes: 1 addition & 1 deletion test/tasks/example/sep/031-revshare-setup/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# RevShare Setup Configuration

# NOTE: The example task with OP as input is for reference only.
templateName = "RevShareSetup"

# L2 chains to target (OP Sepolia only - proxies already upgraded)
Expand Down