modules
Programmable contracts owned and verifiable by accounts, with full IBC support.
Interchain Module Communication
Secure Interchain Module Communication
Sending a message
// a. define the module to send the ibc msg
let self_module_info = module.module_info()?;
// b. access the ibc-client
let ibc_client: IbcClient<_> = module.ibc_client(deps.as_ref());
// c. define the modules ibc action as a cosmos msg
let ibc_action: CosmosMsg = ibc_client.module_ibc_action(
opponent_chain.clone(),
self_module_info,
// Start by playing a Ping
&PingPongIbcMsg {
hand: PingOrPong::Ping,
},
Some(Callback::new(&PingPongCallbackMsg::Pinged {
opponent_chain,
})?),
)?;Receiving a message
Callbacks
Callback Execution
Last updated