Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@ ## master #2317 +/- ## ======================================= Coverage 60.55% 60.55% ======================================= Files 141 141 Lines 5785 5785 Branches 2394 2394 ======================================= Hits 3503 3503 Misses 2282 2282 ☔ View full report in Codecov by Sentry. |
🦑 📈 ink! Example Contracts ‒ Changes Report 📉 🦑These are the results when building the
Link to the run | Last update: Thu Nov 28 14:08:09 CET 2024 |
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 5.1.0
This is the first ink! release outside of Parity. ink! was started at Parity and
during this year became a community project maintained by the ink! Alliance, a
loose group of former Parity employees and teams who want ink! to ensure a bright
future for ink!.
You can find more details about the community handover in
this X post.
Generally, the only thing changing on the user-facing side is that the repositories
have been moved from
paritytechto the new GitHub organizationuse-ink.❣ We want to say a big thank you to our Polkadot community, which recently decided on
funding the continued maintenance and development of ink! with
a Polkadot Treasury grant.
Highlights
This version of ink! comes with three highlights plus some minor fixes.
(1) XCM Support
ink! 5.1 supports the usage of XCM in contracts, developers are no longer limited
to cross-contract calls, but can now execute cross-parachain calls.
We added a contract example that demonstrates the usage:
contract-xcmWe also added a new page on our documentation website: TODO.
You can view the Rust docs of the two functions here:
xcm_sendxcm_execute(2) Call an ink! contract from a
polkadot-sdkruntimeink! 5.1 comes with basic support for calling contracts from a Polkadot runtime.
We've added this example
that demonstrates how to call
flipperfrom apolkadot-sdkruntime pallet.Calling a contract from the runtime is an interesting application for parachains,
as they can put logic into a contract instead of their runtime. Contracts have
a number of advantages, as they are easier to upgrade and allow for
faster development iteration cycles.
The limitations currently are:
pallet-contractscontext, as it is better to depend on a trait ratherthan a contract impl, since you are working against an interface.
(3) E2E Testing
We replaced our
drinksandbox dependency with an internal ink! crate.In case you use DRink!:
First, you should upgrade your
drinkdependency toversion = "0.18.0".Second, these are the two changes you have to make:
Compatibility
The compatibility changes a bit to ink! 5.0:
>= 1.81cargo-contract:>= 5.0.0polkadot-sdk: >= v1.12.0(this release stabilized the
pallet-contractsXCM functions that ink! uses)substrate-contracts-node:>= 0.42.0>= 0.18.0Added
no-panic-handlerfeature ‒ #2164xcm_executeandxcm_sendsupport ‒ #1912Changed
paritytechGitHub organization to newuse-inkone ‒ #2220 and #2248subxtandpolkadot-sdkdependencies ‒ #2174drinksandbox with internalink_sandbox‒ #2158Fixed
burn()clears token approval ‒ #2099[ink_e2e::test]‒ #2162set_account_balancenow can't set balance below existential deposit ‒ #1983 (thanks @0xLucca!)[ink_e2e::test]‒ #2162