pub struct InterchainTokenClient<'a> {
pub env: Env,
pub address: Address,
/* private fields */
}Expand description
InterchainTokenClient is a client for calling the contract defined in “InterchainToken”.
Fields§
§env: Env§address: AddressImplementations§
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn version(&self) -> String
pub fn try_version( &self, ) -> Result<Result<String, <String as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn required_auths(&self) -> Vec<Address>
pub fn try_required_auths( &self, ) -> Result<Result<Vec<Address>, <Vec<Address> as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn upgrade(&self, new_wasm_hash: &BytesN<32>)
pub fn try_upgrade( &self, new_wasm_hash: &BytesN<32>, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn migrate( &self, migration_data: &<InterchainToken as CustomMigratableInterface>::MigrationData, )
pub fn try_migrate( &self, migration_data: &<InterchainToken as CustomMigratableInterface>::MigrationData, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<ContractError, InvokeError>>
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn owner(&self) -> Address
pub fn try_owner( &self, ) -> Result<Result<Address, <Address as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn transfer_ownership(&self, new_owner: &Address)
pub fn try_transfer_ownership( &self, new_owner: &Address, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn set_admin(&self, admin: &Address)
pub fn try_set_admin( &self, admin: &Address, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn admin(&self) -> Address
pub fn try_admin( &self, ) -> Result<Result<Address, <Address as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn mint(&self, to: &Address, amount: &i128)
pub fn try_mint( &self, to: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn clawback(&self, _from: &Address, _amount: &i128)
pub fn try_clawback( &self, _from: &Address, _amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn token_id(&self) -> BytesN<32>
pub fn try_token_id( &self, ) -> Result<Result<BytesN<32>, <BytesN<32> as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn is_minter(&self, minter: &Address) -> bool
pub fn try_is_minter( &self, minter: &Address, ) -> Result<Result<bool, <bool as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn mint_from(&self, minter: &Address, to: &Address, amount: &i128)
pub fn try_mint_from( &self, minter: &Address, to: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<ContractError, InvokeError>>
pub fn add_minter(&self, minter: &Address)
pub fn try_add_minter( &self, minter: &Address, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn remove_minter(&self, minter: &Address)
pub fn try_remove_minter( &self, minter: &Address, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
Source§impl<'a> InterchainTokenClient<'a>
impl<'a> InterchainTokenClient<'a>
pub fn allowance(&self, from: &Address, spender: &Address) -> i128
pub fn try_allowance( &self, from: &Address, spender: &Address, ) -> Result<Result<i128, <i128 as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn approve( &self, from: &Address, spender: &Address, amount: &i128, expiration_ledger: &u32, )
pub fn try_approve( &self, from: &Address, spender: &Address, amount: &i128, expiration_ledger: &u32, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn balance(&self, id: &Address) -> i128
pub fn try_balance( &self, id: &Address, ) -> Result<Result<i128, <i128 as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn transfer(&self, from: &Address, to: &Address, amount: &i128)
pub fn try_transfer( &self, from: &Address, to: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn transfer_from( &self, spender: &Address, from: &Address, to: &Address, amount: &i128, )
pub fn try_transfer_from( &self, spender: &Address, from: &Address, to: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn burn(&self, from: &Address, amount: &i128)
pub fn try_burn( &self, from: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn burn_from(&self, spender: &Address, from: &Address, amount: &i128)
pub fn try_burn_from( &self, spender: &Address, from: &Address, amount: &i128, ) -> Result<Result<(), <() as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn decimals(&self) -> u32
pub fn try_decimals( &self, ) -> Result<Result<u32, <u32 as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn name(&self) -> String
pub fn try_name( &self, ) -> Result<Result<String, <String as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
pub fn symbol(&self) -> String
pub fn try_symbol( &self, ) -> Result<Result<String, <String as TryFromVal<Env, Val>>::Error>, Result<Error, InvokeError>>
Auto Trait Implementations§
impl<'a> Freeze for InterchainTokenClient<'a>
impl<'a> !RefUnwindSafe for InterchainTokenClient<'a>
impl<'a> !Send for InterchainTokenClient<'a>
impl<'a> !Sync for InterchainTokenClient<'a>
impl<'a> Unpin for InterchainTokenClient<'a>
impl<'a> !UnwindSafe for InterchainTokenClient<'a>
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
Source§impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
impl<T, U, V, W, E, C> Compare<(T, U, V, W)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W), b: &(T, U, V, W), ) -> Result<Ordering, <C as Compare<(T, U, V, W)>>::Error>
Source§impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
impl<T, U, V, W, X, E, C> Compare<(T, U, V, W, X)> for C
type Error = E
fn compare( &self, a: &(T, U, V, W, X), b: &(T, U, V, W, X), ) -> Result<Ordering, <C as Compare<(T, U, V, W, X)>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more