pub trait InitCallback: Serialize {
    const BLOCK_SIZE: usize;

    fn to_cosmos_msg(
        &self,
        label: String,
        code_id: u64,
        callback_code_hash: String,
        send_amount: Option<Uint128>
    ) -> StdResult<CosmosMsg> { ... } }
Expand description

A trait marking types that define the instantiation message of a contract

This trait requires specifying a padding block size and provides a method to create the CosmosMsg used to instantiate a contract

Required Associated Constants

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 the instantiation of a contract. The BLOCK_SIZE specified in the implementation is used when padding the message

Arguments
  • label - String holding the label for the new contract instance
  • code_id - code ID of the contract to be instantiated
  • callback_code_hash - String holding the code hash of the contract to be instantiated
  • send_amount - Optional Uint128 amount of native coin to send with instantiation message

Implementors