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 |
HCastano
reviewed
Feb 15, 2023
ascjones
commented
Feb 15, 2023
Closed
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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