Page MenuHomeSolus

Update solidity to 0.8.12
ClosedPublic

Authored by GZGavinZhao on Mar 14 2022, 12:50 PM.

Details

Summary

Changelog:

  • Language Features:
    • General: Add equality-comparison operators for external function types.
    • General: Support ContractName.functionName for abi.encodeCall, in addition to external function pointers.
  • Compiler Features:
    • 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.
  • Bugfixes:
    • 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.
  • Solc-Js:
    • The wrapper now requires at least nodejs v10.
    • The code has been ported to TypeScript.
  • Build System:
    • Emscripten builds store the embedded WebAssembly binary in LZ4 compressed format and transparently decompress on loading.
Test Plan

Successfully compiled and deployed the sample programs from the official Solidity examples (https://docs.soliditylang.org/en/latest/solidity-by-example.html).

Signed-off-by: Gavin Zhao <gavinzhaojw@protonmail.com>

Diff Detail

Repository
R5440 solidity
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

GZGavinZhao created this revision.Mar 14 2022, 12:50 PM
GZGavinZhao requested review of this revision.Mar 14 2022, 12:50 PM
Girtablulu requested changes to this revision.Mar 14 2022, 3:06 PM
Girtablulu added a subscriber: Girtablulu.

is your solbuild and common up to date? When I build it locally the abi changes are getting reverted

This revision now requires changes to proceed.Mar 14 2022, 3:06 PM

Apply requested changes.

It was a linker problem. I was not using ld. Sorry for that!

Girtablulu accepted this revision.Mar 20 2022, 1:18 PM

LGTM, thx

This revision is now accepted and ready to land.Mar 20 2022, 1:18 PM
This revision was automatically updated to reflect the committed changes.