github ethereum/solidity v0.6.2
Version 0.6.2

latest releases: v0.8.28, v0.8.27, v0.8.26...
4 years ago

After long discussions, we finally enabled a high-level way to use the create2 opcode introduced in Constantinople: When creating a contract, you can specify the salt as a "function call option": new Contract{salt: 0x1234}(arg1, arg2). We took this opportunity and also extended the use of these function call options to specifying the gas and value options in external function calls: c.f{value: 10, gas: 20000}(arg1, arg2).

Furthermore, interfaces can now inherit from interfaces, making them even more useful for specification purposes.

To allow mutation testing and other uses, you can now export the AST, modify it and re-compile starting from the modified ast using solc --import-ast. Note that compiling from a modified AST is not meant for production.

And last but not least, we are now building the javascript compiler solc-js / soljson.js using webassembly which should both provide a performance boost as well as reduce compatibility issues with browsers.

Changelog:

Language Features:

  • Allow accessing external functions via contract and interface names to obtain their selector.
  • Allow interfaces to inherit from other interfaces
  • Allow gas and value to be set in external function calls using c.f{gas: 10000, value: 4 ether}().
  • Allow specifying the salt for contract creations and thus the create2 opcode using new C{salt: 0x1234, value: 1 ether}(arg1, arg2).
  • Inline Assembly: Support literals true and false.

Compiler Features:

  • LLL: The LLL compiler has been removed.
  • General: Raise warning if runtime bytecode exceeds 24576 bytes (a limit introduced in Spurious Dragon).
  • General: Support compiling starting from an imported AST. Among others, this can be used for mutation testing.
  • Yul Optimizer: Apply penalty when trying to rematerialize into loops.

Bugfixes:

  • Commandline interface: Only activate yul optimizer if --optimize is given.
  • Fixes internal compiler error on explicitly calling unimplemented base functions.

Build System:

  • Switch to building soljson.js with an embedded base64-encoded wasm binary.

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

Alex Beregszaszi, Bhargava Shastry, cameel, Chris Chinchilla, Christian Parpart, Daniel Kirchner, djudjuu, Erik Kundt, Gonçalo Sá, Jason Cobb, Leonardo Alt, Mathias Baumann, Nicolás Venturo, Rafael Lorandi, rodiazet, Victor Baranov, William Entriken.

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

Don't miss a new solidity release

NewReleases is sending notifications on new releases.