alloy_provider

Trait Provider

source
pub trait Provider<T: Transport + Clone = BoxTransport, N: Network = Ethereum>: Send + Sync {
Show 62 methods // Required method fn root(&self) -> &RootProvider<T, N>; // Provided methods fn builder() -> ProviderBuilder<Identity, Identity, N> where Self: Sized { ... } fn client(&self) -> ClientRef<'_, T> { ... } fn weak_client(&self) -> WeakClient<T> { ... } fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>> { ... } fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128> { ... } fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber> { ... } fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes> { ... } fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>> { ... } fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64> { ... } fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult> { ... } fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64> { ... } fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128> { ... } fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account> { ... } fn get_balance( &self, address: Address, ) -> RpcWithBlock<T, Address, U256, U256> { ... } fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>> { ... } fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes> { ... } fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_filter_changes<'life0, 'async_trait, R>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<R>>> + Send + 'async_trait>> where Self: Sized + 'async_trait, R: 'async_trait + RpcReturn, 'life0: 'async_trait { ... } fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse> { ... } fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue> { ... } fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>> { ... } fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>> { ... } fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>> { ... } fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>> { ... } fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>> { ... } fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>> { ... } fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64> { ... } fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>> { ... } fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn get_max_priority_fee_per_gas( &self, ) -> ProviderCall<T, NoParams, U128, u128> { ... } fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn subscribe<'life0, 'async_trait, P, R>( &'life0 self, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<R>>> + Send + 'async_trait>> where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait { ... } fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait { ... } fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus> { ... } fn get_client_version(&self) -> ProviderCall<T, NoParams, String> { ... } fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256> { ... } fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64> { ... } fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>> where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait { ... } fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait { ... } fn transaction_request(&self) -> N::TransactionRequest { ... }
}
Expand description

Provider is parameterized with a network and a transport. The default transport is type-erased, but you can do Provider<Http, N>.

§Subscriptions

IMPORTANT: this is currently only available when T is PubSubFrontend or BoxedClient over PubSubFrontend due to an internal limitation. This means that layering transports will always disable subscription support. See issue #296.

The provider supports pubsub subscriptions to new block headers and pending transactions. This is only available on pubsub clients, such as Websockets or IPC.

For a polling alternatives available over HTTP, use the watch_* methods. However, be aware that polling increases RPC usage drastically.

§Special treatment of EIP-1559

While many RPC features are encapsulated by traits like DebugApi, EIP-1559 fee estimation is generally assumed to be on by default. We generally assume that EIP-1559 is supported by the client and will proactively use it by default.

As a result, the provider supports EIP-1559 fee estimation the ethereum TransactionBuilder will use it by default. We acknowledge that this means EIP-1559 has a privileged status in comparison to other transaction types. Networks that DO NOT support EIP-1559 should create their own TransactionBuilder and Fillers to change this behavior.

Required Methods§

source

fn root(&self) -> &RootProvider<T, N>

Returns the root provider.

Provided Methods§

source

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

Returns the ProviderBuilder to build on.

source

fn client(&self) -> ClientRef<'_, T>

Returns the RPC client used to send requests.

NOTE: this method should not be overridden.

source

fn weak_client(&self) -> WeakClient<T>

Returns a Weak RPC client used to send requests.

NOTE: this method should not be overridden.

source

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

Gets the accounts in the remote node. This is usually empty unless you’re using a local node.

source

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

Returns the base fee per blob gas (blob gas price) in wei.

source

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

Get the last block number available.

source

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

Execute a smart contract call with a transaction request and state overrides, without publishing a transaction.

This function returns EthCall which can be used to execute the call, or to add StateOverride or a BlockId. If no overrides or block ID is provided, the call will be executed on the latest block with the current state.

§Example
// Execute a call on the latest block, with no state overrides
let output = provider.call(&tx).await?;
source

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

Executes an arbitrary number of transactions on top of the requested state.

The transactions are packed into individual blocks. Overrides can be provided.

source

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

Gets the chain ID.

source

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

Create an EIP-2930 access list.

source

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

This function returns an EthCall which can be used to get a gas estimate, or to add StateOverride or a BlockId. If no overrides or block ID is provided, the gas estimate will be computed for the latest block with the current state.

