Skip to main content
Version: v0.6.x

InstantiateMsg

The InstantiateMsg is the message that is used to instantiate the cw-ica-controller contract.

src/types/msg.rs
loading...

Fields

owner

This contract has an owner who is allowed to call the ExecuteMsg methods. The owner management is handled by the amazing cw-ownable crate. If left empty, the owner is set to the sender of the InstantiateMsg.

channel_open_init_options

src/types/msg.rs
loading...

These are the options required for the contract to initiate an ICS-27 channel open handshake. This contract requires there to be an IBC connection between the two chains before it can open a channel.

connection_id

The identifier of the IBC connection end on the deployed (source) chain. (The underlying IBC light client must be live.) If this field is set to a non-existent connection, the execution of the InstantiateMsg will fail.

counterparty_connection_id

The identifier of the IBC connection end on the counterparty (destination) chain. (The underlying IBC light client must be live.) If this field is set to a non-existent connection or a different connection's end, then the execution of the InstantiateMsg will not fail. This is because the source chain does not know about the counterparty chain's connections. Instead, the channel open handshake will fail to complete.

If the contract was instantiated with a counterparty_connection_id that does not match the connection end on the counterparty chain, then the owner must call ExecuteMsg::CreateChannel with the correct parameters to start a new channel open handshake.

counterparty_port_id

This is a required parameter for the ICS-27 channel version metadata. I've added it here for consistency. Currently, the only supported value is icahost. If left empty, it is set to icahost. So you should ignore this field.

send_callbacks_to

This is the address of the contract that will receive the callbacks from the cw-ica-controller contract. This may be the same address as the owner or a different address. If left empty, no callbacks will be sent. Learn more about callbacks here.