EvmEip1559Fee

@Serializable
@SerialName(value = "evm_eip1559")
data class EvmEip1559Fee(val maxFeeWei: BigInteger, val l1FeeWei: BigInteger? = null, val gasLimit: BigInteger, val baseFeePerGas: BigInteger, val maxPriorityFeePerGas: BigInteger, val maxFeePerGas: BigInteger) : Fee

Represents an EIP-1559 fee structure for EVM chains.

In the EIP-1559 model:

  • baseFeePerGas: Set by the protocol, burned (not paid to validators)

  • maxPriorityFeePerGas: Tip to validators to prioritize the transaction

  • maxFeePerGas: Maximum total fee willing to pay (base + priority)

Actual fee = min(maxFeePerGas, baseFeePerGas + maxPriorityFeePerGas) * gasUsed

See also

Constructors

Link copied to clipboard
constructor(maxFeeWei: BigInteger, l1FeeWei: BigInteger? = null, gasLimit: BigInteger, baseFeePerGas: BigInteger, maxPriorityFeePerGas: BigInteger, maxFeePerGas: BigInteger)
constructor(baseFeePerGas: BigInteger, maxPriorityFeePerGas: BigInteger, maxFeePerGas: BigInteger, gasLimit: BigInteger, l1FeeWei: BigInteger? = null)

Properties

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
val baseFeePerGas: BigInteger

The current base fee from the latest block (informational)

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
open override val gasLimit: BigInteger

The maximum amount of gas units this transaction can consume

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
open override val l1FeeWei: BigInteger?

L1 data fee in wei on L2s (e.g. Base); null on L1. Included in maxFeeWei.

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
val maxFeePerGas: BigInteger

The maximum total fee per gas unit willing to pay (L2 only)

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
open override val maxFeeWei: BigInteger

Maximum total fee in the network's smallest unit (e.g. wei). Includes L2 execution cost and, on L2s (e.g. Base), l1FeeWei when set. Serialized so Flutter can use it without duplicating logic; use for total cost and reserving balance.

Link copied to clipboard
@Serializable(with = BigIntegerSerializer::class)
val maxPriorityFeePerGas: BigInteger

The tip per gas unit in wei (goes to validator)