[−][src]Struct cw20::Cw20Contract
Cw20Contract is a wrapper around HumanAddr that provides a lot of helpers for working with this.
If you wish to persist this, convert to Cw20CanonicalContract via .canonical()
Implementations
impl Cw20Contract
[src]
pub fn addr(&self) -> HumanAddr
[src]
pub fn canonical<A: Api>(&self, api: &A) -> StdResult<Cw20CanonicalContract>
[src]
Convert this address to a form fit for storage
pub fn call<T: Into<Cw20HandleMsg>>(&self, msg: T) -> StdResult<CosmosMsg>
[src]
pub fn balance<Q: Querier>(
&self,
querier: &Q,
address: HumanAddr
) -> StdResult<Uint128>
[src]
&self,
querier: &Q,
address: HumanAddr
) -> StdResult<Uint128>
Get token balance for the given address
pub fn meta<Q: Querier>(&self, querier: &Q) -> StdResult<TokenInfoResponse>
[src]
Get metadata from the contract. This is a good check that the address is a valid Cw20 contract.
pub fn allowance<Q: Querier>(
&self,
querier: &Q,
owner: HumanAddr,
spender: HumanAddr
) -> StdResult<AllowanceResponse>
[src]
&self,
querier: &Q,
owner: HumanAddr,
spender: HumanAddr
) -> StdResult<AllowanceResponse>
Get allowance of spender to use owner's account
pub fn minter<Q: Querier>(
&self,
querier: &Q
) -> StdResult<Option<MinterResponse>>
[src]
&self,
querier: &Q
) -> StdResult<Option<MinterResponse>>
Find info on who can mint, and how much
pub fn has_allowance<Q: Querier>(&self, querier: &Q) -> bool
[src]
returns true if the contract supports the allowance extension
pub fn is_mintable<Q: Querier>(&self, querier: &Q) -> bool
[src]
returns true if the contract supports the mintable extension
Trait Implementations
impl Clone for Cw20Contract
[src]
fn clone(&self) -> Cw20Contract
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for Cw20Contract
[src]
impl<'de> Deserialize<'de> for Cw20Contract
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
impl JsonSchema for Cw20Contract
[src]
fn schema_name() -> String
[src]
fn json_schema(gen: &mut SchemaGenerator) -> Schema
[src]
fn is_referenceable() -> bool
[src]
impl PartialEq<Cw20Contract> for Cw20Contract
[src]
fn eq(&self, other: &Cw20Contract) -> bool
[src]
fn ne(&self, other: &Cw20Contract) -> bool
[src]
impl Serialize for Cw20Contract
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl StructuralPartialEq for Cw20Contract
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cw20Contract
impl Send for Cw20Contract
impl Sync for Cw20Contract
impl Unpin for Cw20Contract
impl UnwindSafe for Cw20Contract
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> DeserializeOwned for T where
T: for<'de> Deserialize<'de>,
[src]
T: for<'de> Deserialize<'de>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,