Solidity 0.6.x features: try/catch statement

This post was originally published on the Ethereum blog. The try/catch syntax introduced in 0.6.0 is arguably the biggest leap in error handling capabilities in Solidity, since reason strings for revert and require were released in v0.4.22. Both try and catch have been reserved keywords since v0.5.9 and now we can use them to handle failures in external function calls without rolling back the complete transaction (state changes in the called function are still rolled back, but the ones in... [Read More]

Solidity 0.6.2 Release Announcement

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.... [Read More]

Solidity 0.6.1 Release Announcement

This release fixes a bug in the Yul optimizer related to break and continue statements in loops. The Yul optimizer is part of the regular optimizer since version 0.6.0. In version 0.5.x, you had to explicitly activate the Yul optimizer in addition to the regular optimizer. The Yul optimizer only operates on the code generated by ABIEncoderV2 or if you use it in a stand-alone way. The code generated by ABIEncoderV2 does not make use of break and continue, but... [Read More]

Solidity 0.5.16 Release Announcement

This release fixes a bug in the Yul optimizer. You are only affected if you manually enabled the Yul optimizer (not the regular optimizer) and either used Yul stand-alone or via ABIEncoderV2. For more details, please see buglist.json. Bugfixes: Yul Optimizer: Fix bug in redundant assignment remover in combination with break and continue statements. A big thank you to all contributors who helped make this release possible! Download the new version of Solidity here.

Solidity 0.6.0 Release Announcement

This is a major breaking release of the Solidity compiler and language. Changes include explicit virtual and override keywords in inheritance, support for try/catch, splitting the fallback function into a receive Ether function and an actual fallback function and limitations on how the length of an array can be changed, among others. For a detailed explanation, please see the documentation or refer to the list below that shows every single change. From this release on, ABIEncoderV2 is not considered experimental... [Read More]

Solidity 0.5.15 Release Announcement

This release fixes a bug that was introduced in 0.5.14 (the previous release). You are only affected if you manually enabled the Yul optimizer (not the regular optimizer) and either used Yul stand-alone or via ABIEncoderV2. For more details, please see buglist.json. Bugfixes: Yul Optimizer: Fix incorrect redundant load optimization crossing user-defined functions that contain for-loops with memory / storage writes. A big thank you to all contributors who helped make this release possible! Download the new version of Solidity... [Read More]

Solidity 0.5.14 Release Announcement

Solidity 0.5.14 sets the default EVM version to “Istanbul” and is targeted as the last release in the 0.5.x series. The SMT checker supports constructors now and it is possible to directly translate EVM-flavoured Yul to Ewasm from the commandline interface. Language Features: Allow to obtain the selector of public or external library functions via a member .selector. Parser: Allow splitting string and hexadecimal string literals into multiple parts. Inline Assembly: Support constants that reference other constants. Compiler Features: Commandline... [Read More]

Solidity 0.5.13 Release Announcement

Solidity 0.5.13 provides Istanbul-EVM compatibility (default is still set to Petersburg), is the first version to generate Ethereum-Webassembly (EWasm) binary output (not fully working yet, though), improves the developer experience by listing potential overloads when resolution fails and can output the layout of the storage variables of a contract. As with all other releases, the coverage of the SMT checker is further improved. Language Features: Allow to obtain the address of a linked library with address(LibraryName). Compiler Features: Code Generator:... [Read More]

Solidity 0.5.12 Release Announcement

This is a small bugfix release that also includes loop support for the SMT solver and some improvements to the Yul optimizer. The reason for the smaller feature set is that we are mainly working on the upcoming 0.6.0 release. Language Features: Type Checker: Allow assignment to external function arguments except for reference types. Compiler Features: ABI Output: Change sorting order of functions from selector to kind, name. Optimizer: Add rule that replaces the BYTE opcode by 0 if the... [Read More]

Solidity 0.5.11 Release Announcement

This release fixes a bug related to calldata structs in ABIEncoderV2 and calldata decoding in V1. Several internal bugs of the SMT checker are fixed. Furthermore, internal types are added to the ABI output which allows you to see which struct type is behind an ABI tuple. Finally, Yul and web assembly support are progressing. We also improved our testing framework which now allows for semantics tests to run in 4 seconds instead of 1 minute. Language Features: Inline Assembly:... [Read More]