Skip to main content

formatTransaction

Callable

  • formatTransaction<ReturnFormat, TransactionType>(transaction: TransactionType, returnFormat?: ReturnFormat, options?: { fillInputAndData?: boolean; transactionSchema?: FullValidationSchema | ShortValidationSchema | { properties: { accessList: { items: { properties: { address: { format: string }; storageKeys: { items: { format: string }; type: string } }; type: string }; type: string }; chain: { enum: string[]; type: string }; chainId: { format: string }; common: { properties: { baseChain: { enum: string[]; type: string }; customChain: { properties: { chainId: { format: string }; name: { format: string }; networkId: { format: string } }; type: string }; hardfork: { enum: string[]; type: string } }; type: string }; data: { format: string }; effectiveGasPrice: { format: string }; from: { format: string }; gas: { format: string }; gasLimit: { format: string }; gasPrice: { format: string }; hardfork: { enum: string[]; type: string }; input: { format: string }; maxFeePerGas: { format: string }; maxPriorityFeePerGas: { format: string }; networkId: { format: string }; nonce: { format: string }; r: { format: string }; s: { format: string }; to: { oneOf: ({ format: string; type?: undefined } | { format?: undefined; type: string })[] }; type: { format: string }; v: { format: string }; value: { format: string } }; type: string } }): FormatType<TransactionType, ReturnFormat>

  • Type parameters

    Parameters

    • transaction: TransactionType
    • returnFormat: ReturnFormat = ...
    • options: { fillInputAndData?: boolean; transactionSchema?: FullValidationSchema | ShortValidationSchema | { properties: { accessList: { items: { properties: { address: { format: string }; storageKeys: { items: { format: string }; type: string } }; type: string }; type: string }; chain: { enum: string[]; type: string }; chainId: { format: string }; common: { properties: { baseChain: { enum: string[]; type: string }; customChain: { properties: { chainId: { format: string }; name: { format: string }; networkId: { format: string } }; type: string }; hardfork: { enum: string[]; type: string } }; type: string }; data: { format: string }; effectiveGasPrice: { format: string }; from: { format: string }; gas: { format: string }; gasLimit: { format: string }; gasPrice: { format: string }; hardfork: { enum: string[]; type: string }; input: { format: string }; maxFeePerGas: { format: string }; maxPriorityFeePerGas: { format: string }; networkId: { format: string }; nonce: { format: string }; r: { format: string }; s: { format: string }; to: { oneOf: ({ format: string; type?: undefined } | { format?: undefined; type: string })[] }; type: { format: string }; v: { format: string }; value: { format: string } }; type: string } } = ...

    Returns FormatType<TransactionType, ReturnFormat>