Gas

Examples

Note

These examples are a Jupyter notebook. Grab the original notebook here

gas

Reference

async ctc.evm.async_get_block_gas_stats(block, normalize=True, provider=None)

get gas statistics for a given block

Parameters
  • block (BlockNumberReference | Block) –

  • normalize (bool) –

  • provider (ProviderSpec) –

Return type

BlockGasStats

async ctc.evm.async_get_blocks_gas_stats(blocks=None, start_block=None, end_block=None, normalize=True, provider=None)

get gas statistics aggregated over multiple blocks

Parameters
  • blocks (Sequence[BlockNumberReference] | None) –

  • start_block (BlockNumberReference | None) –

  • end_block (BlockNumberReference | None) –

  • normalize (bool) –

  • provider (ProviderSpec) –

Return type

BlocksGasStats

class ctc.evm.BlockGasStats(**kwargs)
base_fee: int | float | None
gas_limit: int
gas_used: int
max_gas_price: int | float | None
mean_gas_price: float | None
median_gas_price: int | float | None
min_gas_price: int | float | None
n_transactions: int
class ctc.evm.BlocksGasStats(**kwargs)
max_base_fee: int | float | None
max_gas_limit: int | float | None
max_gas_price: int | float | None
max_gas_used: int | float | None
max_mean_gas_price: int | float | None
max_median_gas_price: int | float | None
max_min_gas_price: int | float | None
max_n_transactions: int | float | None
mean_base_fee: int | float | None
mean_gas_limit: int | float | None
mean_gas_price: int | float | None
mean_gas_used: int | float | None
mean_max_gas_price: int | float | None
mean_median_gas_price: int | float | None
mean_min_gas_price: int | float | None
mean_n_transactions: int | float | None
median_base_fee: int | float | None
median_gas_limit: int | float | None
median_gas_used: int | float | None
median_max_gas_price: int | float | None
median_mean_gas_price: int | float | None
median_median_gas_price: int | float | None
median_min_gas_price: int | float | None
median_n_transactions: int | float | None
min_base_fee: int | float | None
min_gas_limit: int | float | None
min_gas_price: int | float | None
min_gas_used: int | float | None
min_max_gas_price: int | float | None
min_mean_gas_price: int | float | None
min_median_gas_price: int | float | None
min_n_transactions: int | float | None
n_blocks: int