update demo for cross chain SendTx
This commit is contained in:
parent
7f2d25c593
commit
4583f7b748
|
@ -122,16 +122,20 @@ ifExit
|
||||||
echo ""
|
echo ""
|
||||||
echo "... creating egress packet on chain1"
|
echo "... creating egress packet on chain1"
|
||||||
echo ""
|
echo ""
|
||||||
# create a packet on chain1 destined for chain2
|
# send coins from chain1 to an address on chain2
|
||||||
PAYLOAD="010104DEADBEEF" #TODO
|
# TODO: dont hardcode the address
|
||||||
basecoin tx ibc --amount 10mycoin $CHAIN_FLAGS1 packet create --ibc_from $CHAIN_ID1 --to $CHAIN_ID2 --type coin --payload $PAYLOAD --ibc_sequence 0
|
basecoin tx send --amount 10mycoin $CHAIN_FLAGS1 --to $CHAIN_ID2/053BA0F19616AFF975C8756A2CBFF04F408B4D47
|
||||||
ifExit
|
ifExit
|
||||||
|
|
||||||
|
# alternative way to create packets (for testing)
|
||||||
|
# basecoin tx ibc --amount 10mycoin $CHAIN_FLAGS1 packet create --ibc_from $CHAIN_ID1 --to $CHAIN_ID2 --type coin --payload $PAYLOAD --ibc_sequence 0
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
echo "... querying for packet data"
|
echo "... querying for packet data"
|
||||||
echo ""
|
echo ""
|
||||||
# query for the packet data and proof
|
# query for the packet data and proof
|
||||||
QUERY_RESULT=$(basecoin query ibc,egress,$CHAIN_ID1,$CHAIN_ID2,1)
|
# since we only sent one packet, the sequence number is 0
|
||||||
|
QUERY_RESULT=$(basecoin query ibc,egress,$CHAIN_ID1,$CHAIN_ID2,0)
|
||||||
ifExit
|
ifExit
|
||||||
HEIGHT=$(echo $QUERY_RESULT | jq .height)
|
HEIGHT=$(echo $QUERY_RESULT | jq .height)
|
||||||
PACKET=$(echo $QUERY_RESULT | jq .value)
|
PACKET=$(echo $QUERY_RESULT | jq .value)
|
||||||
|
@ -187,7 +191,7 @@ echo ""
|
||||||
echo "... checking if the packet is present on chain2"
|
echo "... checking if the packet is present on chain2"
|
||||||
echo ""
|
echo ""
|
||||||
# query for the packet on chain2
|
# query for the packet on chain2
|
||||||
basecoin query --node tcp://localhost:36657 ibc,ingress,test_chain_2,test_chain_1,1
|
basecoin query --node tcp://localhost:36657 ibc,ingress,test_chain_2,test_chain_1,0
|
||||||
ifExit
|
ifExit
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
Loading…
Reference in New Issue