§Note

Not all client implementations support state overrides for eth_estimateGas.

source

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Estimates the EIP1559 maxFeePerGas and maxPriorityFeePerGas fields.

Receives an optional EstimatorFunction that can be used to modify how to estimate these fees.

source

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Returns a collection of historical gas information FeeHistory which can be used to calculate the EIP1559 fields maxFeePerGas and maxPriorityFeePerGas. block_count can range from 1 to 1024 blocks in a single request.

source

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

Gets the current gas price in wei.

source

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

Retrieves account information (Account) for the given Address at the particular BlockId.

source

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

Gets the balance of the account.

Defaults to the latest block. See also RpcWithBlock::block_id.

source

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a block by either its hash, tag, or number, with full transactions or only hashes.

source

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets a block by its BlockHash, with full transactions or only hashes.

source

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a block by its number.

source

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

Gets the selected block BlockId receipts.

source

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

Gets the bytecode located at the corresponding Address.

source

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Watch for new blocks by polling the provider with eth_getFilterChanges.

Returns a builder that is used to configure the poller. See PollerBuilder for more details.

§Examples

Get the next 5 blocks:

use futures::StreamExt;

let poller = provider.watch_blocks().await?;
let mut stream = poller.into_stream().flat_map(futures::stream::iter).take(5);
while let Some(block_hash) = stream.next().await {
   println!("new block: {block_hash}");
}
source

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Watch for new pending transaction by polling the provider with eth_getFilterChanges.

Returns a builder that is used to configure the poller. See PollerBuilder for more details.

§Examples

Get the next 5 pending transaction hashes:

use futures::StreamExt;

let poller = provider.watch_pending_transactions().await?;
let mut stream = poller.into_stream().flat_map(futures::stream::iter).take(5);
while let Some(tx_hash) = stream.next().await {
   println!("new pending transaction hash: {tx_hash}");
}
source

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Watch for new logs using the given filter by polling the provider with eth_getFilterChanges.

Returns a builder that is used to configure the poller. See PollerBuilder for more details.

§Examples

Get the next 5 USDC transfer logs:

use alloy_primitives::{address, b256};
use alloy_rpc_types_eth::Filter;
use futures::StreamExt;

let address = address!("a0b86991c6218b36c1d19d4a2e9eb0ce3606eb48");
let transfer_signature = b256!("ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef");
let filter = Filter::new().address(address).event_signature(transfer_signature);

let poller = provider.watch_logs(&filter).await?;
let mut stream = poller.into_stream().flat_map(futures::stream::iter).take(5);
while let Some(log) = stream.next().await {
   println!("new log: {log:#?}");
}
source

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Watch for new pending transaction bodies by polling the provider with eth_getFilterChanges.

Returns a builder that is used to configure the poller. See PollerBuilder for more details.

§Support

This endpoint might not be supported by all clients.

§Examples

Get the next 5 pending transaction bodies:

use futures::StreamExt;

let poller = provider.watch_full_pending_transactions().await?;
let mut stream = poller.into_stream().flat_map(futures::stream::iter).take(5);
while let Some(tx) = stream.next().await {
   println!("new pending transaction: {tx:#?}");
}
source

fn get_filter_changes<'life0, 'async_trait, R>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<R>>> + Send + 'async_trait>>
where Self: Sized + 'async_trait, R: 'async_trait + RpcReturn, 'life0: 'async_trait,

Get a list of values that have been added since the last poll.

The return value depends on what stream id corresponds to. See FilterChanges for all possible return values.

source

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Get a list of values that have been added since the last poll.

This returns an enum over all possible return values. You probably want to use get_filter_changes instead.

source

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Watch for the confirmation of a single pending transaction with the given configuration.

Note that this is handled internally rather than calling any specific RPC method, and as such should not be overridden.

source

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Retrieves a Vec<Log> with the given Filter.

source

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

Get the account and storage values of the specified account including the merkle proofs.

This call can be used to verify that the data has not been tampered with.

source

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

Gets the specified storage value from Address.

source

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

Gets a transaction by its TxHash.

source

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

Gets a transaction by block hash and transaction index position.

source

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

Gets a raw transaction by block hash and transaction index position.

source

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

