forked from cosmos/relayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdev-env
executable file
·38 lines (34 loc) · 1.12 KB
/
dev-env
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#/bin/bash -e
RELAYER_DIR="$GOPATH/src/github.com/iqlusioninc/relayer"
RELAYER_CONF="$HOME/.relayer"
GAIA_CONF="$RELAYER_DIR/data"
# Ensure user understands what will be deleted
if ([[ -d $RELAYER_CONF ]] || [[ -d $GAIA_CONF ]]) && [[ ! "$1" == "skip" ]]; then
read -p "$0 will delete \$HOME/.rly and \$(pwd)/data folder. Do you wish to continue? (y/n): " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
exit 1
fi
fi
cd $RELAYER_DIR
rm -rf $RELAYER_CONF &> /dev/null
bash two-chainz "local" "skip"
bash config-relayer "skip"
sleep 2
rly tx full-path ibc0 ibc1 -o 3s
echo
echo "Initial balances:"
echo "ibc0 balance: $(rly q balance ibc0)"
echo "ibc1 balance: $(rly q balance ibc1)"
echo
echo "sending 10n0token from ibc0 to ibc1..."
rly tx transfer ibc0 ibc1 10n0token true $(rly keys show ibc1 testkey -a) -d
echo
echo "ibc0 balance: $(rly q balance ibc0)"
echo "ibc1 balance: $(rly q balance ibc1)"
echo
echo "sending 10n0token back to ibc0 from ibc1..."
rly tx transfer ibc1 ibc0 10n0token false $(rly keys show ibc0 testkey -a) -d
echo
echo "ibc0 balance: $(rly q balance ibc0)"
echo "ibc1 balance: $(rly q balance ibc1)"