Enum cosmwasm_std::WasmMsg[][src]

#[non_exhaustive]pub enum WasmMsg {
    Execute {
        contract_addr: String,
        msg: Binary,
        send: Vec<Coin>,
    },
    Instantiate {
        code_id: u64,
        msg: Binary,
        send: Vec<Coin>,
        label: String,
    },
    Migrate {
        contract_addr: String,
        new_code_id: u64,
        msg: Binary,
    },
}

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)

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

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.

Fields of Execute

contract_addr: Stringmsg: Binary

msg is the json-encoded ExecuteMsg struct (as raw Binary)

send: Vec<Coin>
Instantiate

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.

Fields of Instantiate

code_id: u64msg: Binary

msg is the JSON-encoded InstantiateMsg struct (as raw Binary)

send: Vec<Coin>label: String

A human-readbale label for the contract

Migrate

Migrates a given contracts to use new wasm code. Passes a MigrateMsg to allow us to customize behavior.

Only the contract admin (as defined in wasmd), if any, is able to make this call.

This is translated to a MsgMigrateContract. sender is automatically filled with the current contract’s address.

Fields of Migrate

contract_addr: Stringnew_code_id: u64

the code_id of the new logic to place in the given contract

msg: Binary

msg is the json-encoded MigrateMsg struct that will be passed to the new code

Trait Implementations

impl Clone for WasmMsg[src]

impl Debug for WasmMsg[src]

impl<'de> Deserialize<'de> for WasmMsg[src]

impl<T: Clone + Debug + PartialEq + JsonSchema> From<WasmMsg> for CosmosMsg<T>[src]

impl JsonSchema for WasmMsg[src]

impl PartialEq<WasmMsg> for WasmMsg[src]

impl Serialize for WasmMsg[src]

impl StructuralPartialEq for WasmMsg[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Conv for T

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> DynClone for T where
    T: Clone
[src]

impl<T> FmtForward for T

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pipe for T

impl<T> PipeAsRef for T

impl<T> PipeBorrow for T

impl<T> PipeDeref for T

impl<T> PipeRef for T

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T> Tap for T

impl<T, U> TapAsRef<U> for T where
    U: ?Sized

impl<T, U> TapBorrow<U> for T where
    U: ?Sized

impl<T> TapDeref for T

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> TryConv for T

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.