Lesson 9- AssertionError: Expected transaction to be reverted with reason 'Raffle__SendMoreToEnterRaffle', but it reverted with a custom error #5816
-
|
I got tons of error in the process, maybe my dependencies were not right. I shifted to ethers v5 and was getting TypeError: (0 , ethers_1.getAddress) is not a function this error. After searching on google and these discussions for solution I upgraded to ethers6.6.2 and started getting this error AssertionError: Expected transaction to be reverted with reason 'Raffle__SendMoreToEnterRaffle', but it reverted with a custom error. Here is the Link to the repo https://github.com/VasuShrivastava/hardhat-raffle-fcc.git |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
As I can see from your contract, from there you are reverting with error |
Beta Was this translation helpful? Give feedback.
Yes, it is giving me same error.
I recommend you to refactor your hardhat config file:
And also your package.json file
{ "devDependencies": { "@chainlink/contracts": "^0.6.1", "@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers", "@nomiclabs/hardhat-etherscan": "^3.1.6", "@nomiclabs/hardhat-waffle": "^2.0.5", "chai": "^4.3.7", "dotenv": "^16.0.3", "ethereum-waffle": "^4.0.9", "ethers": "5.7.2", "hardhat": "^2.12.7", "…