From 978a9d1697baf3d9093bf39d6c109bb21f7de582 Mon Sep 17 00:00:00 2001 From: Karl Floersch Date: Tue, 22 Jun 2021 14:42:42 -0700 Subject: [PATCH] Address PR review feedback --- .../scripts/deploy-scripts/mainnet.sh | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) mode change 100644 => 100755 packages/contracts/scripts/deploy-scripts/mainnet.sh diff --git a/packages/contracts/scripts/deploy-scripts/mainnet.sh b/packages/contracts/scripts/deploy-scripts/mainnet.sh old mode 100644 new mode 100755 index d698a39cdd0b..24601812ae8f --- a/packages/contracts/scripts/deploy-scripts/mainnet.sh +++ b/packages/contracts/scripts/deploy-scripts/mainnet.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ### All available deploy options at the time of deployment: ### # --ctc-force-inclusion-period-seconds Number of seconds that the sequencer has to include transactions before the L1 queue. (default: 2592000) # --ctc-max-transaction-gas-limit Max gas limit for L1 queue transactions. (default: 11000000) @@ -29,9 +31,20 @@ ### DEPLOYMENT SCRIPT ### # To be called from root of contracts dir # +# Required env vars +if [[ -z "$CONTRACTS_DEPLOYER_KEY" ]]; then + echo "Must pass CONTRACTS_DEPLOYER_KEY" + exit 1 +fi +if [[ -z "$CONTRACTS_RPC_URL" ]]; then + echo "Must pass CONTRACTS_RPC_URL" + exit 1 +fi +if [[ -z "$ETHERSCAN_API_KEY" ]]; then + echo "Must pass ETHERSCAN_API_KEY" + exit 1 +fi -CONTRACTS_DEPLOYER_KEY= \ -CONTRACTS_RPC_URL= \ CONTRACTS_TARGET_NETWORK=mainnet \ npx hardhat deploy \ --ctc-force-inclusion-period-seconds 12592000 \ @@ -50,3 +63,6 @@ npx hardhat deploy \ --scc-fraud-proof-window 604800 \ --scc-sequencer-publish-window 12592000 \ --network mainnet + +CONTRACTS_TARGET_NETWORK=mainnet \ +npx hardhat etherscan-verify --network mainnet