Skip to main content

TransactionRevertWithCustomError <ReceiptType>

This error is used when a transaction to a smart contract fails and a custom user error (https://blog.soliditylang.org/2021/04/21/custom-errors/) is able to be parsed from the revert reason

Hierarchy

Index

Constructors

constructor

  • new TransactionRevertWithCustomError<ReceiptType>(reason: string, customErrorName: string, customErrorDecodedSignature: string, customErrorArguments: Record<string, unknown>, signature?: string, receipt?: ReceiptType, data?: string): TransactionRevertWithCustomError<ReceiptType>
  • Type parameters

    Parameters

    • reason: string
    • customErrorName: string
    • customErrorDecodedSignature: string
    • customErrorArguments: Record<string, unknown>
    • optionalsignature: string
    • optionalreceipt: ReceiptType
    • optionaldata: string

    Returns TransactionRevertWithCustomError<ReceiptType>

Properties

code

code: number

customErrorArguments

customErrorArguments: Record<string, unknown>

customErrorDecodedSignature

customErrorDecodedSignature: string

customErrorName

customErrorName: string

optionaldata

data?: string

innerError

innerError: undefined | Error | Error[]

readonlyname

name: string

reason

reason: string

optionalreceipt

receipt?: ReceiptType

optionalsignature

signature?: string

stack

stack: undefined | string

Methods

toJSON

  • toJSON(): { code: number; customErrorArguments: Record<string, unknown>; customErrorDecodedSignature: string; customErrorName: string; data: undefined | string; innerError: undefined | Error | Error[]; message: string; name: string; reason: string; receipt: undefined | ReceiptType; signature: undefined | string }
  • Returns { code: number; customErrorArguments: Record<string, unknown>; customErrorDecodedSignature: string; customErrorName: string; data: undefined | string; innerError: undefined | Error | Error[]; message: string; name: string; reason: string; receipt: undefined | ReceiptType; signature: undefined | string }

    • code: number
    • customErrorArguments: Record<string, unknown>
    • customErrorDecodedSignature: string
    • customErrorName: string
    • data: undefined | string
    • innerError: undefined | Error | Error[]
    • message: string
    • name: string
    • reason: string
    • receipt: undefined | ReceiptType
    • signature: undefined | string

staticconvertToString

  • convertToString(value: unknown, unquotValue?: boolean): string
  • Parameters

    • value: unknown
    • optionalunquotValue: boolean

    Returns string