There are a number of simple commands that perform minimal validation, build and send IBC transactions.
tx command provides the following sub-commands:
|Initialize a connection (ConnectionOpenInit)|
|Relay the connection attempt (ConnectionOpenTry)|
|Relay acknowledgment of a connection attempt (ConnectionOpenAck)|
|Confirm opening of a connection (ConnectionOpenConfirm)|
|Initialize a channel (ChannelOpenInit)|
|Relay the channel attempt (ChannelOpenTry)|
|Relay acknowledgment of a channel attempt (ChannelOpenAck)|
|Confirm opening of a channel (ChannelOpenConfirm)|
|Initiate the closing of a channel (ChannelCloseInit)|
|Confirm the closing of a channel (ChannelCloseConfirm)|
|Send a fungible token transfer test transaction (ICS20 MsgTransfer|
|Relay receive or timeout packets|
|Relay acknowledgment packets|
|Send an IBC upgrade plan|
The main purpose of these commands is to support development and testing, and continuous integration. These CLIs take quite a few parameters and they are explained in the individual sub-sections.
At a high level, most commands follow this template:
hermes tx <ibc-datagram> <dst-chain-id> <src-chain-id> [-d <dst-obj-id> -s <src-obj-id>]*
In the command template above:
ibc-datagram- identifies the "main" IBC message that is being sent, e.g.
chan-open-init, etc. To ensure successful processing on the receiving chain, the majority of these commands build and send two messages: one
UpdateClientmessage followed by the actual IBC message. These two messages are included in a single transaction. This is done for all IBC datagrams that include proofs collected from the source chain.
The messages that do not require proofs are:
dst-chain-id- is the identifier of the chain where the transaction will be sent.
src-chain-id- is the identifier of the chain that is queried for the data that is included in the transaction, e.g. connection data, client proofs, etc. To ensure correct on-chain state, the relayer also queries the destination chain, however it does not include this information in the Tx to the destination chain.
dst-obj-id- the identifier of an object on destination chain required by the datagram, e.g. the
client-idassociated with the connection on destination chain in connection datagrams. Or the
src-obj-id- the identifier of an object on the source chain, required by the datagram, e.d. the
client-idof the connection on source chain.
More details about the
txcommands can be found in the following sections:
USAGE: hermes tx <SUBCOMMAND> DESCRIPTION: Raw commands for sending transactions to a configured chain. SUBCOMMANDS: help Get usage information conn-init Initialize a connection (ConnectionOpenInit) conn-try Relay the connection attempt (ConnectionOpenTry) conn-ack Relay acknowledgment of a connection attempt (ConnectionOpenAck) conn-confirm Confirm opening of a connection (ConnectionOpenConfirm) chan-open-init Initialize a channel (ChannelOpenInit) chan-open-try Relay the channel attempt (ChannelOpenTry) chan-open-ack Relay acknowledgment of a channel attempt (ChannelOpenAck) chan-open-confirm Confirm opening of a channel (ChannelOpenConfirm) chan-close-init Initiate the closing of a channel (ChannelCloseInit) chan-close-confirm Confirm the closing of a channel (ChannelCloseConfirm) ft-transfer Send a fungible token transfer test transaction (ICS20 MsgTransfer) packet-recv Relay receive or timeout packets packet-ack Relay acknowledgment packets upgrade-chain Send an IBC upgrade plan