Solidity v0.8.5 is released! - Allows bytes conversions and adds ``verbatim`` in Yul

We released Solidity 0.8.5 yesterday!

v0.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.

:open_book: Solidity 0.8.5 Release Announcement | Solidity Blog
:floppy_disk: Release Version 0.8.5 ยท ethereum/solidity ยท GitHub

Notable New Features

Bytes Conversion

This release introduces the ability to convert bytes and bytes slices to fixed bytes types bytes1 / โ€ฆ / bytes32. While conversion between fixed-length bytes types has always been possible, it is now also possible to convert dynamically-sized bytes types to fixed-length bytes types.

Find the complete feature documentation here.

Verbatim in Yul

This release introduces the set of verbatim builtin functions for Yul that allows you inject arbitrary bytecode into the binary. This is currently only available via pure Yul, i.e., it is not accessible via inline assembly.

This essentially has two use-cases (more on those below):

  1. The use of opcodes unknown to Yul (because they are only proposed or because you are targeting an EVM-incompatible chain).
  2. Generation of specific sequences of bytecode that are unmodified by the optimizer.

Find the complete feature documentation here.

For code examples and more details on the notable features, please check out the release announcement: Solidity 0.8.5 Release Announcement | Solidity Blog

Spread the Word

And, as always, help us to spread the word about the new release, by sharing it in your social networks and with your peers! :bird: :love_letter:

2 Likes