get Unsigned Tx Bytes
fun getUnsignedTxBytes(tx: Transaction, from: String, nonce: BigInteger, fee: Fee): Result<ByteArray>
Returns RLP-encoded unsigned transaction bytes for the given tx/fee. Used by OP Stack L1 fee estimation (GasPriceOracle.getL1Fee(bytes)). Supports both legacy and EIP-1559 (type-2) transactions.
Return
Result with RLP-encoded unsigned tx bytes, or error
Parameters
tx
The transaction (e.g. Transfer)
from
Sender address
nonce
Nonce for the tx (use 0 for fee estimation)
fee
Fee params (legacy or EIP-1559); L1 fee may be null