I am getting following error while Compiling my Solidity Program.

Compiling using solidity from node_modules, solidity version: 0.7.3+commit.9bfce1f6.Emscripten.clang c:/Users/ADMIN/aave-flash-loan-tutorial/aave-flash-loan-v3/contracts/FlashLoan.sol:1:1: ParserError: 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 pragma solidity 0.8.25;

I tried to change the Compiler version from 0.7.3 to 0.8.25 by

1.Default Compiler - Remote 2.Compile using Remote Version - Settings.json

{ "solidity.compileUsingLocalVersion": "", "solidity.compileUsingRemoteVersion": "0.8.25+commit.b61c2a91.Emscripten.clang" }

But my Compiler Version is not changed.

thanks Uday

  • Are you using hardhat? If yes, then change the version in hardhat config file, Commented May 4 at 10:47

1 Answer 1


According to my knowledge assuming you are using VS code and have the official solidity extension maintained by Juan Blanco (found here). The extension is official in the sense that it is the only extension recommended by ethereum.org.

The extension provides a very easy way of toggling compilers:

  • In any *.sol file, right click and press "change workspace compiler version (Remote)"

  • Choose your compiler.

  • Set the compiler version accordingly in config.js if you are using hardhat and then also change on the top of smart contract.

Thats it.

enter image description here


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.