Intrinsic transaction gas calculation.
Covers the base transaction envelope plus static costs derived from calldata, contract creation, access-list entries, and EIP-7702 authorizations — the upfront gas charged before EVM execution begins.
Summary
Functions
Returns the intrinsic gas of tx under hardfork: the 21,000 base, its
calldata, contract creation (32,000 from Homestead, EIP-2, plus 2 per
initcode word from Shanghai, EIP-3860), access-list entries (EIP-2930), and
25,000 per authorization (EIP-7702).
EIP-7623 calldata floor from Prague, 0 before.
Lowest valid gas limit: the larger of intrinsic gas and the calldata floor.
Functions
@spec calculate(EEVM.TxEnv.t(), EEVM.HardforkConfig.t()) :: non_neg_integer()
Returns the intrinsic gas of tx under hardfork: the 21,000 base, its
calldata, contract creation (32,000 from Homestead, EIP-2, plus 2 per
initcode word from Shanghai, EIP-3860), access-list entries (EIP-2930), and
25,000 per authorization (EIP-7702).
@spec calldata_floor_gas_cost(EEVM.TxEnv.t(), EEVM.HardforkConfig.t()) :: non_neg_integer()
EIP-7623 calldata floor from Prague, 0 before.
@spec minimum_gas_limit(EEVM.TxEnv.t(), EEVM.HardforkConfig.t()) :: non_neg_integer()
Lowest valid gas limit: the larger of intrinsic gas and the calldata floor.