MCPcopy Create free account
hub / github.com/wevm/viem / constructor

Method constructor

src/errors/transaction.ts:93–111  ·  view source on GitHub ↗
({ transaction }: { transaction: Record<string, unknown> })

Source from the content-addressed store, hash-verified

91 }
92export class InvalidSerializableTransactionError extends BaseError {
93 constructor({ transaction }: { transaction: Record<string, unknown> }) {
94 super('Cannot infer a transaction type from provided transaction.', {
95 metaMessages: [
96 'Provided Transaction:',
97 '{',
98 prettyPrint(transaction),
99 '}',
100 '',
101 'To infer the type, either provide:',
102 '- a `type` to the Transaction, or',
103 '- an EIP-1559 Transaction with `maxFeePerGas`, or',
104 '- an EIP-2930 Transaction with `gasPrice` & `accessList`, or',
105 '- an EIP-4844 Transaction with `blobs`, `blobVersionedHashes`, `sidecars`, or',
106 '- an EIP-7702 Transaction with `authorizationList`, or',
107 '- a Legacy Transaction with `gasPrice`',
108 ],
109 name: 'InvalidSerializableTransactionError',
110 })
111 }
112}
113
114export type InvalidSerializedTransactionTypeErrorType =

Callers

nothing calls this directly

Calls 1

prettyPrintFunction · 0.85

Tested by

no test coverage detected