Skip to main content
Version: v0.5.x

ExecuteMsg

The ExecuteMsg is the message that is used to interact with the cw-ica-controller contract. All execute messages are only callable by the owner of the contract.

CreateChannel

src/types/msg.rs
loading...

This message is used to initiate an ICS-27 channel open handshake. It is only callable by the owner. This message only takes one optional parameter: channel_open_init_options.

If this parameter is left empty, then the contract will use the channel_open_init_options that were last passed to the InstantiateMsg or CreateChannel messages.

If this parameter is set, then the contract will use the channel_open_init_options that are passed to this message and save them for future CreateChannel messages.

CloseChannel

src/types/msg.rs
loading...

This message is used to close the ICS-27 channel. It is only callable by the owner. The channel can then be reopened with parameters (e.g. channel ordering and version) that are different from the original channel open handshake.

SendCosmosMsgs

src/types/msg.rs
loading...

Once an ICS-27 channel open handshake is complete, the owner can control the interchain account on the counterparty chain. To give the owner a familiar interface, this message allows the owner to take actions with the interchain account using CosmosMsgs. This is the recommended way to use the interchain account. We will go over the fields of this message in detail.

messages

This is a list of CosmosMsgs that the contract will execute on the counterparty chain using the interchain account. This execution is atomic. If any of the CosmosMsgs fail, then the entire execution will fail.

note

All applicable CosmosMsgs are supported if the channel was opened with tx_encoding set to proto3. However, if the channel was opened with tx_encoding set to proto3json, then some CosmosMsgs are not supported. Below is a table of the supported CosmosMsgs for each tx_encoding.

CosmosMsgproto3proto3json
Stargate
BankMsg::Send
BankMsg::Burn
IbcMsg::Transfer🟢
IbcMsg::SendPacketN/AN/A
IbcMsg::CloseChannelN/AN/A
WasmMsg::*
GovMsg::*
StakingMsg::Delegate
StakingMsg::*🟢🟢
DistributionMsg::WithdrawDelegatorReward🟢🟢
DistributionMsg::*

Note that 🟢 means that the CosmosMsg is supported but not tested in the contract's test suite. These will be tested in the future.

packet_memo

This is the IBC packet memo that will be included in the ICS-27 packet. It is optional and defaults to "". Additionally, the memo field is used by some IBC middleware to execute custom logic on the counterparty chain. But most of these middlewares do not yet support ICS-27 channels.

timeout_seconds

This is the timeout in seconds that will be used for the ICS-27 packet. It is optional and defaults to DEFAULT_TIMEOUT_SECONDS.

SendCustomIcaMessages

src/types/msg.rs
loading...

Recall that the SendCosmosMsgs message is the recommended way to use the interchain account. Use this only if you insist on using proto3json encoding and you need to send messages that are not supported by the SendCosmosMsgs.

note

This message is redundant if the channel was opened with tx_encoding set to proto3. This is because any custom message you might want to send will be supported through CosmosMsg::Stargate.

I will not go into the details of the fields of this message since it is not recommended to use this message.

UpdateCallbackAddress

src/types/msg.rs
loading...

This message is used to update the contract address that this contract will send callbacks to. This is useful if the owner wants to change the contract that receives the callbacks. If set to None, then no callbacks will be sent.

UpdateOwnership

packages/ownable/derive/src/lib.rs
loading...

This message type is provided by the cw-ownable crate. It wraps a cw_ownable::Action enum.

packages/ownable/src/lib.rs
loading...

The owner can propose to transfer the ownership of the contract to a new address using Action::TransferOwnership and set and expiry time for the proposal. If the proposal is accepted before the expiry time through Action::AcceptOwnership, then the ownership of the contract is transferred to the new address.

You can learn more about cw-ownable in its crate documentation.