pub struct DefaultImpl;

Implementations§

source§

impl Contract

source

pub fn guard( deps: DepsMut<'_>, env: &Env, info: &MessageInfo, msg: &ExecuteMsg ) -> Result<(), StdError>

source

pub fn authenticate( storage: &dyn Storage, accounts: &[&Account], provided_key: &ViewingKey ) -> StdResult<Option<QueryAnswer>>

Checks if any of the provided accounts has the provided_key. Returns Some if none of them matched the key. This means that the authentication failed.

source

pub fn query_balance( storage: &dyn Storage, account: &Account ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

source

pub fn query_allowance( storage: &dyn Storage, owner: (&Account, String), spender: (&Account, String) ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

source

pub fn query_given_allowances( deps: Deps<'_>, owner: (&Account, String), page: Option<u32>, page_size: u32 ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

source

pub fn query_received_allowances( deps: Deps<'_>, spender: (&Account, String), page: Option<u32>, page_size: u32 ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

source

pub fn query_transfers( deps: Deps<'_>, account: &Account, page: Option<u32>, page_size: u32, filter_decoys: bool ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

source

pub fn query_transactions( deps: Deps<'_>, account: &Account, page: Option<u32>, page_size: u32, filter_decoys: bool ) -> StdResult<QueryAnswer>

This function does not perform authentication!

Must be called after the address was verified via a viewing key or a permit.

Trait Implementations§

source§

impl Admin for Contract

source§

fn change_admin( deps: DepsMut<'_>, env: Env, info: MessageInfo, mode: Option<Mode> ) -> Result<Response, Self::Error>

source§

fn admin(deps: Deps<'_>, env: Env) -> Result<Option<Addr>, Self::Error>

§

type Error = <DefaultImpl as Admin>::Error

source§

impl Clone for Contract

source§

fn clone(&self) -> Contract

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 Contract

source§

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

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

impl Killswitch for Contract

source§

fn set_status( deps: DepsMut<'_>, env: Env, info: MessageInfo, status: ContractStatus<Addr> ) -> Result<Response, <Self as Killswitch>::Error>

source§

fn status( deps: Deps<'_>, env: Env ) -> Result<ContractStatus<Addr>, <Self as Killswitch>::Error>

§

type Error = <DefaultImpl as Killswitch>::Error

source§

impl Snip20 for Contract

§

type Error = StdError

source§

fn new( deps: DepsMut<'_>, env: Env, info: MessageInfo, name: String, admin: Option<String>, symbol: String, decimals: u8, initial_balances: Option<Vec<InitialBalance>>, prng_seed: Binary, config: Option<TokenConfig>, supported_denoms: Option<Vec<String>>, callback: Option<Callback<String>> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn deposit( deps: DepsMut<'_>, env: Env, info: MessageInfo, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn redeem( deps: DepsMut<'_>, env: Env, info: MessageInfo, amount: Uint128, denom: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn transfer( deps: DepsMut<'_>, env: Env, info: MessageInfo, recipient: String, amount: Uint128, memo: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn send( deps: DepsMut<'_>, env: Env, info: MessageInfo, recipient: String, recipient_code_hash: Option<String>, amount: Uint128, memo: Option<String>, msg: Option<Binary>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn burn( deps: DepsMut<'_>, env: Env, info: MessageInfo, amount: Uint128, memo: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn register_receive( deps: DepsMut<'_>, env: Env, info: MessageInfo, code_hash: String, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn increase_allowance( deps: DepsMut<'_>, env: Env, info: MessageInfo, spender: String, amount: Uint128, expiration: Option<u64>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn decrease_allowance( deps: DepsMut<'_>, env: Env, info: MessageInfo, spender: String, amount: Uint128, expiration: Option<u64>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn transfer_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, owner: String, recipient: String, amount: Uint128, memo: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn send_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, owner: String, recipient: String, recipient_code_hash: Option<String>, amount: Uint128, memo: Option<String>, msg: Option<Binary>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn burn_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, owner: String, amount: Uint128, memo: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn mint( deps: DepsMut<'_>, env: Env, info: MessageInfo, recipient: String, amount: Uint128, memo: Option<String>, decoys: Option<Vec<String>>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn add_minters( deps: DepsMut<'_>, env: Env, info: MessageInfo, minters: Vec<String>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn remove_minters( deps: DepsMut<'_>, env: Env, info: MessageInfo, minters: Vec<String>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn set_minters( deps: DepsMut<'_>, env: Env, info: MessageInfo, minters: Vec<String>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn add_supported_denoms( deps: DepsMut<'_>, env: Env, info: MessageInfo, denoms: Vec<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn remove_supported_denoms( deps: DepsMut<'_>, env: Env, info: MessageInfo, denoms: Vec<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_transfer( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<TransferAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_send( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<SendAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_transfer_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<TransferFromAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_send_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<SendFromAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_burn_from( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<BurnFromAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn batch_mint( deps: DepsMut<'_>, env: Env, info: MessageInfo, actions: Vec<MintAction>, entropy: Option<Binary>, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn revoke_permit( deps: DepsMut<'_>, env: Env, info: MessageInfo, permit_name: String, _padding: Option<String> ) -> Result<Response, <Self as Snip20>::Error>

source§

fn exchange_rate( deps: Deps<'_>, env: Env ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn token_info( deps: Deps<'_>, env: Env ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn token_config( deps: Deps<'_>, env: Env ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn minters( deps: Deps<'_>, env: Env ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn allowance( deps: Deps<'_>, env: Env, owner: String, spender: String, key: String ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn balance( deps: Deps<'_>, env: Env, address: String, key: String ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn transfer_history( deps: Deps<'_>, env: Env, address: String, key: String, page: Option<u32>, page_size: u32, should_filter_decoys: bool ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn transaction_history( deps: Deps<'_>, env: Env, address: String, key: String, page: Option<u32>, page_size: u32, should_filter_decoys: bool ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn allowances_given( deps: Deps<'_>, env: Env, owner: String, key: String, page: Option<u32>, page_size: u32 ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn allowances_received( deps: Deps<'_>, env: Env, spender: String, key: String, page: Option<u32>, page_size: u32 ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

fn with_permit( deps: Deps<'_>, env: Env, permit: Permit<QueryPermission>, query: QueryWithPermit ) -> Result<QueryAnswer, <Self as Snip20>::Error>

source§

impl VkAuth for Contract

§

type Error = StdError

source§

fn create_viewing_key( deps: DepsMut<'_>, env: Env, info: MessageInfo, entropy: String, _padding: Option<String> ) -> Result<Response, Self::Error>

source§

fn set_viewing_key( deps: DepsMut<'_>, env: Env, info: MessageInfo, key: String, _padding: Option<String> ) -> Result<Response, Self::Error>

source§

impl Copy for Contract

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