Trait alloy_zksync::provider::ProviderBuilderExt
source · pub trait ProviderBuilderExt<L, F>: Sizedwhere
F: TxFiller<Zksync> + ProviderLayer<L::Provider, Zksync>,
L: ProviderLayer<AnvilZKsyncProvider<RootProvider<Zksync>>, Zksync>,{
// Required methods
fn on_anvil_zksync(self) -> F::Provider;
fn on_anvil_zksync_with_wallet(
self,
) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider;
fn on_anvil_zksync_with_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> F::Provider;
fn on_anvil_zksync_with_wallet_and_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider;
fn try_on_anvil_zksync_with_wallet_and_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> Result<<JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider, AnvilZKsyncError>;
}
Expand description
ZKsync-specific extensions for the ProviderBuilder
.
Required Methods§
sourcefn on_anvil_zksync(self) -> F::Provider
fn on_anvil_zksync(self) -> F::Provider
Build a provider that would spawn anvil-zksync
instance in background and will use it.
sourcefn on_anvil_zksync_with_wallet(
self,
) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider
fn on_anvil_zksync_with_wallet( self, ) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider
Same as on_anvil_zksync
, but also configures a wallet backed by anvil-zksync keys.
sourcefn on_anvil_zksync_with_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> F::Provider
fn on_anvil_zksync_with_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> F::Provider
Same as on_anvil_zksync
, allows to configure anvil-zksync
.
sourcefn on_anvil_zksync_with_wallet_and_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider
fn on_anvil_zksync_with_wallet_and_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider
Same as on_anvil_zksync_with_wallet
, allows to configure anvil-zksync
.
sourcefn try_on_anvil_zksync_with_wallet_and_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> Result<<JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider, AnvilZKsyncError>
fn try_on_anvil_zksync_with_wallet_and_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> Result<<JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider, AnvilZKsyncError>
Fallible version of on_anvil_zksync_with_wallet_and_config
.
Object Safety§
This trait is not object safe.
Implementations on Foreign Types§
source§impl<L, F> ProviderBuilderExt<L, F> for ProviderBuilder<L, F, Zksync>where
F: TxFiller<Zksync> + ProviderLayer<L::Provider, Zksync>,
L: ProviderLayer<AnvilZKsyncProvider<RootProvider<Zksync>>, Zksync>,
impl<L, F> ProviderBuilderExt<L, F> for ProviderBuilder<L, F, Zksync>where
F: TxFiller<Zksync> + ProviderLayer<L::Provider, Zksync>,
L: ProviderLayer<AnvilZKsyncProvider<RootProvider<Zksync>>, Zksync>,
source§fn try_on_anvil_zksync_with_wallet_and_config(
self,
f: impl FnOnce(AnvilZKsync) -> AnvilZKsync,
) -> Result<<JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider, AnvilZKsyncError>
fn try_on_anvil_zksync_with_wallet_and_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> Result<<JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider, AnvilZKsyncError>
Build this provider with anvil-zksync, using an Reqwest HTTP transport. The given function is used to configure the anvil-zksync instance. This function configures a wallet backed by anvil-zksync keys, and is intended for use in tests.