Skip to content

Commit e4fd25d

Browse files
authored
Release ink! 5.1.0 (#2317)
* Bump versions * Update changelog * Update `Cargo.lock` * Update to `contract-build` 5.0 * Temporarily disabled RISCV CI stages * Update test fixtures * Update `.gitignore` * Add missing fields to `ink_sandbox/Cargo.toml` * Add `ink_sandbox` version field to dep
1 parent 98f22de commit e4fd25d

File tree

71 files changed

+442
-289
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+442
-289
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ jobs:
232232
done
233233
234234
- name: Check RISCV
235-
if: ${{ matrix.type == 'RISCV' }}
235+
if: ${{ matrix.type == 'RISCV-disabled' }}
236236
env:
237237
RUSTC_BOOTSTRAP: 1
238238
RUSTUP_TOOLCHAIN: rve-nightly
@@ -611,7 +611,7 @@ jobs:
611611
fi
612612
613613
- name: Build Contract RISCV Examples
614-
if: ${{ matrix.type == 'RISCV' }}
614+
if: ${{ matrix.type == 'RISCV-disabled' }}
615615
env:
616616
RUSTC_BOOTSTRAP: 1
617617
RUSTUP_TOOLCHAIN: rve-nightly

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@
33

44
# Ignore history files.
55
**/.history/**
6+
7+
**/.DS_Store
8+
**/.idea/

CHANGELOG.md

Lines changed: 96 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,110 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased]
7+
## Version 5.1.0
8+
9+
This is the first ink! release outside of Parity. ink! was started at Parity and
10+
during this year became a community project maintained by the ink! Alliance, a
11+
loose group of former Parity employees and teams who want ink! to ensure a bright
12+
future for ink!.
13+
14+
You can find more details about the community handover in
15+
[this X post](https://x.com/ink_lang/status/1783877356819783916).
16+
Generally, the only thing changing on the user-facing side is that the repositories
17+
have been moved from `paritytech` to the new GitHub organization `use-ink`.
18+
19+
_We want to say a big thank you to our Polkadot community, which recently decided on
20+
funding the continued maintenance and development of ink! with
21+
[a Polkadot Treasury grant](https://polkadot.polkassembly.io/referenda/1123)._
22+
23+
### Highlights
24+
25+
This version of ink! comes with three highlights plus some minor fixes.
26+
27+
#### (1) XCM Support
28+
29+
ink! 5.1 supports the usage of XCM in contracts, developers are no longer limited
30+
to cross-contract calls, but can now execute cross-parachain calls.
31+
32+
We added a contract example that demonstrates the usage:
33+
[`contract-xcm`](https://github.com/use-ink/ink/tree/master/integration-tests/public/runtime-call-contract)
34+
35+
We also added a new page on our documentation website: TODO.
36+
37+
You can view the Rust docs of the two functions here:
38+
39+
* [`xcm_send`](https://use-ink.github.io/ink/ink_env/fn.xcm_send.html)
40+
* [`xcm_execute`](https://use-ink.github.io/ink/ink_env/fn.xcm_execute.html)
41+
42+
#### (2) Call an ink! contract from a `polkadot-sdk` runtime
43+
44+
ink! 5.1 comes with basic support for calling contracts from a Polkadot runtime.
45+
We've added [this example](https://github.com/use-ink/ink/tree/master/integration-tests/public/runtime-call-contract)
46+
that demonstrates how to call `flipper` from a `polkadot-sdk` runtime pallet.
47+
48+
Calling a contract from the runtime is an interesting application for parachains,
49+
as they can put logic into a contract instead of their runtime. Contracts have
50+
a number of advantages, as they are easier to upgrade and allow for
51+
faster development iteration cycles.
52+
53+
The limitations currently are:
54+
55+
* Contract calls can only be made to trait messages. This makes sense in the
56+
`pallet-contracts` context, as it is better to depend on a trait rather
57+
than a contract impl, since you are working against an interface.
58+
* Only contract messages can be called currently, no constructors.
59+
* The API could be nicer.
60+
61+
#### (3) E2E Testing
62+
63+
We replaced our `drink` sandbox dependency with an internal ink! crate.
64+
In case you use [DRink!](https://use.ink/basics/contract-testing/drink), these are
65+
the two changes you have to make:
66+
67+
```diff
68+
- #[ink_e2e::test(backend(runtime_only(sandbox = ink_e2e::MinimalSandbox)))]
69+
+ #[ink_e2e::test(backend(runtime_only(sandbox = ink_e2e::DefaultSandbox)))]
70+
```
71+
72+
```diff
73+
- ink_e2e = { version = "5", features = ["drink"] }
74+
+ ink_e2e = { version = "5", features = ["sandbox"] }
75+
```
76+
77+
### Compatibility
78+
79+
The compatibility changes a bit to ink! 5.0:
80+
81+
- Rust: `>= 1.81`
82+
- `cargo-contract`: `>= 5.0.0`
83+
- `polkadot-sdk`: [>= v1.12.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.12.0)
84+
(this release stabilized the `pallet-contracts` XCM functions that ink! uses)
85+
- `substrate-contracts-node`: `>= 0.42.0`
86+
- [DRink!](https://github.com/inkdevhub/drink): `>= 0.15.0`
887

988
### Added
89+
- [Runtime-to-Contract Calls] Environment agnostic contract invocation API, for calling contracts from runtime ‒ [#2219](https://github.com/use-ink/ink/pull/2219)
90+
- [Runtime-to-Contract Calls] Add `no-panic-handler` feature ‒ [#2164](https://github.com/paritytech/ink/pull/2164)
91+
- [Runtime-to-Contract Calls] Add example for calling a contract from a runtime pallet ‒ [#2189](https://github.com/paritytech/ink/pull/2189)
92+
- [XCM] Add `xcm_execute` and `xcm_send` support ‒ [#1912](https://github.com/use-ink/ink/pull/1912)
1093
- [Linter] Add links to detailed lint description ‒ [#2170](https://github.com/use-ink/ink/pull/2170)
11-
- Add `xcm_execute` and `xcm_send` support - [#1912](https://github.com/use-ink/ink/pull/1912)
12-
- Environment agnostic contract invocation API ‒ [#219](https://github.com/use-ink/ink/pull/2219)
13-
- [E2E] Add ability to take and restore snapshots - [#2261](https://github.com/paritytech/ink/pull/2261) (thanks [@0xLucca](https://github.com/0xLucca)!)
94+
- [E2E] Adds a message to SandboxErr to add context for easier debugging ‒ [#2218](https://github.com/use-ink/ink/pull/2218)
95+
- [E2E] Add ability to take and restore snapshots ‒ [#2261](https://github.com/paritytech/ink/pull/2261) (thanks [@0xLucca](https://github.com/0xLucca)!)
96+
- [E2E] Demonstrate usage of seeds for secret URIs in E2E test for chain snapshots ‒ [#2163](https://github.com/paritytech/ink/pull/2163)
97+
1498

1599
### Changed
16-
- [E2E] Update `subxt` and `polkadot-sdk` dependencies ‒ [#2174](https://github.com/use-ink/ink/pull/2174)
17100
- Update repository URLs & references from `paritytech` GitHub organization to new `use-ink` one ‒ [#2220](https://github.com/use-ink/ink/pull/2220) and [#2248](https://github.com/use-ink/ink/pull/2248)
18-
- Fix XCM-support to single encode the XCM message [#2278](https://github.com/use-ink/ink/pull/2278)
101+
- [E2E] Update `subxt` and `polkadot-sdk` dependencies ‒ [#2174](https://github.com/use-ink/ink/pull/2174)
102+
- [Drink backend] Replace `drink` sandbox with internal `ink_sandbox`[#2158](https://github.com/use-ink/ink/pull/2158)
19103

20104
### Fixed
21-
- Fix outdated docs for `[ink_e2e::test]`[#2162](https://github.com/use-ink/ink/pull/2162)
22-
- [E2E] build contracts before initializing node rpc ‒ [#2168](https://github.com/use-ink/ink/pull/2162)
23-
- [E2E] `set_account_balance` now can't set balance below existential deposit - [#1983](https://github.com/paritytech/ink/pull/1983) (thanks [@0xLucca](https://github.com/0xLucca)!)
24-
- ERC-721: `burn()` clears token approval - [#2099](https://github.com/paritytech/ink/pull/2099)
105+
- [XCM] Fix XCM-support to single encode the XCM message ‒ [#2278](https://github.com/use-ink/ink/pull/2278)
106+
- [Examples] ERC-721: `burn()` clears token approval ‒ [#2099](https://github.com/paritytech/ink/pull/2099)
107+
- [E2E] Fix outdated docs for `[ink_e2e::test]`[#2162](https://github.com/use-ink/ink/pull/2162)
108+
- [E2E] Build contracts before initializing node rpc ‒ [#2168](https://github.com/use-ink/ink/pull/2162)
109+
- [E2E] `set_account_balance` now can't set balance below existential deposit ‒ [#1983](https://github.com/paritytech/ink/pull/1983) (thanks [@0xLucca](https://github.com/0xLucca)!)
110+
- [E2E] Fix outdated docs for `[ink_e2e::test]`[#2162](https://github.com/paritytech/ink/pull/2162)
25111

26112
## Version 5.0.0
27113

0 commit comments

Comments
 (0)