pub trait EthFees: LoadFeewhere
Self::Provider: ChainSpecProvider,
<Self::Provider as ChainSpecProvider>::ChainSpec: EthChainSpec<Header = <Self::Provider as HeaderProvider>::Header>,{
// Provided methods
fn gas_price(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: LoadBlock { ... }
fn blob_base_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where Self: LoadBlock { ... }
fn base_fee(
&self,
) -> impl Future<Output = Result<Option<Uint<256, 4>>, Self::Error>> + Send
where Self: LoadBlock { ... }
fn suggested_priority_fee(
&self,
) -> impl Future<Output = Result<Uint<256, 4>, Self::Error>> + Send
where 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 approximate_percentile(
&self,
entry: &FeeHistoryEntry<<Self::Provider as HeaderProvider>::Header>,
requested_percentile: f64,
) -> u128 { ... }
}rpc only.Expand description
Fee related functions for the EthApiServer trait in the
eth_ namespace.
Provided Methods§
Sourcefn 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,
Returns a suggestion for a gas price for legacy transactions.
See also: https://github.com/ethereum/pm/issues/328#issuecomment-853234014
Sourcefn 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,
Returns a suggestion for a base fee for blob transactions.
Sourcefn base_fee(
&self,
) -> impl Future<Output = Result<Option<Uint<256, 4>>, Self::Error>> + Sendwhere
Self: LoadBlock,
fn base_fee(
&self,
) -> impl Future<Output = Result<Option<Uint<256, 4>>, Self::Error>> + Sendwhere
Self: LoadBlock,
Returns the base fee for the next block, or None before London activation.
Sourcefn 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,
Returns a suggestion for the priority fee (the tip)
Sourcefn 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
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.
Sourcefn approximate_percentile(
&self,
entry: &FeeHistoryEntry<<Self::Provider as HeaderProvider>::Header>,
requested_percentile: f64,
) -> u128
fn approximate_percentile( &self, entry: &FeeHistoryEntry<<Self::Provider as HeaderProvider>::Header>, requested_percentile: f64, ) -> u128
Approximates reward at a given percentile for a specific block Based on the configured resolution
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".