Gets a transaction by block number and transaction index position.

source

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

Gets a raw transaction by block number and transaction index position.

source

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

Returns the EIP-2718 encoded transaction if it exists, see also Decodable2718.

If the transaction is an EIP-4844 transaction that is still in the pool (pending) it will include the sidecar, otherwise it will the consensus variant without the sidecar: TxEip4844.

This can be decoded into TxEnvelope.

source

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

Gets the transaction count (AKA “nonce”) of the corresponding address.

source

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

Gets a transaction receipt if it exists, by its TxHash.

source

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets an uncle block through the tag BlockId and index u64.

source

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Gets the number of uncles for the block specified by the tag BlockId.

source

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

Returns a suggestion for the current maxPriorityFeePerGas in wei.

source

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Notify the provider that we are interested in new blocks.

Returns the ID to use with eth_getFilterChanges.

See also watch_blocks to configure a poller.

source

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Notify the provider that we are interested in logs that match the given filter.

Returns the ID to use with eth_getFilterChanges.

See also watch_logs to configure a poller.

source

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Notify the provider that we are interested in new pending transactions.

If full is true, the stream will consist of full transaction bodies instead of just the hashes. This not supported by all clients.

Returns the ID to use with eth_getFilterChanges.

See also watch_pending_transactions to configure a poller.

source

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Broadcasts a raw transaction RLP bytes to the network.

See send_transaction for more details.

source

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Broadcasts a transaction to the network.

Returns a PendingTransactionBuilder which can be used to configure how and when to await the transaction’s confirmation.

§Examples

See PendingTransactionBuilder for more examples.

let tx_hash = provider.send_transaction(tx)
    .await?
    .with_required_confirmations(2)
    .with_timeout(Some(std::time::Duration::from_secs(60)))
    .watch()
    .await?;
source

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Broadcasts a transaction envelope to the network.

Returns a PendingTransactionBuilder which can be used to configure how and when to await the transaction’s confirmation.

source

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.

Subscribe to a stream of new block headers.

§Errors

This method is only available on pubsub clients, such as WebSockets or IPC, and will return a PubsubUnavailable transport error if the client does not support it.

For a polling alternative available over HTTP, use Provider::watch_blocks. However, be aware that polling increases RPC usage drastically.

§Examples
use futures::StreamExt;

let sub = provider.subscribe_blocks().await?;
let mut stream = sub.into_stream().take(5);
while let Some(block) = stream.next().await {
   println!("new block: {block:#?}");
}
source

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.

Subscribe to a stream of pending transaction hashes.

§Errors

This method is only available on pubsub clients, such as WebSockets or IPC, and will return a PubsubUnavailable transport error if the client does not support it.

For a polling alternative available over HTTP, use Provider::watch_pending_transactions. However, be aware that polling increases RPC usage drastically.

§Examples
use futures::StreamExt;

let sub = provider.subscribe_pending_transactions().await?;
let mut stream = sub.into_stream().take(5);
while let Some(tx_hash) = stream.next().await {
   println!("new pending transaction hash: {tx_hash}");
}
source

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.

Subscribe to a stream of pending transaction bodies.

§Support

This endpoint is compatible only with Geth client version 1.11.0 or later.

§Errors

This method is only available on pubsub clients, such as WebSockets or IPC, and will return a PubsubUnavailable transport error if the client does not support it.

For a polling alternative available over HTTP, use Provider::watch_full_pending_transactions. However, be aware that polling increases RPC usage drastically.

§Examples
use futures::StreamExt;

let sub = provider.subscribe_full_pending_transactions().await?;
let mut stream = sub.into_stream().take(5);
while let Some(tx) = stream.next().await {
   println!("{tx:#?}");
}
source

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.

Subscribe to a stream of logs matching given filter.

§Errors

This method is only available on pubsub clients, such as WebSockets or IPC, and will return a PubsubUnavailable transport error if the client does not support it.

For a polling alternative available over HTTP, use Provider::watch_logs. However, be aware that polling increases RPC usage drastically.

§Examples
use futures::StreamExt;
use alloy_primitives::keccak256;
use alloy_rpc_types_eth::Filter;

let signature = keccak256("Transfer(address,address,uint256)".as_bytes());

