pub struct Provider<P> { /* private fields */ }Expand description
An abstract provider for interacting with the Ethereum JSON RPC
API. Must be instantiated
with a data transport which implements the JsonRpcClient trait
(e.g. HTTP, Websockets etc.)
Example
use ethers_providers::{Middleware, Provider, Http};
use std::convert::TryFrom;
let provider = Provider::<Http>::try_from(
"https://eth.llamarpc.com"
).expect("could not instantiate HTTP Provider");
let block = provider.get_block(100u64).await?;
println!("Got block: {}", serde_json::to_string(&block)?);Implementations§
source§impl<P> Provider<P>where
P: JsonRpcClient,
impl<P> Provider<P>where P: JsonRpcClient,
sourcepub async fn node_client(
&self
) -> impl Future<Output = Result<NodeClient, ProviderError>>
pub async fn node_client( &self ) -> impl Future<Output = Result<NodeClient, ProviderError>>
Returns the type of node we’re connected to, while also caching the value for use in other node-specific API calls, such as the get_block_receipts call.
sourcepub fn with_sender(self, address: impl Into<H160>) -> Provider<P>
pub fn with_sender(self, address: impl Into<H160>) -> Provider<P>
Set the default sender on the provider
sourcepub async fn request<T, R>(
&self,
method: &str,
params: T
) -> impl Future<Output = Result<R, ProviderError>>where
T: Debug + Serialize + Send + Sync,
R: Serialize + DeserializeOwned + Debug + Send,
pub async fn request<T, R>( &self, method: &str, params: T ) -> impl Future<Output = Result<R, ProviderError>>where T: Debug + Serialize + Send + Sync, R: Serialize + DeserializeOwned + Debug + Send,
Make an RPC request via the internal connection, and return the result.
sourcepub fn call_raw<'a>(&'a self, tx: &'a TypedTransaction) -> CallBuilder<'a, P> ⓘ
pub fn call_raw<'a>(&'a self, tx: &'a TypedTransaction) -> CallBuilder<'a, P> ⓘ
Analogous to Middleware::call, but returns a CallBuilder that can either be
.awaitd or used to override the parameters sent to eth_call.
See the call_raw::spoof for functions to construct state override parameters.
Note: this method does not send a transaction from your account
Example
let geth = Geth::new().spawn();
let provider = Provider::<Http>::try_from(geth.endpoint()).unwrap();
let adr1: Address = "0x6fC21092DA55B392b045eD78F4732bff3C580e2c".parse()?;
let adr2: Address = "0x295a70b2de5e3953354a6a8344e616ed314d7251".parse()?;
let pay_amt = parse_ether(1u64)?;
// Not enough ether to pay for the transaction
let tx = TransactionRequest::pay(adr2, pay_amt).from(adr1).into();
// override the sender's balance for the call
let mut state = spoof::balance(adr1, pay_amt * 2);
provider.call_raw(&tx).state(&state).await?;source§impl<P> Provider<P>where
P: JsonRpcClient,
impl<P> Provider<P>where P: JsonRpcClient,
sourcepub fn ens<T>(self, ens: T) -> Provider<P>where
T: Into<H160>,
pub fn ens<T>(self, ens: T) -> Provider<P>where T: Into<H160>,
Sets the ENS Address (default: mainnet)
sourcepub fn set_interval<T>(&mut self, interval: T) -> &mut Provider<P>where
T: Into<Duration>,
pub fn set_interval<T>(&mut self, interval: T) -> &mut Provider<P>where T: Into<Duration>,
Sets the default polling interval for event filters and pending transactions (default: 7 seconds)
sourcepub fn interval<T>(self, interval: T) -> Provider<P>where
T: Into<Duration>,
pub fn interval<T>(self, interval: T) -> Provider<P>where T: Into<Duration>,
Sets the default polling interval for event filters and pending transactions (default: 7 seconds)
sourcepub fn get_interval(&self) -> Duration
pub fn get_interval(&self) -> Duration
Gets the polling interval which the provider currently uses for event filters and pending transactions (default: 7 seconds)
source§impl Provider<Ipc>
impl Provider<Ipc>
sourcepub async fn connect_ipc(
path: impl AsRef<Path>
) -> impl Future<Output = Result<Provider<Ipc>, ProviderError>>
pub async fn connect_ipc( path: impl AsRef<Path> ) -> impl Future<Output = Result<Provider<Ipc>, ProviderError>>
Connects to the Unix socket at the provided path.
source§impl<Read, Write> Provider<RwClient<Read, Write>>where
Read: JsonRpcClient + 'static,
<Read as JsonRpcClient>::Error: Sync + Send + 'static,
Write: JsonRpcClient + 'static,
<Write as JsonRpcClient>::Error: Sync + Send + 'static,
impl<Read, Write> Provider<RwClient<Read, Write>>where Read: JsonRpcClient + 'static, <Read as JsonRpcClient>::Error: Sync + Send + 'static, Write: JsonRpcClient + 'static, <Write as JsonRpcClient>::Error: Sync + Send + 'static,
source§impl<T> Provider<QuorumProvider<T>>where
T: JsonRpcClientWrapper,
impl<T> Provider<QuorumProvider<T>>where T: JsonRpcClientWrapper,
sourcepub fn quorum(inner: QuorumProvider<T>) -> Provider<QuorumProvider<T>>
pub fn quorum(inner: QuorumProvider<T>) -> Provider<QuorumProvider<T>>
Provider that uses a quorum
source§impl Provider<MockProvider>
impl Provider<MockProvider>
sourcepub fn mocked() -> (Provider<MockProvider>, MockProvider)
pub fn mocked() -> (Provider<MockProvider>, MockProvider)
Returns a Provider instantiated with an internal “mock” transport.
Example
use ethers_core::types::U64;
use ethers_providers::{Middleware, Provider};
// Instantiate the provider
let (provider, mock) = Provider::mocked();
// Push the mock response
mock.push(U64::from(12))?;
// Make the call
let blk = provider.get_block_number().await.unwrap();
// The response matches
assert_eq!(blk.as_u64(), 12);
// and the request as well!
mock.assert_request("eth_blockNumber", ()).unwrap();source§impl Provider<RetryClient<Provider>>
impl Provider<RetryClient<Provider>>
sourcepub fn new_client(
src: &str,
max_retry: u32,
initial_backoff: u64
) -> Result<Provider<RetryClient<Provider>>, ParseError>
pub fn new_client( src: &str, max_retry: u32, initial_backoff: u64 ) -> Result<Provider<RetryClient<Provider>>, ParseError>
Create a new RetryClient by connecting to the provided URL. Errors
if src is not a valid URL
source§impl Provider<Ws>
impl Provider<Ws>
sourcepub async fn connect(
url: impl IntoClientRequest + Unpin
) -> impl Future<Output = Result<Provider<Ws>, ProviderError>>
pub async fn connect( url: impl IntoClientRequest + Unpin ) -> impl Future<Output = Result<Provider<Ws>, ProviderError>>
Direct connection to a websocket endpoint
sourcepub async fn connect_with_auth(
url: impl IntoClientRequest + Unpin,
auth: Authorization
) -> impl Future<Output = Result<Provider<Ws>, ProviderError>>
pub async fn connect_with_auth( url: impl IntoClientRequest + Unpin, auth: Authorization ) -> impl Future<Output = Result<Provider<Ws>, ProviderError>>
Connect to a WS RPC provider with authentication details
Trait Implementations§
source§impl<P> Middleware for Provider<P>where
P: JsonRpcClient,
impl<P> Middleware for Provider<P>where P: JsonRpcClient,
source§fn sign_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
_tx: &'life1 TypedTransaction,
_from: H160
) -> Pin<Box<dyn Future<Output = Result<Signature, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn sign_transaction<'life0, 'life1, 'async_trait>( &'life0 self, _tx: &'life1 TypedTransaction, _from: H160 ) -> Pin<Box<dyn Future<Output = Result<Signature, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
Sign a transaction via RPC call
source§fn watch_pending_transactions<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
Streams pending transactions
source§fn mining<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
Returns an indication if this node is currently mining.
§type Error = ProviderError
type Error = ProviderError
source§fn inner(&self) -> &<Provider<P> as Middleware>::Inner
fn inner(&self) -> &<Provider<P> as Middleware>::Inner
source§fn provider(&self) -> &Provider<<Provider<P> as Middleware>::Provider>
fn provider(&self) -> &Provider<<Provider<P> as Middleware>::Provider>
source§fn convert_err(p: ProviderError) -> <Provider<P> as Middleware>::Error
fn convert_err(p: ProviderError) -> <Provider<P> as Middleware>::Error
source§fn default_sender(&self) -> Option<H160>
fn default_sender(&self) -> Option<H160>
source§fn client_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn client_version<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
web3_clientVersion RPC.source§fn fill_transaction<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 mut TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn fill_transaction<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 mut TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
source§fn get_block_number<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U64, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn get_block_number<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U64, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn get_block<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockId> + Send + Sync,
Provider<P>: 'async_trait,
fn get_block<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Provider<P>: 'async_trait,
block_hash_or_number (transaction hashes only)source§fn get_block_with_txs<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockId> + Send + Sync,
Provider<P>: 'async_trait,
fn get_block_with_txs<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<Option<Block<Transaction>>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Provider<P>: 'async_trait,
block_hash_or_number (full transactions included)source§fn get_uncle_count<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T
) -> Pin<Box<dyn Future<Output = Result<U256, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockId> + Send + Sync,
Provider<P>: 'async_trait,
fn get_uncle_count<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T ) -> Pin<Box<dyn Future<Output = Result<U256, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Provider<P>: 'async_trait,
block_hash_or_numbersource§fn get_uncle<'life0, 'async_trait, T>(
&'life0 self,
block_hash_or_number: T,
idx: U64
) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockId> + Send + Sync,
Provider<P>: 'async_trait,
fn get_uncle<'life0, 'async_trait, T>( &'life0 self, block_hash_or_number: T, idx: U64 ) -> Pin<Box<dyn Future<Output = Result<Option<Block<H256>>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Provider<P>: 'async_trait,
block_hash_or_number and idxsource§fn get_transaction<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Send + Sync + Into<H256>,
Provider<P>: 'async_trait,
fn get_transaction<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T ) -> Pin<Box<dyn Future<Output = Result<Option<Transaction>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Send + Sync + Into<H256>, Provider<P>: 'async_trait,
transaction_hashsource§fn get_transaction_receipt<'life0, 'async_trait, T>(
&'life0 self,
transaction_hash: T
) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Send + Sync + Into<H256>,
Provider<P>: 'async_trait,
fn get_transaction_receipt<'life0, 'async_trait, T>( &'life0 self, transaction_hash: T ) -> Pin<Box<dyn Future<Output = Result<Option<TransactionReceipt>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Send + Sync + Into<H256>, Provider<P>: 'async_trait,
transaction_hashsource§fn get_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Provider<P>: 'async_trait,
fn get_block_receipts<'life0, 'async_trait, T>( &'life0 self, block: T ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockNumber> + Send + Sync, Provider<P>: 'async_trait,
source§fn parity_block_receipts<'life0, 'async_trait, T>(
&'life0 self,
block: T
) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockNumber> + Send + Sync,
Provider<P>: 'async_trait,
fn parity_block_receipts<'life0, 'async_trait, T>( &'life0 self, block: T ) -> Pin<Box<dyn Future<Output = Result<Vec<TransactionReceipt, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockNumber> + Send + Sync, Provider<P>: 'async_trait,
source§fn get_gas_price<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn get_gas_price<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn estimate_eip1559_fees<'life0, 'async_trait>(
&'life0 self,
estimator: Option<fn(_: U256, _: Vec<Vec<U256, Global>, Global>) -> (U256, U256)>
) -> Pin<Box<dyn Future<Output = Result<(U256, U256), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<fn(_: U256, _: Vec<Vec<U256, Global>, Global>) -> (U256, U256)> ) -> Pin<Box<dyn Future<Output = Result<(U256, U256), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn get_accounts<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<H160, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn get_accounts<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<H160, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn get_transaction_count<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Provider<P>: 'async_trait,
fn get_transaction_count<'life0, 'async_trait, T>( &'life0 self, from: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Provider<P>: 'async_trait,
source§fn get_balance<'life0, 'async_trait, T>(
&'life0 self,
from: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Provider<P>: 'async_trait,
fn get_balance<'life0, 'async_trait, T>( &'life0 self, from: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Provider<P>: 'async_trait,
source§fn get_chainid<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn get_chainid<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn syncing<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn syncing<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<SyncingStatus, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn get_net_version<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn get_net_version<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn call<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn call<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
source§fn estimate_gas<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn estimate_gas<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<U256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
source§fn create_access_list<'life0, 'life1, 'async_trait>(
&'life0 self,
tx: &'life1 TypedTransaction,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn create_access_list<'life0, 'life1, 'async_trait>( &'life0 self, tx: &'life1 TypedTransaction, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<AccessListWithGasUsed, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
source§fn send_transaction<'life0, 'async_trait, T>(
&'life0 self,
tx: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'life0, P>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Provider<P>: 'async_trait,
fn send_transaction<'life0, 'async_trait, T>( &'life0 self, tx: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'life0, P>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Provider<P>: 'async_trait,
source§fn send_raw_transaction<'a, 'async_trait>(
&'a self,
tx: Bytes
) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, P>, ProviderError>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
Provider<P>: 'async_trait,
fn send_raw_transaction<'a, 'async_trait>( &'a self, tx: Bytes ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction<'a, P>, ProviderError>> + Send + 'async_trait, Global>>where 'a: 'async_trait, Provider<P>: 'async_trait,
source§fn is_signer<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn is_signer<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
SignerMiddleware, or the
JSON-RPC provider has an unlocked key that can sign using the eth_sign call. If none of
the above conditions are met, then the middleware stack is not capable of signing data.source§fn sign<'life0, 'life1, 'async_trait, T>(
&'life0 self,
data: T,
from: &'life1 H160
) -> Pin<Box<dyn Future<Output = Result<Signature, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + Into<Bytes> + Send + Sync,
Provider<P>: 'async_trait,
fn sign<'life0, 'life1, 'async_trait, T>( &'life0 self, data: T, from: &'life1 H160 ) -> Pin<Box<dyn Future<Output = Result<Signature, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, T: 'async_trait + Into<Bytes> + Send + Sync, Provider<P>: 'async_trait,
SignerMiddlewaresource§fn get_logs<'life0, 'life1, 'async_trait>(
&'life0 self,
filter: &'life1 Filter
) -> Pin<Box<dyn Future<Output = Result<Vec<Log, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter ) -> Pin<Box<dyn Future<Output = Result<Vec<Log, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
source§fn get_logs_paginated<'a>(
&'a self,
filter: &Filter,
page_size: u64
) -> LogQuery<'a, P>
fn get_logs_paginated<'a>( &'a self, filter: &Filter, page_size: u64 ) -> LogQuery<'a, P>
source§fn watch<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, P, Log>, ProviderError>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn watch<'a, 'life0, 'async_trait>( &'a self, filter: &'life0 Filter ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'a, P, Log>, ProviderError>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn watch_blocks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn watch_blocks<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<FilterWatcher<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn get_storage_at<'life0, 'async_trait, T>(
&'life0 self,
from: T,
location: H256,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Provider<P>: 'async_trait,
fn get_storage_at<'life0, 'async_trait, T>( &'life0 self, from: T, location: H256, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<H256, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Provider<P>: 'async_trait,
source§fn get_code<'life0, 'async_trait, T>(
&'life0 self,
at: T,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Provider<P>: 'async_trait,
fn get_code<'life0, 'async_trait, T>( &'life0 self, at: T, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<Bytes, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Provider<P>: 'async_trait,
source§fn get_proof<'life0, 'async_trait, T>(
&'life0 self,
from: T,
locations: Vec<H256, Global>,
block: Option<BlockId>
) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<NameOrAddress> + Send + Sync,
Provider<P>: 'async_trait,
fn get_proof<'life0, 'async_trait, T>( &'life0 self, from: T, locations: Vec<H256, Global>, block: Option<BlockId> ) -> Pin<Box<dyn Future<Output = Result<EIP1186ProofResponse, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<NameOrAddress> + Send + Sync, Provider<P>: 'async_trait,
source§fn import_raw_key<'life0, 'async_trait>(
&'life0 self,
private_key: Bytes,
passphrase: String
) -> Pin<Box<dyn Future<Output = Result<H160, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn import_raw_key<'life0, 'async_trait>( &'life0 self, private_key: Bytes, passphrase: String ) -> Pin<Box<dyn Future<Output = Result<H160, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn unlock_account<'life0, 'async_trait, T>(
&'life0 self,
account: T,
passphrase: String,
duration: Option<u64>
) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<H160> + Send + Sync,
Provider<P>: 'async_trait,
fn unlock_account<'life0, 'async_trait, T>( &'life0 self, account: T, passphrase: String, duration: Option<u64> ) -> Pin<Box<dyn Future<Output = Result<bool, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<H160> + Send + Sync, Provider<P>: 'async_trait,
source§fn add_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String
) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn add_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn add_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String
) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn add_trusted_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn node_info<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<NodeInfo, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn node_info<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<NodeInfo, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
eth, snap).source§fn peers<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn peers<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<Vec<PeerInfo, Global>, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn remove_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String
) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn remove_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn remove_trusted_peer<'life0, 'async_trait>(
&'life0 self,
enode_url: String
) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn remove_trusted_peer<'life0, 'async_trait>( &'life0 self, enode_url: String ) -> Pin<Box<dyn Future<Output = Result<bool, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
true does not necessarily mean that the
peer was disconnected.source§fn start_mining<'life0, 'async_trait>(
&'life0 self,
threads: Option<usize>
) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn start_mining<'life0, 'async_trait>( &'life0 self, threads: Option<usize> ) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn stop_mining<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn stop_mining<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<(), <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn resolve_name<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<H160, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn resolve_name<'life0, 'life1, 'async_trait>( &'life0 self, ens_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<H160, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
ens_name resolves to (or None if not configured). Read moresource§fn lookup_address<'life0, 'async_trait>(
&'life0 self,
address: H160
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn lookup_address<'life0, 'async_trait>( &'life0 self, address: H160 ) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
address resolves to (or None if not configured). Read moresource§fn resolve_avatar<'life0, 'life1, 'async_trait>(
&'life0 self,
ens_name: &'life1 str
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
Provider<P>: 'async_trait,
fn resolve_avatar<'life0, 'life1, 'async_trait>( &'life0 self, ens_name: &'life1 str ) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, Provider<P>: 'async_trait,
ens_name resolves to (or None
if not configured) Read moresource§fn resolve_nft<'life0, 'async_trait>(
&'life0 self,
token: ERCNFT
) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn resolve_nft<'life0, 'async_trait>( &'life0 self, token: ERCNFT ) -> Pin<Box<dyn Future<Output = Result<Url, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn resolve_field<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
ens_name: &'life1 str,
field: &'life2 str
) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Provider<P>: 'async_trait,
fn resolve_field<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ens_name: &'life1 str, field: &'life2 str ) -> Pin<Box<dyn Future<Output = Result<String, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, Provider<P>: 'async_trait,
ens_name (no None if not configured). Read moresource§fn txpool_content<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn txpool_content<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolContent, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn txpool_inspect<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn txpool_inspect<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolInspect, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn txpool_status<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn txpool_status<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<TxpoolStatus, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn debug_trace_transaction<'life0, 'async_trait>(
&'life0 self,
tx_hash: H256,
trace_options: GethDebugTracingOptions
) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn debug_trace_transaction<'life0, 'async_trait>( &'life0 self, tx_hash: H256, trace_options: GethDebugTracingOptions ) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn debug_trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
block: Option<BlockId>,
trace_options: GethDebugTracingCallOptions
) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Provider<P>: 'async_trait,
fn debug_trace_call<'life0, 'async_trait, T>( &'life0 self, req: T, block: Option<BlockId>, trace_options: GethDebugTracingCallOptions ) -> Pin<Box<dyn Future<Output = Result<GethTrace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Provider<P>: 'async_trait,
source§fn trace_call<'life0, 'async_trait, T>(
&'life0 self,
req: T,
trace_type: Vec<TraceType, Global>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Provider<P>: 'async_trait,
fn trace_call<'life0, 'async_trait, T>( &'life0 self, req: T, trace_type: Vec<TraceType, Global>, block: Option<BlockNumber> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Provider<P>: 'async_trait,
source§fn trace_call_many<'life0, 'async_trait, T>(
&'life0 self,
req: Vec<(T, Vec<TraceType, Global>), Global>,
block: Option<BlockNumber>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<TypedTransaction> + Send + Sync,
Provider<P>: 'async_trait,
fn trace_call_many<'life0, 'async_trait, T>( &'life0 self, req: Vec<(T, Vec<TraceType, Global>), Global>, block: Option<BlockNumber> ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<TypedTransaction> + Send + Sync, Provider<P>: 'async_trait,
source§fn trace_raw_transaction<'life0, 'async_trait>(
&'life0 self,
data: Bytes,
trace_type: Vec<TraceType, Global>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_raw_transaction<'life0, 'async_trait>( &'life0 self, data: Bytes, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
eth_sendRawTransaction without making the call, returning the tracessource§fn trace_replay_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256,
trace_type: Vec<TraceType, Global>
) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_replay_transaction<'life0, 'async_trait>( &'life0 self, hash: H256, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<BlockTrace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn trace_replay_block_transactions<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber,
trace_type: Vec<TraceType, Global>
) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_replay_block_transactions<'life0, 'async_trait>( &'life0 self, block: BlockNumber, trace_type: Vec<TraceType, Global> ) -> Pin<Box<dyn Future<Output = Result<Vec<BlockTrace, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn trace_block<'life0, 'async_trait>(
&'life0 self,
block: BlockNumber
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_block<'life0, 'async_trait>( &'life0 self, block: BlockNumber ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn trace_filter<'life0, 'async_trait>(
&'life0 self,
filter: TraceFilter
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_filter<'life0, 'async_trait>( &'life0 self, filter: TraceFilter ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn trace_get<'life0, 'async_trait, T>(
&'life0 self,
hash: H256,
index: Vec<T, Global>
) -> Pin<Box<dyn Future<Output = Result<Trace, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<U64> + Send + Sync,
Provider<P>: 'async_trait,
fn trace_get<'life0, 'async_trait, T>( &'life0 self, hash: H256, index: Vec<T, Global> ) -> Pin<Box<dyn Future<Output = Result<Trace, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<U64> + Send + Sync, Provider<P>: 'async_trait,
source§fn trace_transaction<'life0, 'async_trait>(
&'life0 self,
hash: H256
) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<P>: 'async_trait,
fn trace_transaction<'life0, 'async_trait>( &'life0 self, hash: H256 ) -> Pin<Box<dyn Future<Output = Result<Vec<Trace, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<P>: 'async_trait,
source§fn subscribe_blocks<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, P, Block<H256>>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
P: PubsubClient,
Provider<P>: 'async_trait,
fn subscribe_blocks<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, P, Block<H256>>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, P: PubsubClient, Provider<P>: 'async_trait,
source§fn subscribe_pending_txs<'life0, 'async_trait>(
&'life0 self
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
P: PubsubClient,
Provider<P>: 'async_trait,
fn subscribe_pending_txs<'life0, 'async_trait>( &'life0 self ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'life0, P, H256>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, P: PubsubClient, Provider<P>: 'async_trait,
source§fn subscribe_logs<'a, 'life0, 'async_trait>(
&'a self,
filter: &'life0 Filter
) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, P, Log>, ProviderError>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
'life0: 'async_trait,
P: PubsubClient,
Provider<P>: 'async_trait,
fn subscribe_logs<'a, 'life0, 'async_trait>( &'a self, filter: &'life0 Filter ) -> Pin<Box<dyn Future<Output = Result<SubscriptionStream<'a, P, Log>, ProviderError>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'life0: 'async_trait, P: PubsubClient, Provider<P>: 'async_trait,
source§fn fee_history<'life0, 'life1, 'async_trait, T>(
&'life0 self,
block_count: T,
last_block: BlockNumber,
reward_percentiles: &'life1 [f64]
) -> Pin<Box<dyn Future<Output = Result<FeeHistory, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
'life1: 'async_trait,
T: 'async_trait + Into<U256> + Send + Sync,
Provider<P>: 'async_trait,
fn fee_history<'life0, 'life1, 'async_trait, T>( &'life0 self, block_count: T, last_block: BlockNumber, reward_percentiles: &'life1 [f64] ) -> Pin<Box<dyn Future<Output = Result<FeeHistory, <Provider<P> as Middleware>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, 'life1: 'async_trait, T: 'async_trait + Into<U256> + Send + Sync, Provider<P>: 'async_trait,
FeeHistory object. This objct contains
information about the EIP-1559 base fee in past blocks, as well as gas
utilization within those blocks. Read moresource§fn send_escalating<'a, 'life0, 'async_trait>(
&'a self,
tx: &'life0 TypedTransaction,
escalations: usize,
policy: Box<dyn Fn(U256, usize) -> U256 + Send + Sync + 'static, Global>
) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, Self::Provider>, Self::Error>> + Send + 'async_trait, Global>>where
'a: 'async_trait,
'life0: 'async_trait,
Self: 'async_trait,
fn send_escalating<'a, 'life0, 'async_trait>( &'a self, tx: &'life0 TypedTransaction, escalations: usize, policy: Box<dyn Fn(U256, usize) -> U256 + Send + Sync + 'static, Global> ) -> Pin<Box<dyn Future<Output = Result<EscalatingPending<'a, Self::Provider>, Self::Error>> + Send + 'async_trait, Global>>where 'a: 'async_trait, 'life0: 'async_trait, Self: 'async_trait,
source§impl ProviderExt for Provider<Provider>
impl ProviderExt for Provider<Provider>
§type Error = ParseError
type Error = ParseError
source§fn try_connect<'life0, 'async_trait>(
url: &'life0 str
) -> Pin<Box<dyn Future<Output = Result<Provider<Provider>, <Provider<Provider> as ProviderExt>::Error>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
Provider<Provider>: Sized + 'async_trait,
fn try_connect<'life0, 'async_trait>( url: &'life0 str ) -> Pin<Box<dyn Future<Output = Result<Provider<Provider>, <Provider<Provider> as ProviderExt>::Error>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, Provider<Provider>: Sized + 'async_trait,
Providersource§fn set_chain(&mut self, chain: impl Into<Chain>) -> &mut Provider<Provider>
fn set_chain(&mut self, chain: impl Into<Chain>) -> &mut Provider<Provider>
Provider settings for chainAuto Trait Implementations§
impl<P> !RefUnwindSafe for Provider<P>
impl<P> Send for Provider<P>where P: Send,
impl<P> Sync for Provider<P>where P: Sync,
impl<P> Unpin for Provider<P>where P: Unpin,
impl<P> !UnwindSafe for Provider<P>
Blanket Implementations§
§impl<T, U> AsByteSlice<T> for Uwhere
T: ToByteSlice,
U: AsRef<[T]> + ?Sized,
impl<T, U> AsByteSlice<T> for Uwhere T: ToByteSlice, U: AsRef<[T]> + ?Sized,
fn as_byte_slice(&self) -> &[u8] ⓘ
§impl<U> AsSliceOf for Uwhere
U: AsRef<[u8]> + ?Sized,
impl<U> AsSliceOf for Uwhere U: AsRef<[u8]> + ?Sized,
fn as_slice_of<T>(&self) -> Result<&[T], Error>where T: FromByteSlice,
§impl<T> Base32Len for Twhere
T: AsRef<[u8]>,
impl<T> Base32Len for Twhere T: AsRef<[u8]>,
§fn base32_len(&self) -> usize
fn base32_len(&self) -> usize
source§impl<T> CeloMiddleware for Twhere
T: Middleware,
impl<T> CeloMiddleware for Twhere T: Middleware,
source§fn get_validators_bls_public_keys<'life0, 'async_trait, T>(
&'life0 self,
block_id: T
) -> Pin<Box<dyn Future<Output = Result<Vec<String, Global>, ProviderError>> + Send + 'async_trait, Global>>where
'life0: 'async_trait,
T: 'async_trait + Into<BlockId> + Send + Sync,
Self: Sync + 'async_trait,
fn get_validators_bls_public_keys<'life0, 'async_trait, T>( &'life0 self, block_id: T ) -> Pin<Box<dyn Future<Output = Result<Vec<String, Global>, ProviderError>> + Send + 'async_trait, Global>>where 'life0: 'async_trait, T: 'async_trait + Into<BlockId> + Send + Sync, Self: Sync + 'async_trait,
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> 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<M> MiddlewareBuilder for Mwhere
M: Middleware + 'static,
impl<M> MiddlewareBuilder for Mwhere M: Middleware + 'static,
source§fn wrap_into<F, T>(self, f: F) -> Twhere
F: FnOnce(Self) -> T,
T: Middleware,
fn wrap_into<F, T>(self, f: F) -> Twhere F: FnOnce(Self) -> T, T: Middleware,
source§fn with_signer<S>(self, s: S) -> SignerMiddleware<Self, S>where
S: Signer,
fn with_signer<S>(self, s: S) -> SignerMiddleware<Self, S>where S: Signer,
source§fn nonce_manager(self, address: H160) -> NonceManagerMiddleware<Self>
fn nonce_manager(self, address: H160) -> NonceManagerMiddleware<Self>
source§fn gas_oracle<G>(self, gas_oracle: G) -> GasOracleMiddleware<Self, G>where
G: GasOracle,
fn gas_oracle<G>(self, gas_oracle: G) -> GasOracleMiddleware<Self, G>where G: GasOracle,
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T> ToHex for Twhere
T: AsRef<[u8]>,
impl<T> ToHex for Twhere T: AsRef<[u8]>,
source§fn encode_hex<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex<U>(&self) -> Uwhere U: FromIterator<char>,
self into the result. Lower case
letters are used (e.g. f9b4ca)source§fn encode_hex_upper<U>(&self) -> Uwhere
U: FromIterator<char>,
fn encode_hex_upper<U>(&self) -> Uwhere U: FromIterator<char>,
self into the result. Upper case
letters are used (e.g. F9B4CA)