Skip to content

Commit

Permalink
Merge pull request #37 from siburu/revive-ics20
Browse files Browse the repository at this point in the history
Revive ICS20 E2E testing (tm2eth)

Signed-off-by: Jun Kimura <[email protected]>
  • Loading branch information
bluele authored Sep 27, 2024
2 parents 54333a9 + 7d40343 commit 6a0aa33
Show file tree
Hide file tree
Showing 7 changed files with 221 additions and 73 deletions.
5 changes: 3 additions & 2 deletions tests/cases/tm2eth/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ test:
./scripts/init-rly
./scripts/handshake
./scripts/test-channel-upgrade
./scripts/test-tx
./scripts/test-mockapp-packet-relay
./scripts/test-ics20-packet-relay

.PHONY: network-down
network-down:
TAG=${DOCKER_TAG} $(DOCKER_COMPOSE) \
-f ../docker-compose-test.yaml \
down -v --remove-orphans
down -v --remove-orphans
23 changes: 23 additions & 0 deletions tests/cases/tm2eth/configs/ics20-path.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"src": {
"chain-id": "ibc0",
"client-id": "",
"connection-id": "",
"channel-id": "",
"port-id": "transfer",
"order": "unordered",
"version": "ics20-1"
},
"dst": {
"chain-id": "ibc1",
"client-id": "",
"connection-id": "",
"channel-id": "",
"port-id": "transfer",
"order": "unordered",
"version": "ics20-1"
},
"strategy": {
"type": "naive"
}
}
File renamed without changes.
23 changes: 18 additions & 5 deletions tests/cases/tm2eth/scripts/handshake
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,24 @@ RLY="${RLY_BINARY} --debug"
CHAINID_ONE=ibc0
CHAINID_TWO=ibc1
RLYKEY=testkey
PATH_NAME=ibc01
MOCKAPP_PATH=mockapp-path
ICS20_PATH=ics20-path


# add a path between chain0 and chain1
$RLY paths add $CHAINID_ONE $CHAINID_TWO $PATH_NAME --file=./configs/path.json
$RLY paths add $CHAINID_ONE $CHAINID_TWO $MOCKAPP_PATH --file=./configs/mockapp-path.json
$RLY paths add $CHAINID_ONE $CHAINID_TWO $ICS20_PATH --file=./configs/ics20-path.json

retry 5 $RLY tx clients $MOCKAPP_PATH
retry 5 $RLY tx connection $MOCKAPP_PATH
retry 5 $RLY tx channel $MOCKAPP_PATH

# copy client-id's from mockapp-path to ics20-path
$RLY paths edit $ICS20_PATH src client-id $($RLY paths list --json | jq --raw-output --arg path_name $MOCKAPP_PATH '.[$path_name].src."client-id"')
$RLY paths edit $ICS20_PATH dst client-id $($RLY paths list --json | jq --raw-output --arg path_name $MOCKAPP_PATH '.[$path_name].dst."client-id"')

# copy connection-id's from mockapp-path to ics20-path
$RLY paths edit $ICS20_PATH src connection-id $($RLY paths list --json | jq --raw-output --arg path_name $MOCKAPP_PATH '.[$path_name].src."connection-id"')
$RLY paths edit $ICS20_PATH dst connection-id $($RLY paths list --json | jq --raw-output --arg path_name $MOCKAPP_PATH '.[$path_name].dst."connection-id"')

retry 5 $RLY tx clients $PATH_NAME
retry 5 $RLY tx connection $PATH_NAME
retry 5 $RLY tx channel $PATH_NAME
retry 5 $RLY tx channel $ICS20_PATH
108 changes: 54 additions & 54 deletions tests/cases/tm2eth/scripts/test-channel-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RELAYER_CONF="$HOME/.yui-relayer"
RLY_BINARY=${SCRIPT_DIR}/../../../../build/yrly
RLY="${RLY_BINARY} --debug"

PATH_NAME=ibc01
PATH_NAME=mockapp-path

