Struct zenith_types::Transactor::TransactorInstance
source · pub struct TransactorInstance<T, P, N = Ethereum> { /* private fields */ }Expand description
A Transactor instance.
Contains type-safe methods for interacting with an on-chain instance of the
Transactor 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> TransactorInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TransactorInstance<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 Transactor contract instance.
See the wrapper’s documentation for more details.
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> TransactorInstance<T, &P, N>
impl<T, P: Clone, N> TransactorInstance<T, &P, N>
sourcepub fn with_cloned_provider(self) -> TransactorInstance<T, P, N>
pub fn with_cloned_provider(self) -> TransactorInstance<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> TransactorInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TransactorInstance<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.
sourcepub fn configureGas(
&self,
perBlock: U256,
perTransact: U256,
) -> SolCallBuilder<T, &P, configureGasCall, N>
pub fn configureGas( &self, perBlock: U256, perTransact: U256, ) -> SolCallBuilder<T, &P, configureGasCall, N>
Creates a new call builder for the [configureGas] function.
sourcepub fn defaultRollupChainId(
&self,
) -> SolCallBuilder<T, &P, defaultRollupChainIdCall, N>
pub fn defaultRollupChainId( &self, ) -> SolCallBuilder<T, &P, defaultRollupChainIdCall, N>
Creates a new call builder for the [defaultRollupChainId] function.
sourcepub fn enterTransact(
&self,
rollupChainId: U256,
etherRecipient: Address,
to: Address,
data: Bytes,
value: U256,
gas: U256,
maxFeePerGas: U256,
) -> SolCallBuilder<T, &P, enterTransactCall, N>
pub fn enterTransact( &self, rollupChainId: U256, etherRecipient: Address, to: Address, data: Bytes, value: U256, gas: U256, maxFeePerGas: U256, ) -> SolCallBuilder<T, &P, enterTransactCall, N>
Creates a new call builder for the [enterTransact] function.
sourcepub fn gasAdmin(&self) -> SolCallBuilder<T, &P, gasAdminCall, N>
pub fn gasAdmin(&self) -> SolCallBuilder<T, &P, gasAdminCall, N>
Creates a new call builder for the [gasAdmin] function.
sourcepub fn passage(&self) -> SolCallBuilder<T, &P, passageCall, N>
pub fn passage(&self) -> SolCallBuilder<T, &P, passageCall, N>
Creates a new call builder for the [passage] function.
sourcepub fn perBlockGasLimit(&self) -> SolCallBuilder<T, &P, perBlockGasLimitCall, N>
pub fn perBlockGasLimit(&self) -> SolCallBuilder<T, &P, perBlockGasLimitCall, N>
Creates a new call builder for the [perBlockGasLimit] function.
sourcepub fn perTransactGasLimit(
&self,
) -> SolCallBuilder<T, &P, perTransactGasLimitCall, N>
pub fn perTransactGasLimit( &self, ) -> SolCallBuilder<T, &P, perTransactGasLimitCall, N>
Creates a new call builder for the [perTransactGasLimit] function.
sourcepub fn transact_0(
&self,
to: Address,
data: Bytes,
value: U256,
gas: U256,
maxFeePerGas: U256,
) -> SolCallBuilder<T, &P, transact_0Call, N>
pub fn transact_0( &self, to: Address, data: Bytes, value: U256, gas: U256, maxFeePerGas: U256, ) -> SolCallBuilder<T, &P, transact_0Call, N>
Creates a new call builder for the [transact_0] function.
sourcepub fn transact_1(
&self,
rollupChainId: U256,
to: Address,
data: Bytes,
value: U256,
gas: U256,
maxFeePerGas: U256,
) -> SolCallBuilder<T, &P, transact_1Call, N>
pub fn transact_1( &self, rollupChainId: U256, to: Address, data: Bytes, value: U256, gas: U256, maxFeePerGas: U256, ) -> SolCallBuilder<T, &P, transact_1Call, N>
Creates a new call builder for the [transact_1] function.
sourcepub fn transactGasUsed(
&self,
_0: U256,
_1: U256,
) -> SolCallBuilder<T, &P, transactGasUsedCall, N>
pub fn transactGasUsed( &self, _0: U256, _1: U256, ) -> SolCallBuilder<T, &P, transactGasUsedCall, N>
Creates a new call builder for the [transactGasUsed] function.
source§impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TransactorInstance<T, P, N>
impl<T: Transport + Clone, P: Provider<T, N>, N: Network> TransactorInstance<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.
sourcepub fn GasConfigured_filter(&self) -> Event<T, &P, GasConfigured, N>
pub fn GasConfigured_filter(&self) -> Event<T, &P, GasConfigured, N>
Creates a new event filter for the GasConfigured event.
Trait Implementations§
Auto Trait Implementations§
impl<T, P, N> Freeze for TransactorInstance<T, P, N>where
P: Freeze,
impl<T, P, N> RefUnwindSafe for TransactorInstance<T, P, N>
impl<T, P, N> Send for TransactorInstance<T, P, N>
impl<T, P, N> Sync for TransactorInstance<T, P, N>
impl<T, P, N> Unpin for TransactorInstance<T, P, N>
impl<T, P, N> UnwindSafe for TransactorInstance<T, P, N>
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
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<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