Skip to main content

Module fees

Module fees 

Source

Modulesยง

optimism ๐Ÿ”’ optimism
Optimism-specific dynamic EIP-1559 fee rules.

Structsยง

FeeDetails
FeeHistoryCacheItem
A single item in the whole fee history cache
FeeHistoryService
An async service that takes care of the FeeHistory cache
FeeManager
Stores the fee related information
FeeRules ๐Ÿ”’
FeeSnapshot ๐Ÿ”’
Chain-derived fee state for the next block.
FeeState ๐Ÿ”’
ParentHeaderFees ๐Ÿ”’

Enumsยง

BaseFeeRules ๐Ÿ”’

Constantsยง

BASE_FEE_CHANGE_DENOMINATOR
Bounds the amount the base fee can change between blocks.
INITIAL_BASE_FEE
Initial base fee for EIP-1559 blocks.
INITIAL_GAS_PRICE
Initial default gas price for the first block
MAX_FEE_HISTORY_CACHE_SIZE
Maximum number of entries in the fee history cache
MIN_SUGGESTED_PRIORITY_FEE
Minimum suggested priority fee
REWARD_PERCENTILE_RESOLUTION ๐Ÿ”’
Number of cached reward samples per percentile.

Staticsยง

REWARD_PERCENTILES ๐Ÿ”’
Percentile list from 0.0 to 100.0 with a 0.5 resolution (201 points).

Functionsยง

calculate_next_block_base_fee_per_gas ๐Ÿ”’
calculate_parent_header_fees ๐Ÿ”’
create_fee_history_cache_item ๐Ÿ”’
Builds the FeeHistoryCacheItem for a single block.
insert_fee_history_cache_item ๐Ÿ”’
Inserts an entry into the fee history cache and trims it back to fee_history_limit.
reward_percentiles ๐Ÿ”’
Calculates percentile rewards from transactions sorted by effective reward.
tempo_next_block_base_fee ๐Ÿ”’
Computes the next blockโ€™s base fee for a Tempo chain.

Type Aliasesยง

FeeHistoryCache