1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
use U256;
/// The default Ethereum block gas limit: 30M
pub const ETHEREUM_BLOCK_GAS_LIMIT_30M: u64 = 30_000_000;
/// The default Ethereum block gas limit: 36M
pub const ETHEREUM_BLOCK_GAS_LIMIT_36M: u64 = 36_000_000;
/// The bound divisor of the gas limit, used in update calculations.
pub const GAS_LIMIT_BOUND_DIVISOR: u64 = 1024;
/// The minimum tx fee below which the txpool will reject the transaction.
///
/// Configured to `7` WEI which is the lowest possible value of base fee under mainnet EIP-1559
/// parameters. `BASE_FEE_MAX_CHANGE_DENOMINATOR` <https://eips.ethereum.org/EIPS/eip-1559>
/// is `8`, or 12.5%. Once the base fee has dropped to `7` WEI it cannot decrease further because
/// 12.5% of 7 is less than 1.
///
/// Note that min base fee under different 1559 parameterizations may differ, but there's no
/// significant harm in leaving this setting as is.
pub const MIN_PROTOCOL_BASE_FEE: u64 = 7;
/// Same as [MIN_PROTOCOL_BASE_FEE] but as a U256.
pub const MIN_PROTOCOL_BASE_FEE_U256: U256 = U256from_limbs;
/// Initial base fee as defined in [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)
pub const INITIAL_BASE_FEE: u64 = 1_000_000_000;
/// Base fee max change denominator as defined in [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)
pub const DEFAULT_BASE_FEE_MAX_CHANGE_DENOMINATOR: u64 = 8;
/// Elasticity multiplier as defined in [EIP-1559](https://eips.ethereum.org/EIPS/eip-1559)
pub const DEFAULT_ELASTICITY_MULTIPLIER: u64 = 2;
/// Base fee max change denominator for Optimism Sepolia as defined in the Optimism
/// [transaction costs](https://docs.optimism.io/stack/differences#transactions) doc.
pub const OP_SEPOLIA_EIP1559_DEFAULT_BASE_FEE_MAX_CHANGE_DENOMINATOR: u128 = 50;
/// Base fee max change denominator for Optimism Sepolia as defined in the Optimism Canyon hardfork.
pub const OP_SEPOLIA_EIP1559_BASE_FEE_MAX_CHANGE_DENOMINATOR_CANYON: u128 = 250;
/// Base fee max change denominator for Optimism Sepolia as defined in the Optimism
/// [transaction costs](https://docs.optimism.io/stack/differences#transactions) doc.
pub const OP_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 6;
/// Base fee max change denominator for Optimism Mainnet as defined in the Optimism
/// [transaction costs](https://docs.optimism.io/stack/differences#transactions) doc.
pub const OP_MAINNET_EIP1559_DEFAULT_BASE_FEE_MAX_CHANGE_DENOMINATOR: u128 = 50;
/// Base fee max change denominator for Optimism Mainnet as defined in the Optimism Canyon hardfork.
pub const OP_MAINNET_EIP1559_BASE_FEE_MAX_CHANGE_DENOMINATOR_CANYON: u128 = 250;
/// Base fee max change denominator for Optimism Mainnet as defined in the Optimism
/// [transaction costs](https://docs.optimism.io/stack/differences#transactions) doc.
pub const OP_MAINNET_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 6;
/// Base fee max change denominator for Base Sepolia as defined in the Optimism
/// [transaction costs](https://docs.optimism.io/stack/differences#transactions) doc.
pub const BASE_SEPOLIA_EIP1559_DEFAULT_ELASTICITY_MULTIPLIER: u128 = 10;