Skip to content

Commit

Permalink
Modify AllowanceHolder deploy script to behave on Arbitrum
Browse files Browse the repository at this point in the history
  • Loading branch information
duncancmt committed Apr 4, 2024
1 parent a43c24e commit 8905398
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion sh/deploy_allowanceholder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,20 @@ if [[ $(get_config isCancun) != [Tt]rue ]] ; then
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 $(get_config extraFlags) src/allowanceholder/AllowanceHolder.sol:AllowanceHolder
declare rpc_url
rpc_url="$(get_api_secret rpcUrl)"
declare -r rpc_url

# set minimum gas price to 10gwei (Arbitrum gets weird if you go lower)
declare -i gas_price
gas_price="$(cast gas-price --rpc-url "$rpc_url")"
if (( gas_price < 10000000000 )) ; then
echo 'Setting gas price to minimum of 10 gwei' >&2
gas_price=10000000000
fi
declare -r -i gas_price

forge create --no-cache --private-key "$(get_secret allowanceHolder key)" --chain "$(get_config chainId)" --rpc-url "$rpc_url" --gas-price "$gas_price" --gas-limit 4000000 --etherscan-api-key "$(get_api_secret etherscanKey)" --verifier-url "$(get_config etherscanApi)" --verify $(get_config extraFlags) src/allowanceholder/AllowanceHolder.sol:AllowanceHolder

echo 'Deployment is complete' >&2
echo 'Add the following to your chain_config.json' >&2
Expand Down

0 comments on commit 8905398

Please sign in to comment.