pub struct CEP2612WrapperHostRef { /* private fields */ }Expand description
CEP2612Wrapper Host Ref.
Implementations§
Source§impl CEP2612WrapperHostRef
impl CEP2612WrapperHostRef
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 the wrapper by deploying the ERC-2612 module and the CEP-18 token, and setting up the EIP-712 domain.
Source§impl CEP2612WrapperHostRef
impl CEP2612WrapperHostRef
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 the wrapper by deploying the ERC-2612 module and the CEP-18 token, and setting up the EIP-712 domain.
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_permit(
&mut self,
owner: Address,
spender: Address,
value: U256,
deadline: u64,
public_key: PublicKey,
signature: Bytes,
) -> OdraResult<()>
pub fn try_permit( &mut self, owner: Address, spender: Address, value: U256, deadline: u64, public_key: PublicKey, signature: Bytes, ) -> OdraResult<()>
Delegated. See self.cep2612.permit() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Sourcepub fn try_allowance(
&self,
owner: &Address,
spender: &Address,
) -> OdraResult<U256>
pub fn try_allowance( &self, owner: &Address, spender: &Address, ) -> OdraResult<U256>
Delegated. See self.token.allowance() for details.
Does not fail in case of error, returns odra::OdraResult instead.
Trait Implementations§
Source§impl EntryPointsCallerProvider for CEP2612WrapperHostRef
impl EntryPointsCallerProvider for CEP2612WrapperHostRef
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 HasIdent for CEP2612WrapperHostRef
impl HasIdent for CEP2612WrapperHostRef
Source§impl HostRef for CEP2612WrapperHostRef
impl HostRef for CEP2612WrapperHostRef
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
Source§fn contract_address(&self) -> Address
fn contract_address(&self) -> Address
Returns the address of the contract.
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,
Returns the n-th event emitted by the contract. Read more
Source§fn last_call(&self) -> ContractCallResult
fn last_call(&self) -> ContractCallResult
Returns a detailed information about the last call of the contract.
Auto Trait Implementations§
impl !RefUnwindSafe for CEP2612WrapperHostRef
impl !Send for CEP2612WrapperHostRef
impl !Sync for CEP2612WrapperHostRef
impl !UnwindSafe for CEP2612WrapperHostRef
impl Freeze for CEP2612WrapperHostRef
impl Unpin for CEP2612WrapperHostRef
impl UnsafeUnpin for CEP2612WrapperHostRef
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
Mutably borrows from an owned value. Read more
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>
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