Releases: ethereum/solidity
Version 0.8.8
Solidity v0.8.8 introduces user defined value types as a major feature, improves overriding interface functions and reading from immutables. Apart from bugfixes, we also cleaned up the command-line interface and improved the way the
import mechanism resolves files.
For more details, see the release announcement.
Language Features:
- Inheritance: A function that overrides only a single interface function does not require the
override
specifier. - Type System: Support
type(E).min
andtype(E).max
for enums. - User Defined Value Type: allows creating a zero cost abstraction over a value type with stricter type requirements.
Compiler Features:
- Commandline Interface: Add
--include-path
option for specifying extra directories that may contain importable code (e.g. packaged third-party libraries). - Commandline Interface: Do not implicitly run evm bytecode generation unless needed for the requested output.
- Commandline Interface: Normalize paths specified on the command line and make them relative for files located inside base path and/or include paths.
- Immutable variables can be read at construction time once they are initialized.
- SMTChecker: Add constraints to better correlate
address(this).balance
andmsg.value
. - SMTChecker: Support constants via modules.
- SMTChecker: Support low level
call
as external calls to unknown code. - SMTChecker: Support the
value
option for external function calls. - SMTChecker: Support user defined value types.
Bugfixes:
- Code Generator: Fix ICE on assigning to calldata structs and statically-sized calldata arrays in inline assembly.
- Code Generator: Use stable source order for ABI functions.
- Commandline Interface: Disallow the
--experimental-via-ir
option in Standard JSON, Assembler and Linker modes. - Commandline Interface: Fix resolution of paths whitelisted with
--allowed-paths
or implicitly due to base path, remappings and files being compiled. Correctly handle paths that do not match imports exactly due to being relative, non-normalized or empty. - Commandline Interface: Report optimizer options as invalid in Standard JSON and linker modes instead of ignoring them.
- Name Resolver: Fix that when importing an aliased symbol using
import {AliasedName} from "a.sol"
it would use the original name of the symbol and not the aliased one. - Opcode Optimizer: Prevent the optimizer from running multiple times to avoid potential bytecode differences for referenced code.
- Parser: Properly check for multiple SPDX license identifiers next to each other and validate them.
- SMTChecker: Fix BMC's constraints regarding internal functions.
- SMTChecker: Fix false negative caused by
push
on storage array references returned by internal functions. - SMTChecker: Fix false positive in external calls from constructors.
- SMTChecker: Fix internal error on some multi-source uses of
abi.*
, cryptographic functions and constants. - Standard JSON: Fix non-fatal errors in Yul mode being discarded if followed by a fatal error.
- Type Checker: Correct wrong error message in inline assembly complaining about
.slot
or.offset` not valid when actually
.length`` was used. - Type Checker: Disallow modifier declarations and definitions in interfaces.
- Yul Optimizer: Fix a crash in LoadResolver, when
keccak256
has particular non-identifier arguments.
We especially thank all the contributors that made this release possible:
Ahmed Ali, Alessandro Coglio, Alex Beregszaszi, Alexander Arlt, Andrew Lyndem, Basit Raza, benldrmn, Bhargava Shastry, CrimsonGlory, Daniel Kirchner, Harikrishnan Mulackal, hawkess, istareatscreens, John Adler, Kamil Śliwak, Leonardo Alt, Marenz, Midhun07, Nikita Stupin, Paul Razvan Berg, priyansh786, Sean Hawkes, soroosh-sdi, Sreekesh V, yatharthagoenka
If you want to perform a source build, please only use solidity_0.8.8.tar.gz and not the zip provided by github directly.
Version 0.8.7
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.
Version 0.8.6
Solidity 0.8.6 fixes some non-critical but annoying bugs, especially a warning about unreachable code that
is in fact reachable.
For more details, please see the release announcement.
Language Features:
- Yul: Special meaning of
".metadata"
data object in Yul object.
Bugfixes:
- Control Flow Graph: Fix incorrectly reported unreachable code.
- Solc-Js: When running
solcjs
without the--optimize
flag, usesettings.optimizer.enabled=false
in Standard JSON instead of omitting the key. - Standard JSON: Omitting
settings.optimizer.enabled
was not equivalent to setting it tofalse
. It meant disabling also the peephole optimizer and jumpdest remover which by default still run withenabled=false
.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Allegheny Crypto, axeldelamarre, Djordje Mijovic, hrkrshnn, jgoodall628, Kamil Śliwak, Leonardo, Mathias Baumann, patekuru, QQ喵, TaldenV
If you want to perform a source build, please only use solidity_0.8.6.tar.gz and not the zip provided by github directly.
Version 0.8.5
Solidity 0.8.5 allows conversions from bytes
to bytesNN
values, adds the verbatim
builtin function to inject
arbitrary bytecode in Yul and fixes several smaller bugs.
For more details, please see the release announcement.
Language Features:
- Allowing conversion from
bytes
andbytes
slices tobytes1
/.../bytes32
. - Yul: Add
verbatim
builtin function to inject arbitrary bytecode.
Compiler Features:
- Code Generator: Insert helper functions for panic codes instead of inlining unconditionally. This can reduce costs if many panics (checks) are inserted, but can increase costs where few panics are used.
- EVM: Set the default EVM version to "Berlin".
- SMTChecker: Function definitions can be annotated with the custom Natspec tag
custom:smtchecker abstract-function-nondet
to be abstracted by a nondeterministic value when called. - Standard JSON / combined JSON: New artifact "functionDebugData" that contains bytecode offsets of entry points of functions and potentially more information in the future.
- Yul Optimizer: Evaluate
keccak256(a, c)
, when the value at memory locationa
is known at compile time andc
is a constant<= 32
.
Bugfixes:
- AST: Do not output value of Yul literal if it is not a valid UTF-8 string.
- Code Generator: Fix internal error when function arrays are assigned to storage variables and the function types can be implicitly converted but are not identical.
- Code Generator: Fix internal error when super would have to skip an unimplemented function in the virtual resolution order.
- Control Flow Graph: Assume unimplemented modifiers use a placeholder.
- Control Flow Graph: Take internal calls to functions that always revert into account for reporting unused or unassigned variables.
- Function Call Graph: Fix internal error connected with circular constant references.
- Name Resolver: Do not issue shadowing warning if the shadowing name is not directly accessible.
- Natspec: Allow multiple
@return
tags on public state variable documentation. - SMTChecker: Fix internal error on conversion from
bytes
tofixed bytes
. - SMTChecker: Fix internal error on external calls from the constructor.
- SMTChecker: Fix internal error on struct constructor with fixed bytes member initialized with string literal.
- Source Locations: Properly set source location of scoped blocks.
- Standard JSON: Properly allow the
inliner
setting undersettings.optimizer.details
. - Type Checker: Fix internal compiler error related to having mapping types in constructor parameter for abstract contracts.
- Type Checker: Fix internal compiler error when attempting to use an invalid external function type on pre-byzantium EVMs.
- Type Checker: Fix internal compiler error when overriding receive ether function with one having different parameters during inheritance.
- Type Checker: Make errors about (nested) mapping type in event or error parameter into fatal type errors.
- Type Checker: Fix internal compiler error when overriding an implemented modifier with an unimplemented one.
AST Changes:
- Add member
hexValue
for Yul string and hex literals.
We especially thank all the contributors that made this release possible:
a3d4, Alex Beregszaszi, Alexander Arlt, Anurag Dashputre, Bhargava Shastry, Christian Parpart, cxxboy, Daniel Kirchner, Đorđe Mijović, Franziska Heintel, Harikrishnan Mulackal, Kamil Śliwak, Keqi Huang, Leonardo Alt, Martin Blicha, Mathias Baumann, Maurelian, newbateni, Raphael Roullet, TerranCivilian, Wade Dorrell, William Entriken.
If you want to perform a source build, please only use solidity_0.8.5.tar.gz and not the zip provided by github directly.
Version 0.8.4
Solidity 0.8.4 fixes a bug in the ABI decoder, adds custom structured errors, bytes.concat(...)
and allows more flexible configuration of the SMT checker. For more details, please see the release announcement.
The release contains an important bugfix. See decoding from memory bug blog post for more details.
The release also implements custom errors. See custom errors blog post for an introduction.
Important Bugfixes:
- ABI Decoder V2: For two-dimensional arrays and specially crafted data in memory, the result of
abi.decode
can depend on data elsewhere in memory. Calldata decoding is not affected.
Language Features:
- Assembly / Yul: Allow hex string literals.
- Possibility to use
bytes.concat
with variable number ofbytes
andbytesNN
arguments which behaves as a restricted version ofabi.encodePacked
with a more descriptive name. - Support custom errors via the
error
keyword and introduce therevert
statement.
Compiler Features:
- Analysis: Properly detect circular references to the bytecode of other contracts across all function calls.
- Commandline Interface: Model checker option
--model-checker-targets
also acceptsoutOfBounds
. - Commandline Interface: New model checker option
--model-checker-contracts
allows users to select which contracts should be analyzed as the most derived. - Low-Level Inliner: Inline ordinary jumps to small blocks and jumps to small blocks that terminate.
- NatSpec: Allow
@notice
tag on non-public state variables and local variable declarations. The documentation will only be part of the AST, under the fielddocumentation
. - SMTChecker: Deprecate
pragma experimental SMTChecker;
and set default model checker engine tonone
. - SMTChecker: Report local variables in CHC counterexamples.
- SMTChecker: Report out of bounds index access for arrays and fixed bytes.
- SMTChecker: Support file level functions and constants.
- Standard JSON: Model checker option
settings.modelChecker.targets
also acceptsoutOfBounds
. - Standard JSON: Model checker option
settings.modelChecker.targets
takes an array of string targets instead of string of comma separated targets. - Standard JSON: New model checker option
settings.modelChecker.contracts
allows users to select which contracts should be analyzed as the most derived. - Yul EVM Code Transform: Stack Optimization: Reuse slots of unused function arguments and defer allocating stack slots for return variables until after expression statements and assignments that do not reference them.
- Yul Optimizer: Added a new step FunctionSpecializer, that specializes a function with its literal arguments.
Bugfixes:
- Antlr Grammar: Fix parsing of import paths involving properly distinguishing between empty and non-empty string literals in general.
- AST Output: Fix
kind
field ofModifierInvocation
for base constructor calls. - Commandline interface: Fix internal error when printing AST and using
--base-path
orfile://
prefix in imports. - Commandline interface: Fix standard input bypassing allowed path checks.
- Natspec: Fix internal error related to the
@returns
documentation for a public state variable overriding a function. - SMTChecker: Fix false positive and false negative on
push
as LHS of a compound assignment. - SMTChecker: Fix false positive in contracts that cannot be deployed.
- SMTChecker: Fix internal error on public getter returning dynamic data on older EVM versions where these are not available.
- SMTChecker: Fix internal error on try-catch with function call in catch block.
- Type Checker: Fix missing error when events are used without an emit statement.
AST Changes:
- New property for
ContractDefinition
nodes:usedErrors
lists AST IDs of all errors used by the contract (even if defined outside).
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Anurag Dashputre, Behrouz, Bhargava Shastry, Christian Parpart, Daniel Kirchner, Đorđe Mijović, Feiyang Tan, franzihei, Harikrishnan Mulackal, Hongbo Miao, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, Paul Razvan Berg, Thibaut Schaeffer, zayneio,
If you want to perform a source build, please only use solidity_0.8.4.tar.gz and not the zip provided by github directly.
Version 0.8.3
Solidity 0.8.3 is a bugfix release that fixes an important bug about how the optimizer handles the Keccak256 opcode.
For details on the bug, please see the bug blog post.
For a detailed explanation of the new features and changes, please see the release blog post.
Important Bugfixes:
- Optimizer: Fix bug on incorrect caching of Keccak-256 hashes.
Compiler Features:
- Command Line Interface: Drop experimental support for
--machine evm15
. - Optimizer: Try to move
and
with constant insideor
to improve storage writes of small types. - Optimizer: Replace multiplications and divisions with powers of two by shifts.
Bugfixes:
- AST Import: For constructors, a public visibility is ignored during importing.
- Error Reporter: Fix handling of carriage return.
- SMTChecker: Fix internal error in BMC on resolving virtual functions inside branches.
- SMTChecker: Fix internal error on
array.pop
nested inside 1-tuple. - SMTChecker: Fix internal error on
FixedBytes
constant initialized with string literal. - SMTChecker: Fix internal error on array slices.
- SMTChecker: Fix internal error on calling public getter on a state variable of type array (possibly nested) of structs.
- SMTChecker: Fix internal error on pushing to
string
casted tobytes
. - SMTChecker: Fix bug in virtual functions called by constructors.
AST Changes:
- ModifierInvocation: Add
kind
field which can bemodifierInvocation
orbaseConstructorSpecifier
.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Alexander Arlt, Bhargava Shastry, Daniel Kirchner, Djordje Mijovic, ghidello, Harikrishnan Mulackal, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann.
If you want to perform a source build, please only use solidity_0.8.3.tar.gz and not the zip provided by github directly.
Version 0.8.2
Solidity 0.8.2 adds an optimizer stage that can inline small amounts of code to save gas and
provides more means to work with code documentation by exporting inline comments
and allowing custom natspec tags.
For a detailed explanation of the new features and changes, please see the blog post.
Compiler Features:
- AST: Export NatSpec comments above each statement as their documentation.
- Inline Assembly: Do not warn anymore about variables or functions being shadowed by EVM opcodes.
- NatSpec: Allow and export all tags that start with
@custom:
. - NatSpec: Provide source locations for parsing errors.
- Optimizer: Simple inlining when jumping to small blocks that jump again after a few side-effect free opcodes.
Bugfixes:
- AST: Added
referencedDeclaration
for enum members. - Code Generator: Fix internal error when functions are passed as parameters of other callables, when the function types can be implicitly converted, but not identical.
- Parser: Properly parse
.address
in some situations. - SMTChecker: Fix missing type constraints on block and transaction variables in the deployment phase.
- Type Checker: Fix internal error when override specifier is not a contract.
- Type Checker: Make function-hash collision errors into fatal type errors.
AST Changes:
- Adds
nameLocation
to declarations to represent the exact location of the symbolic name. - Removed the redundant function type "bytearraypush" - replaced by "arraypush".
- Support field
documentation
to hold NatSpec comments above each statement.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Alexander Arlt, Bhargava Shastry, Christian Parpart, Daniel Kirchner, dms-yondy, Đorđe Mijović, DragonDev1906, Franziska Heintel, Harikrishnan Mulackal, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, Mikko Ohtamaa, nora, Rostyslav,
Sanad, ssi91
Version 0.8.1
Solidity 0.8.1 introduces many new features for the SMTChecker, updates the emscripten version for building soljson.js to 2.0.12, allows to catch panic errors and adds other small improvements.
For a detailed explanation of the new features and changes, please see the blog post.
Language Features:
- Possibility to use
catch Panic(uint code)
to catch a panic failure from an external call.
Compiler Features:
- Code Generator: Reduce the cost of
<address>.code.length
by usingextcodesize
directly. - Command Line Interface: Allow
=
as separator between library name and address in--libraries
commandline option. - Command Line Interface: New option
--model-checker-targets
allows specifying which targets should be checked. The valid options areall
,constantCondition
,underflow
,overflow
,divByZero
,balance
,assert
,popEmptyArray
, where the default isall
. Multiple targets can be chosen at the same time, separated by a comma without spaces:underflow,overflow,assert
. - Command Line Interface: Only accept library addresses with a prefix of
0x
in--libraries
commandline option. - Optimizer: Add rule to replace
iszero(sub(x,y))
byeq(x,y)
. - Parser: Report meaningful error if parsing a version pragma failed.
- SMTChecker: Output internal and trusted external function calls in a counterexample's transaction trace.
- SMTChecker: Show
msg.value
in counterexample transaction traces when greater than 0. - SMTChecker: Show contract name in counterexample function call.
- SMTChecker: Support ABI functions as uninterpreted functions.
- SMTChecker: Support try/catch statements.
- SMTChecker: Synthesize untrusted functions called externally.
- SMTChecker: Use checked arithmetic by default and support
unchecked
blocks. - Standard JSON: New option
modelCheckerSettings.targets
allows specifying which targets should be checked. The valid options areall
,constantCondition
,underflow
,overflow
,divByZero
,balance
,assert
,popEmptyArray
, where the default isall
. Multiple targets can be chosen at the same time, separated by a comma without spaces:underflow,overflow,assert
.
Bugfixes:
- Code Generator: Fix length check when decoding malformed error data in catch clause.
- Control Flow Graph: Fix missing error caused by read from/write to uninitialized variables.
- SMTChecker: Fix false negatives in overriding modifiers and functions.
- SMTChecker: Fix false negatives in the presence of inline assembly.
- SMTChecker: Fix false negatives when analyzing external function calls.
- SMTChecker: Fix internal error on
block.chainid
. - SMTChecker: Fix internal error on pushing string literal to
bytes
array. - SMTChecker: Fix missing type constraints for block variables.
- Type Checker: Fix infinite loop when accessing circular constants from inline assembly.
- Type Checker: Fix internal error caused by constant structs containing mappings.
- Type System: Disallow implicit conversion from
uintN
tointM
whenM > N
, and by extension, explicit conversion between the same types is also disallowed.
Build System:
- Update the soljson.js build to emscripten 2.0.12 and boost 1.75.0.
We especially thank all the contributors that made this release possible:
a3d4, Alex Beregszaszi, Alexander Arlt, az1az1, Bhargava Shastry, BinacsLee, Daniel Kirchner, Dmytro, Đorđe Mijović, Greg Stretton, Harikrishnan Mulackal, Harry Altman, Hui Yu, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, smareasy,
Suriyaa Sundararuban,
If you want to perform a source build, please only use solidity_0.8.0.tar.gz and not the zip provided by github directly.
Version 0.8.0
Solidity 0.8.0 is a breaking release of the Solidity compiler and language.
For a detailed explanation of the new features and changes, please see the blog post.
Breaking Changes:
- Code Generator: All arithmetic is checked by default. These checks can be disabled using
unchecked { ... }
. - Code Generator: Cause a panic if a byte array in storage is accessed whose length is encoded incorrectly.
- Code Generator: Use
revert
with error signaturePanic(uint256)
and error codes instead of invalid opcode on failing assertions. - Command Line Interface: JSON fields
abi
,devdoc
,userdoc
andstorage-layout
are now sub-objects rather than strings. - Command Line Interface: Remove the
--old-reporter
option. - Command Line Interface: Remove the legacy
--ast-json
option. Only the--ast-compact-json
option is supported now. - General: Enable ABI coder v2 by default.
- General: Remove global functions
log0
,log1
,log2
,log3
andlog4
. - Parser: Exponentiation is right associative.
a**b**c
is parsed asa**(b**c)
. - Scanner: Remove support for the
\b
,\f
, and\v
escape sequences. - Standard JSON: Remove the
legacyAST
option. - Type Checker: Function call options can only be given once.
- Type System: Declarations with the name
this
,super
and_
are disallowed, with the exception of public functions and events. - Type System: Disallow
msg.data
inreceive()
function. - Type System: Disallow
type(super)
. - Type System: Disallow enums with more than 256 members.
- Type System: Disallow explicit conversions from negative literals and literals larger than
type(uint160).max
toaddress
type. - Type System: Disallow the
byte
type. It was an alias tobytes1
. - Type System: Explicit conversion to
address
type always returns a non-payableaddress
type. In particular,address(u)
,address(b)
,address(c)
andaddress(this)
have the typeaddress
instead ofaddress payable
(Hereu
,b
, andc
are arbitrary variables of typeuint160
,bytes20
and contract type respectively.) - Type System: Explicit conversions between two types are disallowed if it changes more than one of sign, width or kind at the same time.
- Type System: Explicit conversions from literals to enums are only allowed if the value fits in the enum.
- Type System: Explicit conversions from literals to integer type is as strict as implicit conversions.
- Type System: Introduce
address(...).code
to retrieve the code asbytes memory
. The size can be obtained viaaddress(...).code.length
, but it will currently always include copying the code. - Type System: Introduce
block.chainid
for retrieving the current chain id. - Type System: Support
address(...).codehash
to retrieve the codehash of an account. - Type System: The global variables
tx.origin
andmsg.sender
have typeaddress
instead ofaddress payable
. - Type System: Unary negation can only be used on signed integers, not on unsigned integers.
- View Pure Checker: Mark
chainid
as view. - Yul: Disallow the use of reserved identifiers, such as EVM instructions, even if they are not available in the given dialect / EVM version.
- Yul: The
assignimmutable
builtin in the "EVM with objects" dialect takes the base offset of the code to modify as an additional argument.
Language Features:
- Super constructors can now be called using the member notation e.g.
M.C(123)
.
Bugfixes:
- Type Checker: Perform proper truncating integer arithmetic when using constants in array length expressions.
AST Changes:
- New AST Node
IdentifierPath
replacing in many places theUserDefinedTypeName
. - New AST Node
UncheckedBlock
used forunchecked { ... }
.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Christian Parpart, Daniel Kirchner, Djordje Mijovic, Harikrishnan Mulackal, Kamil Śliwak, Leonardo Alt, Mathias Baumann, ssi91
If you want to perform a source build, please only use solidity_0.8.0.tar.gz and not the zip provided by github directly.
Version 0.7.6
This version of Solidity adds better support for calldata types. Furthermore, the fallback function can now have a parameter and explicitly return data. For details, please see the blog post.
Language Features:
- Code generator: Support conversion from calldata slices to memory and storage arrays.
- Code generator: Support copying dynamically encoded structs from calldata to memory.
- Code generator: Support copying of nested arrays from calldata to memory.
- Scanner: Generate a parser error when comments or unicode strings contain an unbalanced or underflowing set of unicode direction override markers (LRO, RLO, LRE, RLE, PDF).
- The fallback function can now also have a single
calldata
argument (equalingmsg.data
) and returnbytes memory
(which will not be ABI-encoded but returned as-is). - Wasm backend: Add
i32.select
andi64.select
instructions.
Compiler Features:
- Build System: Optionally support dynamic loading of Z3 and use that mechanism for Linux release builds.
- Code Generator: Avoid memory allocation for default value if it is not used.
- SMTChecker: Apply constant evaluation on binary arithmetic expressions.
- SMTChecker: Create underflow and overflow verification targets for increment/decrement in the CHC engine.
- SMTChecker: Report struct values in counterexamples from CHC engine.
- SMTChecker: Support early returns in the CHC engine.
- SMTChecker: Support getters.
- SMTChecker: Support named arguments in function calls.
- SMTChecker: Support struct constructor.
- Standard-Json: Move the recently introduced
modelCheckerSettings
key tosettings.modelChecker
. - Standard-Json: Properly filter the requested output artifacts.
Bugfixes:
- Code generator: Do not pad empty string literals with a single 32-byte zero field in the ABI coder v1.
- NatSpec: Fix segfault when inheriting return parameter documentation for modifiers with no parameters.
- SMTChecker: Fix cast string literals to byte arrays.
- SMTChecker: Fix internal compiler error when doing bitwise compound assignment with string literals.
- SMTChecker: Fix internal error when trying to generate counterexamples with old z3.
- SMTChecker: Fix segmentation fault that could occur on certain SMT-enabled sources when no SMT solver was available.
- SMTChecker: Fix internal error when
bytes.push()
is used as the LHS of an assignment. - Type Checker:
super
is not available in libraries. - Type Checker: Disallow leading zeroes in sized-types (e.g.
bytes000032
), but allow them to be treated as identifiers. - Yul Optimizer: Fix a bug in NameSimplifier where a new name created by NameSimplifier could also be created by NameDispenser.
- Yul Optimizer: Removed NameSimplifier from optimization steps available to users.
We especially thank all the contributors that made this release possible:
Alex Beregszaszi, Alexander Arlt, Bhargava Shastry, Christian Parpart, Daniel Kirchner, Đorđe Mijović, franzihei, Harikrishnan Mulackal, Jaime, Kamil Śliwak, Leonardo Alt, Martin Blicha, Mathias Baumann, Matt Williams, midinas, ritzdorf.
If you want to perform a source build, please only use solidity_0.7.6.tar.gz and not the zip provided by github directly.