-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add scripts to deploy and upgrade holocene systemconfig (#223)
* Add scripts to deploy and upgrade holocene systemconfig * fixes * fixes pt 2 * set denominator * fix denominator
- Loading branch information
1 parent
bd2f815
commit 15fd271
Showing
8 changed files
with
111 additions
and
1 deletion.
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
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,13 @@ | ||
# op-contracts v1.8.0-rc.2 | ||
OP_COMMIT=df25977a160f85160779bbca71a8e56cf35b0f69 | ||
SYSTEM_CONFIG_PROXY=0x7F67DC4959cb3E532B10A99F41bDD906C46FdFdE | ||
|
||
# Newly deployed implementation contract for Holocene | ||
SYSTEM_CONFIG_IMPLEMENTATION=0x57563A1Ad5b07CEB7e77B395d767E6144699C887 | ||
|
||
# Same values as previous SystemConfig: | ||
SYTEM_CONFIG_OWNER=0xAf6E0E871f38c7B653700F7CbAEDafaa2784D430 | ||
|
||
GAS_LIMIT=60000000 | ||
ELASTICITY_MULTIPLIER=2 | ||
DENOMINATOR=250 |
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 @@ | ||
/src/ |
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,15 @@ | ||
include ../../Makefile | ||
include ../.env | ||
include .env | ||
|
||
.PHONY: deploy | ||
deploy: | ||
forge script --rpc-url $(L1_RPC_URL) --private-key $(PRIVATE_KEY) DeploySystemConfig --broadcast | ||
|
||
.PHONY: upgrade | ||
upgrade: | ||
forge script --rpc-url $(L1_RPC_URL) --private-key $(PRIVATE_KEY) UpgradeSystemConfig --broadcast | ||
|
||
.PHONY: set-1559-params | ||
set-1559-params: | ||
forge script --rpc-url $(L1_RPC_URL) --private-key $(PRIVATE_KEY) SetEIP1559Params --broadcast |
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,19 @@ | ||
[profile.default] | ||
src = 'src' | ||
out = 'out' | ||
libs = ['lib'] | ||
broadcast = 'records' | ||
fs_permissions = [ {access = "read-write", path = "./"} ] | ||
optimizer = true | ||
optimizer_runs = 999999 | ||
via-ir = true | ||
remappings = [ | ||
'@eth-optimism-bedrock/contracts/=lib/optimism/packages/contracts-bedrock/src/', | ||
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', | ||
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', | ||
'@rari-capital/solmate/=lib/solmate/', | ||
'@solady/=lib/solady/src', | ||
'@cwia/=lib/clones-with-immutable-args/src' | ||
] | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config |
14 changes: 14 additions & 0 deletions
14
sepolia-alpha/2024-11-19-holocene-contracts/script/DeploySystemConfig.s.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,14 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.15; | ||
|
||
import "lib/optimism/packages/contracts-bedrock/src/L1/SystemConfig.sol"; | ||
import "forge-std/Script.sol"; | ||
|
||
contract DeploySystemConfig is Script { | ||
function run() public { | ||
vm.startBroadcast(); | ||
SystemConfig systemConfigImpl = new SystemConfig(); | ||
console.log("SystemConfig implementation deployed at: ", address(systemConfigImpl)); | ||
vm.stopBroadcast(); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
sepolia-alpha/2024-11-19-holocene-contracts/script/SetEIP1559Params.s.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,26 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.15; | ||
|
||
import "forge-std/Script.sol"; | ||
import "@eth-optimism-bedrock/contracts/universal/ProxyAdmin.sol"; | ||
import "@eth-optimism-bedrock/contracts/L1/SystemConfig.sol"; | ||
|
||
contract SetEIP1559Params is Script { | ||
address systemConfigProxyAddress = vm.envAddress("SYSTEM_CONFIG_PROXY"); | ||
address proxyAdminOwner = vm.envAddress("PROXY_ADMIN_OWNER"); | ||
|
||
uint64 gasLimit = uint64(vm.envUint("GAS_LIMIT")); | ||
|
||
uint32 denominator = uint32(vm.envUint("DENOMINATOR")); | ||
uint32 elasticityMultiplier = uint32(vm.envUint("ELASTICITY_MULTIPLIER")); | ||
|
||
|
||
function run() public { | ||
vm.startBroadcast(proxyAdminOwner); | ||
|
||
SystemConfig(systemConfigProxyAddress).setEIP1559Params(denominator, elasticityMultiplier); | ||
SystemConfig(systemConfigProxyAddress).setGasLimit(gasLimit); | ||
|
||
vm.stopBroadcast(); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
sepolia-alpha/2024-11-19-holocene-contracts/script/UpgradeSystemConfig.s.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,22 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.15; | ||
|
||
import "forge-std/Script.sol"; | ||
import "@eth-optimism-bedrock/contracts/universal/ProxyAdmin.sol"; | ||
import "@eth-optimism-bedrock/contracts/L1/SystemConfig.sol"; | ||
|
||
contract UpgradeSystemConfig is Script { | ||
address systemConfigProxy = vm.envAddress("SYSTEM_CONFIG_PROXY"); | ||
address systemConfigImplementation = vm.envAddress("SYSTEM_CONFIG_IMPLEMENTATION"); | ||
address proxyAdminOwner = vm.envAddress("PROXY_ADMIN_OWNER"); | ||
|
||
function run() public { | ||
vm.broadcast(proxyAdminOwner); | ||
ProxyAdmin proxyAdmin = ProxyAdmin(payable(vm.envAddress("PROXY_ADMIN"))); | ||
|
||
proxyAdmin.upgrade( | ||
payable(systemConfigProxy), | ||
systemConfigImplementation | ||
); | ||
} | ||
} |