pub struct CEP3009WrapperHostRef { /* private fields */ }Expand description
CEP3009Wrapper Host Ref.
Implementations§
Source§impl CEP3009WrapperHostRef
impl CEP3009WrapperHostRef
Sourcepub fn init(
&mut self,
chain_name: String,
symbol: String,
name: String,
decimals: u8,
initial_supply: U256,
)
pub fn init( &mut self, chain_name: String, symbol: String, name: String, decimals: u8, initial_supply: U256, )
Initializes both the authorization module (storing the EIP-712 chain id) and the underlying CEP-18 token (symbol, name, decimals, supply).
Delegated. See self.cep3009.authorization_state() for details.
Delegated. See self.cep3009.transfer_with_authorization() for details.
Delegated. See self.cep3009.receive_with_authorization() for details.
Delegated. See self.cep3009.cancel_authorization() for details.
Sourcepub fn balance_of(&self, address: &Address) -> U256
pub fn balance_of(&self, address: &Address) -> U256
Delegated. See self.token.balance_of() for details.
Source§impl CEP3009WrapperHostRef
impl CEP3009WrapperHostRef
Sourcepub fn try_init(
&mut self,
chain_name: String,
symbol: String,
name: String,
decimals: u8,
initial_supply: U256,
) -> OdraResult<()>
pub fn try_init( &mut self, chain_name: String, symbol: String, name: String, decimals: u8, initial_supply: U256, ) -> OdraResult<()>
Initializes both the authorization module (storing the EIP-712 chain
id) and the underlying CEP-18 token (symbol, name, decimals, supply).
Does not fail in case of error, returns odra::OdraResult instead.
Delegated. See self.cep3009.authorization_state() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Delegated. See self.cep3009.transfer_with_authorization() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Delegated. See self.cep3009.receive_with_authorization() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Delegated. See self.cep3009.cancel_authorization() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_balance_of(&self, address: &Address) -> OdraResult<U256>
pub fn try_balance_of(&self, address: &Address) -> OdraResult<U256>
Delegated. See self.token.balance_of() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl EntryPointsCallerProvider for CEP3009WrapperHostRef
impl EntryPointsCallerProvider for CEP3009WrapperHostRef
Source§fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
fn entry_points_caller(env: &HostEnv) -> EntryPointsCaller
Source§impl HasIdent for CEP3009WrapperHostRef
impl HasIdent for CEP3009WrapperHostRef
Source§impl HostRef for CEP3009WrapperHostRef
impl HostRef for CEP3009WrapperHostRef
Source§fn new(address: Address, env: HostEnv) -> Self
fn new(address: Address, env: HostEnv) -> Self
Source§fn with_tokens(&self, tokens: U512) -> Self
fn with_tokens(&self, tokens: U512) -> Self
Source§fn contract_address(&self) -> Address
fn contract_address(&self) -> Address
Source§fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
fn get_event<T>(&self, index: i32) -> Result<T, EventError>where
T: FromBytes + EventInstance,
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Auto Trait Implementations§
impl !RefUnwindSafe for CEP3009WrapperHostRef
impl !Send for CEP3009WrapperHostRef
impl !Sync for CEP3009WrapperHostRef
impl !UnwindSafe for CEP3009WrapperHostRef
impl Freeze for CEP3009WrapperHostRef
impl Unpin for CEP3009WrapperHostRef
impl UnsafeUnpin for CEP3009WrapperHostRef
Blanket Implementations§
Source§impl<T> Addressable for Twhere
T: HostRef,
impl<T> Addressable for Twhere
T: HostRef,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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