Assembler: Use push0 for placing 0 on the stack for EVM versions starting from “Shanghai”. This decreases the deployment and runtime costs.
EVM: Set default EVM version to “Shanghai”.
EVM: Support for the EVM Version “Shanghai”.
Optimizer: Re-implement simplified version of UnusedAssignEliminator and UnusedStoreEliminator. It can correctly remove some unused assignments in deeply nested loops that were ignored by the old version.
Parser: Unary plus is no longer recognized as a unary operator in the AST and triggers an error at the parsing stage (rather than later during the analysis).
SMTChecker: Group all messages about unsupported language features in a single warning. The CLI option --model-checker-show-unsupported and the JSON option settings.modelChecker.showUnsupported can be enabled to show the full list.
SMTChecker: Properties that are proved safe are now reported explicitly at the end of analysis. By default, only the number of safe properties is shown. The CLI option --model-checker-show-proved-safe and the JSON option settings.modelChecker.showProvedSafe can be enabled to show the full list of safe properties.
Standard JSON Interface: Add experimental support for importing ASTs via Standard JSON.
Yul EVM Code Transform: If available, use push0 instead of codesize to produce an arbitrary value on stack in order to create equal stack heights between branches.
Code Generator: Always generate code for the expression in <expression>.selector in the legacy code generation pipeline.
Yul Optimizer: Fix FullInliner step (i) not preserving the evaluation order of arguments passed into inlined functions in code that is not in expression-split form.
Allow qualified access to events from other contracts.
Relax restrictions on initialization of immutable variables. Reads and writes may now happen at any point at construction time outside of functions and modifiers. Explicit initialization is no longer mandatory.
Use a more recent version of Solidity
Severity
Gas Optimization / Informational
Relevant GitHub Links
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/EscrowFactory.sol#L2
https://github.com/Cyfrin/2023-07-escrow/blob/main/src/Escrow.sol#L2
Summary
0.8.19:
Bug Fixes:
0.8.20:
0.8.21:
<expression>.selector
in the legacy code generation pipeline.Tools Used
Manual Review