[][src]Struct cw4::Cw4Contract

pub struct Cw4Contract(pub HumanAddr);

Cw4Contract is a wrapper around HumanAddr that provides a lot of helpers for working with cw4 contracts

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

Implementations

impl Cw4Contract[src]

pub fn new(addr: HumanAddr) -> Self[src]

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

pub fn add_hook(&self, addr: HumanAddr) -> StdResult<CosmosMsg>[src]

pub fn remove_hook(&self, addr: HumanAddr) -> StdResult<CosmosMsg>[src]

pub fn update_admin<T: Into<HumanAddr>>(
    &self,
    admin: Option<HumanAddr>
) -> StdResult<CosmosMsg>
[src]

pub fn hooks(&self, querier: &QuerierWrapper<'_>) -> StdResult<Vec<HumanAddr>>[src]

Show the hooks

pub fn total_weight(&self, querier: &QuerierWrapper<'_>) -> StdResult<u64>[src]

Read the total weight

pub fn is_member(
    &self,
    querier: &QuerierWrapper<'_>,
    addr: &CanonicalAddr
) -> StdResult<Option<u64>>
[src]

Check if this address is a member, and if so, with which weight

pub fn member_at_height(
    &self,
    querier: &QuerierWrapper<'_>,
    member: HumanAddr,
    height: u64
) -> StdResult<Option<u64>>
[src]

Return the member's weight at the given snapshot - requires a smart query

pub fn list_members(
    &self,
    querier: &QuerierWrapper<'_>,
    start_after: Option<HumanAddr>,
    limit: Option<u32>
) -> StdResult<Vec<Member>>
[src]

pub fn admin(
    &self,
    querier: &QuerierWrapper<'_>
) -> StdResult<Option<HumanAddr>>
[src]

Read the admin

Trait Implementations

impl Clone for Cw4Contract[src]

impl Debug for Cw4Contract[src]

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

impl JsonSchema for Cw4Contract[src]

impl PartialEq<Cw4Contract> for Cw4Contract[src]

impl Serialize for Cw4Contract[src]

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