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

Method constructor

src/errors/node.ts:22–38  ·  view source on GitHub ↗
({
    cause,
    message,
  }: { cause?: BaseError | undefined; message?: string | undefined } = {})

Source from the content-addressed store, hash-verified

20 static nodeMessage = /execution reverted|gas required exceeds allowance/
21
22 constructor({
23 cause,
24 message,
25 }: { cause?: BaseError | undefined; message?: string | undefined } = {}) {
26 const reason = message
27 ?.replace('execution reverted: ', '')
28 ?.replace('execution reverted', '')
29 super(
30 `Execution reverted ${
31 reason ? `with reason: ${reason}` : 'for an unknown reason'
32 }.`,
33 {
34 cause,
35 name: 'ExecutionRevertedError',
36 },
37 )
38 }
39}
40
41export type FeeCapTooHighErrorType = FeeCapTooHighError & {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected