[][src]Struct cw3::Cw3Contract

pub struct Cw3Contract(pub HumanAddr);

Cw3Contract is a wrapper around HumanAddr that provides a lot of helpers for working with this.

If you wish to persist this, convert to Cw3CanonicalContract via .canonical()

FIXME: Cw3Contract currently only supports CosmosMsg. When we actually use this in some consuming code, we should make it generic over CosmosMsg.

Implementations

impl Cw3Contract[src]

pub fn addr(&self) -> HumanAddr[src]

pub fn canonical<A: Api>(&self, api: &A) -> StdResult<Cw3CanonicalContract>[src]

Convert this address to a form fit for storage

pub fn encode_msg(&self, msg: Cw3HandleMsg) -> StdResult<CosmosMsg>[src]

pub fn proposal<T: Into<String>, U: Into<String>>(
    &self,
    title: T,
    description: U,
    msgs: Vec<CosmosMsg>,
    earliest: Option<Expiration>,
    latest: Option<Expiration>
) -> StdResult<CosmosMsg>
[src]

helper doesn't support custom messages now

pub fn vote(&self, proposal_id: u64, vote: Vote) -> StdResult<CosmosMsg>[src]

pub fn execute(&self, proposal_id: u64) -> StdResult<CosmosMsg>[src]

pub fn close(&self, proposal_id: u64) -> StdResult<CosmosMsg>[src]

Trait Implementations

impl Clone for Cw3Contract[src]

impl Debug for Cw3Contract[src]

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

impl JsonSchema for Cw3Contract[src]

impl PartialEq<Cw3Contract> for Cw3Contract[src]

impl Serialize for Cw3Contract[src]

impl StructuralPartialEq for Cw3Contract[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.