diff --git a/libs/remix-lib/src/execution/txExecution.ts b/libs/remix-lib/src/execution/txExecution.ts index 6c65b46dbd..e7eb879c74 100644 --- a/libs/remix-lib/src/execution/txExecution.ts +++ b/libs/remix-lib/src/execution/txExecution.ts @@ -82,7 +82,7 @@ export function checkError (execResult, compiledContracts) { const exceptionError = execResult.errorMessage || '' const error = `Error occured: ${execResult.errorMessage}.\n` let msg = '' - if (exceptionError === errorCode.INVALID_OPCODE) { + if (exceptionError.includes(errorCode.INVALID_OPCODE)) { msg = '\t\n\tThe execution might have thrown OR the EVM version used by the selected environment is not compatible with the compiler EVM version.\n' ret.error = true } else if (exceptionError === errorCode.OUT_OF_GAS) { @@ -173,4 +173,4 @@ export function checkError (execResult, compiledContracts) { } ret.message = `${error}\n${exceptionError}\n${msg}\nDebug the transaction to get more information.` return ret -} \ No newline at end of file +}