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
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
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
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 CosmosMsg
s. 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 CosmosMsg
s that the contract will execute on the counterparty chain using the interchain account.
This execution is atomic. If any of the CosmosMsg
s fail, then the entire execution will fail.
All applicable CosmosMsg
s are supported if the channel was opened with tx_encoding
set to proto3
.
The proto3json
encoding is not supported by this contract anymore.
CosmosMsg | Supported |
---|---|
Stargate | ✅ |
BankMsg::Send | ✅ |
BankMsg::Burn | ❌ |
IbcMsg::Transfer | ✅ |
IbcMsg::SendPacket | N/A |
IbcMsg::CloseChannel | N/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.
queries
This is a list of QueryRequest
s that the contract will execute on the counterparty chain using the interchain account.
This feature only works if the host (counterparty) chain is on ibc-go v7.5+. If the host chain is on an older version, then the packet will return an error acknowledgement.
If both messages
and queries
are provided, then the messages
will be executed first. If the messages
are successful, then the queries
will be executed. If any of the queries
fail, then the entire execution will fail.
In CosmosSDK, query execution is not generally deterministic. This is the main reason why not all query requests are supported. The supported query requests are:
QueryRequest | Supported |
---|---|
BankQuery | ✅ |
Stargate | ✅ |
WasmQuery::Smart | ✅ |
WasmQuery::Raw | ✅ |
WasmQuery::ContractInfo | ✅ |
WasmQuery::CodeInfo | ❌ |
IbcQuery | ❌ |
DistributionQuery | ❌ |
Note that not all Stargate queries are supported. Only queries which are marked with module_query_safe
tag are supported. You can find a list of supported queries in the ibc-go documentation for different versions of ibc-go.
Note that WasmQuery
support works only if the counterparty chain is using wasmd v0.52+
. Moreover, governance queries (as stargate queries) and DistributionQuery
will be supported in the next version of the SDK.
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
.
UpdateCallbackAddress
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
loading...
This message type is provided by the cw-ownable crate. It wraps a
cw_ownable::Action
enum.
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.