It just came to our notice that Ethereum has released the Solidity Version 0.6.2 after long discussions and deliberations. According to the report shared on Github, this new version came with lots of great features and improvements for better users’ experience.
This new development was first hinted by a developer identified as Chris on Twitter, who is probably part of the team that built Solidity, the contract-oriented programming language.
Chris said, “Solidity 0.6.2 is fresh off the press and includes high-level access to the “create2”-opcode, interface inheritance, much faster compilation through wasm and much more!”
New Features to Leverage in Solidity 0.6.2
According to the report, solidity 0.6.2 came with a high-level way to use the create2 opcode introduced in Constantinople.
In the course of creating a contract, users can specify the salt as a “function call option”: new Contract{salt: 0x1234}(arg1, arg2).
The use of the “function call options” were as well extended in this newly released version to specifying the gas and value options in external function calls: c.f{value: 10, gas: 20000}(arg1, arg2).
Also, the interfaces are now liable to inherent from interfaces, which broadens their functions in terms of specification purposes.
In addition to those improvements mentioned above, AST can now be exported, modified and re-compiled starting from the modified ast with the aid of solc –import-ast.
The detailed Changelogs in Solidity 0.6.2 according to the update are properly itemized below:
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 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.
Bug Fixes:
- 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.