pub struct CEP2612Wrapper { /* private fields */ }Expand description
Wrapper contract that combines ERC-2612 functionality with a CEP-18 token for testing purposes.
Implementations§
Source§impl CEP2612Wrapper
Wrapper contract that combines ERC-2612 functionality with a CEP-18 token for testing purposes.
In a real deployment, the ERC-2612 module would likely be separate and interact with an existing token contract.
impl CEP2612Wrapper
Wrapper contract that combines ERC-2612 functionality with a CEP-18 token for testing purposes. In a real deployment, the ERC-2612 module would likely be separate and interact with an existing token contract.
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.
Trait Implementations§
Source§impl HasEntrypoints for CEP2612Wrapper
impl HasEntrypoints for CEP2612Wrapper
Source§fn entrypoints() -> Vec<Entrypoint>
fn entrypoints() -> Vec<Entrypoint>
Returns the list of contract’s entrypoints.
Source§impl HasEvents for CEP2612Wrapper
impl HasEvents for CEP2612Wrapper
Source§impl Module for CEP2612Wrapper
impl Module for CEP2612Wrapper
Source§fn new(env: Rc<ContractEnv>) -> Self
fn new(env: Rc<ContractEnv>) -> Self
Creates a new instance of the module with the given contract environment.
Source§fn env(&self) -> Rc<ContractEnv>
fn env(&self) -> Rc<ContractEnv>
Returns the contract environment associated with the module.
Source§impl OdraContract for CEP2612Wrapper
impl OdraContract for CEP2612Wrapper
Source§type HostRef = CEP2612WrapperHostRef
type HostRef = CEP2612WrapperHostRef
The host reference type.
Source§type ContractRef = CEP2612WrapperContractRef
type ContractRef = CEP2612WrapperContractRef
The contract reference type.
Source§type InitArgs = CEP2612WrapperInitArgs
type InitArgs = CEP2612WrapperInitArgs
The init args type.
Source§type UpgradeArgs = NoArgs
type UpgradeArgs = NoArgs
The upgrade args type.
Source§impl SchemaCustomTypes for CEP2612Wrapper
Available on non-WebAssembly only.
impl SchemaCustomTypes for CEP2612Wrapper
Available on non-WebAssembly only.
Source§fn schema_types() -> Vec<Option<CustomType>>
fn schema_types() -> Vec<Option<CustomType>>
Returns a vector of optional CustomTypes.
Source§impl SchemaEntrypoints for CEP2612Wrapper
Available on non-WebAssembly only.
impl SchemaEntrypoints for CEP2612Wrapper
Available on non-WebAssembly only.
Source§fn schema_entrypoints() -> Vec<Entrypoint>
fn schema_entrypoints() -> Vec<Entrypoint>
Returns a vector of Entrypoints.
Source§impl SchemaErrors for CEP2612Wrapper
Available on non-WebAssembly only.
impl SchemaErrors for CEP2612Wrapper
Available on non-WebAssembly only.
Source§impl SchemaEvents for CEP2612Wrapper
Available on non-WebAssembly only.
impl SchemaEvents for CEP2612Wrapper
Available on non-WebAssembly only.
Source§fn custom_types() -> Vec<Option<CustomType>>
fn custom_types() -> Vec<Option<CustomType>>
Returns a vector of CustomTypes. Read more
Auto Trait Implementations§
impl !Freeze for CEP2612Wrapper
impl !RefUnwindSafe for CEP2612Wrapper
impl !Send for CEP2612Wrapper
impl !Sync for CEP2612Wrapper
impl !UnwindSafe for CEP2612Wrapper
impl Unpin for CEP2612Wrapper
impl UnsafeUnpin for CEP2612Wrapper
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<R> Deployer<R> for Rwhere
R: OdraContract,
impl<R> Deployer<R> for Rwhere
R: OdraContract,
Source§fn deploy(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
) -> <R as OdraContract>::HostRef
fn deploy( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, ) -> <R as OdraContract>::HostRef
Deploys a contract with given init args. Read more
Source§fn try_deploy(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_deploy( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to deploy a contract with given init args. Read more
Source§fn deploy_with_cfg(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
cfg: InstallConfig,
) -> <R as OdraContract>::HostRef
fn deploy_with_cfg( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: InstallConfig, ) -> <R as OdraContract>::HostRef
Deploys a contract with given init args and configuration. Read more
Source§fn try_deploy_with_cfg(
env: &HostEnv,
init_args: <R as OdraContract>::InitArgs,
cfg: InstallConfig,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_deploy_with_cfg( env: &HostEnv, init_args: <R as OdraContract>::InitArgs, cfg: InstallConfig, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to deploy a contract with given init args and configuration. Read more
Source§fn try_upgrade(
env: &HostEnv,
contract_to_upgrade: Address,
upgrade_args: <R as OdraContract>::UpgradeArgs,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_upgrade( env: &HostEnv, contract_to_upgrade: Address, upgrade_args: <R as OdraContract>::UpgradeArgs, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to upgrade a contract with given init args.
Source§fn try_upgrade_with_cfg(
env: &HostEnv,
contract_to_upgrade: Address,
upgrade_args: <R as OdraContract>::UpgradeArgs,
cfg: UpgradeConfig,
) -> Result<<R as OdraContract>::HostRef, OdraError>
fn try_upgrade_with_cfg( env: &HostEnv, contract_to_upgrade: Address, upgrade_args: <R as OdraContract>::UpgradeArgs, cfg: UpgradeConfig, ) -> Result<<R as OdraContract>::HostRef, OdraError>
Tries to upgrade a contract with given init args and configuration
Source§impl<T> HostRefLoader<<T as OdraContract>::HostRef> for Twhere
T: OdraContract,
impl<T> HostRefLoader<<T as OdraContract>::HostRef> for Twhere
T: OdraContract,
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