Skip to content

Commit

Permalink
simplify commands
Browse files Browse the repository at this point in the history
  • Loading branch information
parketh committed Nov 12, 2024
1 parent 68087fb commit 9757f19
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/babylon-integration/utils/teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ KEYRING_DIR=/home/.babylond
CONSUMER_FP_KEYRING_DIR=$KEYRING_DIR/$CONSUMER_FINALITY_PROVIDER_KEY
KEYRING_FILENAME=$(ls $CONSUMER_FP_KEYRING_DIR/keyring-test | grep '\.address$' | sed 's/\.address$//')
echo "Keyring filename: $KEYRING_FILENAME"
CONSUMER_FP_ADDRESS=$(babylond keys parse "$KEYRING_FILENAME" --output json | jq -r '.formats[0]')
CONSUMER_FP_ADDRESS=$(babylond keys show -a consumer-finality-provider \
--keyring-dir $CONSUMER_FP_KEYRING_DIR \
--keyring-backend test)
echo "Consumer FP address: $CONSUMER_FP_ADDRESS"

# Get the prefunded key address
PREFUNDED_ADDRESS=$(babylond keys show "$BABYLON_PREFUNDED_KEY" \
PREFUNDED_ADDRESS=$(babylond keys show -a "$BABYLON_PREFUNDED_KEY" \
--keyring-dir "$KEYRING_DIR" \
--keyring-backend test \
--output json \
| jq -r '.address')
--keyring-backend test)
echo "Prefunded address: $PREFUNDED_ADDRESS"

# Check remaining balance
Expand Down Expand Up @@ -63,7 +63,7 @@ echo "Successfully sent $AMOUNT_TO_SEND ubbn back to prefunded key"
echo "Transaction hash: $SEND_TX_HASH"
echo

# Verify final balance
# Verify final balance = initial balance - amount sent
FINAL_BALANCE=$(babylond query bank balances "$CONSUMER_FP_ADDRESS" \
--node "$BABYLON_RPC_URL" \
-o json | jq -r '.balances[0].amount')
Expand Down

0 comments on commit 9757f19

Please sign in to comment.