github ethereum/solidity v0.7.1
Version 0.7.1

latest releases: v0.8.25, v0.8.24, v0.8.23...
3 years ago

This release introduces the possibility to define functions at file level. This is a way to define helper-functions that are independent of specific contracts which is much more natural than using internal library functions. Apart from this, the release contains many bugfixes.

Language Features:

  • Allow function definitions outside of contracts, behaving much like internal library functions.
  • Code generator: Implementing copying structs from calldata to storage.

Compiler Features:

  • SMTChecker: Add underflow and overflow as verification conditions in the CHC engine.
  • SMTChecker: Support bitwise or, xor and not operators.
  • SMTChecker: Support conditional operator.
  • Standard JSON Interface: Do not run EVM bytecode code generation, if only Yul IR or EWasm output is requested.
  • Yul Optimizer: LoopInvariantCodeMotion can move reading operations outside for-loops as long as the affected area is not modified inside the loop.
  • Yul: Report error when using non-string literals for datasize(), dataoffset(), linkersymbol(), loadimmutable(), setimmutable().

Bugfixes:

  • AST: Remove null member values also when the compiler is used in standard-json-mode.
  • General: Allow type(Contract).name for abstract contracts and interfaces.
  • Immutables: Disallow assigning immutables more than once during their declaration.
  • Immutables: Properly treat complex assignment and increment/decrement as both reading and writing and thus disallow it everywhere for immutable variables.
  • Optimizer: Keep side-effects of x in byte(a, shr(b, x)) even if the constants a and b would make the expression zero unconditionally. This optimizer rule is very hard if not impossible to trigger in a way that it can result in invalid code, though.
  • References Resolver: Fix internal bug when using constructor for library.
  • Scanner: Fix bug where whitespace would be allowed within the -> token (e.g. function f() - > x {} becomes invalid in inline assembly and Yul).
  • SMTChecker: Fix internal error in BMC function inlining.
  • SMTChecker: Fix internal error on array implicit conversion.
  • SMTChecker: Fix internal error on fixed bytes index access.
  • SMTChecker: Fix internal error on lvalue unary operators with tuples.
  • SMTChecker: Fix internal error on tuple assignment.
  • SMTChecker: Fix internal error on tuples of one element that have tuple type.
  • SMTChecker: Fix soundness of array pop.
  • Type Checker: Disallow using for directive inside interfaces.
  • Type Checker: Disallow signed literals as exponent in exponentiation operator.
  • Type Checker: Disallow structs containing nested mapping in memory as parameters for library functions.
  • Yul Optimizer: Ensure that Yul keywords are not mistakenly used by the NameDispenser and VarNameCleaners. The bug would manifest as uncompilable code.
  • Yul Optimizer: Make function inlining order more resilient to whether or not unrelated source files are present.

We especially thank all the contributors that made this release possible:

a3d4, Alex Beregszaszi, Alexander Arlt, Bhargava Shastry, cakesoft-omkar, Christian Parpart, Daniel Kirchner, Đorđe Mijović, Goh Chun Lin, hactrox, Harikrishnan Mulackal, Harry Altman, Jason Cobb, Kamil Śliwak, Leonardo Alt, Mathias Baumann.

If you want to perform a source build, please only use solidity_0.7.1.tar.gz and not the zip provided by github directly.

Don't miss a new solidity release

NewReleases is sending notifications on new releases.