Skip to content

API ReferenceErrorsClass

TransactionRevertError

Error indicating a transaction was reverted. Includes the associated revert error type and a user-friendly message if the error type can be parsed by a contract ABI.

Extends

Constructors

Constructor

new TransactionRevertError(
type,
cause?,
message?
): TransactionRevertError;

Parameters

ParameterType
typeRevertErrorType
cause?unknown
message?string

Returns

TransactionRevertError

Overrides

BaseError.constructor

Properties

type

type: RevertErrorType;

Methods

walk()

walk<T>(errorType): T | undefined;

Checks if the provided ErrorType is in the error hierarchy for the current error.

Type Parameters

Type ParameterDescription
T extends ErrorThe type of the error being searched for.

Parameters

ParameterTypeDescription
errorType(…args) => TThe error type to find.

Returns

T | undefined

The error, if it is found in the hierarchy, otherwise undefined.

Inherited from

BaseError.walk