README.md
r/aib/ibc
Because most of the functions in this realm take complex args, it is required
to call them using MsgRun (maketx run with the CLI) instead of the more
commonly used MsgCall.
Here is an exemple of the command:
$ gnokey maketx run -gas-fee 1000000ugnot -gas-wanted 90000000 \
-broadcast -chainid "dev" -remote "tcp://127.0.0.1:26657" \
ADDRESS run.gno
run.gno content depends on the called function, see the following sections
for examples.
CreateClient
See zz_create_client_example_filetest.gno
Emitted event:
1{
2 "type": "create_client",
3 "attrs": [
4 {
5 "key": "client_id",
6 "value": "07-tendermint-1"
7 },
8 {
9 "key": "client_type",
10 "value": "07-tendermint"
11 },
12 {
13 "key": "consensus_heights",
14 "value": "2/2"
15 }
16 ],
17 "pkg_path": "gno.land/r/aib/ibc/core"
18}
RegisterCounterparty
See zz_register_counterparty_example_filetest.gno
UpdateClient
See zz_update_client_example_filetest.gno
Emitted event:
1{
2 "type": "update_client",
3 "attrs": [
4 {
5 "key": "client_id",
6 "value": "07-tendermint-1"
7 },
8 {
9 "key": "client_type",
10 "value": "07-tendermint"
11 },
12 {
13 "key": "consensus_heights",
14 "value": "2/5"
15 }
16 ],
17 "pkg_path": "gno.land/r/aib/ibc/core"
18}
SendPacket
See zz_send_packet_example_filetest.gno
Emitted event:
1[
2 {
3 "type": "send_packet",
4 "attrs": [
5 {
6 "key": "packet_source_client",
7 "value": "07-tendermint-1"
8 },
9 {
10 "key": "packet_dest_client",
11 "value": "counter-party-id"
12 },
13 {
14 "key": "packet_sequence",
15 "value": "1"
16 },
17 {
18 "key": "packet_timeout_timestamp",
19 "value": "1234571490"
20 },
21 {
22 "key": "encoded_packet_hex",
23 "value": "0801120f30372d74656e6465726d696e742d311a10636f756e7465722d70617274792d696420e2a1d8cc042a3f0a12676e6f2e6c616e645f725f69626361707031120f64657374696e6174696f6e506f72741a02763122106170706c69636174696f6e2f6a736f6e2a027b7d2a3f0a12676e6f2e6c616e645f725f69626361707032120f64657374696e6174696f6e506f72741a02763122106170706c69636174696f6e2f6a736f6e2a027b7d"
24 }
25 ],
26 "pkg_path": "gno.land/r/aib/ibc/core"
27 },
28]
WriteAcknowledgement
For the standard synchronous flow, RecvPacket writes the application
acknowledgement itself. An application may instead return
PacketStatus_Async from OnRecvPacket, in which case the ack is deferred
until the application calls WriteAcknowledgement later (typically from a
subsequent OnAcknowledgementPacket or OnTimeoutPacket callback while
forwarding the parent packet). Async acks only support single-payload
packets, and only the realm whose OnRecvPacket returned async is
authorized to write the ack.
See z10a_async_ack_filetest.gno for the
full A → B → C forward-and-ack call graph.
Emitted event:
1{
2 "type": "write_acknowledgement",
3 "attrs": [
4 {
5 "key": "packet_source_client",
6 "value": "07-tendermint-42"
7 },
8 {
9 "key": "packet_dest_client",
10 "value": "07-tendermint-1"
11 },
12 {
13 "key": "packet_sequence",
14 "value": "1"
15 },
16 {
17 "key": "packet_timeout_timestamp",
18 "value": "1234571490"
19 },
20 {
21 "key": "encoded_packet_hex",
22 "value": "0801121030372d74656e6465726d696e742d34321a0f30372d74656e6465726d696e742d3120e2a1d8cc042a280a056170704944120561707049441a02763122106170706c69636174696f6e2f6a736f6e2a027b7d"
23 },
24 {
25 "key": "encoded_acknowledgement_hex",
26 "value": "0a0101"
27 }
28 ],
29 "pkg_path": "gno.land/r/aib/ibc/core"
30}
Acknowledgement
See zz_acknowledgement_example_filetest.gno
Emitted event:
1[
2 {
3 "type": "acknowledge_packet",
4 "attrs": [
5 {
6 "key": "packet_source_client",
7 "value": "07-tendermint-1"
8 },
9 {
10 "key": "packet_dest_client",
11 "value": "07-tendermint-42"
12 },
13 {
14 "key": "packet_sequence",
15 "value": "1"
16 },
17 {
18 "key": "packet_timeout_timestamp",
19 "value": "1234571490"
20 },
21 {
22 "key": "encoded_packet_hex",
23 "value": "0801120f30372d74656e6465726d696e742d311a1030372d74656e6465726d696e742d343220e2a1d8cc042a300a03617070120f64657374696e6174696f6e506f72741a02763122106170706c69636174696f6e2f6a736f6e2a027b7d"
24 }
25 ],
26 "pkg_path": "gno.land/r/aib/ibc/core"
27 }
28]
RecoverClient
See zz_recover_client_example_filetest.gno
See recover-client.md for the end-to-end flow and
which parameters can be adjusted during recovery.
Emitted event:
1{
2 "type": "recover_client",
3 "attrs": [
4 {
5 "key": "subject_client_id",
6 "value": "07-tendermint-1"
7 },
8 {
9 "key": "substitute_client_id",
10 "value": "07-tendermint-2"
11 },
12 {
13 "key": "client_type",
14 "value": "07-tendermint"
15 }
16 ],
17 "pkg_path": "gno.land/r/aib/ibc/core"
18}
UpgradeClient
See zz_upgrade_client_example_filetest.gno
See upgrade-client.md for the lifecycle, the
proof shape, and the field mapping between the current client and the
upgraded client.
Emitted event:
1{
2 "type": "upgrade_client",
3 "attrs": [
4 {
5 "key": "client_id",
6 "value": "07-tendermint-1"
7 },
8 {
9 "key": "client_type",
10 "value": "07-tendermint"
11 },
12 {
13 "key": "consensus_height",
14 "value": "1-100"
15 }
16 ],
17 "pkg_path": "gno.land/r/aib/ibc/core"
18}