pub struct WrappedNativeTokenHostRef { /* private fields */ }Implementations§
source§impl WrappedNativeTokenHostRef
impl WrappedNativeTokenHostRef
pub fn try_deposit(&mut self) -> OdraResult<()>
pub fn deposit(&mut self)
pub fn try_withdraw(&mut self, amount: U256) -> OdraResult<()>
pub fn withdraw(&mut self, amount: U256)
pub fn try_allowance( &self, owner: Address, spender: Address ) -> OdraResult<U256>
pub fn allowance(&self, owner: Address, spender: Address) -> U256
pub fn try_balance_of(&self, address: Address) -> OdraResult<U256>
pub fn balance_of(&self, address: Address) -> U256
pub fn try_total_supply(&self) -> OdraResult<U256>
pub fn total_supply(&self) -> U256
pub fn try_decimals(&self) -> OdraResult<u8>
pub fn decimals(&self) -> u8
pub fn try_symbol(&self) -> OdraResult<String>
pub fn symbol(&self) -> String
pub fn try_name(&self) -> OdraResult<String>
pub fn name(&self) -> String
pub fn try_approve(&mut self, spender: Address, amount: U256) -> OdraResult<()>
pub fn approve(&mut self, spender: Address, amount: U256)
pub fn try_transfer_from( &mut self, owner: Address, recipient: Address, amount: U256 ) -> OdraResult<()>
pub fn transfer_from( &mut self, owner: Address, recipient: Address, amount: U256 )
pub fn try_transfer( &mut self, recipient: Address, amount: U256 ) -> OdraResult<()>
pub fn transfer(&mut self, recipient: Address, amount: U256)
Trait Implementations§
source§impl EntryPointsCallerProvider for WrappedNativeTokenHostRef
impl EntryPointsCallerProvider for WrappedNativeTokenHostRef
source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Returns an [EntryPointsCaller] for the given host environment.
source§impl HostRef for WrappedNativeTokenHostRef
impl HostRef for WrappedNativeTokenHostRef
source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Creates a new host side reference to a contract.
source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Creates a new host reference with attached tokens, based on the current instance. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for WrappedNativeTokenHostRef
impl !Send for WrappedNativeTokenHostRef
impl !Sync for WrappedNativeTokenHostRef
impl Unpin for WrappedNativeTokenHostRef
impl !UnwindSafe for WrappedNativeTokenHostRef
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
§impl<T> Conv for T
impl<T> Conv for T
§impl<R> Deployer for Rwhere
R: HostRef + EntryPointsCallerProvider + HasIdent,
impl<R> Deployer for Rwhere
R: HostRef + EntryPointsCallerProvider + HasIdent,
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
Causes
self to use its Binary implementation when Debug-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
Causes
self to use its Display implementation when
Debug-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
Causes
self to use its LowerExp implementation when
Debug-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
Causes
self to use its LowerHex implementation when
Debug-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
Causes
self to use its Octal implementation when Debug-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
Causes
self to use its Pointer implementation when
Debug-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
Causes
self to use its UpperExp implementation when
Debug-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
Causes
self to use its UpperHex implementation when
Debug-formatted.§impl<T> HostRefLoader for Twhere
T: EntryPointsCallerProvider + HostRef,
impl<T> HostRefLoader for Twhere
T: EntryPointsCallerProvider + HostRef,
§impl<T> Pipe for T
impl<T> Pipe for T
§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
§impl<T> PipeDeref for T
impl<T> PipeDeref for T
§impl<T> PipeRef for T
impl<T> PipeRef for T
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
Pipes a reference into a function that cannot ordinarily be called in
suffix position. Read more
§fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
Pipes a mutable reference into a function that cannot ordinarily be
called in suffix position. Read more
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_dbg<F, R>(self, func: F) -> Self
fn tap_dbg<F, R>(self, func: F) -> Self
Calls
tap in debug builds, and does nothing in release builds.§fn tap_mut_dbg<F, R>(self, func: F) -> Self
fn tap_mut_dbg<F, R>(self, func: F) -> Self
Calls
tap_mut in debug builds, and does nothing in release builds.§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
Calls
tap_ref in debug builds, and does nothing in release builds.§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Provides mutable access to the reference for modification.
§fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self
fn tap_ref_mut_dbg<F, R>(self, func: F) -> Self
Calls
tap_ref_mut in debug builds, and does nothing in release builds.§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Provides immutable access to the borrow for inspection. Read more
§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
Calls
tap_borrow in debug builds, and does nothing in release builds.§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Provides mutable access to the borrow for modification.
§fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_mut_dbg<F, R>(self, func: F) -> Self
Calls
tap_borrow_mut in debug builds, and does nothing in release
builds.§impl<T> TapDeref for T
impl<T> TapDeref for T
§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
Calls
tap_deref in debug builds, and does nothing in release builds.§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
Mutably dereferences
self for modification.§fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self
fn tap_deref_mut_dbg<F, R>(self, func: F) -> Self
Calls
tap_deref_mut in debug builds, and does nothing in release
builds.