github ethereum/solidity v0.8.22
Version 0.8.22

latest releases: v0.8.28, v0.8.27, v0.8.26...
12 months ago

Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.22.

IMPORTANT NOTE:
This release deprecates support for EVM versions older than Constantinople for the reason of ruling out the need to maintain multiple complex code paths or workarounds for ancient EVM versions. In case you rely on the support for such EVM versions, please reach out to us.

Notable Features:

  • Unchecked loop increments
  • Adding support for importing EVM Assembly JSON (experimental)
  • Adjusting Yul optimizer to rematerialize zero literals

Changelog

Language Features:

  • Allow defining events at file level.

Compiler Features:

  • Code Generator: Remove redundant overflow checks of certain for loops when the counter variable cannot overflow.
  • Commandline Interface: Add --no-import-callback option that prevents the compiler from loading source files not given explicitly on the CLI or in Standard JSON input.
  • Commandline Interface: Add an experimental --import-asm-json option that can import EVM assembly in the format used by --asm-json.
  • Commandline Interface: Use proper severity and coloring also for error messages produced outside of the compilation pipeline.
  • EVM: Deprecate support for "homestead", "tangerineWhistle", "spuriousDragon" and "byzantium" EVM versions.
  • Parser: Remove the experimental error recovery mode (--error-recovery / settings.parserErrorRecovery).
  • SMTChecker: Support user-defined operators.
  • Yul Optimizer: If PUSH0 is supported, favor zero literals over storing zero values in variables.
  • Yul Optimizer: Run the Rematerializer and UnusedPruner steps at the end of the default clean-up sequence.

Bugfixes:

  • Code Generator: Fix output from via-IR code generator being dependent on which files were discovered by import callback. In some cases, a different AST ID assignment would alter the order of functions in internal dispatch, resulting in superficially different but semantically equivalent bytecode.
  • NatSpec: Fix internal error when requesting userdoc or devdoc for a contract that emits an event defined in a foreign contract or interface.
  • SMTChecker: Fix encoding error that causes loops to unroll after completion.
  • SMTChecker: Fix inconsistency on constant condition checks when while or for loops are unrolled before the condition check.
  • Yul Optimizer: Fix replacement decisions during CSE being affected by Yul variable names generated by the compiler, resulting in different (but equivalent) bytecode in some situations.

AST Changes:

  • AST: Fix wrong initial ID for Yul nodes in the AST.

We especially thank all the contributors that made this release possible:
Alejandro Criado-Pérez, Alexander Arlt, Bhargava Shastry, Daniel, Jun Zhang, Kamil Śliwak, Leo, Martin Blicha, Matheus Aguiar, Nikola Matić, Paul Wackerow, Pawel Gebal, Saw-mon & Natalie, Zach Obront, franzihei, omahs, pgebal, r0qs, shalaamum

Don't miss a new solidity release

NewReleases is sending notifications on new releases.