-
Notifications
You must be signed in to change notification settings - Fork 482
Release v4.0.0
#1653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release v4.0.0
#1653
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1653 +/- ##
==========================================
- Coverage 70.76% 70.68% -0.08%
==========================================
Files 206 206
Lines 6416 6416
==========================================
- Hits 4540 4535 -5
- Misses 1876 1881 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
cmichi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🙌
SkymanOne
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yay!
HCastano
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
Version 4.0.0
The latest stable release of ink! is here 🥳
This version brings a lot of usability improvements, making the language better suited for the needs of production parachains.
A couple of highlights include:
contract binaries
There's a lot more to dig through, so take some time to poke around the
CHANGELOG(including the4.0.0-alphaand4.0.0-betareleases).You may notice there have been a few breaking changes. No need to be scared though, we wrote up a migration guide covering all of the breaking changes and how to update your ink! 3.x contract accordingly.
Thanks to everyone that helped make this release possible ❤️
Compatibility
In order to build contracts which use ink!
v4.0.0you need to usecargo-contractv2.0.0. You can install it as follows:cargo install cargo-contract --forced --lockedYou will also need to use a version of
pallet-contractslater than polkadot-v0.9.37 in your node.The
v0.24.0release of thesubstrate-contracts-nodeis compatible with the ink!4.0.0release.For full compatibility requirements see the migration guide.
Added
Mapping::contains(key)andMapping::insert_return_size(key, val)‒ #1224payment-channelexample ‒ #1248 (thanks @kanishkatn!)versionfield to ink! metadata ‒ #1313rand-extensionexample has been adapted to an updated version of theChainExtensionAPI ‒ #1356ink_env::pay_with_call!helper macro for off-chain emulation of sending payments with contract message calls ‒ #1379Result<Self, Error>as a return type in constructors ‒ #1446Mapping::take()function allowing to get a value removing it from storage ‒ #1461Mappingfunctions - #1492Changed
inkrepository ‒ #1361inkentrance crate ‒ #1223XXH32instead ofsha256for calculating storage keys ‒ #1393LangError) ‒ #1450LangErrors from constructors ‒ #1504scale-inforequirement to2.3‒ #1467Mapping::insert(key, val)andMapping::insert_return_size(key, val)into one method - #1463__unstable__wasm import module ‒ #1522return()type ‒ #1525take_storage‒ #1568instantiatemethods ‒ #1591CallBuilderandCreateBuildererror handling optional ‒ #1602CallBuilder::fire()method toinvoke()‒ #1604_checkedcodegen call methods withtry_‒ #1621subxtdependencies ‒ #1549Fixed
docsfield ‒ #1385WhereClosurefor the generics intostorage_item‒ #1536 (thanks @xgreenx!)Removed
ecdsa_to_eth_address()and removeeth_compatibilitycrate ‒ #1233wee-alloc‒ #1403ink_env::randomfunction ‒ #1442Defaultimplementation for AccountId ‒ #1255