Enum secret_cosmwasm_std::WasmMsg
source · [−]#[non_exhaustive]
pub enum WasmMsg {
Execute {
contract_addr: String,
code_hash: String,
msg: Binary,
funds: Vec<Coin>,
},
Instantiate {
code_id: u64,
code_hash: String,
msg: Binary,
funds: Vec<Coin>,
label: String,
},
}Expand description
The message types of the wasm module.
See https://github.com/CosmWasm/wasmd/blob/v0.14.0/x/wasm/internal/types/tx.proto
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Execute
Fields
contract_addr: Stringcode_hash: Stringcode_hash is the hex encoded hash of the code. This is used by Secret Network to harden against replaying the contract It is used to bind the request to a destination contract in a stronger way than just the contract address which can be faked
msg: Binarymsg is the json-encoded ExecuteMsg struct (as raw Binary)
Dispatches a call to another contract at a known address (with known ABI).
This is translated to a MsgExecuteContract.
sender is automatically filled with the current contract’s address.
Instantiate
Fields
code_id: u64code_hash: Stringcode_hash is the hex encoded hash of the code. This is used by Secret Network to harden against replaying the contract It is used to bind the request to a destination contract in a stronger way than just the contract address which can be faked
msg: Binarymsg is the JSON-encoded InstantiateMsg struct (as raw Binary)
label: StringA human-readbale label for the contract, must be unique across all contracts
Instantiates a new contracts from previously uploaded Wasm code.
This is translated to a MsgInstantiateContract.
sender is automatically filled with the current contract’s address.
Trait Implementations
sourceimpl<'de> Deserialize<'de> for WasmMsg
impl<'de> Deserialize<'de> for WasmMsg
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
sourceimpl JsonSchema for WasmMsg
impl JsonSchema for WasmMsg
sourcefn schema_name() -> String
fn schema_name() -> String
sourcefn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
sourcefn is_referenceable() -> bool
fn is_referenceable() -> bool
$ref keyword. Read more