Hello I'm working on ethereum project using truffle framework, I want to know what is the latest solidity compiler version supported by truffle.

2 Answers 2


You may specify...

  • any solc-js version (using semver) listed at solc-bin. Specify the one you want and Truffle will get it for you.
  • "native" to use a natively compiled solc binary (you'll need to install this yourself, links to help below).
  • a dockerized solc tag from one of images published here.
  • a path to a locally available solc
  • "pragma" to have Truffle autodetect solc versions from your source files. This can be used to compile using multiple versions of solc.
  • a solc-js parser for faster docker and native compilations

Source: https://trufflesuite.com/docs/truffle/reference/configuration#solc


Any of them, but you need to change the config file for Truffle, Truffle-config.js. If you want to use 0.8.7, you must change (or add) the following

compilers: {
  solc: {
    version: "0.8.7"

next time you compile the contract, you will see that Truffle will use this version to compile the code.

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.

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