checkEq() {
typ=$1
Expand Down Expand Up @@ -91,15 +91,15 @@ checkResult() {
fi

# confirm src chain is not upgrading
upg=$($RLY query channel-upgrade ibc01 ibc0)
upg=$($RLY query channel-upgrade $PATH_NAME ibc0)
if [ $(echo "$upg" | jq '.fields|length') -ne 0 ]
then
echo "src chain still in the process of upgrade: $upg"
exit 1
fi

# confirm dst chain is not upgrading
upg=$($RLY query channel-upgrade ibc01 ibc1)
upg=$($RLY query channel-upgrade $PATH_NAME ibc1)
if [ $(echo "$upg" | jq '.fields|length') -ne 0 ]
then
echo "dst chain is still in the process of upgrade: $upg"
Expand All @@ -115,85 +115,85 @@ ALT_FIELDS="--ordering $altOrder --connection-hops $altConnectionId"

echo '##### case 1 #####'
fields="$ALT_FIELDS --version mockapp-2"
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init ibc01 ibc1 $fields
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY eth upgrade allow ibc01 ibc1 --upgrade-sequence 1
retry 10 $RLY tx channel-upgrade execute ibc01
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init $PATH_NAME ibc1 $fields
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY eth upgrade allow $PATH_NAME ibc1 --upgrade-sequence 1
retry 10 $RLY tx channel-upgrade execute $PATH_NAME
checkResult alt mockapp-2

echo '##### case 2 #####'
fields="$ORIG_FIELDS --version mockapp-3"
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init ibc01 ibc1 $fields
retry 10 $RLY tx channel-upgrade execute ibc01
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init $PATH_NAME ibc1 $fields
retry 10 $RLY tx channel-upgrade execute $PATH_NAME
checkResult orig mockapp-3

echo '##### case 3 #####'
fields="$ALT_FIELDS --version mockapp-4"
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init ibc01 ibc1 $fields
$RLY tx channel-upgrade cancel ibc01 ibc0 # create situation where ibc0.error_receipt.sequence >= ibc1.channel.upgrade_sequence
retry 10 $RLY tx channel-upgrade execute ibc01 # the channel upgrade of ibc1 should be cancelled
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init $PATH_NAME ibc1 $fields
$RLY tx channel-upgrade cancel $PATH_NAME ibc0 # create situation where ibc0.error_receipt.sequence >= ibc1.channel.upgrade_sequence
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # the channel upgrade of ibc1 should be cancelled
checkResult orig mockapp-3

echo '##### case 4 #####'
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state INIT --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel ibc01 ibc0 # ibc0 returns to UNINIT. ibc1 is FLUSHING.
retry 10 $RLY tx channel-upgrade execute ibc01 # ibc1's upgrade should be cancelled
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state INIT --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel $PATH_NAME ibc0 # ibc0 returns to UNINIT. ibc1 is FLUSHING.
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # ibc1's upgrade should be cancelled
checkResult orig mockapp-3

echo '##### case 5 #####'
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state INIT --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel ibc01 ibc0 # ibc0 returns to UNINIT. ibc1 is FLUSHING.
$RLY tx channel-upgrade init ibc01 ibc0 --unsafe $fields # ibc0 re-initiates new upgrade.
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY eth upgrade allow ibc01 ibc1 --upgrade-sequence 7
retry 10 $RLY tx channel-upgrade execute ibc01 # The upgrade initiated by ibc0 should be completed after ibc1's one is cancelled.
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state INIT --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel $PATH_NAME ibc0 # ibc0 returns to UNINIT. ibc1 is FLUSHING.
$RLY tx channel-upgrade init $PATH_NAME ibc0 --unsafe $fields # ibc0 re-initiates new upgrade.
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY eth upgrade allow $PATH_NAME ibc1 --upgrade-sequence 7
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # The upgrade initiated by ibc0 should be completed after ibc1's one is cancelled.
checkResult alt mockapp-4

echo '##### case 6 #####'
fields="$ORIG_FIELDS --version mockapp-5"
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel ibc01 ibc1 # ibc1 returns to UNINIT. ibc0 is FLUSHCOMPLETE.
retry 10 $RLY tx channel-upgrade execute ibc01 # ibc0's upgrade (in FLUSHCOMPLETE) should be cancelled.
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel $PATH_NAME ibc1 # ibc1 returns to UNINIT. ibc0 is FLUSHCOMPLETE.
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # ibc0's upgrade (in FLUSHCOMPLETE) should be cancelled.
checkResult alt mockapp-4

echo '##### case 7 #####'
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel ibc01 ibc1 # ibc1 returns to UNINIT. ibc0 is FLUSHCOMPLETE.
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init ibc01 ibc1 --unsafe $fields # ibc1 re-initiates new upgrade.
retry 10 $RLY tx channel-upgrade execute ibc01 # The upgrade initiated by ibc1 should be completed after ibc0's one is cancelled.
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY tx channel-upgrade cancel $PATH_NAME ibc1 # ibc1 returns to UNINIT. ibc0 is FLUSHCOMPLETE.
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init $PATH_NAME ibc1 --unsafe $fields # ibc1 re-initiates new upgrade.
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # The upgrade initiated by ibc1 should be completed after ibc0's one is cancelled.
checkResult orig mockapp-5

echo '##### case 8 #####'
fields="$ALT_FIELDS --version mockapp-6"
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init ibc01 ibc1 $fields
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields $TIMEOUT_FLAGS
$RLY tx channel-upgrade init $PATH_NAME ibc1 $fields
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHCOMPLETE --target-dst-state FLUSHING
sleep 30 # ibc1 exceeds upgrade.timeout.timestamp
retry 10 $RLY tx channel-upgrade execute ibc01 # ibc0 <= chanUpgradeTimeout, ibc1 <= chanUpgradeCancel
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # ibc0 <= chanUpgradeTimeout, ibc1 <= chanUpgradeCancel
checkResult orig mockapp-5

echo '##### case 9 #####'
$RLY tx channel-upgrade init ibc01 ibc0 $fields
$RLY eth upgrade propose ibc01 ibc1 $fields --timeout-height 0-0 --timeout-timestamp `date -d 30sec +%s%N`
$RLY tx channel-upgrade init ibc01 ibc1 $fields
retry 10 $RLY tx channel-upgrade execute ibc01 --target-src-state FLUSHING --target-dst-state FLUSHING
$RLY tx channel-upgrade init $PATH_NAME ibc0 $fields
$RLY eth upgrade propose $PATH_NAME ibc1 $fields --timeout-height 0-0 --timeout-timestamp `date -d 30sec +%s%N`
$RLY tx channel-upgrade init $PATH_NAME ibc1 $fields
retry 10 $RLY tx channel-upgrade execute $PATH_NAME --target-src-state FLUSHING --target-dst-state FLUSHING
sleep 30 # Both chains exceed upgrade.timeout.timestamp
retry 10 $RLY tx channel-upgrade execute ibc01 # ibc0,ibc1 <= chanUpgradeTimeout
retry 10 $RLY tx channel-upgrade execute $PATH_NAME # ibc0,ibc1 <= chanUpgradeTimeout
checkResult orig mockapp-5
111 changes: 111 additions & 0 deletions tests/cases/tm2eth/scripts/test-ics20-packet-relay
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
#!/bin/bash

set -eux

SCRIPT_DIR=$(cd $(dirname ${BASH_SOURCE:-$0}); pwd)
FIXTURES_DIR=${SCRIPT_DIR}/../fixtures

RELAYER_CONF="$HOME/.yui-relayer"
RLY_BINARY=${SCRIPT_DIR}/../../../../build/yrly
RLY="${RLY_BINARY} --debug"

PATH_NAME=ics20-path

TM_ADDRESS=$(${RLY} tendermint keys show ibc0 testkey)
DEPLOYER_INDEX=0
BOB_INDEX=2

ADDRESSES_DIR_B="${FIXTURES_DIR}/ethereum/ibc1/addresses"
ERC20_TOKEN_CONTRACT_B=`cat ${ADDRESSES_DIR_B}/ERC20Token`
ICS20_BANK_CONTRACT_B=`cat ${ADDRESSES_DIR_B}/ICS20Bank`
ICS20_TRANSFER_BANK_CONTRACT_B=`cat ${ADDRESSES_DIR_B}/ICS20TransferBank`

MNEMONIC_B=$($RLY config show | jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.signer.mnemonic')
RPC_ADDRESS_B=$($RLY config show | jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.rpc_addr')
PORT_A=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].src."port-id"')
PORT_B=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].dst."port-id"')
CHANNEL_A=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].src."channel-id"')
CHANNEL_B=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].dst."channel-id"')
BOB_ADDRESS=$(cast wallet address --mnemonic "$MNEMONIC_B" --mnemonic-index $BOB_INDEX)

