import type { Address } from '@ethereumjs/util'; import type { LegacyTxInterface } from '../types.ts'; /** * EIP-2780 execution-gas extras that sit in intrinsic (and the calldata floor * base): recipient cold access and `TX_VALUE_COST` for value-bearing txs. * Create txs already pay `txCreationGas` (CREATE_ACCESS) via * `tx.getIntrinsicGas()`; this helper adds `TX_VALUE_COST` when `value > 0`. * * Since glamsterdam-devnet v8, `TX_VALUE_COST` includes the EIP-7708 transfer * log — do not add `transferLogCost` separately at the tx level. * * Self-transfers (`sender === tx.to`) skip the extras. When `sender` cannot * be resolved, a call is treated as a non-self-transfer (conservative). */ export declare function getEip2780RecipientRegularGas(tx: LegacyTxInterface, sender?: Address): bigint; /** * Floor / intrinsic base for EIP-7623: `TX_BASE`, plus the decomposed EIP-2780 * recipient regular gas (`COLD_ACCOUNT_ACCESS` or `CREATE_ACCESS`, and value * extras). Does not include calldata, access-list, or auth costs. * * See execution-specs#3120: the floor is anchored on this base rather than * `TX_BASE` alone. */ export declare function getEip2780FloorBaseGas(tx: LegacyTxInterface, sender?: Address): bigint; /** * EIP-7623 / EIP-7976 / EIP-7981 floor token count. * * - Pre-7976: 1 token per zero calldata byte, 4 per non-zero. * - EIP-7976: 4 tokens per calldata byte (zero and non-zero). * - EIP-7981: plus 4 tokens per access-list byte (20 per address + 32 per slot). */ export declare function countCalldataFloorTokens(tx: LegacyTxInterface): bigint; /** * EIP-7623 calldata floor: `floor_base + totalCostFloorPerToken * tokens`. * * Under EIP-2780 the floor base is the decomposed regular intrinsic * (`TX_BASE` + recipient/value), not `txGas` alone. Pass `sender` when it is * already known (e.g. `runTx`) so self-transfers are priced correctly even * if the tx is unsigned. * * Returns `0` when EIP-7623 is not active. */ export declare function getCalldataFloorGas(tx: LegacyTxInterface, sender?: Address): bigint; /** * Minimum `gasLimit` for the tx to pass {@link TransactionInterface.isValid}: * `max(getIntrinsicGas(), getCalldataFloorGas())` when EIP-7623 is active, * otherwise intrinsic gas alone. * * Does not include EIP-8037 first-touch state gas (that depends on pre-state; * see `estimateTxGasDimensions()` on `@ethereumjs/vm`). */ export declare function getMinimumGasLimit(tx: LegacyTxInterface, sender?: Address): bigint; /** * EIP-8037 / EIP-7702: state-independent per-authorization regular gas. * Pre-8037 this is already folded into `getDataGas()` via `perEmptyAccountCost`. */ export declare function getEip7702IntrinsicAuthGas(tx: LegacyTxInterface): bigint; //# sourceMappingURL=intrinsic.d.ts.map