0

I started getting this error...

Source file requires different compiler version (current compiler is 0.7.3+commit.9bfce1f6.Emscripten.clang) - note that nightly builds are considered to be strictly less than the released version

...a few days ago on the following line of code only:

pragma solidity ^0.8.17;  

Anyway, this seems to be compiling without issues.

Anybody knows what may be causing this and how I can get rid of it?

8
  • What environment are you working on ? May 23 at 12:55
  • What do you mean with environment? I am using Visual Studio Code with solidity extension. May 23 at 23:42
  • Environment refers to the tools you are using to write the code. Like remix, hardhat, truffle, foundry. I assume you are using hardhat. This error might be coming from the hardhat config file because of different pragma versions in your smart contract and the config file. May 24 at 5:08
  • Yes, I am using hardhat for compilation. May 24 at 6:35
  • What version of of Solidity do you have specified inside hardhat.config file?
    – kornelHub
    May 24 at 12:27

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.