Skip to content

Commit

Permalink
Avoid echoing private key
Browse files Browse the repository at this point in the history
  • Loading branch information
mdehoog committed Mar 6, 2024
1 parent 8f6beb5 commit 5636eb3
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 11 deletions.
1 change: 0 additions & 1 deletion sepolia/2024-02-28-pause-unpause-portal/.env
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ BASE_CONTRACTS_COMMIT=fe492be3478134b2305c207a12b153eca04148c0

GUARDIAN=0xA9FF930151130fd19DA1F03E5077AFB7C78F8503
OPTIMISM_PORTAL_PROXY=0x49f53e41452C74589E85cA1677426Ba426459e85
GUARDIAN_PRIVATE_KEY= # TODO: Fill in when running script
30 changes: 20 additions & 10 deletions sepolia/2024-02-28-pause-unpause-portal/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <PATH> 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

0 comments on commit 5636eb3

Please sign in to comment.