revm_primitives/eip2780.rs
1//! EIP-2780: Reduce intrinsic transaction gas
2//!
3//! Replaces the legacy `21,000` intrinsic base with a decomposed model that
4//! prices a reduced sender base plus additional `to`- and `value`-based
5//! charges. Composes with EIP-8037 (state gas) and EIP-8038 (state-access
6//! costs) starting at the Amsterdam hardfork.
7
8/// Reduced intrinsic base cost charged to `tx.sender` (execution-specs `TX_BASE`).
9pub const TX_BASE_COST: u64 = 12_000;
10
11/// Additional intrinsic regular-gas charge for a value-bearing (non-create,
12/// non-self) transaction (execution-specs `TX_VALUE_COST`).
13///
14/// Since glamsterdam devnet-8 the former separate `TRANSFER_LOG_COST` (1,756)
15/// is folded into this constant (`4,244 + 1,756 = 6,000`); contract-creation
16/// transactions no longer pay any value-based charge.
17pub const TX_VALUE_COST: u64 = 6_000;