Skip to content

Commit

Permalink
fix script
Browse files Browse the repository at this point in the history
  • Loading branch information
parketh committed Nov 9, 2024
1 parent c8084df commit 9c71aa0
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker/docker-compose-babylon-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ services:
- "${PWD}/.env.babylon-integration"
volumes:
- ${PWD}/.deploy/babylond:/home/.babylond
- ${PWD}/.consumer-finality-provider:/home/finality-provider/.fpd
entrypoint:
- /bin/bash
- -c
Expand Down
13 changes: 7 additions & 6 deletions scripts/babylon-integration/utils/teardown.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,15 @@ set -uo pipefail
source "./common.sh"

# Get the consumer FP address
KEYRING_FILENAME=$(ls .consumer-finality-provider/keyring-test | grep '\.address$')
CONSUMER_FP_KEYRING_DIR=/home/finality-provider/.fpd
KEYRING_FILENAME=$(ls $CONSUMER_FP_KEYRING_DIR/keyring-test | grep '\.address$')
CONSUMER_FP_ADDRESS=$(babylond keys parse "$KEYRING_FILENAME" | grep -o '^[^- ]*' | head -n 1)
echo "Consumer FP address: $CONSUMER_FP_ADDRESS"

# Get the prefunded key address
KEYRING_DIR=/home/.babylond
PREFUNDED_KEYRING_DIR=/home/.babylond
PREFUNDED_ADDRESS=$(babylond keys show "$BABYLON_PREFUNDED_KEY" \
--keyring-dir "$KEYRING_DIR" \
--keyring-dir "$PREFUNDED_KEYRING_DIR" \
--keyring-backend test \
--output json \
| jq -r '.address')
Expand All @@ -35,10 +36,10 @@ fi
AMOUNT_TO_SEND=$((CONSUMER_FP_BALANCE - TRANSFER_GAS_COST))
echo "Sending funds to prefunded key..."
SEND_TX_HASH=$(babylond tx bank send "$CONSUMER_FP_ADDRESS" "$PREFUNDED_ADDRESS" "$AMOUNT_TO_SEND"ubbn \
--keyring-dir "$KEYRING_DIR" \
--keyring-dir "$CONSUMER_FP_KEYRING_DIR" \
--chain-id $BABYLON_CHAIN_ID \
--node $BABYLON_RPC_URL \
--keyring-backend test \
--chain-id "$BABYLON_CHAIN_ID" \
--node "$BABYLON_RPC_URL" \
--gas auto \
--gas-adjustment 1.5 \
--gas-prices 0.2ubbn \
Expand Down

0 comments on commit 9c71aa0

Please sign in to comment.