Trait reth::core::rpc::api::servers::eth::helpers::EthFees

source ·
pub trait EthFees: LoadFee {
    // Provided methods
    fn gas_price(
        &self,
    ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
       where Self: LoadBlock { ... }
    fn blob_base_fee(
        &self,
    ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
       where Self: LoadBlock { ... }
    fn suggested_priority_fee(
        &self,
    ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
       where Self: 'static { ... }
    fn fee_history(
        &self,
        block_count: u64,
        newest_block: BlockNumberOrTag,
        reward_percentiles: Option<Vec<f64>>,
    ) -> impl Future<Output = Result<FeeHistory, EthApiError>> + Send { ... }
    fn approximate_percentile(
        &self,
        entry: &FeeHistoryEntry,
        requested_percentile: f64,
    ) -> u128 { ... }
}
Expand description

Fee related functions for the EthApiServer trait in the eth_ namespace.

Provided Methods§

source

fn gas_price( &self, ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
where Self: LoadBlock,

Returns a suggestion for a gas price for legacy transactions.

See also: https://github.com/ethereum/pm/issues/328#issuecomment-853234014

source

fn blob_base_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
where Self: LoadBlock,

Returns a suggestion for a base fee for blob transactions.

source

fn suggested_priority_fee( &self, ) -> impl Future<Output = Result<Uint<256, 4>, EthApiError>> + Send
where Self: 'static,

Returns a suggestion for the priority fee (the tip)

source

fn fee_history( &self, block_count: u64, newest_block: BlockNumberOrTag, reward_percentiles: Option<Vec<f64>>, ) -> impl Future<Output = Result<FeeHistory, EthApiError>> + Send

Reports the fee history, for the given amount of blocks, up until the given newest block.

If reward_percentiles are provided the FeeHistory will include the approximated rewards for the requested range.

source

fn approximate_percentile( &self, entry: &FeeHistoryEntry, requested_percentile: f64, ) -> u128

Approximates reward at a given percentile for a specific block Based on the configured resolution

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Provider, Pool, Network, EvmConfig> EthFees for EthApi<Provider, Pool, Network, EvmConfig>
where EthApi<Provider, Pool, Network, EvmConfig>: LoadFee,