Struct fadroma::scrt::snip20::client::ISnip20

source ·
pub struct ISnip20 {
    pub link: ContractLink<Addr>,
    /* private fields */
}
Expand description

SNIP-20 token wrapper to easily call methods on contracts that implement the standard.

Fields§

§link: ContractLink<Addr>

Implementations§

source§

impl ISnip20

source

pub fn new(address: Addr, code_hash: String) -> Self

source

pub fn memo(self, memo: String) -> Self

source

pub fn block_size(self, size: usize) -> Self

source

pub fn padding(self, padding: String) -> Self

source

pub fn add_funds(self, coin: Coin) -> Self

source

pub fn mint( self, recipient: String, amount: Uint128, decoys: Option<Vec<String>>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn set_minters(self, minters: Vec<String>) -> StdResult<CosmosMsg>

source

pub fn send( self, recipient: String, amount: Uint128, msg: Option<Binary>, recipient_code_hash: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn send_from( self, owner: String, recipient: String, amount: Uint128, msg: Option<Binary>, recipient_code_hash: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn register_receive(self, code_hash: String) -> StdResult<CosmosMsg>

source

pub fn transfer( self, recipient: String, amount: Uint128, decoys: Option<Vec<String>>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn transfer_from( self, owner: String, recipient: String, amount: Uint128, decoys: Option<Vec<String>>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn batch_transfer( self, actions: Vec<TransferAction>, entropy: Option<Binary> ) -> StdResult<CosmosMsg>

source

pub fn set_viewing_key(self, key: impl Into<String>) -> StdResult<CosmosMsg>

source

pub fn increase_allowance( self, spender: String, amount: Uint128, expiration: Option<u64> ) -> StdResult<CosmosMsg>

source

pub fn query_balance( self, querier: QuerierWrapper<'_>, address: impl Into<String>, key: impl Into<String> ) -> StdResult<Uint128>

source

pub fn query_token_info( self, querier: QuerierWrapper<'_> ) -> StdResult<TokenInfo>

Trait Implementations§

source§

impl Clone for ISnip20

source§

fn clone(&self) -> ISnip20

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ISnip20

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ContractLink<Addr>> for ISnip20

source§

fn from(link: ContractLink<Addr>) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DynClone for Twhere T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Same<T> for T

§

type Output = T

Should always be Self
source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for Twhere V: MultiLane<T>,

§

fn vzip(self) -> V