Skip to content
On this page

parseTransaction โ€‹

Parses a serialized RLP-encoded transaction. Supports signed & unsigned EIP-1559, EIP-2930 and Legacy Transactions.

Import โ€‹

ts
import { parseTransaction } from 'viem'

Usage โ€‹

ts
import { parseTransaction } from 'viem'

const transaction = parseTransaction('0x02ef0182031184773594008477359400809470997970c51812dc3a010c7d01b50e0d17dc79c8880de0b6b3a764000080c0')

Returns โ€‹

TransactionSerializable

The parsed transaction object.

Parameters โ€‹

serializedTransaction โ€‹

  • Type: Hex

The serialized transaction.

Released under the MIT License.