[][src]Struct cw4_group::helpers::Cw4GroupContract

pub struct Cw4GroupContract(pub Cw4Contract);

Cw4GroupContract is a wrapper around HumanAddr that provides a lot of helpers for working with cw4-group contracts.

It extends Cw4Contract to add the extra calls from cw4-group.

Implementations

impl Cw4GroupContract[src]

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

pub fn update_members(
    &self,
    remove: Vec<HumanAddr>,
    add: Vec<Member>
) -> StdResult<CosmosMsg>
[src]

Methods from Deref<Target = Cw4Contract>

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

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

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

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

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

Show the hooks

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

Read the total weight

pub fn is_member(
    &self,
    querier: &QuerierWrapper<'_>,
    addr: &CanonicalAddr
) -> Result<Option<u64>, StdError>
[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
) -> Result<Option<u64>, StdError>
[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>
) -> Result<Vec<Member, Global>, StdError>
[src]

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

Read the admin

Trait Implementations

impl Clone for Cw4GroupContract[src]

impl Debug for Cw4GroupContract[src]

impl Deref for Cw4GroupContract[src]

type Target = Cw4Contract

The resulting type after dereferencing.

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

impl JsonSchema for Cw4GroupContract[src]

impl PartialEq<Cw4GroupContract> for Cw4GroupContract[src]

impl Serialize for Cw4GroupContract[src]

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