From 5636eb330aa7f495da7a718452e4fbef155112da Mon Sep 17 00:00:00 2001 From: Michael de Hoog Date: Wed, 6 Mar 2024 09:50:59 -1000 Subject: [PATCH] Avoid echoing private key --- sepolia/2024-02-28-pause-unpause-portal/.env | 1 - .../2024-02-28-pause-unpause-portal/Makefile | 30 ++++++++++++------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/sepolia/2024-02-28-pause-unpause-portal/.env b/sepolia/2024-02-28-pause-unpause-portal/.env index 5399c66e..4a608ee8 100644 --- a/sepolia/2024-02-28-pause-unpause-portal/.env +++ b/sepolia/2024-02-28-pause-unpause-portal/.env @@ -3,4 +3,3 @@ BASE_CONTRACTS_COMMIT=fe492be3478134b2305c207a12b153eca04148c0 GUARDIAN=0xA9FF930151130fd19DA1F03E5077AFB7C78F8503 OPTIMISM_PORTAL_PROXY=0x49f53e41452C74589E85cA1677426Ba426459e85 -GUARDIAN_PRIVATE_KEY= # TODO: Fill in when running script diff --git a/sepolia/2024-02-28-pause-unpause-portal/Makefile b/sepolia/2024-02-28-pause-unpause-portal/Makefile index 7fa84939..2bd30792 100644 --- a/sepolia/2024-02-28-pause-unpause-portal/Makefile +++ b/sepolia/2024-02-28-pause-unpause-portal/Makefile @@ -2,28 +2,38 @@ include ../../Makefile include ../.env include .env -ifndef LEDGER_ACCOUNT -override LEDGER_ACCOUNT = 0 -endif - ## # Incident response commands # Note that --ledger --hd-paths can be replaced with --private-key $(PRIVATE_KEY) # in any command when using a local key. ## +ifndef PORTAL_GUARDIAN_PRIVATE_KEY +$(error PORTAL_GUARDIAN_PRIVATE_KEY is undefined) +endif + # Pause OptimismPortal Commands +.PHONY: pause-portal-dryrun +pause-portal-dryrun: + @forge script --rpc-url $(L1_RPC_URL) \ + PausePortal --private-key $(PORTAL_GUARDIAN_PRIVATE_KEY) + .PHONY: pause-portal -pause-portal: deps - forge script --rpc-url $(L1_RPC_URL) \ - PausePortal --private-key $(GUARDIAN_PRIVATE_KEY) \ +pause-portal: + @forge script --rpc-url $(L1_RPC_URL) \ + PausePortal --private-key $(PORTAL_GUARDIAN_PRIVATE_KEY) \ --broadcast # Unpause OptimismPortal Commands +.PHONY: unpause-portal-dryrun +unpause-portal-dryrun: + @forge script --rpc-url $(L1_RPC_URL) \ + UnpausePortal --private-key $(PORTAL_GUARDIAN_PRIVATE_KEY) + .PHONY: unpause-portal -unpause-portal: deps - forge script --rpc-url $(L1_RPC_URL) \ - UnpausePortal --private-key $(GUARDIAN_PRIVATE_KEY) \ +unpause-portal: + @forge script --rpc-url $(L1_RPC_URL) \ + UnpausePortal --private-key $(PORTAL_GUARDIAN_PRIVATE_KEY) \ --broadcast