let sub = provider.subscribe_logs(&Filter::new().event_signature(signature)).await?;
let mut stream = sub.into_stream().take(5);
while let Some(tx) = stream.next().await {
   println!("{tx:#?}");
}
source

fn subscribe<'life0, 'async_trait, P, R>( &'life0 self, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<R>>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.

Subscribe to an RPC event.

source

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.

Cancels a subscription given the subscription ID.

source

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

Gets syncing info.

source

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

Gets the client version.

source

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

Gets the Keccak-256 hash of the given data.

source

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

Gets the network ID. Same as eth_chainId.

source

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

Sends a raw JSON-RPC request.

§Examples
use alloy_rpc_types_eth::BlockNumberOrTag;
use alloy_rpc_client::NoParams;

// No parameters: `()`
let block_number = provider.raw_request("eth_blockNumber".into(), NoParams::default()).await?;

// One parameter: `(param,)` or `[param]`
let block = provider.raw_request("eth_getBlockByNumber".into(), (BlockNumberOrTag::Latest,)).await?;

// Two or more parameters: `(param1, param2, ...)` or `[param1, param2, ...]`
let full_block = provider.raw_request("eth_getBlockByNumber".into(), (BlockNumberOrTag::Latest, true)).await?;
source

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Sends a raw JSON-RPC request with type-erased parameters and return.

§Examples
use alloy_rpc_types_eth::BlockNumberOrTag;

// No parameters: `()`
let params = serde_json::value::to_raw_value(&())?;
let block_number = provider.raw_request_dyn("eth_blockNumber".into(), &params).await?;

// One parameter: `(param,)` or `[param]`
let params = serde_json::value::to_raw_value(&(BlockNumberOrTag::Latest,))?;
let block = provider.raw_request_dyn("eth_getBlockByNumber".into(), &params).await?;

// Two or more parameters: `(param1, param2, ...)` or `[param1, param2, ...]`
let params = serde_json::value::to_raw_value(&(BlockNumberOrTag::Latest, true))?;
let full_block = provider.raw_request_dyn("eth_getBlockByNumber".into(), &params).await?;
source

fn transaction_request(&self) -> N::TransactionRequest

Creates a new TransactionRequest.

Implementations on Foreign Types§

source§

impl<'b, T: Transport + Clone, N: Network, U: 'b + Provider<T, N> + Sized> Provider<T, N> for &'b U
where &'b U: Send + Sync,

source§

fn root(&self) -> &RootProvider<T, N>

source§

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

source§

fn client(&self) -> ClientRef<'_, T>

source§

fn weak_client(&self) -> WeakClient<T>

source§

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

source§

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

source§

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

source§

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

source§

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

source§

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

source§

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

source§

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

source§

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

source§

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

source§

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

source§

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

source§

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

source§

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

source§

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

source§

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

source§

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

source§

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.
source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

source§

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

source§

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

source§

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

source§

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn transaction_request(&self) -> N::TransactionRequest

source§

impl<'b, T: Transport + Clone, N: Network, U: 'b + Provider<T, N> + Sized> Provider<T, N> for &'b mut U
where &'b mut U: Send + Sync,

source§

fn root(&self) -> &RootProvider<T, N>

source§

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

source§

fn client(&self) -> ClientRef<'_, T>

source§

fn weak_client(&self) -> WeakClient<T>

source§

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

source§

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

source§

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

source§

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

source§

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

source§

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

source§

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

source§

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

source§

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

source§

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

source§

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

source§

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

source§

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

source§

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

source§

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

source§

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

source§

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

source§

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.
source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

source§

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

source§

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

source§

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

source§

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn transaction_request(&self) -> N::TransactionRequest

source§

impl<T: Transport + Clone, N: Network, U: Provider<T, N> + Sized> Provider<T, N> for Box<U>
where Box<U>: Send + Sync,

source§

fn root(&self) -> &RootProvider<T, N>

source§

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

source§

fn client(&self) -> ClientRef<'_, T>

source§

fn weak_client(&self) -> WeakClient<T>

source§

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

source§

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

source§

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

source§

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

source§

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

source§

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

source§

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

source§

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

source§

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

source§

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

source§

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

source§

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

source§

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

source§

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

source§

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

source§

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

source§

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

source§

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.
source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

source§

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

source§

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

source§

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

source§

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn transaction_request(&self) -> N::TransactionRequest

source§

impl<T: Transport + Clone, N: Network, U: Provider<T, N> + Sized> Provider<T, N> for Rc<U>
where Rc<U>: Send + Sync,

source§

fn root(&self) -> &RootProvider<T, N>

source§

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

source§

fn client(&self) -> ClientRef<'_, T>

source§

fn weak_client(&self) -> WeakClient<T>

source§

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

source§

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

source§

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

source§

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

source§

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

source§

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

source§

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

source§

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

source§

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

source§

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

source§

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

source§

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

source§

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

source§

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

source§

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

source§

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

source§

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

source§

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.
source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

source§

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

source§

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

source§

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

source§

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn transaction_request(&self) -> N::TransactionRequest

source§

impl<T: Transport + Clone, N: Network, U: Provider<T, N> + Sized> Provider<T, N> for Arc<U>
where Arc<U>: Send + Sync,

source§

fn root(&self) -> &RootProvider<T, N>

source§

fn builder() -> ProviderBuilder<Identity, Identity, N>
where Self: Sized,

source§

fn client(&self) -> ClientRef<'_, T>

source§

fn weak_client(&self) -> WeakClient<T>

source§

fn get_accounts(&self) -> ProviderCall<T, NoParams, Vec<Address>>

source§

fn get_blob_base_fee(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_block_number(&self) -> ProviderCall<T, NoParams, U64, BlockNumber>

source§

fn call<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, Bytes>

source§

fn simulate<'req>( &self, payload: &'req SimulatePayload, ) -> RpcWithBlock<T, &'req SimulatePayload, Vec<SimulatedBlock<N::BlockResponse>>>

source§

fn get_chain_id(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn create_access_list<'a>( &self, request: &'a N::TransactionRequest, ) -> RpcWithBlock<T, &'a N::TransactionRequest, AccessListResult>

source§

fn estimate_gas<'req>( &self, tx: &'req N::TransactionRequest, ) -> EthCall<'req, T, N, U64, u64>

