ink! 3.0.0 RC 8
Pre-releaseVersion 3.0-rc8
This is the 8th release candidate for ink! 3.0.
Compatibility
You need to upgrade to a new version of the contracts
pallet in order to use this
ink! release. Specifically we recommend you upgrade to at least the pallet version
249dbbb
(or newer than Jan 17, 2022).
For substrate-contracts-node
we just issued a new release v0.5.0
, which has been synchronized
to the latest Substrate master
and hence is compatible with this ink! release candidate.
Also, the metadata changed with this release, so you need to have a recent version of
the user interface you are using. For polkadot-js/api
and polkadot-js/apps
the metadata
changes are supported since Jan 19, 2022.
Metadata Changes
There are two metadata changes in this release candidate:
For messages and constructors: name: Array
➔ label: String
The messages and constructors exposed by a contract were previously denoted with
"name": ["foo", "bar"]
Now they are instead denoted with
"label": "foo"
For public contract methods that are implemented from a trait, the trait name is prefixed to
the method name with ::
as the separator. So e.g. trait_name::get_owner
.
The ink! PR which implemented this is #923,
for the polkadot-js/api
it was polkadot-js/api#4255.
Constructors got a new field: payable: bool
Constructors now have to be specified payable
if it's intended for them to receive value
(i.e. tokens). This is a breaking change, beforehand they were by default payable,
now they are by default non-payable.
The ink! PR which implemented this is #1065, the PR that updated the ink!
metadata to V3 is #1100, and for the polkadot-js/api
it was polkadot-js/api#4432.
Changed
- Update metadate to support payable constructors - #1100.
- Make constructors non-payable by default, require specifying
payable
explicitly - #1065. - Renamed the error code
EcdsaRecoverFailed
toEcdsaRecoveryFailed
‒ #1064. - Renamed the
ink_env
functiontransferred_balance()
totransferred_value()
‒ #1063. - Removed the error codes
BelowSubsistenceThreshold
andNewContractNotFunded
‒ #1062. - Updated ink! to use the most recent
contracts
pallet API ‒ #1053. - Explicitly link against
rlibc
to get non-buggy version ofmemcpy
‒ #1049. - Changed the metadata field
name
tolabel
for messages and constructors ‒ #923 (thanks @xgreenx).
Added
- Added a
remove
method to theMapping
data structure ‒ #1023.