Commit 04beb53 1 parent 5694a3f commit 04beb53 Copy full SHA for 04beb53
File tree 5 files changed +92
-0
lines changed
sepolia/2024-02-28-pause-unpause-portal
5 files changed +92
-0
lines changed Original file line number Diff line number Diff line change
1
+ OP_COMMIT = 10b06fb49861053999a89533d846ee5c2ccb33e1
2
+ BASE_CONTRACTS_COMMIT = fe492be3478134b2305c207a12b153eca04148c0
3
+
4
+ GUARDIAN = 0xA9FF930151130fd19DA1F03E5077AFB7C78F8503
5
+ OPTIMISM_PORTAL_PROXY = 0x49f53e41452C74589E85cA1677426Ba426459e85
6
+ GUARDIAN_PRIVATE_KEY = # TODO: Fill in when running script
Original file line number Diff line number Diff line change
1
+ include ../../Makefile
2
+ include ../.env
3
+ include .env
4
+
5
+ ifndef LEDGER_ACCOUNT
6
+ override LEDGER_ACCOUNT = 0
7
+ endif
8
+
9
+ # #
10
+ # Incident response commands
11
+ # Note that --ledger --hd-paths <PATH> can be replaced with --private-key $(PRIVATE_KEY)
12
+ # in any command when using a local key.
13
+ # #
14
+
15
+ # Pause OptimismPortal Commands
16
+
17
+ .PHONY : pause-portal
18
+ pause-portal : deps
19
+ forge script --rpc-url $(L1_RPC_URL ) \
20
+ PausePortal --private-key $(GUARDIAN_PRIVATE_KEY ) \
21
+ --broadcast
22
+
23
+ # Unpause OptimismPortal Commands
24
+
25
+ .PHONY : unpause-portal
26
+ unpause-portal : deps
27
+ forge script --rpc-url $(L1_RPC_URL ) \
28
+ UnpausePortal --private-key $(GUARDIAN_PRIVATE_KEY ) \
29
+ --broadcast
Original file line number Diff line number Diff line change
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
+ ]
18
+
19
+ # See more config options https://github.com/foundry-rs/foundry/tree/master/config
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.15 ;
3
+
4
+ import "forge-std/Script.sol " ;
5
+ import "@eth-optimism-bedrock/src/L1/OptimismPortal.sol " ;
6
+
7
+ contract PausePortal is Script {
8
+ address internal OPTIMISM_PORTAL_PROXY = vm.envAddress ("OPTIMISM_PORTAL_PROXY " );
9
+ address internal GUARDIAN = vm.envAddress ("GUARDIAN " );
10
+
11
+ function run () external {
12
+ OptimismPortal optimismPortal = OptimismPortal (payable (OPTIMISM_PORTAL_PROXY));
13
+
14
+ vm.broadcast (GUARDIAN);
15
+ optimismPortal.pause ();
16
+
17
+ require (optimismPortal.paused () == true , "PausePortal: failed to pause " );
18
+ }
19
+ }
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT
2
+ pragma solidity 0.8.15 ;
3
+
4
+ import "forge-std/Script.sol " ;
5
+ import "@eth-optimism-bedrock/src/L1/OptimismPortal.sol " ;
6
+
7
+ contract UnpausePortal is Script {
8
+ address internal OPTIMISM_PORTAL_PROXY = vm.envAddress ("OPTIMISM_PORTAL_PROXY " );
9
+ address internal GUARDIAN = vm.envAddress ("GUARDIAN " );
10
+
11
+ function run () external {
12
+ OptimismPortal optimismPortal = OptimismPortal (payable (OPTIMISM_PORTAL_PROXY));
13
+
14
+ vm.broadcast (GUARDIAN);
15
+ optimismPortal.unpause ();
16
+
17
+ require (optimismPortal.paused () == false , "PausePortal: failed to unpause " );
18
+ }
19
+ }
You can’t perform that action at this time.
0 commit comments