As we are getting closer to the next breaking release, we want to give everyone a heads up by introducing pragma experimental "v0.5.0"
which already enables some of the new safety features of the 0.5.0 release.
Furthermore, this release finally checks the modifiers view
(used to be named constant
) and pure
on functions. As a rule of thumb, use view
if your function does not modify storage and pure
if it does not even read any state information - but the compiler will also suggest the tightest restriction itself.
We also worked further on the new ABI encoder: Functions can now return structs. Switch it on using pragma experimental ABIEncoderV2
. It should already work, but still generates more expensive code.
Finally, many new warnings were introduced and error messages improved.
Features:
- Assembly Parser: Support multiple assignment (
x, y := f()
). - Code Generator: Keep a single copy of encoding functions when using the experimental "ABIEncoderV2".
- Code Generator: Partial support for passing
structs
as arguments and return parameters (requirespragma experimental ABIEncoderV2;
for now). - General: Support
pragma experimental "v0.5.0";
to activate upcoming breaking changes. - General: Added
.selector
member on external function types to retrieve their signature. - Optimizer: Add new optimization step to remove unused
JUMPDEST
s. - Static Analyzer: Warn when using deprecated builtins
sha3
andsuicide
(replaced bykeccak256
andselfdestruct
, introduced in 0.4.2 and 0.2.0, respectively). - Syntax Checker: Warn if no visibility is specified on contract functions.
- Type Checker: Display helpful warning for unused function arguments/return parameters.
- Type Checker: Do not show the same error multiple times for events.
- Type Checker: Greatly reduce the number of duplicate errors shown for duplicate constructors and functions.
- Type Checker: Warn on using literals as tight packing parameters in
keccak256
,sha3
,sha256
andripemd160
. - Type Checker: Enforce
view
andpure
. - Type Checker: Enforce
view
/constant
with error as experimental 0.5.0 feature. - Type Checker: Enforce fallback functions to be
external
as experimental 0.5.0 feature.
Bugfixes:
- ABI JSON: Include all overloaded events.
- Parser: Crash fix related to parseTypeName.
- Type Checker: Allow constant byte arrays.
We especially thank all our open source community contributors:
Ali92hm, Aaron Colaço, Lefteris Karapetsas, Matthieu Caneill, Robert Edström and Suman
If you want to perform a source build, please only use solidity_0.4.17.tar.gz and not the zip provided by github directly.