import type { Address } from 'abitype'; import type { FeeValuesEIP1559 } from '../../types/fee.js'; import type { Hash, Hex } from '../../types/misc.js'; import type { Index, Quantity, RpcTransactionReceipt, RpcTransactionRequest as RpcTransactionRequest_ } from '../../types/rpc.js'; import type { Transaction as Transaction_, TransactionBase, TransactionEIP1559 as TransactionEIP1559_, TransactionEIP2930 as TransactionEIP2930_, TransactionLegacy as TransactionLegacy_, TransactionReceipt, TransactionRequest as TransactionRequest_, TransactionRequestBase, TransactionSerializable, TransactionSerializableEIP1559, TransactionSerialized, TransactionType } from '../../types/transaction.js'; import type { ExactPartial, OneOf, UnionOmit } from '../../types/utils.js'; import type { ZksyncEip712Meta } from './eip712.js'; import type { ZksyncFee, ZksyncFeeValues } from './fee.js'; import type { ZksyncL2ToL1Log, ZksyncLog, ZksyncRpcL2ToL1Log, ZksyncRpcLog } from './log.js'; type EIP712Type = '0x71'; type PriorityType = '0xff'; type TransactionOverrides = { l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; }; type TransactionPriority = TransactionBase & TransactionOverrides & FeeValuesEIP1559 & { type: 'priority'; }; export type ZksyncTransactionEIP712 = TransactionBase & TransactionOverrides & FeeValuesEIP1559 & { type: 'eip712' | 'priority'; }; type Transaction = Transaction_ & TransactionOverrides; export type ZksyncTransaction = Transaction | TransactionPriority | ZksyncTransactionEIP712; type RpcTransactionOverrides = { l1BatchNumber: Hex | null; l1BatchTxIndex: Hex | null; }; type RpcTransactionLegacy = TransactionLegacy_ & RpcTransactionOverrides; type RpcTransactionEIP2930 = TransactionEIP2930_ & RpcTransactionOverrides; type RpcTransactionEIP1559 = TransactionEIP1559_ & RpcTransactionOverrides; export type ZksyncRpcTransactionPriority = TransactionBase & ZksyncFeeValues & RpcTransactionOverrides & { accessList?: undefined; chainId: Hex; type: PriorityType; }; export type ZksyncRpcTransactionEIP712 = TransactionBase & ZksyncFeeValues & RpcTransactionOverrides & { accessList?: undefined; chainId: Hex; type: EIP712Type; }; export type ZksyncRpcTransaction = UnionOmit | RpcTransactionEIP2930 | RpcTransactionEIP1559 | ZksyncRpcTransactionPriority | ZksyncRpcTransactionEIP712, 'typeHex'>; export type TransactionRequest = TransactionRequest_ & { gasPerPubdata?: undefined; customSignature?: undefined; paymaster?: undefined; paymasterInput?: undefined; factoryDeps?: undefined; }; export type ZksyncTransactionRequestEIP712 = Omit, 'type'> & ExactPartial & { gasPerPubdata?: bigint | undefined; customSignature?: Hex | undefined; factoryDeps?: Hex[] | undefined; type?: 'eip712' | 'priority' | undefined; } & ({ paymaster: Address; paymasterInput: Hex; } | { paymaster?: undefined; paymasterInput?: undefined; }); export type ZksyncTransactionRequest = TransactionRequest | ZksyncTransactionRequestEIP712; type RpcTransactionRequest = RpcTransactionRequest_ & { eip712Meta?: undefined; }; export type ZksyncRpcTransactionRequestEIP712 = TransactionRequestBase & ExactPartial> & { eip712Meta: ZksyncEip712Meta; type: EIP712Type | PriorityType; }; export type ZksyncRpcTransactionRequest = RpcTransactionRequest | ZksyncRpcTransactionRequestEIP712; export type ZksyncTransactionType = TransactionType | 'eip712' | 'priority'; export type ZksyncRpcTransactionReceiptOverrides = { l1BatchNumber: Hex | null; l1BatchTxIndex: Hex | null; logs: ZksyncRpcLog[]; l2ToL1Logs: ZksyncRpcL2ToL1Log[]; root: Hex; }; export type ZksyncRpcTransactionReceipt = Omit & ZksyncRpcTransactionReceiptOverrides; export type ZksyncTransactionReceiptOverrides = { l1BatchNumber: bigint | null; l1BatchTxIndex: bigint | null; logs: ZksyncLog[]; l2ToL1Logs: ZksyncL2ToL1Log[]; }; export type ZksyncTransactionReceipt = Omit, 'logs'> & ZksyncTransactionReceiptOverrides; export type ZksyncTransactionSerializable = OneOf; export type ZksyncTransactionSerialized = type extends 'eip712' ? ZksyncTransactionSerializedEIP712 : TransactionSerialized; export type ZksyncTransactionSerializedEIP712 = `0x71${string}`; export type ZksyncTransactionSerializableEIP712 = Omit, 'type'> & { from: Hex; gasPerPubdata?: bigint | undefined; paymaster?: Address | undefined; factoryDeps?: Hex[] | undefined; paymasterInput?: Hex | undefined; customSignature?: Hex | undefined; type?: 'eip712' | undefined; }; export type ZksyncEIP712TransactionSignable = { txType: bigint; from: bigint; to: bigint; gasLimit: bigint; gasPerPubdataByteLimit: bigint; maxFeePerGas: bigint; maxPriorityFeePerGas: bigint; paymaster: bigint; nonce: bigint; value: bigint; data: Hex; factoryDeps: Hex[]; paymasterInput: Hex; }; export type TransactionRequestEIP712 = TransactionRequestBase & ExactPartial> & { accessList?: undefined; gasPerPubdata?: bigint | undefined; factoryDeps?: Hex[] | undefined; paymaster?: Address | undefined; paymasterInput?: Hex | undefined; customSignature?: Hex | undefined; type?: transactionType | undefined; }; type CommonDataRawBlockTransaction = { sender: Address; maxFeePerGas: Hex; gasLimit: Hex; gasPerPubdataLimit: Hex; ethHash: Hash; ethBlock: number; canonicalTxHash: Hash; toMint: Hex; refundRecipient: Address; }; export type ZksyncRawBlockTransactions = { commonData: { L1?: ({ serialId: number; deadlineBlock: number; layer2TipFee: Hex; fullFee: Hex; opProcessingType: string; priorityQueueType: string; } & CommonDataRawBlockTransaction) | undefined; L2?: { nonce: number; fee: ZksyncFee; initiatorAddress: Address; signature: Uint8Array; transactionType: string; input?: { hash: Hash; data: Uint8Array; } | undefined; paymasterParams: { paymaster: Address; paymasterInput: Uint8Array; }; } | undefined; ProtocolUpgrade?: ({ upgradeId: string; } & CommonDataRawBlockTransaction) | undefined; }; execute: { calldata: Hash; contractAddress: Address; factoryDeps?: Hash; value: bigint; }; receivedTimestampMs: number; rawBytes?: string | undefined; }[]; export type ZksyncTransactionDetails = { isL1Originated: boolean; status: string; fee: bigint; gasPerPubdata: bigint; initiatorAddress: Address; receivedAt: Date; ethCommitTxHash?: Hash | undefined; ethProveTxHash?: Hash | undefined; ethExecuteTxHash?: Hash | undefined; }; export {}; //# sourceMappingURL=transaction.d.ts.map