Transactions

There are a number of simple commands that perform minimal validation, build and send IBC transactions.

The tx command provides the following sub-commands:

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 subsections.

At a high level, most commands follow this template:

hermes tx <IBC-MESSAGE> --dst-chain-id <CHAIN-ID> --src-chain-id <CHAIN-id> --dst-obj-id <OBJ-ID> --src-obj-id <SRC-OBJ-ID>

In the command template above:

  • ibc-message - identifies the "main" IBC message that is being sent, e.g. conn-init, conn-try, chan-open-init, etc. To ensure successful processing on the receiving chain, the majority of these commands build and send two messages: one UpdateClient message followed by the actual IBC message. These two messages are included in a single transaction. This is done for all IBC messages that include proofs collected from the source chain.

    The messages that do not require proofs are:

    • MsgConnectionOpenInit (conn-open-init command),
    • MsgChannelOpenInit (chan-open-init command),
    • MsgChannelCloseInit (chan-close-init command) and
    • MsgTransfer (ft-transfer command)
  • 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 message, e.g. the client-id associated with the connection on destination chain in connection messages. Or the connection-id in a ConnOpenAck message.

  • src-obj-id - the identifier of an object on the source chain, required by the message, e.d. the client-id of the connection on source chain.

  • More details about the tx commands can be found in the following sections:

Usage

DESCRIPTION:
Create and send IBC transactions

USAGE:
    hermes tx <SUBCOMMAND>

OPTIONS:
    -h, --help    Print help information

SUBCOMMANDS:
    chan-close-confirm      Confirm the closing of a channel (ChannelCloseConfirm)
    chan-close-init         Initiate the closing of a channel (ChannelCloseInit)
    chan-open-ack           Relay acknowledgment of a channel attempt (ChannelOpenAck)
    chan-open-confirm       Confirm opening of a channel (ChannelOpenConfirm)
    chan-open-init          Initialize a channel (ChannelOpenInit)
    chan-open-try           Relay the channel attempt (ChannelOpenTry)
    chan-upgrade-ack        Relay the channel upgrade attempt (ChannelUpgradeAck)
    chan-upgrade-cancel     Relay the channel upgrade cancellation (ChannelUpgradeCancel)
    chan-upgrade-confirm    Relay the channel upgrade attempt (ChannelUpgradeConfirm)
    chan-upgrade-open       Relay the channel upgrade attempt (ChannelUpgradeOpen)
    chan-upgrade-timeout    Relay the channel upgrade timeout (ChannelUpgradeTimeout)
    chan-upgrade-try        Relay the channel upgrade attempt (ChannelUpgradeTry)
    conn-ack                Relay acknowledgment of a connection attempt (ConnectionOpenAck)
    conn-confirm            Confirm opening of a connection (ConnectionOpenConfirm)
    conn-init               Initialize a connection (ConnectionOpenInit)
    conn-try                Relay the connection attempt (ConnectionOpenTry)
    ft-transfer             Send a fungible token transfer test transaction (ICS20 MsgTransfer)
    help                    Print this message or the help of the given subcommand(s)
    packet-ack              Relay acknowledgment packets
    packet-recv             Relay receive or timeout packets
    upgrade-chain           Send an IBC upgrade plan