Struct cw4_group::helpers::Cw4GroupContract
source · pub struct Cw4GroupContract(pub Cw4Contract);
Expand description
Cw4GroupContract is a wrapper around Cw4Contract that provides a lot of helpers for working with cw4-group contracts.
It extends Cw4Contract to add the extra calls from cw4-group.
Tuple Fields§
§0: Cw4Contract
Implementations§
Methods from Deref<Target = Cw4Contract>§
pub fn addr(&self) -> Addr
pub fn add_hook<T>(&self, addr: T) -> Result<CosmosMsg, StdError>
pub fn remove_hook<T>(&self, addr: T) -> Result<CosmosMsg, StdError>
pub fn update_admin<T>(&self, admin: Option<T>) -> Result<CosmosMsg, StdError>
sourcepub fn hooks<Q>(
&self,
querier: &QuerierWrapper<'_, Q>
) -> Result<Vec<String>, StdError>where
Q: CustomQuery,
pub fn hooks<Q>(
&self,
querier: &QuerierWrapper<'_, Q>
) -> Result<Vec<String>, StdError>where
Q: CustomQuery,
Show the hooks
sourcepub fn total_weight(
&self,
querier: &QuerierWrapper<'_>
) -> Result<u64, StdError>
pub fn total_weight( &self, querier: &QuerierWrapper<'_> ) -> Result<u64, StdError>
Read the total weight
sourcepub fn is_member(
&self,
querier: &QuerierWrapper<'_>,
member: &Addr,
height: Option<u64>
) -> Result<Option<u64>, StdError>
pub fn is_member( &self, querier: &QuerierWrapper<'_>, member: &Addr, height: Option<u64> ) -> Result<Option<u64>, StdError>
Check if this address is a member and returns its weight
sourcepub fn is_voting_member(
&self,
querier: &QuerierWrapper<'_>,
member: &Addr,
height: impl Into<Option<u64>>
) -> Result<Option<u64>, StdError>
pub fn is_voting_member( &self, querier: &QuerierWrapper<'_>, member: &Addr, height: impl Into<Option<u64>> ) -> Result<Option<u64>, StdError>
Check if this address is a member, and if its weight is >= 1 Returns member’s weight in positive case
sourcepub fn member_at_height(
&self,
querier: &QuerierWrapper<'_>,
member: impl Into<String>,
at_height: Option<u64>
) -> Result<Option<u64>, StdError>
pub fn member_at_height( &self, querier: &QuerierWrapper<'_>, member: impl Into<String>, at_height: Option<u64> ) -> Result<Option<u64>, StdError>
Return the member’s weight at the given snapshot - requires a smart query
pub fn list_members( &self, querier: &QuerierWrapper<'_>, start_after: Option<String>, limit: Option<u32> ) -> Result<Vec<Member>, StdError>
Trait Implementations§
source§impl Clone for Cw4GroupContract
impl Clone for Cw4GroupContract
source§fn clone(&self) -> Cw4GroupContract
fn clone(&self) -> Cw4GroupContract
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for Cw4GroupContract
impl Debug for Cw4GroupContract
source§impl Deref for Cw4GroupContract
impl Deref for Cw4GroupContract
source§impl<'de> Deserialize<'de> for Cw4GroupContract
impl<'de> Deserialize<'de> for Cw4GroupContract
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl JsonSchema for Cw4GroupContract
impl JsonSchema for Cw4GroupContract
source§fn schema_name() -> String
fn schema_name() -> String
The name of the generated JSON Schema. Read more
source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
source§fn json_schema(gen: &mut SchemaGenerator) -> Schema
fn json_schema(gen: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
source§fn is_referenceable() -> bool
fn is_referenceable() -> bool
Whether JSON Schemas generated for this type should be re-used where possible using the
$ref
keyword. Read moresource§impl PartialEq for Cw4GroupContract
impl PartialEq for Cw4GroupContract
source§fn eq(&self, other: &Cw4GroupContract) -> bool
fn eq(&self, other: &Cw4GroupContract) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl Serialize for Cw4GroupContract
impl Serialize for Cw4GroupContract
impl StructuralPartialEq for Cw4GroupContract
Auto Trait Implementations§
impl Freeze for Cw4GroupContract
impl RefUnwindSafe for Cw4GroupContract
impl Send for Cw4GroupContract
impl Sync for Cw4GroupContract
impl Unpin for Cw4GroupContract
impl UnwindSafe for Cw4GroupContract
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more