pub struct PodProviderBuilder<L, F>(/* private fields */);
Implementations§
Source§impl PodProviderBuilder<Identity, JoinFill<Identity, <PodNetwork as RecommendedFillers>::RecommendedFillers>>
impl PodProviderBuilder<Identity, JoinFill<Identity, <PodNetwork as RecommendedFillers>::RecommendedFillers>>
Sourcepub fn with_recommended_settings() -> Self
pub fn with_recommended_settings() -> Self
Create a PodProviderBuilder set up with recommended settings.
The builder can be used to build a Provider configured for the PodNetwork.
The returned builder has fillers preconfigured to automatically fill chain ID, nonce and gas price. Check PodNetwork::RecommendedFillers for details.
Source§impl<L, F> PodProviderBuilder<L, F>
impl<L, F> PodProviderBuilder<L, F>
Sourcepub async fn on_url<U: AsRef<str>>(
self,
url: U,
) -> Result<PodProvider, TransportError>where
L: ProviderLayer<RootProvider<PodNetwork>, PodNetwork>,
F: TxFiller<PodNetwork> + ProviderLayer<L::Provider, PodNetwork>,
F::Provider: 'static,
pub async fn on_url<U: AsRef<str>>(
self,
url: U,
) -> Result<PodProvider, TransportError>where
L: ProviderLayer<RootProvider<PodNetwork>, PodNetwork>,
F: TxFiller<PodNetwork> + ProviderLayer<L::Provider, PodNetwork>,
F::Provider: 'static,
Finish the layer stack by providing a url for connection,
outputting the final PodProvider
type with all stack
components.
Sourcepub fn wallet<W>(
self,
wallet: W,
) -> PodProviderBuilder<L, JoinFill<F, WalletFiller<W>>>where
W: NetworkWallet<PodNetwork>,
pub fn wallet<W>(
self,
wallet: W,
) -> PodProviderBuilder<L, JoinFill<F, WalletFiller<W>>>where
W: NetworkWallet<PodNetwork>,
Configure a wallet to be used for signing transactions and spending funds.
pub fn with_private_key( self, key: SigningKey, ) -> PodProviderBuilder<L, JoinFill<F, WalletFiller<EthereumWallet>>>
Sourcepub async fn from_env(self) -> Result<PodProvider>where
L: ProviderLayer<RootProvider<PodNetwork>, PodNetwork>,
F: TxFiller<PodNetwork> + ProviderLayer<L::Provider, PodNetwork> + 'static,
L::Provider: 'static,
pub async fn from_env(self) -> Result<PodProvider>where
L: ProviderLayer<RootProvider<PodNetwork>, PodNetwork>,
F: TxFiller<PodNetwork> + ProviderLayer<L::Provider, PodNetwork> + 'static,
L::Provider: 'static,
Create PodProvider by filling in signer key and RPC url from environment.
The following env variables need to be configured:
- POD_PRIVATE_KEY: hex-encoded ECDSA private key of the wallet owner
- POD_RPC_URL: URL for a pod RPC API (example: https://rpc.dev.pod.network) (default: ws://127.0.0.1:8545)
Trait Implementations§
Auto Trait Implementations§
impl<L, F> Freeze for PodProviderBuilder<L, F>
impl<L, F> RefUnwindSafe for PodProviderBuilder<L, F>where
L: RefUnwindSafe,
F: RefUnwindSafe,
impl<L, F> Send for PodProviderBuilder<L, F>
impl<L, F> Sync for PodProviderBuilder<L, F>
impl<L, F> Unpin for PodProviderBuilder<L, F>
impl<L, F> UnwindSafe for PodProviderBuilder<L, F>where
L: UnwindSafe,
F: UnwindSafe,
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
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