|
| 1 | +// SPDX-License-Identifier: MIT |
| 2 | +pragma solidity 0.8.15; |
| 3 | + |
| 4 | +import "forge-std/Script.sol"; |
| 5 | + |
| 6 | +import {Vetoer1of2} from "@base-contracts/src/Vetoer1of2.sol"; |
| 7 | + |
| 8 | +contract DeployVetoer1of2 is Script { |
| 9 | + function deployL1() public { |
| 10 | + address opSafe = vm.envAddress("L1_OP_SAFE"); |
| 11 | + address baseSafe = vm.envAddress("L1_BASE_SAFE"); |
| 12 | + address initiator = vm.envAddress("L1_SECURITY_COUNCIL_SAFE"); |
| 13 | + address proxyAdmin = vm.envAddress("L1_PROXY_ADMIN"); |
| 14 | + |
| 15 | + _deployVetoer1of2({opSafe: opSafe, baseSafe: baseSafe, initiator: initiator, proxyAdmin: proxyAdmin}); |
| 16 | + } |
| 17 | + |
| 18 | + function deployL2() public { |
| 19 | + address opSafe = vm.envAddress("L2_OP_SAFE"); |
| 20 | + address baseSafe = vm.envAddress("L2_BASE_SAFE"); |
| 21 | + address initiator = vm.envAddress("L2_SECURITY_COUNCIL_SAFE"); |
| 22 | + address proxyAdmin = vm.envAddress("L2_PROXY_ADMIN"); |
| 23 | + |
| 24 | + _deployVetoer1of2({opSafe: opSafe, baseSafe: baseSafe, initiator: initiator, proxyAdmin: proxyAdmin}); |
| 25 | + } |
| 26 | + |
| 27 | + function _deployVetoer1of2(address opSafe, address baseSafe, address initiator, address proxyAdmin) private { |
| 28 | + vm.startBroadcast(); |
| 29 | + |
| 30 | + Vetoer1of2 vetoer1of2 = |
| 31 | + new Vetoer1of2({opSigner_: opSafe, otherSigner_: baseSafe, initiator: initiator, target: proxyAdmin}); |
| 32 | + |
| 33 | + vm.stopBroadcast(); |
| 34 | + |
| 35 | + console.log("Vetoer1of2 deployed at", address(vetoer1of2)); |
| 36 | + console.log("DelayedVetoable deployed at", vetoer1of2.delayedVetoable()); |
| 37 | + } |
| 38 | +} |
0 commit comments