Notable New Features
Emscripten Build / solc-js
The size reduction is achieved by compressing the binary using LZ4 and decompressing it when it is loaded, which should be completely transparent to the user. We were initially worried that this might have a negative impact on people who switch compiler versions often or always run it in a fresh Node.js environment, but our benchmarks show that the decompression is faster than the base64 decoding, so it should not be an issue.
TypeScript Migration of solc-js
- General: Add equality-comparison operators for external function types.
- General: Support ContractName.functionName for abi.encodeCall, in addition to external function pointers.
- Commandline Interface: Event and error signatures are also returned when using --hashes.
- Yul Optimizer: Remove mstore and sstore operations if the slot already contains the same value.
- Yul: Emit immutable references for pure yul code when requested.
- Antlr Grammar: Allow builtin names in yulPath to support .address in function pointers.
- Code Generator: Fix internal error when accessing the members of external functions occupying more than two stack slots.
- Code Generator: Fix internal error when doing an explicit conversion from string calldata to bytes.
- Control Flow Graph: Perform proper virtual lookup for modifiers for uninitialized variable and unreachable code analysis.
- General: string.concat now properly takes strings as arguments and returns string memory. It was accidentally introduced as a copy of bytes.concat before.
- Immutables: Fix wrong error when the constructor of a base contract uses return and the derived contract contains immutable variables.
- Inheritance: Consider functions in all ancestors during override analysis.
- IR Generator: Add missing cleanup during the conversion of fixed bytes types to smaller fixed bytes types.
- IR Generator: Add missing cleanup for indexed event arguments of value type.
- IR Generator: Fix internal error when copying reference types in calldata and storage to struct or array members in memory.
- IR Generator: Fix IR syntax error when copying storage arrays of structs containing functions.
- Natspec: Fix internal error when overriding a struct getter with a Natspec-documented return value and the name in the struct is different.
- Type Checker: Fix internal error when a constant variable declaration forward references a struct.
- Yul EVM Code Transform: Improved stack shuffling in corner cases.
- The wrapper now requires at least nodejs v10.
- The code has been ported to TypeScript.
- Emscripten builds store the embedded WebAssembly binary in LZ4 compressed format and transparently decompress on loading.
A big thank you to all contributors who helped make this release possible!
Download the new version of Solidity here.