estimateL1Fee

open suspend fun estimateL1Fee(to: String, from: String? = null, value: String? = null, data: String? = null, gasLimit: String? = null): BigInteger?

Estimate L1 data fee for a transaction (Base/OP Stack L2s). Returns null if the RPC does not support eth_estimateL1Fee (e.g. L1 chains). Prefer getL1FeeFromGasPriceOracle when EvmFeatures.opStackL1Fee is true.

Return

L1 fee in wei, or null if unsupported / error

Parameters

to

Destination address

from

Source address (optional)

value

Value in wei as hex string (optional)

data

Contract call data (optional)

gasLimit

Gas limit as hex string (optional; some nodes use it for L1 size estimate)