Skip to content

v0.2.0: Berlin

Compare
Choose a tag to compare
@github-actions github-actions released this 02 Dec 22:00
· 444 commits to main since this release
v0.2.0
1aa5263

We are happy to release solang v0.2.0 codenamed Berlin today. Aside from containing many small fixes and improvements, this release marks a milestone towards maturing our Substrate compilation target: Any regressions building up since ink! v3.0 are fixed, most notably the metadata format (shoutout and many thanks to external contributor extraymond) and event topics. Furthermore, we are leaving ink! version 3 behind us, in favor of introducing compatibility with the recent ink! 4 beta release and the latest substrate contract node v0.22.1.

Added

  • Solana / breaking: The try-catch construct is no longer permitted on Solana, as it
    never worked. Any CPI error will abort the transaction.
    seanyoung
  • Solana: Introduce new sub-command solang idl which can be used for generating
    a Solidity interface file from an Anchor IDL file. This can be used for calling
    Anchor Contracts on Solana. seanyoung
  • Substrate: Provide specific Substrate builtins via a "substrate" file. The
    Hash type from ink! is the first ink! specific type made available for Solidity
    contracts.
    xermicus
  • Substrate: Introduce the --log-api-return-codes CLI flag, which changes the
    emitted code to print return codes for seal API calls into the debug buffer.
    xermicus
  • Introduce function name mangling for overloaded functions and constructors, so
    that they can be represented properly in the metadata.
    xermicus

Changed

  • The Solana target now uses Borsh encoding rather than eth abi
    encoding. This is aimed at making Solang contracts Anchor compatible.
    LucasSte
  • Substrate / breaking: Supported node version is now pallet contracts v0.22.1.
    xermicus
  • Substrate / breaking: Remove the deprecated random builtin.
    xermicus

Fixed

  • Whenever possible, the parser does not give up after the first error.
    salaheldinsoliman
  • Constant expressions are checked for overflow.
    salaheldinsoliman
  • AddMod and MulMod were broken. This is now fixed.
    LucasSte
  • Substrate / breaking: Solang is now compatible with ink! version 4 (beta).
    xermicus
  • Substrate: Switched ABI generation to use official ink! crates, which fixes all
    remaining metadata regressions.
    extraymond and xermicus
  • Substrate: Allow constructors to have a name, so that multiple constructors are
    supported, like in ink!.
    xermicus
  • All provided examples as well as most of the Solidity code snippets in our
    documentation are now checked for succesful compilation on the Solang CI.
    xermicus
  • Substrate: Fix events with topics. The topic hashes generated by Solang
    contracts are now exactly the same as those generated by ink!.
    xermicus