DENOM_A=samoleans
DENOM_B=$(echo $ERC20_TOKEN_CONTRACT_B | tr '[:upper:]' '[:lower:]')

TX_INTERVAL=3

echo "!!! ibc0(lock) -> ibc1(mint) !!!"
${RLY} tx transfer $PATH_NAME ibc0 ibc1 "100${DENOM_A}" $BOB_ADDRESS
sleep ${TX_INTERVAL}
${RLY} tx relay $PATH_NAME --src-seqs 1
sleep ${TX_INTERVAL}
${RLY} tx acks $PATH_NAME --dst-seqs 1
sleep ${TX_INTERVAL}

echo "!!! ibc1(burn) -> ibc0(unlock) !!!"
cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${BOB_INDEX} \
$ICS20_TRANSFER_BANK_CONTRACT_B \
'sendTransfer(string,uint256,string,string,string,uint64)' \
$PORT_B/$CHANNEL_B/$DENOM_A \
100 \
$TM_ADDRESS \
$PORT_B \
$CHANNEL_B \
100000
sleep ${TX_INTERVAL}
${RLY} tx relay $PATH_NAME --dst-seqs 1
sleep ${TX_INTERVAL}
${RLY} tx acks $PATH_NAME --src-seqs 1

echo "!!! ibc1(lock) -> ibc0(mint) !!!"
cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${DEPLOYER_INDEX} \
$ERC20_TOKEN_CONTRACT_B \
'transfer(address,uint256)' \
$BOB_ADDRESS \
500
cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${BOB_INDEX} \
$ERC20_TOKEN_CONTRACT_B \
'approve(address,uint256)' \
$ICS20_BANK_CONTRACT_B \
500
cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${BOB_INDEX} \
$ICS20_BANK_CONTRACT_B \
'deposit(address,uint256,address)' \
$ERC20_TOKEN_CONTRACT_B \
500 \
$BOB_ADDRESS
cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${BOB_INDEX} \
$ICS20_TRANSFER_BANK_CONTRACT_B \
'sendTransfer(string,uint256,string,string,string,uint64)' \
$DENOM_B \
500 \
$TM_ADDRESS \
$PORT_B \
$CHANNEL_B \
100000
sleep ${TX_INTERVAL}
${RLY} tx relay $PATH_NAME --dst-seqs 2
sleep ${TX_INTERVAL}
${RLY} tx acks $PATH_NAME --src-seqs 2

