-
Notifications
You must be signed in to change notification settings - Fork 432
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
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 |
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.
🙌
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!
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-alpha
and4.0.0-beta
releases).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.0
you need to usecargo-contract
v2.0.0
. You can install it as follows:cargo install cargo-contract --forced --locked
You will also need to use a version of
pallet-contracts
later than polkadot-v0.9.37 in your node.The
v0.24.0
release of thesubstrate-contracts-node
is compatible with the ink!4.0.0
release.For full compatibility requirements see the migration guide.
Added
Mapping::contains(key)
andMapping::insert_return_size(key, val)
‒ #1224payment-channel
example ‒ #1248 (thanks @kanishkatn!)version
field to ink! metadata ‒ #1313rand-extension
example has been adapted to an updated version of theChainExtension
API ‒ #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 ‒ #1461Mapping
functions - #1492Changed
ink
repository ‒ #1361ink
entrance crate ‒ #1223XXH32
instead ofsha256
for calculating storage keys ‒ #1393LangError
) ‒ #1450LangError
s from constructors ‒ #1504scale-info
requirement to2.3
‒ #1467Mapping::insert(key, val)
andMapping::insert_return_size(key, val)
into one method - #1463__unstable__
wasm import module ‒ #1522return()
type ‒ #1525take_storage
‒ #1568instantiate
methods ‒ #1591CallBuilder
andCreateBuilder
error handling optional ‒ #1602CallBuilder::fire()
method toinvoke()
‒ #1604_checked
codegen call methods withtry_
‒ #1621subxt
dependencies ‒ #1549Fixed
docs
field ‒ #1385WhereClosure
for the generics intostorage_item
‒ #1536 (thanks @xgreenx!)Removed
ecdsa_to_eth_address()
and removeeth_compatibility
crate ‒ #1233wee-alloc
‒ #1403ink_env::random
function ‒ #1442Default
implementation for AccountId ‒ #1255