[**tevm**](../../README.md) *** [tevm](../../modules.md) / [tx](../README.md) / TransactionFactory # Function: TransactionFactory() > **TransactionFactory**\<`T`\>(`txData`, `txOptions?`): `Transaction`\[`T`\] Create a transaction from a `txData` object ## Type Parameters | Type Parameter | | ------ | | `T` *extends* [`TransactionType`](../type-aliases/TransactionType.md) | ## Parameters | Parameter | Type | Description | | ------ | ------ | ------ | | `txData` | `TypedTxData` | The transaction data. The `type` field will determine which transaction type is returned (if undefined, creates a legacy transaction) | | `txOptions?` | [`TxOptions`](../interfaces/TxOptions.md) | Options to pass on to the constructor of the transaction | ## Returns `Transaction`\[`T`\]