pub struct EventNumericsContractInstance<T, P, N = Ethereum> { /* private fields */ }
Expand description
A EventNumericsContract
instance.
Contains type-safe methods for interacting with an on-chain instance of the
EventNumericsContract
contract located at a given address
, using a given
provider P
.
If the contract bytecode is available (see the sol!
documentation on how to provide it), the deploy
and deploy_builder
methods can
be used to deploy a new instance of the contract.
See the module-level documentation for all the available methods.
Implementations§
source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
Instantiation and getters/setters.
sourcepub const fn new(address: Address, provider: P) -> Self
pub const fn new(address: Address, provider: P) -> Self
Creates a new wrapper around an on-chain EventNumericsContract
contract instance.
See the wrapper’s documentation for more details.
sourcepub async fn deploy(
provider: P,
initialSupply: U256,
) -> Result<EventNumericsContractInstance<T, P, N>>
pub async fn deploy( provider: P, initialSupply: U256, ) -> Result<EventNumericsContractInstance<T, P, N>>
Deploys this contract using the given provider
and constructor arguments, if any.
Returns a new instance of the contract, if the deployment was successful.
For more fine-grained control over the deployment process, use deploy_builder
instead.
sourcepub fn deploy_builder(
provider: P,
initialSupply: U256,
) -> RawCallBuilder<T, P, N>
pub fn deploy_builder( provider: P, initialSupply: U256, ) -> RawCallBuilder<T, P, N>
Creates a RawCallBuilder
for deploying this contract using the given provider
and constructor arguments, if any.
This is a simple wrapper around creating a RawCallBuilder
with the data set to
the bytecode concatenated with the constructor’s ABI-encoded arguments.
sourcepub fn set_address(&mut self, address: Address)
pub fn set_address(&mut self, address: Address)
Sets the address.
source§impl<T, P: Clone, N> EventNumericsContractInstance<T, &P, N>
impl<T, P: Clone, N> EventNumericsContractInstance<T, &P, N>
sourcepub fn with_cloned_provider(self) -> EventNumericsContractInstance<T, P, N>
pub fn with_cloned_provider(self) -> EventNumericsContractInstance<T, P, N>
Clones the provider and returns a new instance with the cloned provider.
source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
Function calls.
sourcepub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &P, C, N>
pub fn call_builder<C: SolCall>(&self, call: &C) -> SolCallBuilder<T, &P, C, N>
Creates a new call builder using this contract instance’s provider and address.
Note that the call can be any function call, not just those defined in this contract. Prefer using the other methods for building type-safe contract calls.
source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> EventNumericsContractInstance<T, P, N>
Event filters.
sourcepub fn event_filter<E: SolEvent>(&self) -> Event<T, &P, E, N>
pub fn event_filter<E: SolEvent>(&self) -> Event<T, &P, E, N>
Creates a new event filter using this contract instance’s provider and address.
Note that the type can be any event, not just those defined in this contract. Prefer using the other methods for building type-safe event filters.
Trait Implementations§
Auto Trait Implementations§
impl<T, P, N> Freeze for EventNumericsContractInstance<T, P, N>where
P: Freeze,
impl<T, P, N> RefUnwindSafe for EventNumericsContractInstance<T, P, N>
impl<T, P, N> Send for EventNumericsContractInstance<T, P, N>
impl<T, P, N> Sync for EventNumericsContractInstance<T, P, N>
impl<T, P, N> Unpin for EventNumericsContractInstance<T, P, N>
impl<T, P, N> UnwindSafe for EventNumericsContractInstance<T, P, N>
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
impl<Choices> CoproductSubsetter<CNil, HNil> for Choices
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
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 moresource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
source§impl<T> MockResults for T
impl<T> MockResults for T
§type Results = T
type Results = T
MockInstance
.source§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
impl<M, I> RuntimeMemory<&mut I> for Mwhere
M: RuntimeMemory<I>,
source§fn read<'instance>(
&self,
instance: &'instance &mut I,
location: GuestPointer,
length: u32,
) -> Result<Cow<'instance, [u8]>, RuntimeError>
fn read<'instance>( &self, instance: &'instance &mut I, location: GuestPointer, length: u32, ) -> Result<Cow<'instance, [u8]>, RuntimeError>
Reads length
bytes from memory from the provided location
.
source§fn write(
&mut self,
instance: &mut &mut I,
location: GuestPointer,
bytes: &[u8],
) -> Result<(), RuntimeError>
fn write( &mut self, instance: &mut &mut I, location: GuestPointer, bytes: &[u8], ) -> Result<(), RuntimeError>
Writes the bytes
to memory at the provided location
.