eth-sri / securify2

Securify v2.0
Apache License 2.0
579 stars 133 forks source link

Solidity Compiler Version #1

Open Miller-kk opened 4 years ago

Miller-kk commented 4 years ago

I wanna change solidity's compiler version. (current version is v0.5.12.)

i installed solc v0.4.24 and changed my env path.

But I get the following error. Does securify currently support only solc in version 0.5.12?

--------------- error console------------------------- solc.exceptions.SolcError: fixed_pragma.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.12-develop.2019.8.13+commit.e91c6acb.Linux.g++ - note that nightly builds are considered to be strictly less than the released version pragma solidity 0.4.24; ^---------------------^

    > command: `solc --allow-paths / --standard-json`
    > return code: `0`
    > stderr:
    {"errors":[{"component":"general","formattedMessage":"Warning: This is a pre-release compiler version, please do not use it in production.\n","message":"This is a pre-release compiler version, please do not use it in production.","severity":"warning","type":"Warning"},{"component":"general","formattedMessage":"fixed_pragma.sol:1:1: ParserError: Source file requires different compiler version (current compiler is 0.5.12-develop.2019.8.13+commit.e91c6acb.Linux.g++ - note that nightly builds are considered to be strictly less than the released version\npragma solidity 0.4.24;\n^---------------------^\n","message":"Source file requires different compiler version (current compiler is 0.5.12-develop.2019.8.13+commit.e91c6acb.Linux.g++ - note that nightly builds are considered to be strictly less than the released version","severity":"error","sourceLocation":{"end":23,"file":"fixed_pragma.sol","start":0},"type":"ParserError"}],"sources":{}}
YannisSach commented 4 years ago

First of all, we do not support versions before 0.5. From the error you are getting, it seems that you are still using the 0.5.12 version. In order to use another version of the solidity compiler you should either use the --solidity flag or set the environment variable SOLC_BINARY to the version you want.