From 0bc5bc172c0afbeff20d6fda98d555b8e16acbcd Mon Sep 17 00:00:00 2001 From: kant777 <61204489+kant777@users.noreply.github.com> Date: Fri, 19 Jan 2024 02:29:14 -0800 Subject: [PATCH] Update deploy_create2.sh --- geth-poa/util/deploy_create2.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/geth-poa/util/deploy_create2.sh b/geth-poa/util/deploy_create2.sh index eda40615ee..197ff8b5f2 100755 --- a/geth-poa/util/deploy_create2.sh +++ b/geth-poa/util/deploy_create2.sh @@ -4,11 +4,13 @@ set -e -if [ -z "$1" ]; then - echo "Usage: $0 " +# Use the first command line argument, if provided. Otherwise, use the environment variable. +JSON_RPC="${1:-$JSON_RPC_URL}" + +if [ -z "$JSON_RPC" ]; then + echo "Usage: $0 or set the JSON_RPC_URL environment variable." exit 1 fi -JSON_RPC="$1" if ! [ -x "$(command -v curl)" ]; then echo "Curl must be installed to deploy the create2 proxy" >&2