echo "!!! ibc0(burn) -> ibc1(unlock) !!!"
${RLY} tx transfer $PATH_NAME ibc0 ibc1 "500${PORT_A}/${CHANNEL_A}/${DENOM_B}" $BOB_ADDRESS
sleep ${TX_INTERVAL}
${RLY} tx relay $PATH_NAME --src-seqs 2
sleep ${TX_INTERVAL}
${RLY} tx acks $PATH_NAME --dst-seqs 2
sleep ${TX_INTERVAL}
Original file line number Diff line number Diff line change
Expand Up @@ -9,25 +9,25 @@ RELAYER_CONF="$HOME/.yui-relayer"
RLY_BINARY=${SCRIPT_DIR}/../../../../build/yrly
RLY="${RLY_BINARY} --debug"

ADDRESSES_DIR_B="${FIXTURES_DIR}/ethereum/ibc1/addresses"
MOCKAPP_B=`cat ${ADDRESSES_DIR_B}/AppV1`
PATH_NAME=mockapp-path

CONFIG_JSON=${RELAYER_CONF}/config/config.json
ADDRESSES_DIR_B="${FIXTURES_DIR}/ethereum/ibc1/addresses"
MOCKAPP_CONTRACT_B=`cat ${ADDRESSES_DIR_B}/AppV1`

MNEMONIC_B=$(jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.signer.mnemonic' ${CONFIG_JSON})
RPC_ADDRESS_B=$(jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.rpc_addr' ${CONFIG_JSON})
PORT_B=$(jq -r '.paths.ibc01.dst."port-id"' ${CONFIG_JSON})
CHANNEL_B=$(jq -r '.paths.ibc01.dst."channel-id"' ${CONFIG_JSON})
MNEMONIC_B=$($RLY config show | jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.signer.mnemonic')
RPC_ADDRESS_B=$($RLY config show | jq -r '.chains[] | select(.chain.chain_id == "ibc1").chain.rpc_addr')
PORT_B=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].dst."port-id"')
CHANNEL_B=$($RLY paths list --json | jq -r --arg path $PATH_NAME '.[$path].dst."channel-id"')

TX_INTERVAL=3

echo "!!! ibc0 -> ibc1 !!!"
TM_ADDRESS=$(${RLY} tendermint keys show ibc0 testkey)
docker exec tendermint-chain0-mock sh -c "simd --home /root/data/ibc0 tx --keyring-backend=test --from ${TM_ADDRESS} --chain-id ibc0 mockapp send mockapp channel-0 'mock packet data' --yes"
sleep ${TX_INTERVAL}
${RLY} tx relay ibc01 --src-seqs 1
${RLY} tx relay $PATH_NAME --src-seqs 1
sleep ${TX_INTERVAL}
${RLY} tx acks ibc01 --dst-seqs 1
${RLY} tx acks $PATH_NAME --dst-seqs 1
sleep ${TX_INTERVAL}

echo "!!! ibc1 -> ibc0 !!!"
Expand All @@ -36,14 +36,14 @@ cast send \
--rpc-url $RPC_ADDRESS_B \
--mnemonic "$MNEMONIC_B" \
--mnemonic-index ${BOB_INDEX} \
$MOCKAPP_B \
$MOCKAPP_CONTRACT_B \
'sendPacket(bytes,string,string,(uint64,uint64),uint64)' \
$(cast from-utf8 'mock packet data') \
$PORT_B \
$CHANNEL_B \
'(0,100000)' \
$(date -d 1hour +%s%N)
sleep ${TX_INTERVAL}
${RLY} tx relay ibc01 --dst-seqs 1
${RLY} tx relay $PATH_NAME --dst-seqs 1
sleep ${TX_INTERVAL}
${RLY} tx acks ibc01 --src-seqs 1
${RLY} tx acks $PATH_NAME --src-seqs 1

0 comments on commit 6a0aa33

Please sign in to comment.