[][src]Struct cosmwasm_std::MessageInfo

pub struct MessageInfo {
    pub sender: HumanAddr,
    pub sent_funds: Vec<Coin>,
}

MessageInfo is sent with init, handle, and migrate calls, but not with queries. It contains the essential info for authorization - identity of the call, and payment

Fields

sender: HumanAddr

The sender field from the wasm/MsgStoreCode, wasm/MsgInstantiateContract, wasm/MsgMigrateContract or wasm/MsgExecuteContract message. You can think of this as the address that initiated the action (i.e. the message). What that means exactly heavily depends on the application.

The x/wasm module ensures that the sender address signed the transaction. Additional signers of the transaction that are either needed for other messages or contain unnecessary signatures are not propagated into the contract.

There is a discussion to open up this field to multiple initiators, which you're welcome to join if you have a specific need for that feature: https://github.com/CosmWasm/cosmwasm/issues/293

sent_funds: Vec<Coin>

Trait Implementations

impl Clone for MessageInfo[src]

impl Debug for MessageInfo[src]

impl Default for MessageInfo[src]

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

impl JsonSchema for MessageInfo[src]

impl PartialEq<MessageInfo> for MessageInfo[src]

impl Serialize for MessageInfo[src]

impl StructuralPartialEq for MessageInfo[src]

Auto Trait Implementations

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> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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.