Hey I tried copy-pasting the contracts as you did from the repo and then tried to compile them. It told me that version 0.8.8 is required for the fundMe contract, so the modifier is working correctly.
The error message I was seeing:
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/FundMe.sol (^0.8.8)
* @chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol (^0.8.0)
* contracts/PriceConverter.sol (^0.8.8)
To learn more, run the command again with --verbose
Read about compiler configuration at https://hardhat.org/config
I could only fixed by setting all versions to 0.8.0, without the ^ (also in the hardhat.config.js).
Inside the FundMe.sol contract I also commented the error NotOwner() and adjusted the modifier to look like this:
Hey I tried copy-pasting the contracts as you did from the repo and then tried to compile them. It told me that version 0.8.8 is required for the fundMe contract, so the modifier is working correctly.
The error message I was seeing:
I could only fixed by setting all versions to
0.8.0
, without the^
(also in the hardhat.config.js).Inside the FundMe.sol contract I also commented the
error NotOwner()
and adjusted the modifier to look like this:Then it compiles