{"version":3,"file":"error.cjs","sourceRoot":"","sources":["../../src/utils/error.ts"],"names":[],"mappings":";;;AAAA,qDAAkD;AAClD,2CAAiD;AAGjD;;;;;;GAMG;AACH,SAAgB,wBAAwB,CACtC,KAAc;IAEd,OAAO,CACL,IAAA,sBAAc,EAAC,KAAK,CAAC;QACrB,KAAK,CAAC,IAAI,KAAK,uBAAU,CAAC,GAAG,CAAC,YAAY;QAC1C,KAAK,CAAC,OAAO,KAAK,oBAAoB,CACvC,CAAC;AACJ,CAAC;AARD,4DAQC","sourcesContent":["import { errorCodes } from '@metamask/rpc-errors';\nimport { isJsonRpcError } from '@metamask/utils';\nimport type { JsonRpcError } from '@metamask/utils';\n\n/**\n * Checks if a value is a JSON-RPC error that indicates an execution reverted error.\n *\n * @param error - The value to check.\n * @returns True if the value is a JSON-RPC error that indicates an execution reverted\n * error, false otherwise.\n */\nexport function isExecutionRevertedError(\n  error: unknown,\n): error is JsonRpcError {\n  return (\n    isJsonRpcError(error) &&\n    error.code === errorCodes.rpc.invalidInput &&\n    error.message === 'execution reverted'\n  );\n}\n"]}