Skip to content

ContractError

ContractError: BaseCallError | InvalidAddressError | EvmError | InvalidRequestError | UnexpectedError | InvalidAbiError | InvalidDataError | InvalidFunctionNameError | InvalidArgsError | DecodeFunctionDataError | EncodeFunctionReturnDataError

Errors returned by contract tevm procedure

Example

const {errors} = await tevm.contract({address: '0x1234'})
if (errors?.length) {
console.log(errors[0].name) // InvalidAddressError
}

Source

packages/errors/src/actions/ContractError.ts:22