Releases: argotorg/solidity
Version 0.8.21
Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.21.
Changelog
Important Bugfixes:
- Code Generator: Always generate code for the expression in
<expression>.selectorin the legacy code generation pipeline. - Yul Optimizer: Fix
FullInlinerstep (i) not preserving the evaluation order of arguments passed into inlined functions in code that is not in expression-split form (i.e. when using a custom optimizer sequence in which the step not preceded byExpressionSplitter(x)).
Language Features:
- 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.
Compiler Features:
- Commandline Interface: Add
--ast-compact-jsonoutput in assembler mode. - Commandline Interface: Add
--ir-ast-jsonand--ir-optimized-ast-jsonoutputs for Solidity input, providing AST in compact JSON format for IR and optimized IR. - Commandline Interface: Respect
--optimize-yuland--no-optimize-yulin compiler mode and accept them in assembler mode as well.--optimize --no-optimize-yulcombination now allows enabling EVM assembly optimizer without enabling Yul optimizer. - EWasm: Remove EWasm backend.
- Parser: Introduce
pragma experimental solidity, which will enable an experimental language mode that, in particular, has no stability guarantees between non-breaking releases and is not suited for production use. - SMTChecker: Add
--model-checker-print-queryCLI option andsettings.modelChecker.printQueryJSON option to output the SMTChecker queries in the SMTLIB2 format. This requires usingsmtlib2solver only. - Standard JSON Interface: Add
astfile-level output for Yul input. - Standard JSON Interface: Add
irAstandirOptimizedAstcontract-level outputs for Solidity input, providing AST in compact JSON format for IR and optimized IR. - Yul Optimizer: Remove experimental
ReasoningBasedSimplifieroptimization step. - Yul Optimizer: Stack-to-memory mover is now enabled by default whenever possible for via IR code generation and pure Yul compilation.
Bugfixes:
- Code Generator: Disallow complex expressions whose results are types, built-ins, modules or some unassignable functions. The legacy code generation pipeline would not actually evaluate them, discarding any side effects they might have.
- Code Generator: Fix not entirely deterministic order of functions in unoptimized Yul output. The choice of C++ compiler in some cases would result in different (but equivalent) bytecode (especially from native binaries vs emscripten binaries).
- Commandline Interface: Fix internal error when using
--stop-after parsingand requesting some of the outputs that require full analysis or compilation. - Commandline Interface: It is no longer possible to specify both
--optimize-yuland--no-optimize-yulat the same time. - SMTChecker: Fix encoding of side-effects inside
ifandternary conditionalstatements in the BMC engine. - SMTChecker: Fix false negative when a verification target can be violated only by a trusted external call from another public function.
- SMTChecker: Fix generation of invalid SMT-LIB2 scripts in BMC engine with trusted mode for external calls when CHC engine times out.
- SMTChecker: Fix internal error caused by incorrectly classifying external function call using function pointer as a public getter.
- SMTChecker: Fix internal error caused by using external identifier to encode member access to functions that take an internal function as a parameter.
- Standard JSON Interface: Fix an incomplete AST being returned when analysis is interrupted by certain kinds of fatal errors.
- Type Checker: Disallow using certain unassignable function types in complex expressions.
- Type Checker: Function declaration types referring to different declarations are no longer convertible to each other.
- Yul Optimizer: Ensure that the assignment of memory slots for variables moved to memory does not depend on AST IDs that may depend on whether additional files are included during compilation.
- Yul Optimizer: Fix
FullInlinerstep not ignoring code that is not in expression-split form. - Yul Optimizer: Fix optimized IR being unnecessarily passed through the Yul optimizer again before bytecode generation.
AST Changes:
- AST: Add the
experimentalSolidityfield to theSourceUnitnodes, which indicates whether the experimental parsing mode has been enabled viapragma experimental solidity.
We especially thank all the contributors that made this release possible:
Alejandro Criado-Pérez, Alexander Arlt, Alexandre Ferreira, Bhargava Shastry, Cliff Syner, Daniel Kirchner, David Bar-On, GiokaMarkella, Jun Zhang, Kaan Uzdoğan, Kamil Śliwak, Leo Alt, Martin Blicha, Matheus Aguiar, Nikola Matić, Nuno Santos, Paul Wackerow, Pawel Gebal, johnnygee19, minaminao, r0qs
Version 0.8.20
Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.20.
This latest version includes a range of improvements and, most importantly, support for Shanghai!
It also contains performance improvements in the via-IR pipeline and improves the list of events exposed in the contract ABI.
IMPORTANT NOTE: This compiler switches the default target EVM version to Shanghai, which means that the generated bytecode will include PUSH0 opcodes. Be sure to select the appropriate EVM version in case you intend to deploy on a chain other than mainnet like L2 chains that may not yet support PUSH0, otherwise deployment of your contracts will fail.
Changelog
Compiler Features:
- Assembler: Use
push0for placing0on 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".
- NatSpec: Add support for NatSpec documentation in
enumdefinitions. - NatSpec: Add support for NatSpec documentation in
structdefinitions. - NatSpec: Include NatSpec from events that are emitted by a contract but defined outside of it in userdoc and devdoc output.
- Optimizer: Re-implement simplified version of
UnusedAssignEliminatorandUnusedStoreEliminator. 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-unsupportedand the JSON optionsettings.modelChecker.showUnsupportedcan 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-safeand the JSON optionsettings.modelChecker.showProvedSafecan 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
push0instead ofcodesizeto produce an arbitrary value on stack in order to create equal stack heights between branches.
Bugfixes:
- ABI: Include events in the ABI that are emitted by a contract but defined outside of it.
- Immutables: Disallow initialization of immutables in try/catch statements.
- SMTChecker: Fix false positives in ternary operators that contain verification targets in its branches, directly or indirectly.
AST Changes:
- AST: Add the
internalFunctionIDsfield to the AST nodes of contracts containing IDs of functions that may be called via the internal dispatch. The field is a map from function AST IDs to internal dispatch function IDs. These IDs are always generated, but they are only used in via-IR code generation. - AST: Add the
usedEventsfield toContractDefinitionwhich contains the AST IDs of all events emitted by the contract as well as all events defined and inherited by the contract.
We especially thank all the contributors that made this release possible:
Alexander Arlt, Alex Beregszaszi, Bhargava Shastry, chriseth, Christian Parpart, Daniel Kirchner, Francois-Rene Rideau, hrkrshnn, Kaan Uzdoğan, Kamil Śliwak, Leo Alt, Matheus Aguiar, Michael de Hoog, minaminao, mmqxyz, Nikola Matic, Nuno Santos, Ojas Aklecha, Peter Lemenkov, Rodrigo Q. Saramago, uji, Vaibhaw
If you want to perform a source build, please only use solidity_0.8.20.tar.gz and not the source archives generated automatically by GitHub.
Version 0.8.19
Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.19.
This latest version includes a range of improvements and, most importantly, custom operators for user-defined value types language feature!
It also contains a fix for a long-standing bug that can result in code that is only used in creation code to also be included in runtime bytecode.
Changelog
Language Features:
- Allow defining custom operators for user-defined value types via
using {f as +} for T globalsyntax.
Compiler Features:
- SMTChecker: New trusted mode that assumes that any compile-time available code is the actual used code, even in external calls. This can be used via the CLI option
--model-checker-ext-calls trustedor the JSON fieldsettings.modelChecker.extCalls: "trusted".
Bugfixes:
- Assembler: Avoid duplicating subassembly bytecode where possible.
- Code Generator: Avoid including references to the deployed label of referenced functions if they are called right away.
- ContractLevelChecker: Properly distinguish the case of missing base constructor arguments from having an unimplemented base function.
- SMTChecker: Fix internal error caused by unhandled
z3expressions that come from the solver when bitwise operators are used. - SMTChecker: Fix internal error when using the custom NatSpec annotation to abstract free functions.
- TypeChecker: Also allow external library functions in
using for.
AST Changes:
- AST: Add
functionfield toUnaryOperationandBinaryOperationAST nodes.functionListinUsingForDirectiveAST nodes will now containoperatoranddefinitionmembers instead offunctionwhen the list entry defines an operator.
We especially thank all the contributors that made this release possible:
Bhargava Shastry, Daniel Kirchner, Evan Saulpaugh, Jacob Heider, Kamil Śliwak, Leo Alt, Matheus Aguiar, Michał Janiszewski, Nicolás Acosta, Nikola Matić, Nuno Santos, Pawel Gebal, Peter Lemenkov, Rodrigo Q. Saramago, William Entriken, Zachinquarantine, chriseth, drblessing, minaminao, wechman
If you want to perform a source build, please only use solidity_0.8.19.tar.gz and not the source archives generated automatically by GitHub.
Version 0.8.18
Introducing the newest version of the Solidity Compiler!
We are excited to announce the latest release of the Solidity Compiler, Solidity v0.8.18.
This latest version includes a range of improvements and it also introduces support for the Paris upgrade!
Changelog
Language Features:
- Allow named parameters in mapping types.
Compiler Features:
- Commandline Interface: Add
--no-cbor-metadatathat skips CBOR metadata from getting appended at the end of the bytecode. - Commandline Interface: Return exit code
2on uncaught exceptions. - EVM: Deprecate
block.difficultyand disallowdifficulty()in inline assembly for EVM versions >= paris. The change is due to the renaming introduced by EIP-4399. - EVM: Introduce
block.prevrandaoin Solidity andprevrandao()in inline assembly for EVM versions >= paris. - EVM: Set the default EVM version to "Paris".
- EVM: Support for the EVM version "Paris".
- Language Server: Add basic document hover support.
- Natspec: Add event Natspec inheritance for devdoc.
- Optimizer: Added optimization rule
and(shl(X, Y), shl(X, Z)) => shl(X, and(Y, Z)). - Parser: More detailed error messages about invalid version pragmas.
- SMTChecker: Make
z3the default solver for the BMC and CHC engines instead of all solvers. - SMTChecker: Support Eldarica as a Horn solver for the CHC engine when using the CLI option
--model-checker-solvers eld. The binaryeldmust be available in the system. - Solidity Upgrade Tool: Remove
solidity-upgradetool. - Standard JSON: Add a boolean field
settings.metadata.appendCBORthat skips CBOR metadata from getting appended at the end of the bytecode. - TypeChecker: Warn when using deprecated builtin
selfdestruct. - Yul EVM Code Transform: Generate more optimal code for user-defined functions that always terminate a transaction. No return labels will be pushed for calls to functions that always terminate.
- Yul Optimizer: Allow replacing the previously hard-coded cleanup sequence by specifying custom steps after a colon delimiter (
:) in the sequence string. - Yul Optimizer: Eliminate
keccak256calls if the value was already calculated by a previous call and can be reused.
Bugfixes:
- Parser: Disallow several
indexedattributes for the same event parameter. - Parser: Disallow usage of the
indexedattribute for modifier parameters. - SMTChecker: Fix display error for negative integers that are one more than powers of two.
- SMTChecker: Fix internal error on chain assignments using static fully specified state variables.
- SMTChecker: Fix internal error on multiple wrong SMTChecker natspec entries.
- SMTChecker: Fix internal error when a public library function is called internally.
- SMTChecker: Fix internal error when deleting struct member of function type.
- SMTChecker: Fix internal error when using user-defined types as mapping indices or struct members.
- SMTChecker: Improved readability for large integers that are powers of two or almost powers of two in error messages.
- TypeChecker: Fix bug where private library functions could be attached with
using foroutside of their declaration scope. - Yul Optimizer: Hash hex and decimal literals according to their value instead of their representation, improving the detection of equivalent functions.
We especially thank all the contributors that made this release possible:
Alexander Arlt, Alex Beregszaszi, andy53, Anton Paymyshev, Bhargava Shastry, Big-Aaron, Bojidar00, Bulgantamir Gankhuyag, chriseth, Christian Parpart, ChrisXXXXXXX, Damian Wechman, Daniel Kirchner, Doggo, Duc Thanh Nguyen, Franco Victorio, Franziska Heintel, George Plotnikov, hrkrshnn, Ikko Ashimine, Ishtiaque Zahid, John Kane, Kaan Uzdoğan, Kamil Śliwak, Leo Alt, ligi, Lokesh Kumar, Matheus Aguiar, Mathias L. Baumann, Mike Leach, Miles Liu, Minebuu, Mio, Nathaniel Jensen, Nikola Matić, Nishant Sachdeva, Nuno Santos, omahs, Paweł Bylica, Phill, Pierre Grimaud, Prusakova Katya, Rafal Stozek, Rajkumar gaur, Rhythm Bansal, Riley, Rodrigo Q. Saramago, Sabnock, Saw-mon-and-Natalie, Sebastian Supreme, Soham Zemse, Vinay, vlad, William Entriken, Yusuf Benli
If you want to perform a source build, please only use solidity_0.8.18.tar.gz and not the source archives generated automatically by GitHub.
UPDATE 2023-02-02: The Linux binary originally included here has been rebuilt and replaced due to incompatibility with older Ubuntu releases (Bionic, Focal and earlier). We have recently migrated our CI builds to Ubuntu 22.04, which includes a backwards-incompatible glibc version. Since the Linux binary is not completely static (it dynamically loads Z3 and consequently glibc), it would not run with older glibc when built against newer one. You can find more details in the release blog post and issue #13921.
To be clear: both binaries will produce identical outputs under all circumstances, including the commit hash in the metadata. Only the hash of the compiler binary itself will change due to the replacement, but the new binary will always produce byte-identical output.
The SHA-256 hash of the old binary was a1c0f33eb4482c26f56719ecf62b0ee05d7d7a4f8264ffbddf9ebcd9095c32bd. The new one is
95e6ed4949a63ad89afb443ecba1fb8302dd2860ee5e9baace3e674a0f48aa77.
Version 0.8.17
This release primarily fixes an important bug, but also involves some improvements in code generation, optimizer and in the language server.
For details, please see the release announcement.
Important Bugfixes:
- Yul Optimizer: Prevent the incorrect removal of storage writes before calls to Yul functions that conditionally terminate the external EVM call.
Compiler Features:
- Code Generator: More efficient overflow checks for multiplication.
- Language Server: Analyze all files in a project by default (can be customized by setting
'file-load-strategy'to'directly-opened-and-on-import'in LSP settings object). - Yul Optimizer: Simplify the starting offset of zero-length operations to zero.
Bugfixes:
- Type Checker: Fix internal compiler error on tuple assignments with invalid left-hand side.
- Yul IR Code Generation: Fix internal compiler error when accessing the
.slotmember of a mapping through a storage reference in inline assembly.
Build System:
- Allow disabling pedantic warnings and do not treat warnings as errors during compiler build when
-DPEDANTIC=OFFflag is passed to CMake. - Update emscripten to version 3.1.19.
We especially thank all the contributors that made this release possible:
Alexander Arlt, Bhargava Shastry, Christian Parpart, Damian Wechman, Daniel Kirchner, Duc Thanh Nguyen, Emmanuel Oaikhenan, Francisco Giordano, Kamil Śliwak, krakxn, Leonardo Alt, Leonid Pospelov, Luke Hutchison, Luoh Ren-Shan, Matheus Aguiar, Mathias L. Baumann, MeetRajput00, Nikola Matić, NoFaceDev, Pranay, Roman Figurin, Taylor Ferran, Thanh Tran, Yuvraj Singh, aathan, emmaodia, khue, kuzdogan, minaminao, Nishant Sachdeva, tcoyvwac, xternet
If you want to perform a source build, please only use solidity_0.8.17.tar.gz and not the zip provided by github directly.
Version 0.8.16
This release fixes one important bug and contains further minor bug fixes and features.
For details, please see the release announcement.
Important Bugfixes:
- Code Generation: Fix data corruption that affected ABI-encoding of calldata values represented by tuples: structs at any nesting level; argument lists of external functions, events and errors; return value lists of external functions. The 32 leading bytes of the first dynamically-encoded value in the tuple would get zeroed when the last component contained a statically-encoded array.
Compiler Features:
- Code Generator: More efficient code for checked addition and subtraction.
- TypeChecker: Support using library constants in initializers of other constants.
- Yul IR Code Generation: Improved copy routines for arrays with packed storage layout.
- Yul Optimizer: Add rule to convert
mod(add(X, Y), A)intoaddmod(X, Y, A), ifAis a power of two. - Yul Optimizer: Add rule to convert
mod(mul(X, Y), A)intomulmod(X, Y, A), ifAis a power of two.
Bugfixes:
- Commandline Interface: Disallow the following options outside of the compiler mode:
--via-ir,--metadata-literal,--metadata-hash,--model-checker-show-unproved,--model-checker-div-mod-no-slacks,--model-checker-engine,--model-checker-invariants,--model-checker-solvers,--model-checker-timeout,--model-checker-contracts,--model-checker-targets. - Type Checker: Fix compiler crash on tuple assignments involving certain patterns with unary tuples on the left-hand side.
- Type Checker: Fix compiler crash when
abi.encodeCallreceived a tuple expression instead of an inline tuple. - Type Checker: Fix null dereference in
abi.encodeCalltype checking of free function.
We especially thank all the contributors that made this release possible:
a3d4, Aiman Baharna, Alex Beregszaszi, Bhargava Shastry, Christian Parpart, Christian Reitwiessner, CJ42, Damian Wechman, Daniel Kirchner, Daniel Lupu, Derek Gottfrid, Duc Thanh Nguyen, Femi Bolaji, Harikrishnan Mulackal, Ishtiaque Zahid, Kamil Śliwak, krakxn, Matheus Aguiar, Mathias L. Baumann, Maximiliano Schultheis, Midhun07, minami, Nikola Matić, Nishant Sachdeva, Quentin Garchery, Richie, Rodrigo Baraglia, Rohit Kumar Suman, Ryan, vdusart, victorknox, William Entriken, ywon0925
If you want to perform a source build, please only use solidity_0.8.16.tar.gz and not the zip provided by github directly.
Version 0.8.15
This release fixes two important bugs and also contains other minor bug fixes and features.
For details, please see the release announcement.
Important Bugfixes:
- Code Generation: Avoid writing dirty bytes to storage when copying
bytesarrays. - Yul Optimizer: Keep all memory side-effects of inline assembly blocks.
Language Features:
- Add
E.selectorfor a non-anonymous eventEto access the 32-byte selector topic.
Compiler Features:
- LSP: Add rudimentary support for semantic highlighting.
- Type Checker: Warn about assignments involving multiple pushes to storage
bytesthat may invalidate references. - Yul Optimizer: Improve inlining heuristics for via IR code generation and pure Yul compilation.
Bugfixes:
- ABI Encoder: When encoding an empty string coming from storage do not add a superfluous empty slot for data.
- Common Subexpression Eliminator: Process assembly items in chunks with maximum size of 2000. It helps to avoid extremely time-consuming searches during code optimization.
- Yul Optimizer: Do not remove
returndatacopyin cases in which it might perform out-of-bounds reads that unconditionally revert as out-of-gas. Previously, any
returndatacopythat wrote to memory that was never read from was removed without accounting for the out-of-bounds condition.
We especially thank all the contributors that made this release possible:
Christian Parpart, Christian Reitwiessner, Damian Wechman, Daniel Kirchner, Denis T, Dustin Alandzes, Harikrishnan Mulackal, Josep M Sobrepere, Kamil Śliwak, Matheus Aguiar, Mathias L. Baumann, Nishant Sachdeva, Prajwal Borkar, Ryan, Samuel Osewa, Saw-mon-and-Natalie, shady41, sourabh.xyz, uji, Yuri Victorovich
If you want to perform a source build, please only use solidity_0.8.15.tar.gz and not the zip provided by github directly.
Version 0.8.14
This release fixes two important bugs and also contains other minor bug fixes and features.
For details, please see the release announcement.
Important Bugfixes:
- ABI Encoder: When ABI-encoding values from calldata that contain nested arrays, correctly validate the nested array length against
calldatasize()in all cases. - Override Checker: Allow changing data location for parameters only when overriding external functions.
Compiler Features:
- Assembly-Json Exporter: Include source list in
sourceListfield. - Commandline Interface: Option
--pretty-jsonworks also with the following options:--abi,--asm-json,--ast-compact-json,--devdoc,--storage-layout,--userdoc. - Language Server: Allow full filesystem access to language server.
- Peephole Optimizer: Remove operations without side effects before simple terminations.
- SMTChecker: Support
abi.encodeCalltaking into account the called selector.
Bugfixes:
- Assembly-Json Exporter: Fix assembly json export to store jump types of operations in
jumpTypefield instead ofvalue. - SMTChecker: Fix ABI compatibility with z3 >=4.8.16.
- SMTChecker: Fix bug when z3 is selected but not available at runtime.
- Type Checker: Properly check restrictions of
using ... globalin conjunction with libraries. - TypeChecker: Convert parameters of function type to how they would be called for
abi.encodeCall.
We especially thank all the contributors that made this release possible:
a3d4, aathan, Aisultan Kali, Alexander Arlt, Alexey Shekhirin, alpharush, andreb0x, Bytecurl, Christian Parpart, Damian Wechman, Daniel Kirchner, dtedesco1, Florian Sey, Hector Roussille, Joshua Quinones, Kamil Śliwak, Leo Alt, Matheus Aguiar, Mathias L. Baumann, Nishant Sachdeva, Nobuhiko Otoba, Ryan, sourabh.xyz, Tharun K
If you want to perform a source build, please only use solidity_0.8.14.tar.gz and not the zip provided by github directly.
Version 0.8.13
Solidity v0.8.13 fixes an important bug related to abi.encodeCall, extends the using for directive and implements "go to definition" for the language server.
Furthermore, compiling via the new Yul IR pipeline is now considered production ready.
For more details, see the release announcement.
Important Bugfixes:
- Code Generator: Correctly encode literals used in
abi.encodeCallin place of fixed bytes arguments.
Language Features:
- General: Allow annotating inline assembly as memory-safe to allow optimizations and stack limit evasion that rely on respecting Solidity's memory model.
- General:
using M for Type;is allowed at file level andMcan now also be a brace-enclosed list of free functions or library functions. - General:
using ... for T global;is allowed at file level where the user-defined typeThas been defined, resulting in the effect of the statement being available everywhereTis available.
Compiler Features:
- Commandline Interface: Allow the use of
--via-irin place of--experimental-via-ir. - Compilation via Yul IR is no longer marked as experimental.
- JSON-AST: Added selector field for errors and events.
- LSP: Implements goto-definition.
- Peephole Optimizer: Optimize comparisons in front of conditional jumps and conditional jumps across a single unconditional jump.
- Yul EVM Code Transform: Avoid unnecessary
pops on terminating control flow. - Yul Optimizer: Remove
sstoreandmstoreoperations that are never read from.
Bugfixes:
- General: Fix internal error for locales with unusual capitalization rules. Locale set in the environment is now completely ignored.
- Type Checker: Fix incorrect type checker errors when importing overloaded functions.
- Yul IR Code Generation: Optimize embedded creation code with correct settings. This fixes potential mismatches between the constructor code of a contract compiled in isolation and the bytecode in
type(C).creationCode, resp. the bytecode used fornew C(...).
We especially thank all the contributors that made this release possible:
a3d4, Abdul Karim Moro, Alexander Arlt, Bhargava Shastry, Callis Ezenwaka, Christian Parpart, Daniel Kirchner, david-k, franzihei, hrkrshnn, Kamil Śliwak, kanedaaaa, Leo Alt, Marenz, Mate Soos, Nishant Sachdeva, Paarth Madan, Richie, Sleepy, Tyler, wechman, Wes Bouaziz,
If you want to perform a source build, please only use solidity_0.8.13.tar.gz and not the zip provided by github directly.
Version 0.8.12
Solidity v0.8.12 improves the javascript/wasm binary and fixes several bugs.
For more details, see the release announcement.
Language Features:
- General: Add equality-comparison operators for external function types.
- General: Support
ContractName.functionNameforabi.encodeCall, in addition to external function pointers.
Compiler Features:
- Commandline Interface: Event and error signatures are also returned when using
--hashes. - Yul Optimizer: Remove
mstoreandsstoreoperations 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
yulPathto support.addressin 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 calldatatobytes. - Control Flow Graph: Perform proper virtual lookup for modifiers for uninitialized variable and unreachable code analysis.
- General:
string.concatnow properly takes strings as arguments and returnsstring memory. It was accidentally introduced as a copy ofbytes.concatbefore. - Immutables: Fix wrong error when the constructor of a base contract uses
returnand 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.
We especially thank all the contributors that made this release possible:
a3d4, Aleksey Bykhun, Amsavarthan Lv, Ayush Shukla, Bhargava Shastry, Braden Watling, Brien, Bruno Barbieri, Christian Parpart, Daniel Kirchner, Esquith Allen, Franziska Heintel, Hakeem Almidan, Harikrishnan Mulackal, joshieDo, joshuatarkwski, Kamil Śliwak, Laurent, Leo Alt, Markus Waas, Mathias L. Baumann, mejsiej, Mohamed Safouen Bouabid, Naveen Sahu, Nikita Stupin, Nishant Sachdeva, Pranay Reddy, Sean Billig, Semar Augusto, William Entriken, yatharthagoenka, Younghoon-Lee.
If you want to perform a source build, please only use solidity_0.8.12.tar.gz and not the zip provided by github directly.