PatrickAlphaC / hardhat-fund-me-fcc

82 stars 184 forks source link

Change MockV3Aggregator to v0.8 #186

Open mosh02 opened 7 months ago

mosh02 commented 7 months ago

I am on lesson 7 and for some reason I had an issue deploying when my MockV3Interface and got this error

"Error HH606: The project cannot be compiled, see reasons below.

The Solidity version pragma statement in these files doesn't match any of the configured compilers in your config. Change the pragma or configure additional compiler versions in your hardhat config.

  * contracts/test/MockV3Aggregator.sol (^0.6.0)
  * @chainlink/contracts/src/v0.6/tests/MockV3Aggregator.sol (^0.6.0)
  * @chainlink/contracts/src/v0.6/interfaces/AggregatorV2V3Interface.sol (^0.6.0)
  * @chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol (^0.6.0)
  * @chainlink/contracts/src/v0.6/interfaces/AggregatorInterface.sol (^0.6.0)"

Keep in mind I do have solidity: { compilers: [ { version: "0.8.7", }, { version: "0.6.6", }, ], in my hardhat config as is in the repo and my package.json is the same as the one on the repo as well.

Changing the MockV3Aggregator to the v0.8 fixed this issue. I suggest changing it on the repo as well to avoid it happening with future learners. (I dont think v0.8 is significantly different than v0.6 in the context of this course).

PatrickAlphaC commented 7 months ago

Can you try to git clone the repo and follow the install instructions and see if you get the same errors?