-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
91 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
OP_COMMIT=08f3dbed90faccb36135fc4bd1d40bfa8ed4066f | ||
BASE_CONTRACTS_COMMIT=a0f86fcf67e61f08ba7d7a8b26256963379b8a60 | ||
|
||
# L1 configuration | ||
L1_PROXY_ADMIN=0x0475cBCAebd9CE8AfA5025828d5b98DFb67E059E | ||
L1_BASE_SAFE=0x9855054731540A48b28990B63DcF4f33d8AE46A1 | ||
L1_OP_SAFE=0x9BA6e03D8B90dE867373Db8cF1A58d2F7F006b3A | ||
L1_SECURITY_COUNCIL_SAFE=0xc2819DC788505Aac350142A7A707BF9D03E3Bd03 | ||
L1_VERIFIER_URL=https://api.etherscan.io/api | ||
L1_ETHERSCAN_API_KEY=SET-ME | ||
|
||
# L2 configuration | ||
L2_PROXY_ADMIN=0x4200000000000000000000000000000000000018 | ||
L2_BASE_SAFE=0xd94E416cf2c7167608B2515B7e4102B41efff94f | ||
L2_OP_SAFE=0x28EDB11394eb271212ED66c08f2b7893C04C5D65 | ||
L2_SECURITY_COUNCIL_SAFE=TBD | ||
L2_VERIFIER_URL=https://api-sepolia.basescan.org/api | ||
L2_ETHERSCAN_API_KEY=SET-ME |
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,16 @@ | ||
include ../../Makefile | ||
include ../.env | ||
include .env | ||
|
||
## | ||
# Deploy command | ||
## | ||
.PHONY: deploy-l1 | ||
deploy-l1: | ||
forge script --rpc-url $(L1_RPC_URL) DeployVetoer1of2 --sig "deployL1()" --broadcast -i 1 \ | ||
--verify --verifier-url $(L1_VERIFIER_URL) --chain-id $(L1_CHAIN_ID) --etherscan-api-key $(L1_ETHERSCAN_API_KEY) | ||
|
||
.PHONY: deploy-l2 | ||
deploy-l2: | ||
forge script --rpc-url $(L2_RPC_URL) DeployVetoer1of2 --sig "deployL2()" --broadcast -i 1 \ | ||
--verify --verifier-url $(L2_VERIFIER_URL) --chain-id $(L2_CHAIN_ID) --etherscan-api-key $(L2_ETHERSCAN_API_KEY) |
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 @@ | ||
{} |
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,18 @@ | ||
[profile.default] | ||
src = 'src' | ||
out = 'out' | ||
libs = ['lib'] | ||
broadcast = 'records' | ||
fs_permissions = [{ access = "read-write", path = "./" }] | ||
optimizer = true | ||
optimizer_runs = 999999 | ||
solc_version = "0.8.15" | ||
remappings = [ | ||
'@eth-optimism-bedrock/=lib/optimism/packages/contracts-bedrock/', | ||
'@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts', | ||
'@openzeppelin/contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts', | ||
'@base-contracts/=lib/base-contracts', | ||
'solady/=lib/solady/src/', | ||
] | ||
|
||
# See more config options https://github.com/foundry-rs/foundry/tree/master/config |
38 changes: 38 additions & 0 deletions
38
mainnet/2024-04-23-deploy-vetoer1of2/script/DeployVetoer1of2.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,38 @@ | ||
// SPDX-License-Identifier: MIT | ||
pragma solidity 0.8.15; | ||
|
||
import "forge-std/Script.sol"; | ||
|
||
import {Vetoer1of2} from "@base-contracts/src/Vetoer1of2.sol"; | ||
|
||
contract DeployVetoer1of2 is Script { | ||
function deployL2() public { | ||
address opSafe = vm.envAddress("L2_OP_SAFE"); | ||
address baseSafe = vm.envAddress("L2_BASE_SAFE"); | ||
address initiator = vm.envAddress("L2_SECURITY_COUNCIL_SAFE"); | ||
address proxyAdmin = vm.envAddress("L2_PROXY_ADMIN"); | ||
|
||
_deployVetoer1of2({opSafe: opSafe, baseSafe: baseSafe, initiator: initiator, proxyAdmin: proxyAdmin}); | ||
} | ||
|
||
function deployL1() public { | ||
address opSafe = vm.envAddress("L1_OP_SAFE"); | ||
address baseSafe = vm.envAddress("L1_BASE_SAFE"); | ||
address initiator = vm.envAddress("L1_SECURITY_COUNCIL_SAFE"); | ||
address proxyAdmin = vm.envAddress("L1_PROXY_ADMIN"); | ||
|
||
_deployVetoer1of2({opSafe: opSafe, baseSafe: baseSafe, initiator: initiator, proxyAdmin: proxyAdmin}); | ||
} | ||
|
||
function _deployVetoer1of2(address opSafe, address baseSafe, address initiator, address proxyAdmin) private { | ||
vm.startBroadcast(); | ||
|
||
Vetoer1of2 vetoer1of2 = | ||
new Vetoer1of2({opSigner_: opSafe, otherSigner_: baseSafe, initiator: initiator, target: proxyAdmin}); | ||
|
||
vm.stopBroadcast(); | ||
|
||
console.log("Vetoer1of2 deployed at", address(vetoer1of2)); | ||
console.log("DelayedVetoable deployed at", vetoer1of2.delayedVetoable()); | ||
} | ||
} |