From 28cd171dc97b30c85124f1a667d803fed82d4461 Mon Sep 17 00:00:00 2001 From: Duncan Townsend Date: Wed, 3 Apr 2024 06:06:08 -0400 Subject: [PATCH] Add check for non-Cancun chains --- sh/deploy_allowanceholder.sh | 9 +++++---- sh/deploy_new_chain.sh | 5 +++++ sh/deploy_settler_single.sh | 5 +++++ 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/sh/deploy_allowanceholder.sh b/sh/deploy_allowanceholder.sh index d9e256643..095cc6c84 100755 --- a/sh/deploy_allowanceholder.sh +++ b/sh/deploy_allowanceholder.sh @@ -181,8 +181,9 @@ function get_config { jq -r -M ."$chain_name"."$1" < ./chain_config.json } -if [[ $(get_config isCancun) = [Tt]rue ]] ; then - forge create --no-cache --private-key "$(get_secret allowanceHolder key)" --chain "$(get_config chainId)" --rpc-url "$(get_api_secret rpcUrl)" --etherscan-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --verify src/allowanceholder/AllowanceHolder.sol:AllowanceHolder -else - forge create --no-cache --private-key "$(get_secret allowanceHolderOld key)" --chain "$(get_config chainId)" --rpc-url "$(get_api_secret rpcUrl)" --etherscan-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --verify src/allowanceholder/AllowanceHolderOld.sol:AllowanceHolder +if [[ $(get_config isCancun) != [Tt]rue ]] ; then + echo 'You are on the wrong branch' >&2 + exit 1 fi + +forge create --no-cache --private-key "$(get_secret allowanceHolder key)" --chain "$(get_config chainId)" --rpc-url "$(get_api_secret rpcUrl)" --etherscan-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --verify src/allowanceholder/AllowanceHolder.sol:AllowanceHolder diff --git a/sh/deploy_new_chain.sh b/sh/deploy_new_chain.sh index da93a98f4..059058dc8 100755 --- a/sh/deploy_new_chain.sh +++ b/sh/deploy_new_chain.sh @@ -186,6 +186,11 @@ function get_config { jq -r -M ."$chain_name"."$1" < ./chain_config.json } +if [[ $(get_config isCancun) != [Tt]rue ]] ; then + echo 'You are on the wrong branch' >&2 + exit 1 +fi + declare module_deployer module_deployer="$(get_secret iceColdCoffee deployer)" declare -r module_deployer diff --git a/sh/deploy_settler_single.sh b/sh/deploy_settler_single.sh index ee25a538f..a84281bec 100755 --- a/sh/deploy_settler_single.sh +++ b/sh/deploy_settler_single.sh @@ -186,6 +186,11 @@ function get_config { jq -r -M ."$chain_name"."$1" < ./chain_config.json } +if [[ $(get_config isCancun) != [Tt]rue ]] ; then + echo 'You are on the wrong branch' >&2 + exit 1 +fi + declare deployer_proxy deployer_proxy="$(get_secret deployer address)" declare -r deployer_proxy