Skip to content

Commit 6ece564

Browse files
[sepolia] Added script to update Gas Limit (#143)
* Added script to update Gas Limit * Format * Fix makefile * Fixes to script and makefile * Update Makefile * Update Makefile
1 parent 5192cea commit 6ece564

File tree

4 files changed

+56
-0
lines changed

4 files changed

+56
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
OP_COMMIT=c87a469d7d679e8a4efbace56c3646b925bcc009
2+
BASE_CONTRACTS_COMMIT=56d8f40b48795663fa88366d762161af5a1ba5d5
3+
4+
# https://sepolia.etherscan.io/address/0xf272670eb55e895584501d564AfEB048bEd26194
5+
L1_SYSTEM_CONFIG_ADDRESS=0xf272670eb55e895584501d564AfEB048bEd26194
6+
OWNER_ADDRESS=0x608081689Fe46936fB2fBDF7552CbB1D80ad4822
7+
GAS_LIMIT=45000000
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
include ../../Makefile
2+
include ../.env
3+
include .env
4+
5+
.PHONY: update-gas-limit
6+
update-gas-limit:
7+
@forge script --rpc-url $(L1_RPC_URL) UpdateGasLimitSepolia --private-key $(PRIVATE_KEY) --broadcast
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
[profile.default]
2+
src = 'src'
3+
out = 'out'
4+
libs = ['lib']
5+
broadcast = 'records'
6+
fs_permissions = [ {access = "read-write", path = "./"} ]
7+
optimizer = true
8+
optimizer_runs = 999999
9+
solc_version = "0.8.15"
10+
via-ir = true
11+
remappings = [
12+
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/',
13+
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts',
14+
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts',
15+
'@rari-capital/solmate/=lib/solmate/',
16+
'@base-contracts/=lib/base-contracts',
17+
'solady/=lib/solady/src/'
18+
]
19+
20+
# See more config options https://github.com/foundry-rs/foundry/tree/master/config
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// SPDX-License-Identifier: MIT
2+
pragma solidity 0.8.15;
3+
4+
import {SystemConfig} from "@eth-optimism-bedrock/src/L1/SystemConfig.sol";
5+
import "forge-std/Script.sol";
6+
7+
contract UpdateGasLimitSepolia is Script {
8+
address internal L1_SYSTEM_CONFIG = vm.envAddress("L1_SYSTEM_CONFIG_ADDRESS");
9+
uint64 internal GAS_LIMIT = uint64(vm.envUint("GAS_LIMIT"));
10+
address internal OWNER = vm.envAddress("OWNER_ADDRESS");
11+
12+
function _postCheck() internal view {
13+
require(SystemConfig(L1_SYSTEM_CONFIG).gasLimit() == GAS_LIMIT);
14+
}
15+
16+
function run() public {
17+
vm.startBroadcast(OWNER);
18+
SystemConfig(L1_SYSTEM_CONFIG).setGasLimit(GAS_LIMIT);
19+
_postCheck();
20+
vm.stopBroadcast();
21+
}
22+
}

0 commit comments

Comments
 (0)