import type { FeeValuesEIP1559 } from '../../types/fee.js' import type { Hex } from '../../types/misc.js' import type { Index, Quantity, RpcTransactionReceipt, RpcTransaction as RpcTransaction_, } from '../../types/rpc.js' import type { TransactionBase, TransactionReceipt, TransactionSerializable, TransactionSerializableBase, TransactionSerialized, TransactionType, Transaction as Transaction_, } from '../../types/transaction.js' import type { OneOf } from '../../types/utils.js' type RpcTransaction = RpcTransaction_ & { isSystemTx?: undefined mint?: undefined sourceHash?: undefined } export type OpStackRpcDepositTransaction = Omit, 'typeHex'> & FeeValuesEIP1559 & { isSystemTx?: boolean | undefined mint?: Hex | undefined sourceHash: Hex type: '0x7e' } export type OpStackRpcTransaction = OneOf< RpcTransaction | OpStackRpcDepositTransaction > export type OpStackRpcTransactionReceiptOverrides = { l1GasPrice: Hex | null l1GasUsed: Hex | null l1Fee: Hex | null l1FeeScalar: `${number}` | null } export type OpStackRpcTransactionReceipt = RpcTransactionReceipt & OpStackRpcTransactionReceiptOverrides type Transaction = Transaction_< bigint, number, pending > & { isSystemTx?: undefined mint?: undefined sourceHash?: undefined } export type OpStackDepositTransaction = TransactionBase & FeeValuesEIP1559 & { isSystemTx?: boolean mint?: bigint | undefined sourceHash: Hex type: 'deposit' } export type OpStackTransaction = | Transaction | OpStackDepositTransaction export type OpStackTransactionReceiptOverrides = { l1GasPrice: bigint | null l1GasUsed: bigint | null l1Fee: bigint | null l1FeeScalar: number | null } export type OpStackTransactionReceipt = TransactionReceipt & OpStackTransactionReceiptOverrides export type OpStackTransactionSerializable = OneOf< TransactionSerializableDeposit | TransactionSerializable > export type OpStackTransactionSerialized< type extends OpStackTransactionType = OpStackTransactionType, > = type extends 'deposit' ? TransactionSerializedDeposit : TransactionSerialized export type OpStackTransactionType = TransactionType | 'deposit' export type TransactionSerializableDeposit< quantity = bigint, index = number, > = Omit< TransactionSerializableBase, 'nonce' | 'r' | 's' | 'v' > & { from: Hex isSystemTx?: boolean mint?: bigint | undefined sourceHash: Hex type: 'deposit' } export type TransactionSerializedDeposit = `0x7e${string}`