-
Notifications
You must be signed in to change notification settings - Fork 128
feat: add betanet tasks for revshare #1356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Wazabie
merged 21 commits into
ethereum-optimism:main
from
defi-wonderland:sc-feat/add-betanet-task
Jan 30, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2765d50
feat: add betanet task
0xChin 0a2c933
chore: wrong noonoce for SC
0xChin 5d774ab
chore: increase nonce of betanet task
0xChin bb58489
feat: add rev share betanet task (#132)
0xChin b287109
fix: message hashes in validation.md (#134)
0xChin 547bb5d
Merge branch 'main' into chore/sync-main-betanet
0xChin 0c82990
Merge pull request #135 from defi-wonderland/chore/sync-main-betanet
0xChin 2da4a08
fix: validations and nonce overrides revsahre
0xChin cde6e35
Merge pull request #136 from defi-wonderland/fix/nonce-state-overrides
0xChin 4bc6d72
feat: add U18 rev share betanet task
0xChin 2193493
feat: add U18 rev share betanet task with correct configs
0xChin 4d85beb
Merge branch 'sc-feat/add-betanet-task' into feat/new-betanet-tasks
0xChin edb3e1b
feat: add state overrides
0xChin dc0753e
chore: wrong addresses breaking simulation
0xChin b4c3d1d
Merge pull request #138 from defi-wonderland/feat/new-betanet-tasks
0xChin 165a642
feat: update configs based on new betanet
0xChin 34973a5
feat: add configs sources
0xChin 3acee20
fix: validations
0xChin fe11b27
Merge pull request #139 from defi-wonderland/feat/new-betanet-config
0xChin 54bf077
fix: prestates (#140)
0xOneTony 9a22944
fix: hashes (#141)
0xOneTony File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| TENDERLY_GAS=15000000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,22 @@ | ||
| # 060-U18-rev-share-betanet | ||
|
|
||
| Status: READY TO SIGN | ||
|
|
||
| ## Objective | ||
|
|
||
| Updates RevShare Betanet (revshare-beta-0) to U18. | ||
|
|
||
| ## Simulation & Signing | ||
|
|
||
| ```bash | ||
| cd src/tasks/sep/060-U18-rev-share-betanet | ||
|
|
||
| # Testing | ||
| just simulate-stack sep 060-U18-rev-share-betanet | ||
|
|
||
| # Commands to execute | ||
| just --dotenv-path $(pwd)/.env simulate | ||
| USE_KEYSTORE=1 just --dotenv-path $(pwd)/.env sign | ||
| # or USE_KEYSTORE=1 just sign-stack sep 060-U18-rev-share-betanet | ||
| SIGNATURES=0x just execute | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ## Expected Domain and Message Hashes | ||
|
|
||
| First, we need to 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. | ||
| > | ||
| > ### Betanet 1/1 Safe (`0xe934Dc97E347C6aCef74364B50125bb8689c40ff`) | ||
| > | ||
| > - Domain Hash: `0x07e03428d7125835eca12b6dd1a02903029b456da3a091ecd66fda859fbce61e` | ||
| > - Message Hash: `0x1ee6ecb9c616384caf288af3520246f40161c8fa4623dccf51461de3db516ab0` | ||
|
|
||
| ## Task Calldata | ||
|
|
||
| ``` | ||
| 0x82ad56cb000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000020000000000000000000000000f0a2e224519e876979ea6b2cd15ef5cc3d6703bd0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a4cbeda5a7000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000010000000000000000000000009e964e030ef490ff88b0e4ff5846d80f286d5f2103a7021f5a914968290be4b0ae8c4094e52842fc356ce1e79d3bf8485c412e0703203b5839f05b5a88815521c09982655c9f41c1d451665ec7c79951fd4a955200000000000000000000000000000000000000000000000000000000 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "420120033": { | ||
| "ProxyAdminOwner": "0xe934Dc97E347C6aCef74364B50125bb8689c40ff", | ||
| "SystemConfigProxy": "0x9E964E030Ef490fF88b0e4ff5846D80F286D5F21", | ||
| "L1CrossDomainMessengerProxy": "0x9ab3e890a6Cb011b0EcE3C3f137fd162f6c7F231", | ||
| "L1StandardBridgeProxy": "0x7173B9e76f8316De85cf5cb9CA3Cf998A2f24ed0", | ||
| "OptimismPortalProxy": "0x4fC40f2D8cf14925567938d209EB493a43347A79", | ||
| "DisputeGameFactoryProxy": "0xb9353415381A665eE9ACC313e586fB8667D554C8", | ||
| "DelayedWETHProxy": "0xFb19493EEFE1cDd3203204b389595Db86E94989b", | ||
| "PermissionedDelayedWETHProxy": "0xFb19493EEFE1cDd3203204b389595Db86E94989b", | ||
| "AnchorStateRegistryProxy": "0x36e3368A370480350b665afe6E53a427a7b2e8d4", | ||
| "AddressManager": "0x38538354Fc6979201B734FA28374be95C258BB1a", | ||
| "L1ERC721BridgeProxy": "0x4bbdaAC75C609858D6d14A7EbE9dfeAA62010691", | ||
| "Proposer": "0x40aed6d9ef3d694aeb406d210db82613b67cf99d", | ||
| "Challenger": "0xf6015e1850d6622921a647a76ffd892ba6870b75", | ||
| "OptimismMintableERC20FactoryProxy": "0x307e1D3019024ec7851982B10289696f9801E270" | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # RevShare Betanet on U18 | ||
| l2chains = [ | ||
| {name = "revshare-beta-0", chainId = 420120033} | ||
| ] | ||
|
|
||
| # Addresses for this task can be found here: https://github.com/ethereum-optimism/devnets/tree/main/betanets/revshare-beta | ||
|
|
||
| fallbackAddressesJsonPath = "src/tasks/sep/060-U18-rev-share-betanet/addresses.json" | ||
|
|
||
| templateName = "OPCMUpgradeV600" | ||
|
|
||
| [[opcmUpgrades]] | ||
| chainId = 420120033 | ||
| # U18 prestates for betanet: https://github.com/ethereum-optimism/devnets/blob/main/betanets/revshare-beta/op-program/prestates.json | ||
| cannonPrestate = "0x03a7021f5a914968290be4b0ae8c4094e52842fc356ce1e79d3bf8485c412e07" | ||
| cannonKonaPrestate = "0x03203b5839f05b5a88815521c09982655c9f41c1d451665ec7c79951fd4a9552" | ||
| expectedValidationErrors = "OVERRIDES-L1PAOMULTISIG,OVERRIDES-CHALLENGER,SYSCON-130" | ||
| # OVERRIDES-L1PAOMULTISIG,OVERRIDES-CHALLENGER: these are expected as they are not the standard OP Sepolia ones | ||
| # SYSCON-130: this is expected as the SystemConfig proxyAdmin on betanets is not the standard OP Sepolia one | ||
|
|
||
| [addresses] | ||
| OPCM = "0xf0a2e224519e876979ea6b2cd15ef5cc3d6703bd" # v600 OPCM source: https://github.com/ethereum-optimism/superchain-registry/blob/c84ed822ae5a65500d8c0e323460fa688cfcca22/validation/standard/standard-versions-sepolia.toml#L23C56-L23C98 | ||
|
|
||
| [stateOverrides] | ||
| 0xe934Dc97E347C6aCef74364B50125bb8689c40ff = [ | ||
| {key = "0x0000000000000000000000000000000000000000000000000000000000000005", value = 66} | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| TENDERLY_GAS=16700000 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,32 @@ | ||
| # 061 betanet-rev-share: RevShare Upgrade and Setup for Betanet | ||
|
|
||
| Status: [READY TO SIGN] | ||
|
|
||
| ## Objective | ||
|
|
||
| Upgrade proxies and setup RevShare contracts for the RevShare Betanet chain. 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 the Betanet L2 | ||
| 3. Sets FeeSplitter predeploy to point to the new FeeSplitter implementation and initializes it with the RevShareCalculator address | ||
|
|
||
| Target chain: | ||
|
|
||
| - revshare-beta-0 (chainId: 420120033) | ||
|
|
||
| ## Simulation & Signing | ||
|
|
||
| Simulation commands for each safe: | ||
|
|
||
| ```bash | ||
| # For stacked simulation (recommended for validation): | ||
| just simulate-stack sep 061-betanet-rev-share | ||
|
|
||
| # For individual simulation: | ||
| cd src/tasks/sep/061-betanet-rev-share | ||
| SIMULATE_WITHOUT_LEDGER=1 just --dotenv-path "$(pwd)"/.env --justfile ../../../justfile simulate | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ## Expected Domain and Message Hashes | ||
|
|
||
| First, we need to 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. | ||
| > | ||
| > ### Betanet 1/1 Safe (`0xe934Dc97E347C6aCef74364B50125bb8689c40ff`) | ||
| > | ||
| > - Domain Hash: `0x07e03428d7125835eca12b6dd1a02903029b456da3a091ecd66fda859fbce61e` | ||
| > - Message Hash: `0x00254ae422448797b14dba7eae2e4ae3b96763509d7010d2f403c28b0035f1ce` | ||
|
|
||
| ## Task Calldata | ||
|
|
||
| ``` | ||
| 0x82ad56cb00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000002000000000000000000000000071241bbae674967dd523e621c272ea32cf33119a0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000e41a80dc3800000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000a1f4f424901e0773e68c714077bcdd5cf8bcec230000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000ed9b99a703bad32ac96fddc313c0652e379251fd00000000000000000000000000000000000000000000000000000000000c35000000000000000000000000007e31e1eafb4d1486c05743e5c496cb5042843d7a00000000000000000000000000000000000000000000000000000000 | ||
| ``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| { | ||
| "420120033": { | ||
| "ProxyAdminOwner": "0xe934Dc97E347C6aCef74364B50125bb8689c40ff" | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| # RevShare Upgrade And Setup Configuration | ||
|
|
||
| templateName = "RevShareUpgradeAndSetup" | ||
|
|
||
| # L2 chains to target | ||
| l2chains = [{name = "revshare-beta-0", chainId = 420120033}] | ||
|
|
||
| safeAddress = "ProxyAdminOwner" | ||
|
|
||
| # RevShareContractsUpgrader https://sepolia.etherscan.io/address/0x71241bbae674967dd523e621c272ea32cf33119a | ||
| revShareUpgrader = "0x71241bbae674967dd523e621c272ea32cf33119a" | ||
|
|
||
| # RevShare configurations (one per chain) | ||
| # Betanet Portal in Sepolia https://sepolia.etherscan.io/address/0xa1F4F424901e0773e68C714077bCDD5CF8BcEc23 | ||
| portals = ["0xa1F4F424901e0773e68C714077bCDD5CF8BcEc23"] | ||
|
|
||
| # SequencerFeeVault.RECIPIENT() in the betanet. | ||
| chainFeesRecipients = ["0x7e31e1EafB4D1486C05743e5C496cB5042843d7a"] | ||
|
|
||
| # 2 ether | ||
| l1WithdrawerMinWithdrawalAmounts = [2000000000000000000] | ||
|
|
||
| # FeesDepositor https://sepolia.etherscan.io/address/0xed9B99a703BaD32AC96FDdc313c0652e379251Fd | ||
| l1WithdrawerRecipients = ["0xed9B99a703BaD32AC96FDdc313c0652e379251Fd"] | ||
|
Wazabie marked this conversation as resolved.
|
||
| l1WithdrawerGasLimits = [800000] | ||
|
|
||
| fallbackAddressesJsonPath = "src/tasks/sep/061-betanet-rev-share/addresses.json" | ||
|
|
||
| [addresses] | ||
| ProxyAdminOwner = "0xe934Dc97E347C6aCef74364B50125bb8689c40ff" | ||
|
|
||
| [stateOverrides] | ||
| 0xe934Dc97E347C6aCef74364B50125bb8689c40ff = [ | ||
| {key = "0x0000000000000000000000000000000000000000000000000000000000000005", value = 67} | ||
| ] | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.