ethereumjs-monorepo

@ethereumjs/tx


@ethereumjs/tx / getCalldataFloorGas

Function: getCalldataFloorGas()

getCalldataFloorGas(tx, sender?): bigint

Defined in: util/intrinsic.ts:124

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.

Parameters

tx

LegacyTxInterface

sender?

Address

Returns

bigint