Lesson 9: Error: VM Exception while processing transaction: reverted with an unrecognized custom error #5507
-
Hi team, I'm getting the below error when trying to do my unit tests which should revert when the raffle is calculating. "Error: VM Exception while processing transaction: reverted with an unrecognized custom error" Based on my console logs, it does not get beyond the performUpkeep section of my test. I've tried a few things without any success. Even when using 'to.be.revertedWithCustomError', I still get the same error message for some reason. Any help would be greatly appreciated. Please let me know if you require any further information. My test script:
My Raffle.sol contract:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 11 replies
-
@AmethRP Please show the terminal error. |
Beta Was this translation helpful? Give feedback.
@AmethRP The solution I just was for the latest version of chai matcher which comes built-in with hardhat-toolbox dependency.
But for your version this is working;
Try to remove both .lock files and node_modules folder and reinstall dependencies and then retry.