pub struct EthApi<Provider, Pool, Network, EvmConfig> { /* private fields */ }
Expand description
Eth
API implementation.
This type provides the functionality for handling eth_
related requests.
These are implemented two-fold: Core functionality is implemented as
EthApiSpec
trait. Additionally, the required server
implementations (e.g. EthApiServer
) are implemented
separately in submodules. The rpc handler implementation can then delegate to the main impls.
This way EthApi
is not limited to [jsonrpsee
] and can be used standalone or in other
network handlers (for example ipc).
Implementations§
source§impl<Provider, Pool, Network, EvmConfig> EthApi<Provider, Pool, Network, EvmConfig>where
Provider: BlockReaderIdExt,
impl<Provider, Pool, Network, EvmConfig> EthApi<Provider, Pool, Network, EvmConfig>where
Provider: BlockReaderIdExt,
sourcepub fn new(
provider: Provider,
pool: Pool,
network: Network,
eth_cache: EthStateCache,
gas_oracle: GasPriceOracle<Provider>,
gas_cap: impl Into<GasCap>,
max_simulate_blocks: u64,
eth_proof_window: u64,
blocking_task_pool: BlockingTaskPool,
fee_history_cache: FeeHistoryCache,
evm_config: EvmConfig,
proof_permits: usize,
) -> Self
pub fn new( provider: Provider, pool: Pool, network: Network, eth_cache: EthStateCache, gas_oracle: GasPriceOracle<Provider>, gas_cap: impl Into<GasCap>, max_simulate_blocks: u64, eth_proof_window: u64, blocking_task_pool: BlockingTaskPool, fee_history_cache: FeeHistoryCache, evm_config: EvmConfig, proof_permits: usize, ) -> Self
Creates a new, shareable instance using the default tokio task spawner.
source§impl<Provider, Pool, EvmConfig, Network> EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, EvmConfig, Network> EthApi<Provider, Pool, Network, EvmConfig>
sourcepub fn with_spawner<Tasks, Events>(
ctx: &EthApiBuilderCtx<Provider, Pool, EvmConfig, Network, Tasks, Events, Self>,
) -> Selfwhere
Tasks: TaskSpawner + Clone + 'static,
Events: CanonStateSubscriptions,
pub fn with_spawner<Tasks, Events>(
ctx: &EthApiBuilderCtx<Provider, Pool, EvmConfig, Network, Tasks, Events, Self>,
) -> Selfwhere
Tasks: TaskSpawner + Clone + 'static,
Events: CanonStateSubscriptions,
Creates a new, shareable instance.
Trait Implementations§
source§impl<Provider, Pool, Network, EvmConfig> AddDevSigners for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> AddDevSigners for EthApi<Provider, Pool, Network, EvmConfig>
source§fn with_dev_accounts(&self)
fn with_dev_accounts(&self)
source§impl<N> BuilderProvider<N> for EthApi<N::Provider, N::Pool, N::Network, N::Evm>where
N: FullNodeComponents,
impl<N> BuilderProvider<N> for EthApi<N::Provider, N::Pool, N::Network, N::Evm>where
N: FullNodeComponents,
source§type Ctx<'a> = &'a EthApiBuilderCtx<<N as FullNodeTypes>::Provider, <N as FullNodeComponents>::Pool, <N as FullNodeComponents>::Evm, <N as FullNodeComponents>::Network, TaskExecutor, <N as FullNodeTypes>::Provider, EthApi<<N as FullNodeTypes>::Provider, <N as FullNodeComponents>::Pool, <N as FullNodeComponents>::Network, <N as FullNodeComponents>::Evm>>
type Ctx<'a> = &'a EthApiBuilderCtx<<N as FullNodeTypes>::Provider, <N as FullNodeComponents>::Pool, <N as FullNodeComponents>::Evm, <N as FullNodeComponents>::Network, TaskExecutor, <N as FullNodeTypes>::Provider, EthApi<<N as FullNodeTypes>::Provider, <N as FullNodeComponents>::Pool, <N as FullNodeComponents>::Network, <N as FullNodeComponents>::Evm>>
source§impl<Provider, Pool, Network, EvmConfig> Call for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState + SpawnBlocking,
EvmConfig: ConfigureEvm<Header = Header>,
impl<Provider, Pool, Network, EvmConfig> Call for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState + SpawnBlocking,
EvmConfig: ConfigureEvm<Header = Header>,
source§fn call_gas_limit(&self) -> u64
fn call_gas_limit(&self) -> u64
eth_call
and tracing RPC methods. Read moresource§fn max_simulate_blocks(&self) -> u64
fn max_simulate_blocks(&self) -> u64
eth_simulateV1
.source§fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
§fn with_state_at_block<F, R>(&self, at: BlockId, f: F) -> Result<R, Self::Error>
fn with_state_at_block<F, R>(&self, at: BlockId, f: F) -> Result<R, Self::Error>
BlockId
].§fn transact<DB>(
&self,
db: DB,
env: EnvWithHandlerCfg,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
fn transact<DB>(
&self,
db: DB,
env: EnvWithHandlerCfg,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
EnvWithHandlerCfg
] against the given [Database] without committing state
changes.§fn transact_with_inspector<DB>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: impl GetInspector<DB>,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
fn transact_with_inspector<DB>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: impl GetInspector<DB>,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
EnvWithHandlerCfg
] against the given [Database] without committing state
changes.§fn spawn_with_state_at_block<F, R>(
&self,
at: BlockId,
f: F,
) -> impl Future<Output = Result<R, Self::Error>> + Send
fn spawn_with_state_at_block<F, R>( &self, at: BlockId, f: F, ) -> impl Future<Output = Result<R, Self::Error>> + Send
BlockId
] on a new task§fn replay_transactions_until<DB>(
&self,
db: &mut CacheDB<DB>,
cfg: CfgEnvWithHandlerCfg,
block_env: BlockEnv,
transactions: impl IntoIterator<Item = TransactionSignedEcRecovered>,
target_tx_hash: FixedBytes<32>,
) -> Result<usize, Self::Error>where
DB: DatabaseRef,
EthApiError: From<<DB as DatabaseRef>::Error>,
fn replay_transactions_until<DB>(
&self,
db: &mut CacheDB<DB>,
cfg: CfgEnvWithHandlerCfg,
block_env: BlockEnv,
transactions: impl IntoIterator<Item = TransactionSignedEcRecovered>,
target_tx_hash: FixedBytes<32>,
) -> Result<usize, Self::Error>where
DB: DatabaseRef,
EthApiError: From<<DB as DatabaseRef>::Error>,
§fn estimate_gas_with<S>(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
request: TransactionRequest,
state: S,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> Result<Uint<256, 4>, Self::Error>where
S: StateProvider,
fn estimate_gas_with<S>(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
request: TransactionRequest,
state: S,
state_override: Option<HashMap<Address, AccountOverride, FbBuildHasher<20>>>,
) -> Result<Uint<256, 4>, Self::Error>where
S: StateProvider,
request
with the state. Read more§fn update_estimated_gas_range(
&self,
result: ExecutionResult,
tx_gas_limit: u64,
highest_gas_limit: &mut u64,
lowest_gas_limit: &mut u64,
) -> Result<(), Self::Error>
fn update_estimated_gas_range( &self, result: ExecutionResult, tx_gas_limit: u64, highest_gas_limit: &mut u64, lowest_gas_limit: &mut u64, ) -> Result<(), Self::Error>
§fn map_out_of_gas_err<S>(
&self,
env_gas_limit: Uint<256, 4>,
env: EnvWithHandlerCfg,
db: &mut CacheDB<StateProviderDatabase<S>>,
) -> Self::Errorwhere
S: StateProvider,
fn map_out_of_gas_err<S>(
&self,
env_gas_limit: Uint<256, 4>,
env: EnvWithHandlerCfg,
db: &mut CacheDB<StateProviderDatabase<S>>,
) -> Self::Errorwhere
S: StateProvider,
§fn create_txn_env(
&self,
block_env: &BlockEnv,
request: TransactionRequest,
) -> Result<TxEnv, Self::Error>
fn create_txn_env( &self, block_env: &BlockEnv, request: TransactionRequest, ) -> Result<TxEnv, Self::Error>
§fn build_call_evm_env(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
request: TransactionRequest,
) -> Result<EnvWithHandlerCfg, Self::Error>
fn build_call_evm_env( &self, cfg: CfgEnvWithHandlerCfg, block: BlockEnv, request: TransactionRequest, ) -> Result<EnvWithHandlerCfg, Self::Error>
EnvWithHandlerCfg
] to be used for executing the [TransactionRequest
] in
eth_call
. Read more§fn prepare_call_env<DB>(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
request: TransactionRequest,
db: &mut CacheDB<DB>,
overrides: EvmOverrides,
) -> Result<EnvWithHandlerCfg, Self::Error>where
DB: DatabaseRef,
EthApiError: From<<DB as DatabaseRef>::Error>,
fn prepare_call_env<DB>(
&self,
cfg: CfgEnvWithHandlerCfg,
block: BlockEnv,
request: TransactionRequest,
db: &mut CacheDB<DB>,
overrides: EvmOverrides,
) -> Result<EnvWithHandlerCfg, Self::Error>where
DB: DatabaseRef,
EthApiError: From<<DB as DatabaseRef>::Error>,
EnvWithHandlerCfg
] for execution. Read moresource§impl<Provider, Pool, Network, EvmConfig> Clone for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Clone for EthApi<Provider, Pool, Network, EvmConfig>
source§impl<Provider, Pool, Network, EvmConfig> Debug for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Debug for EthApi<Provider, Pool, Network, EvmConfig>
source§impl<Provider, Pool, Network, EvmConfig> Deref for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Deref for EthApi<Provider, Pool, Network, EvmConfig>
source§impl<Provider, Pool, Network, EvmConfig> EthApiSpec for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> EthApiSpec for EthApi<Provider, Pool, Network, EvmConfig>
source§fn provider(
&self,
) -> impl ChainSpecProvider<ChainSpec: EthereumHardforks> + BlockNumReader + StageCheckpointReader
fn provider( &self, ) -> impl ChainSpecProvider<ChainSpec: EthereumHardforks> + BlockNumReader + StageCheckpointReader
source§fn starting_block(&self) -> U256
fn starting_block(&self) -> U256
source§fn signers(&self) -> &RwLock<Vec<Box<dyn EthSigner>>>
fn signers(&self) -> &RwLock<Vec<Box<dyn EthSigner>>>
§fn protocol_version(
&self,
) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
fn protocol_version( &self, ) -> impl Future<Output = Result<Uint<64, 1>, RethError>> + Send
§fn chain_info(&self) -> Result<ChainInfo, RethError>
fn chain_info(&self) -> Result<ChainInfo, RethError>
§fn is_syncing(&self) -> bool
fn is_syncing(&self) -> bool
true
if the network is undergoing sync.§fn sync_status(&self) -> Result<SyncStatus, RethError>
fn sync_status(&self) -> Result<SyncStatus, RethError>
SyncStatus
] of the networksource§impl<Provider, Pool, Network, EvmConfig> EthApiTypes for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> EthApiTypes for EthApi<Provider, Pool, Network, EvmConfig>
source§type NetworkTypes = AnyNetwork
type NetworkTypes = AnyNetwork
source§type TransactionCompat = EthTxBuilder
type TransactionCompat = EthTxBuilder
source§impl<Provider, Pool, Network, EvmConfig> EthBlocks for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadBlock<Error = EthApiError, NetworkTypes: Network<ReceiptResponse = AnyTransactionReceipt>>,
Provider: HeaderProvider,
impl<Provider, Pool, Network, EvmConfig> EthBlocks for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadBlock<Error = EthApiError, NetworkTypes: Network<ReceiptResponse = AnyTransactionReceipt>>,
Provider: HeaderProvider,
source§fn provider(&self) -> impl HeaderProvider
fn provider(&self) -> impl HeaderProvider
source§async fn block_receipts(
&self,
block_id: BlockId,
) -> Result<Option<Vec<RpcReceipt<Self::NetworkTypes>>>, Self::Error>where
Self: LoadReceipt,
async fn block_receipts(
&self,
block_id: BlockId,
) -> Result<Option<Vec<RpcReceipt<Self::NetworkTypes>>>, Self::Error>where
Self: LoadReceipt,
eth_getBlockReceipts
. Read more§fn block_transaction_count(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<usize>, Self::Error>> + Send
fn block_transaction_count( &self, block_id: BlockId, ) -> impl Future<Output = Result<Option<usize>, Self::Error>> + Send
§fn load_block_and_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<(SealedBlock, Arc<Vec<Receipt>>)>, Self::Error>> + Sendwhere
Self: LoadReceipt,
fn load_block_and_receipts(
&self,
block_id: BlockId,
) -> impl Future<Output = Result<Option<(SealedBlock, Arc<Vec<Receipt>>)>, Self::Error>> + Sendwhere
Self: LoadReceipt,
§fn ommers(&self, block_id: BlockId) -> Result<Option<Vec<Header>>, Self::Error>
fn ommers(&self, block_id: BlockId) -> Result<Option<Vec<Header>>, Self::Error>
§fn ommer_by_block_and_index(
&self,
block_id: BlockId,
index: Index,
) -> impl Future<Output = Result<Option<Block<<Self::NetworkTypes as Network>::TransactionResponse, <Self::NetworkTypes as Network>::HeaderResponse>>, Self::Error>> + Send
fn ommer_by_block_and_index( &self, block_id: BlockId, index: Index, ) -> impl Future<Output = Result<Option<Block<<Self::NetworkTypes as Network>::TransactionResponse, <Self::NetworkTypes as Network>::HeaderResponse>>, Self::Error>> + Send
source§impl<Provider, Pool, Network, EvmConfig> EthCall for EthApi<Provider, Pool, Network, EvmConfig>where
Self: Call + LoadPendingBlock,
impl<Provider, Pool, Network, EvmConfig> EthCall for EthApi<Provider, Pool, Network, EvmConfig>where
Self: Call + LoadPendingBlock,
source§impl<Provider, Pool, Network, EvmConfig> EthFees for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadFee,
impl<Provider, Pool, Network, EvmConfig> EthFees for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadFee,
§fn gas_price(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: LoadBlock,
fn gas_price(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: LoadBlock,
§fn blob_base_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: LoadBlock,
fn blob_base_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: LoadBlock,
§fn suggested_priority_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: 'static,
fn suggested_priority_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: 'static,
§fn fee_history(
&self,
block_count: u64,
newest_block: BlockNumberOrTag,
reward_percentiles: Option<Vec<f64>>,
) -> impl Future<Output = Result<FeeHistory, Self::Error>> + Send
fn fee_history( &self, block_count: u64, newest_block: BlockNumberOrTag, reward_percentiles: Option<Vec<f64>>, ) -> impl Future<Output = Result<FeeHistory, Self::Error>> + Send
§fn approximate_percentile(
&self,
entry: &FeeHistoryEntry,
requested_percentile: f64,
) -> u128
fn approximate_percentile( &self, entry: &FeeHistoryEntry, requested_percentile: f64, ) -> u128
source§impl<Provider, Pool, Network, EvmConfig> EthState for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState + SpawnBlocking,
impl<Provider, Pool, Network, EvmConfig> EthState for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState + SpawnBlocking,
source§fn max_proof_window(&self) -> u64
fn max_proof_window(&self) -> u64
§fn transaction_count(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn transaction_count( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
§fn get_code(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
fn get_code( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
§fn balance(
&self,
address: Address,
block_id: Option<BlockId>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn balance( &self, address: Address, block_id: Option<BlockId>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
source§impl<Provider, Pool, Network, EvmConfig> EthTransactions for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadTransaction,
Pool: TransactionPool + 'static,
Provider: BlockReaderIdExt,
impl<Provider, Pool, Network, EvmConfig> EthTransactions for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadTransaction,
Pool: TransactionPool + 'static,
Provider: BlockReaderIdExt,
source§fn provider(&self) -> impl BlockReaderIdExt
fn provider(&self) -> impl BlockReaderIdExt
source§fn signers(&self) -> &RwLock<Vec<Box<dyn EthSigner>>>
fn signers(&self) -> &RwLock<Vec<Box<dyn EthSigner>>>
§fn transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<TransactionSource>, Self::Error>> + Send
fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<TransactionSource>, Self::Error>> + Send
§fn transactions_by_block(
&self,
block: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Vec<TransactionSigned>>, Self::Error>> + Send
fn transactions_by_block( &self, block: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Vec<TransactionSigned>>, Self::Error>> + Send
§fn raw_transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<Bytes>, Self::Error>> + Send
fn raw_transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<Bytes>, Self::Error>> + Send
§fn historical_transaction_by_hash_at(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<(TransactionSource, FixedBytes<32>)>, Self::Error>> + Send
fn historical_transaction_by_hash_at( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<(TransactionSource, FixedBytes<32>)>, Self::Error>> + Send
§fn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<<Self::NetworkTypes as Network>::ReceiptResponse>, Self::Error>> + Sendwhere
Self: LoadReceipt + 'static,
fn transaction_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<<Self::NetworkTypes as Network>::ReceiptResponse>, Self::Error>> + Sendwhere
Self: LoadReceipt + 'static,
§fn load_transaction_and_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<(TransactionSigned, TransactionMeta, Receipt)>, Self::Error>> + Sendwhere
Self: 'static,
fn load_transaction_and_receipt(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<(TransactionSigned, TransactionMeta, Receipt)>, Self::Error>> + Sendwhere
Self: 'static,
§fn send_raw_transaction(
&self,
tx: Bytes,
) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send
fn send_raw_transaction( &self, tx: Bytes, ) -> impl Future<Output = Result<FixedBytes<32>, Self::Error>> + Send
§fn sign_request(
&self,
from: &Address,
txn: TransactionRequest,
) -> impl Future<Output = Result<TransactionSigned, Self::Error>> + Send
fn sign_request( &self, from: &Address, txn: TransactionRequest, ) -> impl Future<Output = Result<TransactionSigned, Self::Error>> + Send
§fn sign(
&self,
account: Address,
message: Bytes,
) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
fn sign( &self, account: Address, message: Bytes, ) -> impl Future<Output = Result<Bytes, Self::Error>> + Send
§fn sign_typed_data(
&self,
data: &TypedData,
account: Address,
) -> Result<Bytes, Self::Error>
fn sign_typed_data( &self, data: &TypedData, account: Address, ) -> Result<Bytes, Self::Error>
§fn find_signer(
&self,
account: &Address,
) -> Result<Box<dyn EthSigner>, Self::Error>
fn find_signer( &self, account: &Address, ) -> Result<Box<dyn EthSigner>, Self::Error>
source§impl<Provider, Pool, Network, EvmConfig> LoadBlock for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadPendingBlock + SpawnBlocking,
Provider: BlockReaderIdExt,
impl<Provider, Pool, Network, EvmConfig> LoadBlock for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadPendingBlock + SpawnBlocking,
Provider: BlockReaderIdExt,
source§impl<Provider, Pool, Network, EvmConfig> LoadFee for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadBlock,
Provider: BlockReaderIdExt + HeaderProvider + ChainSpecProvider<ChainSpec: EthereumHardforks>,
impl<Provider, Pool, Network, EvmConfig> LoadFee for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadBlock,
Provider: BlockReaderIdExt + HeaderProvider + ChainSpecProvider<ChainSpec: EthereumHardforks>,
source§fn provider(
&self,
) -> impl BlockIdReader + HeaderProvider + ChainSpecProvider<ChainSpec: EthereumHardforks>
fn provider( &self, ) -> impl BlockIdReader + HeaderProvider + ChainSpecProvider<ChainSpec: EthereumHardforks>
source§fn gas_oracle(&self) -> &GasPriceOracle<impl BlockReaderIdExt>
fn gas_oracle(&self) -> &GasPriceOracle<impl BlockReaderIdExt>
source§fn fee_history_cache(&self) -> &FeeHistoryCache
fn fee_history_cache(&self) -> &FeeHistoryCache
§fn legacy_gas_price(
&self,
gas_price: Option<Uint<256, 4>>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn legacy_gas_price( &self, gas_price: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
§fn eip1559_fees(
&self,
max_fee_per_gas: Option<Uint<256, 4>>,
max_priority_fee_per_gas: Option<Uint<256, 4>>,
) -> impl Future<Output = Result<(Uint<256, 4>, Uint<256, 4>), Self::Error>> + Send
fn eip1559_fees( &self, max_fee_per_gas: Option<Uint<256, 4>>, max_priority_fee_per_gas: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<(Uint<256, 4>, Uint<256, 4>), Self::Error>> + Send
§fn eip4844_blob_fee(
&self,
blob_fee: Option<Uint<256, 4>>,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn eip4844_blob_fee( &self, blob_fee: Option<Uint<256, 4>>, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
§fn gas_price(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn gas_price( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
§fn blob_base_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
fn blob_base_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
§fn suggested_priority_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: 'static,
fn suggested_priority_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Sendwhere
Self: 'static,
source§impl<Provider, Pool, Network, EvmConfig> LoadPendingBlock for EthApi<Provider, Pool, Network, EvmConfig>where
Self: SpawnBlocking,
Provider: BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider<ChainSpec: EthereumHardforks> + StateProviderFactory,
Pool: TransactionPool,
EvmConfig: ConfigureEvm<Header = Header>,
impl<Provider, Pool, Network, EvmConfig> LoadPendingBlock for EthApi<Provider, Pool, Network, EvmConfig>where
Self: SpawnBlocking,
Provider: BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider<ChainSpec: EthereumHardforks> + StateProviderFactory,
Pool: TransactionPool,
EvmConfig: ConfigureEvm<Header = Header>,
source§fn provider(
&self,
) -> impl BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider<ChainSpec: EthereumHardforks> + StateProviderFactory
fn provider( &self, ) -> impl BlockReaderIdExt + EvmEnvProvider + ChainSpecProvider<ChainSpec: EthereumHardforks> + StateProviderFactory
source§fn pool(&self) -> impl TransactionPool
fn pool(&self) -> impl TransactionPool
source§fn pending_block(&self) -> &Mutex<Option<PendingBlock>>
fn pending_block(&self) -> &Mutex<Option<PendingBlock>>
source§fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
§fn pending_block_env_and_cfg(&self) -> Result<PendingBlockEnv, Self::Error>
fn pending_block_env_and_cfg(&self) -> Result<PendingBlockEnv, Self::Error>
§fn local_pending_block(
&self,
) -> impl Future<Output = Result<Option<(SealedBlockWithSenders, Vec<Receipt>)>, Self::Error>> + Sendwhere
Self: SpawnBlocking,
fn local_pending_block(
&self,
) -> impl Future<Output = Result<Option<(SealedBlockWithSenders, Vec<Receipt>)>, Self::Error>> + Sendwhere
Self: SpawnBlocking,
§fn assemble_receipt(
&self,
tx: &TransactionSignedEcRecovered,
result: ExecutionResult,
cumulative_gas_used: u64,
) -> Receipt
fn assemble_receipt( &self, tx: &TransactionSignedEcRecovered, result: ExecutionResult, cumulative_gas_used: u64, ) -> Receipt
Receipt
] for a transaction, based on its [ExecutionResult
].§fn receipts_root(
&self,
_block_env: &BlockEnv,
execution_outcome: &ExecutionOutcome,
block_number: u64,
) -> FixedBytes<32>
fn receipts_root( &self, _block_env: &BlockEnv, execution_outcome: &ExecutionOutcome, block_number: u64, ) -> FixedBytes<32>
source§impl<Provider, Pool, Network, EvmConfig> LoadReceipt for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> LoadReceipt for EthApi<Provider, Pool, Network, EvmConfig>
source§async fn build_transaction_receipt(
&self,
tx: TransactionSigned,
meta: TransactionMeta,
receipt: Receipt,
) -> Result<RpcReceipt<Self::NetworkTypes>, Self::Error>
async fn build_transaction_receipt( &self, tx: TransactionSigned, meta: TransactionMeta, receipt: Receipt, ) -> Result<RpcReceipt<Self::NetworkTypes>, Self::Error>
eth_getBlockReceipts
and eth_getTransactionReceipt
.source§impl<Provider, Pool, Network, EvmConfig> LoadState for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> LoadState for EthApi<Provider, Pool, Network, EvmConfig>
source§fn provider(
&self,
) -> impl StateProviderFactory + ChainSpecProvider<ChainSpec: EthereumHardforks>
fn provider( &self, ) -> impl StateProviderFactory + ChainSpecProvider<ChainSpec: EthereumHardforks>
source§fn pool(&self) -> impl TransactionPool
fn pool(&self) -> impl TransactionPool
§fn state_at_hash(
&self,
block_hash: FixedBytes<32>,
) -> Result<Box<dyn StateProvider>, Self::Error>
fn state_at_hash( &self, block_hash: FixedBytes<32>, ) -> Result<Box<dyn StateProvider>, Self::Error>
§fn state_at_block_id(
&self,
at: BlockId,
) -> Result<Box<dyn StateProvider>, Self::Error>
fn state_at_block_id( &self, at: BlockId, ) -> Result<Box<dyn StateProvider>, Self::Error>
BlockId
] enum. Read more§fn latest_state(&self) -> Result<Box<dyn StateProvider>, Self::Error>
fn latest_state(&self) -> Result<Box<dyn StateProvider>, Self::Error>
§fn state_at_block_id_or_latest(
&self,
block_id: Option<BlockId>,
) -> Result<Box<dyn StateProvider>, Self::Error>
fn state_at_block_id_or_latest( &self, block_id: Option<BlockId>, ) -> Result<Box<dyn StateProvider>, Self::Error>
BlockId
] enum or the latest. Read moresource§impl<Provider, Pool, Network, EvmConfig> LoadTransaction for EthApi<Provider, Pool, Network, EvmConfig>where
Self: SpawnBlocking + FullEthApiTypes,
Provider: TransactionsProvider,
Pool: TransactionPool,
impl<Provider, Pool, Network, EvmConfig> LoadTransaction for EthApi<Provider, Pool, Network, EvmConfig>where
Self: SpawnBlocking + FullEthApiTypes,
Provider: TransactionsProvider,
Pool: TransactionPool,
source§type Pool = Pool
type Pool = Pool
TransactionPool::Transaction
] is the
supported transaction type.source§fn provider(&self) -> impl TransactionsProvider
fn provider(&self) -> impl TransactionsProvider
§fn transaction_by_hash(
&self,
hash: FixedBytes<32>,
) -> impl Future<Output = Result<Option<TransactionSource>, Self::Error>> + Send
fn transaction_by_hash( &self, hash: FixedBytes<32>, ) -> impl Future<Output = Result<Option<TransactionSource>, Self::Error>> + Send
source§impl<Provider, Pool, Network, EvmConfig> SpawnBlocking for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> SpawnBlocking for EthApi<Provider, Pool, Network, EvmConfig>
source§fn io_task_spawner(&self) -> impl TaskSpawner
fn io_task_spawner(&self) -> impl TaskSpawner
source§fn tracing_task_pool(&self) -> &BlockingTaskPool
fn tracing_task_pool(&self) -> &BlockingTaskPool
source§fn tracing_task_guard(&self) -> &BlockingTaskGuard
fn tracing_task_guard(&self) -> &BlockingTaskGuard
§fn acquire_owned(
&self,
) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send
fn acquire_owned( &self, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send
Semaphore::acquire_owned
.§fn acquire_many_owned(
&self,
n: u32,
) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send
fn acquire_many_owned( &self, n: u32, ) -> impl Future<Output = Result<OwnedSemaphorePermit, AcquireError>> + Send
Semaphore::acquire_many_owned
.source§impl<Provider, Pool, Network, EvmConfig> Trace for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState,
EvmConfig: ConfigureEvm<Header = Header>,
impl<Provider, Pool, Network, EvmConfig> Trace for EthApi<Provider, Pool, Network, EvmConfig>where
Self: LoadState,
EvmConfig: ConfigureEvm<Header = Header>,
source§fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
fn evm_config(&self) -> &impl ConfigureEvm<Header = Header>
§fn inspect<DB, I>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: I,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
I: GetInspector<DB>,
fn inspect<DB, I>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: I,
) -> Result<(ResultAndState, EnvWithHandlerCfg), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
I: GetInspector<DB>,
EnvWithHandlerCfg
] against the given [Database] without committing state
changes.§fn inspect_and_return_db<DB, I>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: I,
) -> Result<(ResultAndState, EnvWithHandlerCfg, DB), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
I: GetInspector<DB>,
fn inspect_and_return_db<DB, I>(
&self,
db: DB,
env: EnvWithHandlerCfg,
inspector: I,
) -> Result<(ResultAndState, EnvWithHandlerCfg, DB), Self::Error>where
DB: Database,
EthApiError: From<<DB as Database>::Error>,
I: GetInspector<DB>,
Auto Trait Implementations§
impl<Provider, Pool, Network, EvmConfig> Freeze for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> !RefUnwindSafe for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Send for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Sync for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> Unpin for EthApi<Provider, Pool, Network, EvmConfig>
impl<Provider, Pool, Network, EvmConfig> !UnwindSafe for EthApi<Provider, Pool, Network, EvmConfig>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Conv for T
impl<T> Conv for T
§impl<T> FmtForward for T
impl<T> FmtForward for T
§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self
to use its Binary
implementation when Debug
-formatted.§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self
to use its Display
implementation when
Debug
-formatted.§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self
to use its LowerExp
implementation when
Debug
-formatted.§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self
to use its LowerHex
implementation when
Debug
-formatted.§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self
to use its Octal
implementation when Debug
-formatted.§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self
to use its Pointer
implementation when
Debug
-formatted.§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self
to use its UpperExp
implementation when
Debug
-formatted.§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self
to use its UpperHex
implementation when
Debug
-formatted.§fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
fn fmt_list(self) -> FmtList<Self>where
&'a Self: for<'a> IntoIterator,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self
and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self
, then passes self.as_ref()
into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self
, then passes self.as_mut()
into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self
, then passes self.deref()
into the pipe function.§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B>
of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B>
of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R>
view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R>
view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target
of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target
of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap()
only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut()
only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow()
only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut()
only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref()
only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut()
only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref()
only in debug builds, and is erased in release
builds.§impl<T> TryConv for T
impl<T> TryConv for T
§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
source§impl<T> WithSubscriber for T
impl<T> WithSubscriber for T
source§fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>where
S: Into<Dispatch>,
source§fn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> FullEthApi for Twhere
T: FullEthApiTypes + EthApiSpec + EthTransactions + EthBlocks + EthState + EthCall + EthFees + Trace + LoadReceipt,
impl<T> MaybeDebug for Twhere
T: Debug,
impl<T> MaybeSend for Twhere
T: Send,
impl<T> MaybeSendSync for T
impl<T> TraceExt for Twhere
T: LoadTransaction + LoadBlock + LoadPendingBlock + Trace + Call,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 8 bytes