-2

I'm having this issue, even adding the versions in the hardhat.config file.

module.exports = {
  solidity: {
      compilers: [{version: "0.6.6"}, {version: "0.4.19"}, {version: "0.6.12"}, {version: "0.8.8"}, {version: "0.7.0"}]
  },

Here is still the error, What can I do?? The contract works perfectly in remix.

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

These files import other files that use a different and incompatible version of Solidity:

  * contracts/MarketOrder.sol (^0.8.8) imports @openzeppelin/contracts/token/ERC20/ERC20.sol (^0.7.0)

To learn more, run the command again with --verbose

Read about compiler configuration at https://hardhat.org/config
Oriok
  • 63
  • 7

1 Answers1

0

Your MarketOrder.sol contract has been configured for Solidity 0.8, whereas the imported OpenZeppelin contract is Solidity 0.7

Update your @openzeppelin/contracts package to the latest version or at least one that supports ^0.8.0

Arhaam Patvi
  • 640
  • 5
  • 13