This CosmWasm contract serves as a wrapper around Kujira's ICS20 transfer callbacks. It provides a mechanism to execute callbacks after interchain transfers are completed.
- Execute interchain transfers with customizable callbacks
- Handle transfer success, errors, and timeouts
- Customizable timeout for transfers
Used to initialize the contract. Currently, it doesn't require any parameters.
pub struct InstantiateMsg {}
The main message for executing actions on the contract.
pub enum ExecuteMsg {
Transfer {
channel_id: String,
to_address: String,
timeout: IbcTimeout,
transfer_callback: CallbackData,
},
}
channel_id
: The IBC channel ID for the transferto_address
: The recipient address on the destination chaintimeout
: The timeout for the IBC transfertransfer_callback
: CallbackData payload to receive with acknowledgements or errors/timeouts.
Note: The actual coin to be transferred should be sent along with this message.
In case of a transfer error or timeout, the TransferResult
will be set to Error
or Timeout
, respectively, and return the original transfer amount.
If the sender contract has an error during the callback execution, it will NOT revert the entire transaction, as the IBC acknowledgement will be saved anyway, and the initial funds will be bank transferred to the original sender instead.