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

Method constructor

src/errors/transaction.ts:138–160  ·  view source on GitHub ↗
({
    attributes,
    serializedTransaction,
    type,
  }: {
    attributes: Record<string, unknown>
    serializedTransaction: Hex
    type: TransactionType
  })

Source from the content-addressed store, hash-verified

136 type: TransactionType
137
138 constructor({
139 attributes,
140 serializedTransaction,
141 type,
142 }: {
143 attributes: Record<string, unknown>
144 serializedTransaction: Hex
145 type: TransactionType
146 }) {
147 const missing = Object.entries(attributes)
148 .map(([key, value]) => (typeof value === 'undefined' ? key : undefined))
149 .filter(Boolean)
150 super(`Invalid serialized transaction of type "${type}" was provided.`, {
151 metaMessages: [
152 `Serialized Transaction: "${serializedTransaction}"`,
153 missing.length > 0 ? `Missing Attributes: ${missing.join(', ')}` : '',
154 ].filter(Boolean),
155 name: 'InvalidSerializedTransactionError',
156 })
157
158 this.serializedTransaction = serializedTransaction
159 this.type = type
160 }
161}
162
163export type InvalidStorageKeySizeErrorType = InvalidStorageKeySizeError & {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected