Skip to content

Commit

Permalink
Add check for non-Cancun chains
Browse files Browse the repository at this point in the history
  • Loading branch information
duncancmt committed Apr 3, 2024
1 parent f024007 commit 28cd171
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
9 changes: 5 additions & 4 deletions sh/deploy_allowanceholder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
5 changes: 5 additions & 0 deletions sh/deploy_new_chain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions sh/deploy_settler_single.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 28cd171

Please sign in to comment.