SyntaxError: Source file requires different compiler version (current compiler is 0.4.19+commit.c4cbbb05.Emscripten.clang - note that nightly builds are considered to be strictly less than the released version
pragma solidity 0.4.15;
^---------------------^
-
Could you explain where you get this error and what you are trying to do. Thanks.– Lauri PeltonenCommented Mar 15, 2018 at 13:11
-
shashwat@ShashwatGupta:~/Music/BlockChain/ETHERUIM/simple-storage-truffle$ truffle version Truffle v4.1.3 (core: 4.1.3) Solidity v0.4.19 (solc-js)– Shashwat GuptaCommented Mar 15, 2018 at 13:12
-
i am facing error while i am deploying contact with truffle– Shashwat GuptaCommented Mar 15, 2018 at 13:13
Add a comment
|
2 Answers
Maybe you are using some functions that not working on greater versions. Try to set pragram solidity ^0.4.15; if the problem still there, paste here your contract.
-
-
@ngCourse Ivan is correct. Using
0.4.15
without the^
means you are specifying exactly which compiler you are using. If you do^0.4.15
, it represents that version and above. Commented Mar 15, 2018 at 13:19 -
i did mention on ^0.4.15 ... it still have that same error Commented Mar 15, 2018 at 13:22
-
I try in remix.ethereum.org your code and when i change pragma to ^0.4.15 the error disappear. Commented Mar 15, 2018 at 13:25