Trait alloy_zksync::provider::ProviderBuilderExt

source ·
pub trait ProviderBuilderExt<L, F>: Sized
where 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§

source

fn on_anvil_zksync(self) -> F::Provider

Build a provider that would spawn anvil-zksync instance in background and will use it.

source

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.

source

fn on_anvil_zksync_with_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> F::Provider

Same as on_anvil_zksync, allows to configure anvil-zksync.

source

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.

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>

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>,

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>

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.

source§

fn on_anvil_zksync(self) -> F::Provider

source§

fn on_anvil_zksync_with_wallet( self, ) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider

source§

fn on_anvil_zksync_with_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> F::Provider

source§

fn on_anvil_zksync_with_wallet_and_config( self, f: impl FnOnce(AnvilZKsync) -> AnvilZKsync, ) -> <JoinFill<F, WalletFiller<ZksyncWallet>> as ProviderLayer<L::Provider, Zksync>>::Provider

Implementors§