-
Notifications
You must be signed in to change notification settings - Fork 140
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added updateGasConfigSepolia script and associated env/makefile
- Loading branch information
1 parent
b78680c
commit 2ad8b5d
Showing
9 changed files
with
54 additions
and
273 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,2 +1,28 @@ | ||
OP_COMMIT= # commit number to use of Optimism's code (https://github.com/ethereum-optimism/optimism) | ||
BASE_CONTRACTS_COMMIT= # commit number to use of Base contract code (https://github.com/base-org/contracts) | ||
OP_COMMIT=c87a469d7d679e8a4efbace56c3646b925bcc009 | ||
BASE_CONTRACTS_COMMIT=7bda41784332750f2d8e8f040ac3f03c2f4565bf | ||
|
||
# https://sepolia.etherscan.io/address/0xf272670eb55e895584501d564AfEB048bEd26194 | ||
L1_SYSTEM_CONFIG_ADDRESS=0xf272670eb55e895584501d564AfEB048bEd26194 | ||
|
||
# scalars defined by running: https://github.com/ethereum-optimism/optimism/tree/4b7627cbb94a75e478a34f33f91121ef6ae794b3/op-chain-ops/cmd/ecotone-scalar | ||
# 1 BLOB PER TX | ||
# base fee scalar : 6607 | ||
# blob base fee scalar: 654675 | ||
# v1 hex encoding : 0x0100000000000000000000000000000000000000000000000009fd53000019cf | ||
# uint value for the 'scalar' parameter in SystemConfigProxy.setGasConfig(): | ||
# SCALAR=452312848583266388373324160190187140051835877600158453279133999338625178063 | ||
|
||
|
||
# 6 BLOBS PER TX | ||
# base fee scalar : 1101 | ||
# blob base fee scalar: 652972 | ||
# v1 hex encoding : 0x0100000000000000000000000000000000000000000000000009f6ac0000044d | ||
# uint value for the 'scalar' parameter in SystemConfigProxy.setGasConfig(): | ||
SCALAR=452312848583266388373324160190187140051835877600158453279133992024295867469 | ||
|
||
# THINGS WENT WRONG --> FALLBACK TO CALLDATA | ||
# base fee scalar : 668098 | ||
# blob base fee scalar: 0 | ||
# v1 hex encoding : 0x01000000000000000000000000000000000000000000000000000000000a31c2 | ||
# uint value for the 'scalar' parameter in SystemConfigProxy.setGasConfig(): | ||
FALLBACK_SCALAR=452312848583266388373324160190187140051835877600158453279131187530911330754 |
This file contains 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
41 changes: 0 additions & 41 deletions
41
sepolia/2024-03-07-ecotone-sysconfig-updates/script/DeleteL2Outputs.s.sol
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
sepolia/2024-03-07-ecotone-sysconfig-updates/script/PausePortal.s.sol
This file was deleted.
Oops, something went wrong.
39 changes: 0 additions & 39 deletions
39
sepolia/2024-03-07-ecotone-sysconfig-updates/script/SetBatcher.s.sol
This file was deleted.
Oops, something went wrong.
42 changes: 0 additions & 42 deletions
42
sepolia/2024-03-07-ecotone-sysconfig-updates/script/SetupNewProposer.s.sol
This file was deleted.
Oops, something went wrong.
33 changes: 0 additions & 33 deletions
33
sepolia/2024-03-07-ecotone-sysconfig-updates/script/UnpausePortal.s.sol
This file was deleted.
Oops, something went wrong.
23 changes: 23 additions & 0 deletions
23
sepolia/2024-03-07-ecotone-sysconfig-updates/script/UpdateGasConfig.sol
This file contains 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,23 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.15; | ||
|
||
import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol"; | ||
import "forge-std/Script.sol"; | ||
|
||
contract UpdateGasConfigSepolia is Script { | ||
|
||
address internal L1_SYSTEM_CONFIG = vm.envAddress("L1_SYSTEM_CONFIG_ADDRESS"); | ||
uint256 internal SCALAR = vm.envUint("SCALAR"); | ||
|
||
function _postCheck() internal view { | ||
require(SystemConfig(L1_SYSTEM_CONFIG).scalar() == SCALAR); | ||
require(SystemConfig(L1_SYSTEM_CONFIG).overhead() == 0); | ||
} | ||
|
||
function run() public { | ||
vm.startBroadcast(); | ||
SystemConfig(L1_SYSTEM_CONFIG).setGasConfig(0, SCALAR); | ||
_postCheck(); | ||
vm.stopBroadcast(); | ||
} | ||
} |
38 changes: 0 additions & 38 deletions
38
sepolia/2024-03-07-ecotone-sysconfig-updates/script/UpdateProposer.s.sol
This file was deleted.
Oops, something went wrong.