forked from cosmos/relayer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev-env
executable file
·31 lines (27 loc) · 902 Bytes
/
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
#!/bin/bash -e
RELAYER_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
RELAYER_CONF="$HOME/.relayer"
GAIA_CONF="$(pwd)/data"
# Ensure user understands what will be deleted
if ([[ -d $RELAYER_CONF ]] || [[ -d $GAIA_CONF ]]) && [[ ! "$1" == "skip" ]]; then
read -p "$0 will delete \$HOME/.relayer 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
pwd
bash scripts/two-chainz "skip"
echo "waiting for blocks..."
sleep 3
rly tx link demo -d -o 3s
echo "ibc-1 addr $(rly keys show ibc-1)"
echo "ibc-0 addr $(rly keys show ibc-0)"
rly tx transfer ibc-0 ibc-1 100000samoleans $(rly keys show ibc-1)
rly tx transfer ibc-1 ibc-0 100000samoleans $(rly keys show ibc-0)
sleep 2
rly tx relay-packets demo -d
sleep 2
rly tx relay-acknowledgements demo -d