source§

fn estimate_eip1559_fees<'life0, 'async_trait>( &'life0 self, estimator: Option<EstimatorFunction>, ) -> Pin<Box<dyn Future<Output = TransportResult<Eip1559Estimation>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_fee_history<'life0, 'life1, 'async_trait>( &'life0 self, block_count: u64, last_block: BlockNumberOrTag, reward_percentiles: &'life1 [f64], ) -> Pin<Box<dyn Future<Output = TransportResult<FeeHistory>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_gas_price(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn get_account(&self, address: Address) -> RpcWithBlock<T, Address, Account>

source§

fn get_balance(&self, address: Address) -> RpcWithBlock<T, Address, U256, U256>

source§

fn get_block<'life0, 'async_trait>( &'life0 self, block: BlockId, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_hash<'life0, 'async_trait>( &'life0 self, hash: BlockHash, kind: BlockTransactionsKind, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_by_number<'life0, 'async_trait>( &'life0 self, number: BlockNumberOrTag, hydrate: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_block_receipts( &self, block: BlockId, ) -> ProviderCall<T, (BlockId,), Option<Vec<N::ReceiptResponse>>>

source§

fn get_code_at(&self, address: Address) -> RpcWithBlock<T, Address, Bytes>

source§

fn watch_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn watch_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterPollerBuilder<T, N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_filter_changes_dyn<'life0, 'async_trait>( &'life0 self, id: U256, ) -> Pin<Box<dyn Future<Output = TransportResult<FilterChanges>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn watch_pending_transaction<'life0, 'async_trait>( &'life0 self, config: PendingTransactionConfig, ) -> Pin<Box<dyn Future<Output = Result<PendingTransaction, PendingTransactionError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Vec<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn get_proof( &self, address: Address, keys: Vec<StorageKey>, ) -> RpcWithBlock<T, (Address, Vec<StorageKey>), EIP1186AccountProofResponse>

source§

fn get_storage_at( &self, address: Address, key: U256, ) -> RpcWithBlock<T, (Address, U256), StorageValue>

source§

fn get_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::TransactionResponse>>

source§

fn get_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_hash_and_index( &self, block_hash: B256, index: usize, ) -> ProviderCall<T, (B256, Index), Option<Bytes>>

source§

fn get_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<N::TransactionResponse>>

source§

fn get_raw_transaction_by_block_number_and_index( &self, block_number: BlockNumberOrTag, index: usize, ) -> ProviderCall<T, (BlockNumberOrTag, Index), Option<Bytes>>

source§

fn get_raw_transaction_by_hash( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<Bytes>>

source§

fn get_transaction_count( &self, address: Address, ) -> RpcWithBlock<T, Address, U64, u64, fn(_: U64) -> u64>

source§

fn get_transaction_receipt( &self, hash: TxHash, ) -> ProviderCall<T, (TxHash,), Option<N::ReceiptResponse>>

source§

fn get_uncle<'life0, 'async_trait>( &'life0 self, tag: BlockId, idx: u64, ) -> Pin<Box<dyn Future<Output = TransportResult<Option<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_uncle_count<'life0, 'async_trait>( &'life0 self, tag: BlockId, ) -> Pin<Box<dyn Future<Output = TransportResult<u64>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn get_max_priority_fee_per_gas(&self) -> ProviderCall<T, NoParams, U128, u128>

source§

fn new_block_filter<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn new_filter<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn new_pending_transactions_filter<'life0, 'async_trait>( &'life0 self, full: bool, ) -> Pin<Box<dyn Future<Output = TransportResult<U256>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_raw_transaction<'life0, 'life1, 'async_trait>( &'life0 self, encoded_tx: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn send_transaction<'life0, 'async_trait>( &'life0 self, tx: N::TransactionRequest, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn send_tx_envelope<'life0, 'async_trait>( &'life0 self, tx: N::TxEnvelope, ) -> Pin<Box<dyn Future<Output = TransportResult<PendingTransactionBuilder<T, N>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

source§

fn subscribe_blocks<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::BlockResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<B256>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_full_pending_transactions<'life0, 'async_trait>( &'life0 self, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<N::TransactionResponse>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn subscribe_logs<'life0, 'life1, 'async_trait>( &'life0 self, filter: &'life1 Filter, ) -> Pin<Box<dyn Future<Output = TransportResult<Subscription<Log>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Available on crate feature pubsub only.
source§

fn unsubscribe<'life0, 'async_trait>( &'life0 self, id: B256, ) -> Pin<Box<dyn Future<Output = TransportResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Available on crate feature pubsub only.
source§

fn syncing(&self) -> ProviderCall<T, NoParams, SyncStatus>

source§

fn get_client_version(&self) -> ProviderCall<T, NoParams, String>

source§

fn get_sha3(&self, data: &[u8]) -> ProviderCall<T, (String,), B256>

source§

fn get_net_version(&self) -> ProviderCall<T, NoParams, U64, u64>

source§

fn raw_request<'life0, 'async_trait, P, R>( &'life0 self, method: Cow<'static, str>, params: P, ) -> Pin<Box<dyn Future<Output = TransportResult<R>> + Send + 'async_trait>>
where P: RpcParam + 'async_trait, R: RpcReturn + 'async_trait, Self: Sized + 'async_trait, 'life0: 'async_trait,

source§

fn raw_request_dyn<'life0, 'life1, 'async_trait>( &'life0 self, method: Cow<'static, str>, params: &'life1 RawValue, ) -> Pin<Box<dyn Future<Output = TransportResult<Box<RawValue>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

source§

fn transaction_request(&self) -> N::TransactionRequest

Implementors§

source§

impl<F, P, T, N> Provider<T, N> for FillProvider<F, P, T, N>
where F: TxFiller<N>, P: Provider<T, N>, T: Transport + Clone, N: Network,

source§

impl<P, T> Provider<T> for AnvilProvider<P, T>
where P: Provider<T>, T: Transport + Clone,

Available on crate feature anvil-node only.
source§

impl<P, T, N> Provider<T, N> for CacheProvider<P, T, N>
where P: Provider<T, N>, T: Transport + Clone, N: Network,

Available on non-WebAssembly only.
source§

impl<T: Transport + Clone, N: Network> Provider<T, N> for RootProvider<T, N>