Trait secret_toolkit_utils::calls::HandleCallback
source · [−]pub trait HandleCallback: Serialize {
const BLOCK_SIZE: usize;
fn to_cosmos_msg(
&self,
callback_code_hash: String,
contract_addr: HumanAddr,
send_amount: Option<Uint128>
) -> StdResult<CosmosMsg> { ... }
}
Expand description
A trait marking types that define the handle message(s) of a contract
This trait requires specifying a padding block size and provides a method to create the CosmosMsg used to execute a handle method of a contract
Required Associated Constants
const BLOCK_SIZE: usize
const BLOCK_SIZE: usize
pad the message to blocks of this size
Provided Methods
Returns StdResult
Tries to convert the instance of the implementing type to a CosmosMsg that will trigger a handle function of a contract. The BLOCK_SIZE specified in the implementation is used when padding the message
Arguments
callback_code_hash
- String holding the code hash of the contract to be executedcontract_addr
- address of the contract being calledsend_amount
- Optional Uint128 amount of native coin to send with the handle message