Pragma versions are designed in a way that 0.x.0
introduces bracking changes and 0.0.x
introduces bug fixes in the previous versions.
Now using ^
with the pragma vesions opens the code compilation till the next < 0.x.0
version, there will be no breaking changes until version 0.x.0
, you can be sure that your code compiles the way you intended but due to the exact version of the compiler is not fixed, newly introduced bugfix can still affect the code.
It is recommeded by Solidity Docs to use fixed version for your projects.
Which version should we choose?
There are pros and cons in using both older and newer versions and we should always use the latest stable(tested) version.
Newer versions fix the bugs, introduces new ways to optimize the code and release new features but can introduces new bugs as well.
Older versions are battle tested but lacks the pros of newer versions.
According to my knowledge until now 0.8.17
is the recommended choice.
Use the stable fixed pragma version.
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.