pub enum WasmMsg {
Execute {
contract_addr: String,
code_hash: String,
msg: Binary,
funds: Vec<Coin, Global>,
},
Instantiate {
code_id: u64,
code_hash: String,
msg: Binary,
funds: Vec<Coin, Global>,
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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Execute
Fields
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
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§
source§impl<'de> Deserialize<'de> for WasmMsg
impl<'de> Deserialize<'de> for WasmMsg
source§fn deserialize<__D>(
__deserializer: __D
) -> Result<WasmMsg, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>( __deserializer: __D ) -> Result<WasmMsg, <__D as Deserializer<'de>>::Error>where __D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for WasmMsg
impl JsonSchema for WasmMsg
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq<WasmMsg> for WasmMsg
impl PartialEq<WasmMsg> for WasmMsg
source§impl Serialize for WasmMsg
impl Serialize for WasmMsg
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>( &self, __serializer: __S ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where __S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl Eq for WasmMsg
impl StructuralEq for WasmMsg
impl StructuralPartialEq for WasmMsg
Auto Trait Implementations§
impl RefUnwindSafe for WasmMsg
impl Send for WasmMsg
impl Sync for WasmMsg
impl Unpin for WasmMsg
impl UnwindSafe for WasmMsg
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more