reth_rpc/eth/helpers/
fees.rs

1//! Contains RPC handler implementations for fee history.
2
3use reth_chainspec::{ChainSpecProvider, EthChainSpec, EthereumHardforks};
4use reth_rpc_eth_api::helpers::{EthFees, LoadBlock, LoadFee};
5use reth_rpc_eth_types::{FeeHistoryCache, GasPriceOracle};
6use reth_storage_api::{BlockReader, BlockReaderIdExt, StateProviderFactory};
7
8use crate::EthApi;
9
10impl<Provider, Pool, Network, EvmConfig> EthFees for EthApi<Provider, Pool, Network, EvmConfig>
11where
12    Self: LoadFee,
13    Provider: BlockReader,
14{
15}
16
17impl<Provider, Pool, Network, EvmConfig> LoadFee for EthApi<Provider, Pool, Network, EvmConfig>
18where
19    Self: LoadBlock<Provider = Provider>,
20    Provider: BlockReaderIdExt
21        + ChainSpecProvider<ChainSpec: EthChainSpec + EthereumHardforks>
22        + StateProviderFactory,
23{
24    #[inline]
25    fn gas_oracle(&self) -> &GasPriceOracle<Self::Provider> {
26        self.inner.gas_oracle()
27    }
28
29    #[inline]
30    fn fee_history_cache(&self) -> &FeeHistoryCache {
31        self.inner.fee_history_cache()
32    }
33}