Problem with devDependencies ( chai / waffle / toolbox) #6021
-
Hello, I am currently on lesson 9 and sure enough Raffle.test.js is giving me problems at .to.be.revertedWith("Raffle__NotEnoughETHEntered")
all deploys and tests worked fine until here. my package.json looks like this: {
"devDependencies": {
"@chainlink/contracts": "^0.6.1",
"@nomicfoundation/hardhat-chai-matchers": "^2.0.2",
"@nomicfoundation/hardhat-toolbox": "^3.0.0",
"@nomiclabs/hardhat-ethers": "npm:hardhat-deploy-ethers",
"@nomiclabs/hardhat-etherscan": "^3.1.7",
"chai": "^4.3.7",
"dotenv": "^16.3.1",
"ethereum-waffle": "^4.0.10",
"ethers": "^6.4.0",
"hardhat": "^2.17.1",
"hardhat-contract-sizer": "^2.10.0",
"hardhat-deploy": "^0.11.36",
"hardhat-gas-reporter": "^1.0.9",
"prettier": "^3.0.2",
"prettier-plugin-solidity": "^1.1.3",
"solhint": "^3.6.1",
"solidity-coverage": "^0.8.4"
},
"dependencies": {
"@nomicfoundation/hardhat-ethers": "^3.0.4",
"@nomicfoundation/hardhat-verify": "^1.0.0",
"@typechain/ethers-v6": "^0.4.0",
"@typechain/hardhat": "^8.0.0",
"@types/mocha": ">=9.1.0",
"hardhat-shorthand": "^1.0.0",
"ts-node": ">=8.0.0",
"typescript": ">=4.5.0"
}
} and the head section of my hardhat.config.js like this: require("@nomicfoundation/hardhat-toolbox")
//require("@nomiclabs/hardhat-waffle")
require("@nomiclabs/hardhat-etherscan")
require("hardhat-deploy")
require("solidity-coverage")
require("hardhat-gas-reporter")
require("hardhat-contract-sizer")
require("dotenv").config() any help would be more then appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
if i remove "@nomicfoundation/hardhat-verify": "^1.0.0",
|
Beta Was this translation helpful? Give feedback.
-
https://github.com/shikhar229169/Raffle-Hardhat-Ethers-v6 I recently did it for the latest ethers version with all latest packages, you can check it out and refactor your code accordingly. |
Beta Was this translation helpful? Give feedback.
https://github.com/shikhar229169/Raffle-Hardhat-Ethers-v6
I recently did it for the latest ethers version with all latest packages, you can check it out and refactor your code accordingly.
The error you provided most probably occur due to packages issue.