Solidity v0.8.7 introduces support for the London upgrade, includes
various improvements to Yul to EVM code transformation, the SMTChecker and some bugfixes.
For more details, see the release announcement.
Language Features:
- Introduce global
block.basefee
for retrieving the base fee of the current block. - Yul: Introduce builtin
basefee()
for retrieving the base fee of the current block.
Compiler Features:
- AssemblyStack: Also run opcode-based optimizer when compiling Yul code.
- Commandline Interface: option
--pretty-json
works also with--standard--json
. - EVM: Set the default EVM version to "London".
- SMTChecker: Do not check underflow and overflow by default.
- SMTChecker: Unproved targets are hidden by default, and the SMTChecker only states how many unproved targets there are. They can be listed using the command line option
--model-checker-show-unproved
or the JSON optionsettings.modelChecker.showUnproved
. - SMTChecker: new setting to enable/disable encoding of division and modulo with slack variables. The command line option is
--model-checker-div-mod-slacks
and the JSON option issettings.modelChecker.divModWithSlacks
. - Yul EVM Code Transform: Also pop unused argument slots for functions without return variables (under the same restrictions as for functions with return variables).
- Yul EVM Code Transform: Do not reuse stack slots that immediately become unreachable.
- Yul Optimizer: Move function arguments and return variables to memory with the experimental Stack Limit Evader (which is not enabled by default).
Bugfixes:
- Code Generator: Fix crash when passing an empty string literal to
bytes.concat()
. - Code Generator: Fix internal compiler error when calling functions bound to calldata structs and arrays.
- Code Generator: Fix internal compiler error when passing a 32-byte hex literal or a zero literal to
bytes.concat()
by disallowing such literals. - Commandline Interface: Apply
--optimizer-runs
option in assembly / yul mode. - Commandline Interface: Fix crash when a directory path is passed to
--standard-json
. - Commandline Interface: Read JSON from standard input when
--standard-json
gets-
as a file name. - Standard JSON: Include source location for errors in files with empty name.
- Type Checker: Fix internal error and prevent static calls to unimplemented modifiers.
- Yul Code Generator: Fix internal compiler error when using a long literal with bitwise negation.
- Yul Code Generator: Fix source location references for calls to builtin functions.
- Yul Parser: Fix source location references for
if
statements.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Alexander Arlt, Amid Moeinzadeh, Bhargava Shastry, Christian Parpart, CrimsonGlory, Daniel Kirchner, GuLiPing-Hz, Harikrishnan Mulackal, Josué, Kamil Śliwak, Ladislav Sladecek, Leo Alt, Mathias Baumann, Simon Tian, Tony, chriseth, franzihei, iskanderandrews, jaa2, qedk and t11s.
If you want to perform a source build, please only use solidity_0.8.7.tar.gz and not the zip provided by github directly.