Skip to content

Commit

Permalink
improve: do not hardcode amounts
Browse files Browse the repository at this point in the history
  • Loading branch information
james-a-morris authored Sep 11, 2023
1 parent 75b1ce4 commit 199ed76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/testTargetChainRoutes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
# This script accepts two arguments:
# - The first argument is the target chain ID
# - The second argument is the base domain to make the HTTP request to
# - The third argument is the amount of tokens to transmit
#
# Example usage: ./testTargetChainRoutes.sh my-chain-id example.com

Expand All @@ -46,10 +47,11 @@ get_json_field() {

TARGET_CHAIN_ID=$1
BASE_DOMAIN=$2
AMOUNT_TO_TRANSMIT=$3

# Verify that the target chain ID and the base domain were provided
if [ -z "$TARGET_CHAIN_ID" ] || [ -z "$BASE_DOMAIN" ]; then
echo "Usage: $0 <target chain ID> <base domain>"
if [ -z "$TARGET_CHAIN_ID" ] || [ -z "$BASE_DOMAIN" ] || [ -z "$AMOUNT_TO_TRANSMIT" ]; then
echo "Usage: $0 <target chain ID> <base domain> <amount to transmit>"
exit 1
fi

Expand Down Expand Up @@ -80,7 +82,7 @@ for route in "${ORIGIN_ROUTES[@]}" "${DESTINATION_ROUTES[@]}"; do
echo "Sending a deposit from $from_chain_id to $to_chain_id on token $origin_token_address"

# Call yarn deposit with the correct arguments
echo $(yarn deposit --from $from_chain_id --to $to_chain_id --token $origin_token_address --amount 1)
echo $(yarn deposit --from $from_chain_id --to $to_chain_id --token $origin_token_address --amount $AMOUNT_TO_TRANSMIT)

done

Expand Down

0 comments on commit 199ed76

Please sign in to comment.