From 16459033712f3f99985dc16ad9fce37de63f0b85 Mon Sep 17 00:00:00 2001 From: Gherman Date: Wed, 13 Mar 2024 10:20:10 +0000 Subject: [PATCH] Release `5.0.0` (#2133) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Release `5.0.0` * update lock file * add release summary * fix typos * update changelog * update changelog * update release notes * typo * add migration guide notice * fix typo * Apply suggestions from code review Co-authored-by: Michael Müller * finish merge * update changelog * Bump drink to 14.0.0 and fix drink_client Note that there is a breaking API change in this commit The new syntax to specify a custom sandbox is now: ```diff - #[ink_e2e::test(backend(runtime_only(runtime = ink_e2e::MinimalRuntime)))] + #[ink_e2e::test(backend(runtime_only(sandbox = ink_e2e::MinimalSandbox)))] ``` * replace the export * Reexport `subxt_signer` --------- Co-authored-by: Michael Müller Co-authored-by: PG Herveou Co-authored-by: Michael Mueller --- CHANGELOG.md | 164 ++++- Cargo.lock | 610 +++++++++++++++++- Cargo.toml | 33 +- crates/e2e/Cargo.toml | 3 + crates/e2e/macro/src/config.rs | 12 +- crates/e2e/src/drink_client.rs | 172 +++-- crates/e2e/src/lib.rs | 17 +- crates/ink/codegen/Cargo.toml | 2 +- .../call-builder-return-value/Cargo.toml | 2 +- integration-tests/call-runtime/Cargo.toml | 2 +- .../combined-extension/Cargo.toml | 2 +- .../conditional-compilation/Cargo.toml | 2 +- integration-tests/contract-storage/Cargo.toml | 2 +- .../contract-terminate/Cargo.toml | 2 +- .../contract-transfer/Cargo.toml | 2 +- .../cross-contract-calls/Cargo.toml | 2 +- .../other-contract/Cargo.toml | 2 +- integration-tests/custom-allocator/Cargo.toml | 2 +- .../custom-environment/Cargo.toml | 2 +- integration-tests/dns/Cargo.toml | 2 +- integration-tests/e2e-call-runtime/Cargo.toml | 2 +- .../e2e-runtime-only-backend/Cargo.toml | 2 +- .../e2e-runtime-only-backend/lib.rs | 2 +- integration-tests/erc1155/Cargo.toml | 2 +- integration-tests/erc20/Cargo.toml | 2 +- integration-tests/erc721/Cargo.toml | 2 +- integration-tests/events/Cargo.toml | 2 +- integration-tests/flipper/Cargo.toml | 2 +- integration-tests/incrementer/Cargo.toml | 2 +- .../call-builder-delegate/Cargo.toml | 2 +- .../call-builder/Cargo.toml | 2 +- .../constructors-return-value/Cargo.toml | 2 +- .../contract-ref/Cargo.toml | 2 +- .../integration-flipper/Cargo.toml | 2 +- .../lazyvec-integration-test/Cargo.toml | 2 +- .../mapping-integration-tests/Cargo.toml | 2 +- integration-tests/mother/Cargo.toml | 2 +- .../multi-contract-caller/Cargo.toml | 2 +- .../accumulator/Cargo.toml | 2 +- .../multi-contract-caller/adder/Cargo.toml | 2 +- .../multi-contract-caller/subber/Cargo.toml | 2 +- integration-tests/multisig/Cargo.toml | 2 +- integration-tests/payment-channel/Cargo.toml | 2 +- integration-tests/psp22-extension/Cargo.toml | 2 +- integration-tests/rand-extension/Cargo.toml | 2 +- .../sr25519-verification/Cargo.toml | 2 +- integration-tests/static-buffer/Cargo.toml | 2 +- .../trait-dyn-cross-contract-calls/Cargo.toml | 2 +- .../contracts/incrementer/Cargo.toml | 2 +- .../traits/Cargo.toml | 4 +- integration-tests/trait-erc20/Cargo.toml | 2 +- integration-tests/trait-flipper/Cargo.toml | 2 +- .../trait-incrementer/Cargo.toml | 2 +- .../trait-incrementer/traits/Cargo.toml | 2 +- .../delegator/Cargo.toml | 2 +- .../delegator/delegatee/Cargo.toml | 2 +- .../delegator/delegatee2/Cargo.toml | 2 +- .../set-code-hash/Cargo.toml | 2 +- .../updated-incrementer/Cargo.toml | 2 +- .../wildcard-selector/Cargo.toml | 2 +- linting/Cargo.toml | 4 +- linting/extra/Cargo.toml | 10 +- linting/mandatory/Cargo.toml | 10 +- 63 files changed, 944 insertions(+), 199 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c9207a0cb9..f67267ce42d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,119 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [Unreleased] -- Add Hash trait to Selector struct + +## Version 5.0.0 + +_ℹ️ We have created a migration guide from ink! 4 to ink! 5. It also contains an +overview over all breaking changes and newly added features. + +You can view it [here](https://use.ink/faq/migrating-from-ink-4-to-5)._ + + +### Summary +This release addresses the rest of the severities described in the [OpenZeppelin security review](https://blog.openzeppelin.com/security-review-ink-cargo-contract) of ink! and `cargo-contract`. +One of the notable addressed issues is the proxy selector clashing attack. +As of this release, ink! only allows exactly one other message with a well-known reserved selector to be defined. +You can read more about the change in the [#1827](https://github.com/paritytech/ink/pull/1827) and [#2031](https://github.com/paritytech/ink/pull/2031). + +ink! 5.0.0 features a significant number of new features: +- We have introduced a new API based on the calculated or specified selectors for the event definition. This allows events to be defined in separate files and modules, and be shared across multiple ink! contracts - [#1827](https://github.com/paritytech/ink/pull/1827) and [#2031](https://github.com/paritytech/ink/pull/2031). +- [@pmikolajczyk41](https://github.com/pmikolajczyk41) has introduced an alternative E2E testing framework, [DRink!](https://github.com/inkdevhub/drink?tab=readme-ov-file#as-an-alternative-backend-to-inks-e2e-testing-framework), that support quasi-testing model, it allows the test simulate a running node as part of the E2E test while improving debugging experience such as allowing to set breakpoint and step through each stage of execution cycle. +- Following improvements in E2E, we have added a call builder API that allows to easily build calls while significantly reducing boilerplate code - [#1917](https://github.com/paritytech/ink/pull/1917) and [#2075](https://github.com/paritytech/ink/pull/2075) +- Another notable introduction in 5.0.0 release is the support for multiple chain extensions that empower developers +to build even more sophisticated and advanced contracts for supported chains - [#1958](https://github.com/paritytech/ink/pull/1958). +- To further address our consideration of the intrinsic security of ink! smart contracts, +we have disallowed unchecked arithmetic expressions. `cargo-contract` will fail to compile the contract with the raw arithmetic operation - [#1831](https://github.com/paritytech/ink/pull/1831). + +These are the main features we have introduced in this release. We also encourage developers +to have a look at more detailed changelog entries to find out about any breaking changes that may affect +the development of new ink! contracts. + +### Compatibility + +See [the compatibility section](https://use.ink/faq/migrating-from-ink-4-to-5/#compatibility) of our migration guide for a detailed description. On a high level: + +- Rust: `>= 1.70` +- `cargo-contract`: `>= 4.0.0` +- polkadot-sdk: [>= 0.9.3](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v0.9.3). But if using the new functions introduced in [#2123](https://github.com/paritytech/ink/pull/2123) and [#2077](https://github.com/paritytech/ink/pull/2077) [>= 1.8.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.8.0) and if using the new functions introduced in [#2076](https://github.com/paritytech/ink/pull/2076) [>= 1.9.0](https://github.com/paritytech/polkadot-sdk/releases/tag/polkadot-v1.8.0). +- `polkadot-js/api` and `polkadot-js/api-contract`: `>= 10.12.1` +- `substrate-contracts-node`: `>= 0.39.0` + +### Changelog + +#### Added +- Add Hash trait to Selector struct - [#2149](https://github.com/paritytech/ink/pull/2149) +- `instantiate_v2` with additional limit parameters [#2123](https://github.com/paritytech/ink/pull/2123) +- Custom signature topic in Events - [#2031](https://github.com/paritytech/ink/pull/2031) +- [Linter] `non_fallible_api` lint - [#2004](https://github.com/paritytech/ink/pull/2004) +- [Linter] Publish the linting crates on crates.io - [#2060](https://github.com/paritytech/ink/pull/2060) +- [E2E] Added `create_call_builder` for testing existing contracts - [#2075](https://github.com/paritytech/ink/pull/2075) +- `call_v2` cross-contract calls with additional limit parameters - [#2077](https://github.com/paritytech/ink/pull/2077) +- `delegate_dependency` api calls - [#2076](https://github.com/paritytech/ink/pull/2076) +- Allow mutable parameters in messages - [#2004](https://github.com/paritytech/ink/pull/2004) +- Clean E2E configuration parsing - [#1922](https://github.com/paritytech/ink/pull/1922) +- Make `set_code_hash` generic - [#1906](https://github.com/paritytech/ink/pull/1906) +- Provide a `StorageVec` datastructure built on top of `Lazy` - [#1995](https://github.com/paritytech/ink/pull/1995) +- Add fallible methods for `Mapping` and `Lazy` - [#1910](https://github.com/paritytech/ink/pull/1910) +- [E2E] Allow testing with live-chain state - [#1949](https://github.com/paritytech/ink/pull/1949) +- [E2E] Call builders and extra gas margin option - [#1917](https://github.com/paritytech/ink/pull/1917) +- [Linter] `storage_never_freed` lint - [#1932](https://github.com/paritytech/ink/pull/1932) +- [Linter] `strict_balance_equality` lint - [#1914](https://github.com/paritytech/ink/pull/1914) +- [Linter] `no_main` lint - [#2001](https://github.com/paritytech/ink/pull/2001) +- Reexport `scale` dependencies, introduce `#[ink::scale_derive]` - [#1890](https://github.com/paritytech/ink/pull/1890) +- Upgradeable contracts example - [#1889](https://github.com/paritytech/ink/pull/1889) +- Persist static buffer size in metadata - [#1880](https://github.com/paritytech/ink/pull/1880) +- Modify static buffer size via environmental variables - [#1869](https://github.com/paritytech/ink/pull/1869) +- Added `sr25519_verify` function to `ink_env` [#1840](https://github.com/paritytech/ink/pull/1840) +- Events `2.0` - [#1827](https://github.com/paritytech/ink/pull/1827) +- Add `set_block_number` to off-chain test api `Engine` - [#1806](https://github.com/paritytech/ink/pull/1806) +- Stabilize `call_runtime` ‒ [#1749](https://github.com/paritytech/ink/pull/1749) +- Schema generation - [#1765](https://github.com/paritytech/ink/pull/1765) +- Restrict wildcard selectors to have exactly one other message - [#1708](https://github.com/paritytech/ink/pull/1708) +- [Linter] Warn when primitive number is annotated as event topic - [#1837](https://github.com/paritytech/ink/pull/1837) +- [Drink backend] allow for arbitrary runtime - [#1892](https://github.com/paritytech/ink/pull/1892) +- [Drink backend] support runtime call - [#1891](https://github.com/paritytech/ink/pull/1891) +- [Drink backend] Make tests generic `E2EBackend` trait - [#1867](https://github.com/paritytech/ink/pull/1867) +- [Drink backend] Backend choice ‒ [#1864](https://github.com/paritytech/ink/pull/1864) +- [Drink backend] Backend traits - [#1857](https://github.com/paritytech/ink/pull/1857) +- [Drink backend] Abstract error and result structs - [#1844](https://github.com/paritytech/ink/pull/1844) + +#### Changed +- Use name-only syntax for `anonymous` ink! event item configuration argument - [#2140](https://github.com/paritytech/ink/pull/2140) +- Restrict syntax for setting default ink! e2e test runtime-only emulator - [#2143](https://github.com/paritytech/ink/pull/2143) +- Restrict syntax for setting ink! e2e test node to auto - [#2146](https://github.com/paritytech/ink/pull/2146) +- Bump Substrate crates - [#2141](https://github.com/paritytech/ink/pull/2141) +- Minor fixes - [#2144](https://github.com/paritytech/ink/pull/2144), +[#2137](https://github.com/paritytech/ink/pull/2137), [#2132](https://github.com/paritytech/ink/pull/2132) +- Bump metadata version to 5 [#2126](https://github.com/paritytech/ink/pull/2126) +- Use `MaxEncodedLen` for output buffer size [#2128](https://github.com/paritytech/ink/pull/2128) +- `Mapping`: Reflect all possible failure cases in comments ‒ [#2079](https://github.com/paritytech/ink/pull/2079) +- [E2E] Rename `.call` to `.call_builder` ‒ [#2078](https://github.com/paritytech/ink/pull/2078) +- Improve syntax for ink! e2e `runtime_only` attribute argument - [#2083](https://github.com/paritytech/ink/pull/2083) +- [E2E] Remove `additional_contracts` parameter [#2098](https://github.com/paritytech/ink/pull/2098) +- [E2E] change node url backend config - [#2101](https://github.com/paritytech/ink/pull/2101) +- Messages return `TypeSpec` directly - [#1999](https://github.com/paritytech/ink/pull/1999) +- Fail when decoding from storage and not all bytes consumed - [#1897](https://github.com/paritytech/ink/pull/1897) +- Support multiple chain extensions - [#1958](https://github.com/paritytech/ink/pull/1958) + - New example of how to use multiple chain extensions in one contract. + - Affects the usage of the `#[ink::chain_extension]` macro and the definition of the chain extension. +- Split up `ink_linting` to mandatory and extra libraries - [#2032](https://github.com/paritytech/ink/pull/2032) +- [E2E] resolve DispatchError error details for dry-runs - [#1994](https://github.com/paritytech/ink/pull/1994) +- [E2E] update to new `drink` API - [#2005](https://github.com/paritytech/ink/pull/2005) +- Reexport `scale` dependencies, introduce `#[ink::scale_derive]` ‒ [#1890](https://github.com/paritytech/ink/pull/1890) +- Use of workspace dependencies and properties - [#1835](https://github.com/paritytech/ink/pull/1835) +- Remove of unchecked arithmetic - [#1831](https://github.com/paritytech/ink/pull/1831) +- Use `decode_all` for decoding cross contract call result - [#1810](https://github.com/paritytech/ink/pull/1810) +- [E2E] build contracts at runtime instead of during codegen - [#1881](https://github.com/paritytech/ink/pull/1881) +- [E2E] crate refactoring - [#1830](https://github.com/paritytech/ink/pull/1830) +- [E2E] improve call API, remove `build_message` + callback - [#1782](https://github.com/paritytech/ink/pull/1782) + +#### Fixed +- Fix alignment in allocator [#2100](https://github.com/paritytech/ink/pull/2100) +- Fix the `StorageVec` type by excluding the `len_cached` field from its type info - [#2052](https://github.com/paritytech/ink/pull/2052) +- Fix panic in `approve_for` in the ERC-721 example - [#2092](https://github.com/paritytech/ink/pull/2092) +- ERC-721: `transfer_token_from` now ensures the token owner is correct - [#2093](https://github.com/paritytech/ink/pull/2093) +- `RootLayout::new()` is generic again to allow using `ink_metadata` in pure `PortableForm` contexts - [#1989](https://github.com/paritytech/ink/pull/1989) ## Version 5.0.0-rc.3 @@ -832,10 +944,10 @@ This is the 7th release candidate for ink! 3.0. Since our last release candidate we implemented a number of contract size improvements. With those improvements the size of our `erc20` example has reduced significantly: -| | | Release Build with `cargo-contract` | -|:---------|:------------|:------------------------------------| -| `erc20` | `3.0.0-rc6` | 29.3 K | -| `erc20` | `3.0.0-rc7` | 10.4 K | +| | | Release Build with `cargo-contract` | +| :------ | :---------- | :---------------------------------- | +| `erc20` | `3.0.0-rc6` | 29.3 K | +| `erc20` | `3.0.0-rc7` | 10.4 K | The savings apply partly to our other examples; for `erc20` they are most significant since it has been migrated to use a new [`Mapping`](https://paritytech.github.io/ink/ink_storage/lazy/struct.Mapping.html) @@ -1298,15 +1410,15 @@ However, their APIs look very different. Whereas the `HashMap` provides a rich a The fundamental difference of both data structures is that `HashMap` is aware of the keys that have been stored in it and thus can reconstruct exactly which elements and storage regions apply to it. This enables it to provide iteration and automated deletion as well as efficient way to defragment its underlying storage to free some storage space again. This goes very well in the vein of Substrate's storage rent model where contracts have to pay for the storage they are using. -| Data Structure | level of abstraction | caching | lazy | element type | container | -|:--|:-:|:-:|:-:|:-:|:-:| -| `T` | - | yes | no | `T` | primitive value | -| `Lazy` | high-level | yes | yes | `T` | single element container | -| `LazyCell` | low-level | yes | yes | `Option` | single element, no container | -| `Vec` | high-level | yes | yes | `T` | Rust vector-like container | -| `LazyIndexMap` | low-level | yes | yes | `Option` | similar to Solidity mapping | -| `HashMap` | high-level | yes | yes | `V` (key type `K`) | Rust map-like container | -| `LazyHashMap` | low-level | yes | yes | `Option` (key type `K`) | similar to Solidity mapping | +| Data Structure | level of abstraction | caching | lazy | element type | container | +| :------------------ | :------------------: | :-----: | :---: | :------------------------: | :--------------------------: | +| `T` | - | yes | no | `T` | primitive value | +| `Lazy` | high-level | yes | yes | `T` | single element container | +| `LazyCell` | low-level | yes | yes | `Option` | single element, no container | +| `Vec` | high-level | yes | yes | `T` | Rust vector-like container | +| `LazyIndexMap` | low-level | yes | yes | `Option` | similar to Solidity mapping | +| `HashMap` | high-level | yes | yes | `V` (key type `K`) | Rust map-like container | +| `LazyHashMap` | low-level | yes | yes | `Option` (key type `K`) | similar to Solidity mapping | There are many more! For more information about the specifics please take a look into [the `ink_storage` crate documentation](https://paritytech.github.io/ink/ink_storage/). @@ -1492,18 +1604,18 @@ mod erc20 { We won't be going into the details for any of those but will briefly present the entire set of ink! specific attributes below: -| Attribute | Where Applicable | Description | -|:--|:--|:--| -| `#[ink(storage)]` | On `struct` definitions. | Defines the ink! storage struct. There can only be one ink! storage definition per contract. | -| `#[ink(event)]` | On `struct` definitions. | Defines an ink! event. A contract can define multiple such ink! events. | -| `#[ink(anonymous)]` **new** | Applicable to ink! events. | Tells the ink! codegen to treat the ink! event as anonymous which omits the event signature as topic upon emitting. Very similar to anonymous events in Solidity. | -| `#[ink(topic)]` | Applicate on ink! event field. | Tells the ink! codegen to provide a topic hash for the given field. Every ink! event can only have a limited number of such topic field. Similar semantics as to indexed event arguments in Solidity. | -| `#[ink(message)]` | Applicable to methods. | Flags a method for the ink! storage struct as message making it available to the API for calling the contract. | -| `#[ink(constructor)]` | Applicable to method. | Flags a method for the ink! storage struct as constructor making it available to the API for instantiating the contract. | -| `#[ink(payable)]` **new** | Applicable to ink! messages. | Allows receiving value as part of the call of the ink! message. ink! constructors are implicitly payable. | -| `#[ink(selector = "..")]` **new** | Applicable to ink! messages and ink! constructors. | Specifies a concrete dispatch selector for the flagged entity. This allows a contract author to precisely control the selectors of their APIs making it possible to rename their API without breakage. | -| `#[ink(namespace = "..")]` **new** | Applicable to ink! trait implementation blocks. | Changes the resulting selectors of all the ink! messages and ink! constructors within the trait implementation. Allows to disambiguate between trait implementations with overlapping message or constructor names. Use only with great care and consideration! | -| `#[ink(impl)]` **new** | Applicable to ink! implementation blocks. | Tells the ink! codegen that some implementation block shall be granted access to ink! internals even without it containing any ink! messages or ink! constructors. | +| Attribute | Where Applicable | Description | +| :--------------------------------- | :------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `#[ink(storage)]` | On `struct` definitions. | Defines the ink! storage struct. There can only be one ink! storage definition per contract. | +| `#[ink(event)]` | On `struct` definitions. | Defines an ink! event. A contract can define multiple such ink! events. | +| `#[ink(anonymous)]` **new** | Applicable to ink! events. | Tells the ink! codegen to treat the ink! event as anonymous which omits the event signature as topic upon emitting. Very similar to anonymous events in Solidity. | +| `#[ink(topic)]` | Applicate on ink! event field. | Tells the ink! codegen to provide a topic hash for the given field. Every ink! event can only have a limited number of such topic field. Similar semantics as to indexed event arguments in Solidity. | +| `#[ink(message)]` | Applicable to methods. | Flags a method for the ink! storage struct as message making it available to the API for calling the contract. | +| `#[ink(constructor)]` | Applicable to method. | Flags a method for the ink! storage struct as constructor making it available to the API for instantiating the contract. | +| `#[ink(payable)]` **new** | Applicable to ink! messages. | Allows receiving value as part of the call of the ink! message. ink! constructors are implicitly payable. | +| `#[ink(selector = "..")]` **new** | Applicable to ink! messages and ink! constructors. | Specifies a concrete dispatch selector for the flagged entity. This allows a contract author to precisely control the selectors of their APIs making it possible to rename their API without breakage. | +| `#[ink(namespace = "..")]` **new** | Applicable to ink! trait implementation blocks. | Changes the resulting selectors of all the ink! messages and ink! constructors within the trait implementation. Allows to disambiguate between trait implementations with overlapping message or constructor names. Use only with great care and consideration! | +| `#[ink(impl)]` **new** | Applicable to ink! implementation blocks. | Tells the ink! codegen that some implementation block shall be granted access to ink! internals even without it containing any ink! messages or ink! constructors. | ### Merging of ink! Attributes diff --git a/Cargo.lock b/Cargo.lock index 409a0fd2366..38bc4988d9d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -242,7 +242,7 @@ dependencies = [ "num-bigint", "num-traits", "paste", - "rustc_version", + "rustc_version 0.4.0", "zeroize", ] @@ -388,9 +388,9 @@ dependencies = [ [[package]] name = "async-io" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f97ab0c5b00a7cdbe5a371b9a782ee7be1316095885c8a4ea1daf490eb0ef65" +checksum = "dcccb0f599cfa2f8ace422d3555572f47424da5648a4382a9dd0310ff8210884" dependencies = [ "async-lock 3.3.0", "cfg-if", @@ -618,6 +618,7 @@ checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", "radium", + "serde", "tap", "wyz", ] @@ -807,7 +808,7 @@ checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" dependencies = [ "camino", "cargo-platform", - "semver", + "semver 1.0.22", "serde", "serde_json", "thiserror", @@ -1038,11 +1039,11 @@ dependencies = [ "parity-scale-codec", "parity-wasm", "regex", - "rustc_version", - "semver", + "rustc_version 0.4.0", + "semver 1.0.22", "serde", "serde_json", - "strum 0.26.1", + "strum 0.26.2", "tempfile", "term_size", "tokio", @@ -1065,7 +1066,7 @@ checksum = "71d239a78947aa2d0c63a9936754927551f275d3064a221384427c2c2ff1504b" dependencies = [ "anyhow", "impl-serde", - "semver", + "semver 1.0.22", "serde", "serde_json", "url", @@ -1252,7 +1253,7 @@ dependencies = [ "digest 0.10.7", "fiat-crypto", "platforms", - "rustc_version", + "rustc_version 0.4.0", "subtle", "zeroize", ] @@ -1433,7 +1434,7 @@ dependencies = [ "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version", + "rustc_version 0.4.0", "syn 1.0.109", ] @@ -1505,9 +1506,9 @@ checksum = "9ea835d29036a4087793836fa931b08837ad5e957da9e23886b29586fb9b6650" [[package]] name = "drink" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c85dfa5bfd4a46bd1cce0f21eb34f35ff9f7f6e5242fe94eac78dd7e19b3da5c" +checksum = "f702c1985b7202b8dd6eaa2490d4c7da5a7fdeee88fab858438ccce4e0eee58b" dependencies = [ "drink-test-macro", "frame-metadata 16.0.0", @@ -1519,6 +1520,7 @@ dependencies = [ "pallet-timestamp", "parity-scale-codec", "parity-scale-codec-derive", + "paste", "scale-info", "sp-externalities", "sp-io", @@ -1529,9 +1531,9 @@ dependencies = [ [[package]] name = "drink-test-macro" -version = "0.13.0" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f87ddbde004f8fff3e1b67380ec79672528919aae4711b48b468205788ed5" +checksum = "27646ddbf1bf4919eea90312cc98f7780f50358365637d8889a06842590bca4d" dependencies = [ "cargo_metadata", "contract-build", @@ -1849,6 +1851,36 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "frame-election-provider-solution-type" +version = "13.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5c3bff645e46577c69c272733c53fa3a77d1ee6e40dfb66157bc94b0740b8fc" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.52", +] + +[[package]] +name = "frame-election-provider-support" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53ff3c76750b481f9fd633ccddeed955426adc28aee566dd7233b7ac22cda9f5" +dependencies = [ + "frame-election-provider-solution-type", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-npos-elections", + "sp-runtime", + "sp-std", +] + [[package]] name = "frame-metadata" version = "15.1.0" @@ -2250,6 +2282,12 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" + [[package]] name = "hmac" version = "0.8.1" @@ -2593,7 +2631,7 @@ checksum = "8e04e2fd2b8188ea827b32ef11de88377086d690286ab35747ef7f9bf3ccb590" [[package]] name = "ink" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "derive_more", "ink_env", @@ -2611,7 +2649,7 @@ dependencies = [ [[package]] name = "ink_allocator" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "cfg-if", "quickcheck", @@ -2620,7 +2658,7 @@ dependencies = [ [[package]] name = "ink_codegen" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "blake2", "derive_more", @@ -2640,11 +2678,12 @@ dependencies = [ [[package]] name = "ink_e2e" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "cargo_metadata", "contract-build", "drink", + "frame-support", "funty", "impl-serde", "ink", @@ -2653,6 +2692,7 @@ dependencies = [ "ink_primitives", "jsonrpsee 0.22.2", "pallet-contracts", + "pallet-contracts-mock-network", "parity-scale-codec", "scale-info", "serde", @@ -2674,7 +2714,7 @@ dependencies = [ [[package]] name = "ink_e2e_macro" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "darling 0.20.8", "derive_more", @@ -2689,7 +2729,7 @@ dependencies = [ [[package]] name = "ink_engine" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "blake2", "derive_more", @@ -2703,7 +2743,7 @@ dependencies = [ [[package]] name = "ink_env" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "blake2", "cfg-if", @@ -2732,7 +2772,7 @@ dependencies = [ [[package]] name = "ink_ir" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "blake2", "either", @@ -2746,7 +2786,7 @@ dependencies = [ [[package]] name = "ink_macro" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "ink", "ink_codegen", @@ -2766,7 +2806,7 @@ dependencies = [ [[package]] name = "ink_metadata" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "derive_more", "impl-serde", @@ -2783,14 +2823,14 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "derive_more", "ink_prelude", @@ -2803,7 +2843,7 @@ dependencies = [ [[package]] name = "ink_storage" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "array-init", "cfg-if", @@ -2824,7 +2864,7 @@ dependencies = [ [[package]] name = "ink_storage_traits" -version = "5.0.0-rc.3" +version = "5.0.0" dependencies = [ "ink_metadata", "ink_prelude", @@ -3607,6 +3647,80 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +[[package]] +name = "pallet-assets" +version = "31.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c54b67fb2fab83382f7cd860aa5e0e0d478c914f81b87a7c24df2d93f740a89" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-authority-discovery" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0df2c0f34a853bf34ea89ad999e7ac30bec58ab3a76295258ec594e370da1668" +dependencies = [ + "frame-support", + "frame-system", + "pallet-session", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-authority-discovery", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-authorship" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa1f02863403c1cf5e9f49fd492c8cdb329d4b45029f3f19f278b3ba832a2b81" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-babe" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91a0fdb62c2d72c3c680deca50121d4bf2d8ed4b24dedd85f5b98ac454e781b" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-application-crypto", + "sp-consensus-babe", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-balances" version = "30.0.0" @@ -3624,6 +3738,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-broker" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16828306edf66de7412d769f4716fd54f9046713e8e63a774f75814c9ca7a898" +dependencies = [ + "bitvec", + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-contracts" version = "29.0.0" @@ -3656,6 +3788,43 @@ dependencies = [ "wasmi", ] +[[package]] +name = "pallet-contracts-mock-network" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45e047c639be0ef340e1f9ad3c6bc4e714e6fb3e01edfba6d432201a68ebaa5d" +dependencies = [ + "frame-support", + "frame-system", + "pallet-assets", + "pallet-balances", + "pallet-contracts", + "pallet-contracts-proc-macro", + "pallet-contracts-uapi", + "pallet-insecure-randomness-collective-flip", + "pallet-message-queue", + "pallet-proxy", + "pallet-timestamp", + "pallet-utility", + "pallet-xcm", + "parity-scale-codec", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "scale-info", + "sp-api", + "sp-core", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-std", + "sp-tracing", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", + "xcm-simulator", +] + [[package]] name = "pallet-contracts-proc-macro" version = "20.0.0" @@ -3691,6 +3860,104 @@ dependencies = [ "polkavm-derive 0.5.0", ] +[[package]] +name = "pallet-insecure-randomness-collective-flip" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fe899a5ccb1bf4934f9ea344b9c45040d6cae4f9553be642580738afe5ff8ea" +dependencies = [ + "frame-support", + "frame-system", + "parity-scale-codec", + "safe-mix", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-message-queue" +version = "33.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31856e2c797c6a262c22b63ce195901ef48b66d7b80a8a1d0f3b5f1c88a51332" +dependencies = [ + "environmental", + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-weights", +] + +[[package]] +name = "pallet-proxy" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3d6b9f7210b6cd4dcf531c1f8729eaeb7dfbed8e8b1b01b1747240b0f8a715d" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-session" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42218759d10405996ae378968751a9b1142b47f6b887562f2df50cc14b1c7eaa" +dependencies = [ + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-timestamp", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-trie", +] + +[[package]] +name = "pallet-staking" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77c4a35f3bd92c45c7e67da645711894f172c29adc1e8a567f2987ee5399ebab" +dependencies = [ + "frame-benchmarking", + "frame-election-provider-support", + "frame-support", + "frame-system", + "log", + "pallet-authorship", + "pallet-session", + "parity-scale-codec", + "scale-info", + "serde", + "sp-application-crypto", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "pallet-timestamp" version = "29.0.0" @@ -3729,6 +3996,60 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-utility" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79b879fb8c20405663309986621856050efc31969c2d2a209d78373356a62e27" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-vesting" +version = "30.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391edd70faa651c43c2bbd03fcb5cd3f0be8b45ed38231991fe46d33a4cc4ef5" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "pallet-xcm" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "085a71440a945fae1bc6077fd40bdf1780a7e31747b86b2012bba18b18f0d6ef" +dependencies = [ + "bounded-collections", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + [[package]] name = "parity-scale-codec" version = "3.6.9" @@ -3911,6 +4232,97 @@ dependencies = [ "sp-weights", ] +[[package]] +name = "polkadot-primitives" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20a6d6b36fdda53a0c50c4c6fbbda8ff557c9cf5b0a9edaea1f9641756ec1981" +dependencies = [ + "bitvec", + "hex-literal", + "log", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-authority-discovery", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", +] + +[[package]] +name = "polkadot-runtime-metrics" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3881206c09c9aafc5a8a801013d4069f012a0a68eb7edf5f1ac423196f76481e" +dependencies = [ + "bs58", + "frame-benchmarking", + "parity-scale-codec", + "polkadot-primitives", + "sp-std", + "sp-tracing", +] + +[[package]] +name = "polkadot-runtime-parachains" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5003965d03a5b6c8b98350f8f10f42a6ce04875a048a98e4c1523e42cf3f72b4" +dependencies = [ + "bitflags 1.3.2", + "bitvec", + "derive_more", + "frame-benchmarking", + "frame-support", + "frame-system", + "impl-trait-for-tuples", + "log", + "pallet-authority-discovery", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-broker", + "pallet-message-queue", + "pallet-session", + "pallet-staking", + "pallet-timestamp", + "pallet-vesting", + "parity-scale-codec", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-metrics", + "rand", + "rand_chacha", + "rustc-hex", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-session", + "sp-staking", + "sp-std", + "staging-xcm", + "staging-xcm-executor", +] + [[package]] name = "polkavm-common" version = "0.5.0" @@ -4328,13 +4740,22 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +dependencies = [ + "semver 0.9.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.22", ] [[package]] @@ -4484,6 +4905,15 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "safe-mix" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c" +dependencies = [ + "rustc_version 0.2.3", +] + [[package]] name = "safe_arch" version = "0.7.1" @@ -4778,6 +5208,15 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser", +] + [[package]] name = "semver" version = "1.0.22" @@ -4787,6 +5226,12 @@ dependencies = [ "serde", ] +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" + [[package]] name = "serde" version = "1.0.197" @@ -5233,6 +5678,53 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "sp-authority-discovery" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0addabbce9f90c614145067139122420cfc940c495d2c3c1acc4a3b5f392f914" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-application-crypto", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-consensus-babe" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "473409ca152309b11898dd53130a578b341bc285ca9410246cbf1acc02996126" +dependencies = [ + "async-trait", + "parity-scale-codec", + "scale-info", + "serde", + "sp-api", + "sp-application-crypto", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-std", + "sp-timestamp", +] + +[[package]] +name = "sp-consensus-slots" +version = "0.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c72408adadb54b6f4eb287729166528cdb83e08c796685edc9bee09571b6474" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-std", + "sp-timestamp", +] + [[package]] name = "sp-core" version = "30.0.0" @@ -5429,6 +5921,21 @@ dependencies = [ "sp-std", ] +[[package]] +name = "sp-npos-elections" +version = "28.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bc47d1b765ddd3d73678edd25eed4c33193e67929060d729bd751790026077b" +dependencies = [ + "parity-scale-codec", + "scale-info", + "serde", + "sp-arithmetic", + "sp-core", + "sp-runtime", + "sp-std", +] + [[package]] name = "sp-panic-handler" version = "13.0.0" @@ -5499,6 +6006,22 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "sp-session" +version = "29.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0399eb885209b51b2999fe35883a579b0848674f0679019ce262f19d0a853325" +dependencies = [ + "parity-scale-codec", + "scale-info", + "sp-api", + "sp-core", + "sp-keystore", + "sp-runtime", + "sp-staking", + "sp-std", +] + [[package]] name = "sp-staking" version = "28.0.0" @@ -5798,11 +6321,11 @@ dependencies = [ [[package]] name = "strum" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" +checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" dependencies = [ - "strum_macros 0.26.1", + "strum_macros 0.26.2", ] [[package]] @@ -5820,9 +6343,9 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" +checksum = "c6cf59daf282c0a494ba14fd21610a0325f9f90ec9d1231dea26bcb1d696c946" dependencies = [ "heck", "proc-macro2", @@ -7271,6 +7794,25 @@ dependencies = [ "syn 2.0.52", ] +[[package]] +name = "xcm-simulator" +version = "9.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d49e52e0195992a5e3b16279136b564aae754c7bf59aa915837c944f5af8a12" +dependencies = [ + "frame-support", + "parity-scale-codec", + "paste", + "polkadot-core-primitives", + "polkadot-parachain-primitives", + "polkadot-runtime-parachains", + "sp-io", + "sp-std", + "staging-xcm", + "staging-xcm-builder", + "staging-xcm-executor", +] + [[package]] name = "xxhash-rust" version = "0.8.10" diff --git a/Cargo.toml b/Cargo.toml index d0fb8bde5b5..18414cefeb6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,7 +29,7 @@ homepage = "https://www.parity.io/" keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] license = "Apache-2.0" repository = "https://github.com/paritytech/ink" -version = "5.0.0-rc.3" +version = "5.0.0" [workspace.dependencies] arrayref = { version = "0.3" } @@ -40,7 +40,7 @@ cfg-if = { version = "1.0" } contract-build = { version = "4.0.0" } darling = { version = "0.20.8" } derive_more = { version = "0.99.17", default-features = false } -drink = { version = "=0.13.0", default-features = false, features = ["std"] } +drink = { version = "=0.14.0", default-features = false, features = ["std"] } either = { version = "1.5", default-features = false } funty = { version = "2.0.0" } heck = { version = "0.4.0" } @@ -83,28 +83,29 @@ xxhash-rust = { version = "0.8" } const_env = { version = "0.1"} # Substrate dependencies -# Substrate dependencies +frame-support = { version = "30.0.0", default-features = false } pallet-contracts = { version = "29.0.0", default-features = false } pallet-contracts-uapi = { package = "pallet-contracts-uapi-next", version = "=6.0.3", default-features = false } +pallet-contracts-mock-network = { version = "5.0.0", default-features = false } sp-core = { version = "30.0.0", default-features = false } sp-keyring = { version = "33.0.0", default-features = false } sp-runtime = { version = "33.0.0", default-features = false } sp-weights = { version = "29.0.0", default-features = false } # Local dependencies -ink = { version = "=5.0.0-rc.3", path = "crates/ink", default-features = false } -ink_allocator = { version = "=5.0.0-rc.3", path = "crates/allocator", default-features = false } -ink_codegen = { version = "=5.0.0-rc.3", path = "crates/ink/codegen", default-features = false } -ink_e2e_macro = { version = "=5.0.0-rc.3", path = "crates/e2e/macro", default-features = false } -ink_engine = { version = "=5.0.0-rc.3", path = "crates/engine", default-features = false } -ink_env = { version = "=5.0.0-rc.3", path = "crates/env", default-features = false } -ink_ir = { version = "=5.0.0-rc.3", path = "crates/ink/ir", default-features = false } -ink_macro = { version = "=5.0.0-rc.3", path = "crates/ink/macro", default-features = false } -ink_metadata = { version = "=5.0.0-rc.3", path = "crates/metadata", default-features = false } -ink_prelude = { version = "=5.0.0-rc.3", path = "crates/prelude", default-features = false } -ink_primitives = { version = "=5.0.0-rc.3", path = "crates/primitives", default-features = false } -ink_storage = { version = "=5.0.0-rc.3", path = "crates/storage", default-features = false } -ink_storage_traits = { version = "=5.0.0-rc.3", path = "crates/storage/traits", default-features = false } +ink = { version = "=5.0.0", path = "crates/ink", default-features = false } +ink_allocator = { version = "=5.0.0", path = "crates/allocator", default-features = false } +ink_codegen = { version = "=5.0.0", path = "crates/ink/codegen", default-features = false } +ink_e2e_macro = { version = "=5.0.0", path = "crates/e2e/macro", default-features = false } +ink_engine = { version = "=5.0.0", path = "crates/engine", default-features = false } +ink_env = { version = "=5.0.0", path = "crates/env", default-features = false } +ink_ir = { version = "=5.0.0", path = "crates/ink/ir", default-features = false } +ink_macro = { version = "=5.0.0", path = "crates/ink/macro", default-features = false } +ink_metadata = { version = "=5.0.0", path = "crates/metadata", default-features = false } +ink_prelude = { version = "=5.0.0", path = "crates/prelude", default-features = false } +ink_primitives = { version = "=5.0.0", path = "crates/primitives", default-features = false } +ink_storage = { version = "=5.0.0", path = "crates/storage", default-features = false } +ink_storage_traits = { version = "=5.0.0", path = "crates/storage/traits", default-features = false } [profile.release] panic = "abort" diff --git a/crates/e2e/Cargo.toml b/crates/e2e/Cargo.toml index 543c9fd0572..f71a6725ac9 100644 --- a/crates/e2e/Cargo.toml +++ b/crates/e2e/Cargo.toml @@ -23,6 +23,7 @@ ink_primitives = { workspace = true, default-features = true } cargo_metadata = { workspace = true } contract-build = { workspace = true } drink = { workspace = true, optional = true } +pallet-contracts-mock-network = { workspace = true, optional = true } funty = { workspace = true } impl-serde = { workspace = true } jsonrpsee = { workspace = true, features = ["ws-client"] } @@ -40,6 +41,7 @@ wasm-instrument = { workspace = true } which = { workspace = true } # Substrate +frame-support = { workspace = true } pallet-contracts = { workspace = true } sp-core = { workspace = true } sp-keyring = { workspace = true } @@ -66,5 +68,6 @@ std = [ drink = [ "dep:drink", "subxt-metadata", + "pallet-contracts-mock-network", "ink_e2e_macro/drink", ] diff --git a/crates/e2e/macro/src/config.rs b/crates/e2e/macro/src/config.rs index 182549edeef..b1acb88681a 100644 --- a/crates/e2e/macro/src/config.rs +++ b/crates/e2e/macro/src/config.rs @@ -69,15 +69,15 @@ pub enum RuntimeOnly { #[darling(word)] #[darling(skip)] Default, - Runtime(syn::Path), + Sandbox(syn::Path), } #[cfg(any(test, feature = "drink"))] impl From for syn::Path { fn from(value: RuntimeOnly) -> Self { match value { - RuntimeOnly::Default => syn::parse_quote! { ::ink_e2e::MinimalRuntime }, - RuntimeOnly::Runtime(path) => path, + RuntimeOnly::Default => syn::parse_quote! { ::ink_e2e::MinimalSandbox }, + RuntimeOnly::Sandbox(path) => path, } } } @@ -151,15 +151,15 @@ mod tests { #[test] fn config_works_runtime_only_with_custom_backend() { let input = quote! { - backend(runtime_only(runtime = ::ink_e2e::MinimalRuntime)), + backend(runtime_only(sandbox = ::ink_e2e::MinimalSandbox)), }; let config = E2EConfig::from_list(&NestedMeta::parse_meta_list(input).unwrap()).unwrap(); assert_eq!( config.backend(), - Backend::RuntimeOnly(RuntimeOnly::Runtime( - syn::parse_quote! { ::ink_e2e::MinimalRuntime } + Backend::RuntimeOnly(RuntimeOnly::Sandbox( + syn::parse_quote! { ::ink_e2e::MinimalSandbox } )) ); } diff --git a/crates/e2e/src/drink_client.rs b/crates/e2e/src/drink_client.rs index bc6d3888c1b..b68b4971bf7 100644 --- a/crates/e2e/src/drink_client.rs +++ b/crates/e2e/src/drink_client.rs @@ -33,18 +33,18 @@ use crate::{ InstantiateDryRunResult, UploadResult, }; + use drink::{ pallet_balances, pallet_contracts, runtime::AccountIdFor, - BalanceOf as ContractsBalanceOf, + sandbox::prelude::*, RuntimeCall, Sandbox, - SandboxConfig, Weight, DEFAULT_GAS_LIMIT, }; - +use frame_support::traits::fungible::Inspect; use pallet_contracts::ContractResult; use ink_env::Environment; @@ -73,9 +73,11 @@ use subxt::{ use subxt_signer::sr25519::Keypair; type BalanceOf = ::Balance; +type ContractsBalanceOf = + <::Currency as Inspect>>::Balance; -pub struct Client { - sandbox: Sandbox, +pub struct Client { + sandbox: S, contracts: ContractsRegistry, _phantom: PhantomData<(AccountId, Hash)>, } @@ -83,18 +85,16 @@ pub struct Client { // While it is not necessary true that `Client` is `Send`, it will not be used in a way // that would violate this bound. In particular, all `Client` instances will be operating // synchronously. -unsafe impl Send - for Client -{ -} -impl Client +unsafe impl Send for Client {} +impl Client where - Config::Runtime: pallet_balances::Config + pallet_contracts::Config, - AccountIdFor: From<[u8; 32]>, - BalanceOf: From, + S: Default, + S::Runtime: pallet_balances::Config + pallet_contracts::Config, + AccountIdFor: From<[u8; 32]>, + BalanceOf: From, { pub fn new>(contracts: impl IntoIterator) -> Self { - let mut sandbox = Sandbox::new().expect("Failed to initialize Drink! sandbox"); + let mut sandbox = S::default(); Self::fund_accounts(&mut sandbox); Self { @@ -104,7 +104,7 @@ where } } - fn fund_accounts(sandbox: &mut Sandbox) { + fn fund_accounts(sandbox: &mut S) { const TOKENS: u128 = 1_000_000_000_000_000; let accounts = [ @@ -119,7 +119,7 @@ where ] .map(|kp| kp.public_key().0) .map(From::from); - for account in accounts.into_iter() { + for account in accounts.iter() { sandbox .mint_into(account, TOKENS.into()) .unwrap_or_else(|_| panic!("Failed to mint {} tokens", TOKENS)); @@ -128,14 +128,14 @@ where } #[async_trait] -impl + Send, Hash, Config: SandboxConfig> ChainBackend - for Client +impl + Send, Hash, S: Sandbox> ChainBackend + for Client where - Config::Runtime: pallet_balances::Config, - AccountIdFor: From<[u8; 32]>, + S::Runtime: pallet_balances::Config, + AccountIdFor: From<[u8; 32]>, { type AccountId = AccountId; - type Balance = BalanceOf; + type Balance = BalanceOf; type Error = DrinkErr; type EventLog = (); @@ -147,7 +147,7 @@ where let (pair, seed) = Pair::generate(); self.sandbox - .mint_into(pair.public().0.into(), amount) + .mint_into(&pair.public().0.into(), amount) .expect("Failed to mint tokens"); Keypair::from_seed(seed).expect("Failed to create keypair") @@ -157,7 +157,7 @@ where &mut self, account: Self::AccountId, ) -> Result { - let account = AccountIdFor::::from(*account.as_ref()); + let account = AccountIdFor::::from(*account.as_ref()); Ok(self.sandbox.free_balance(&account)) } @@ -175,7 +175,7 @@ where // Get metadata of the drink! runtime, so that we can encode the call object. // Panic on error - metadata of the static im-memory runtime should always be // available. - let raw_metadata: Vec = Config::get_metadata().into(); + let raw_metadata: Vec = S::get_metadata().into(); let metadata = subxt_metadata::Metadata::decode(&mut raw_metadata.as_slice()) .expect("Failed to decode metadata"); @@ -189,14 +189,14 @@ where // Panic on error - we just encoded a validated call object, so it should be // decodable. let decoded_call = - RuntimeCall::::decode(&mut encoded_call.as_slice()) + RuntimeCall::::decode(&mut encoded_call.as_slice()) .expect("Failed to decode runtime call"); // Execute the call. self.sandbox .runtime_call( decoded_call, - Config::convert_account_to_origin(keypair_to_account(origin)), + S::convert_account_to_origin(keypair_to_account(origin)), ) .map_err(|_| DrinkErr)?; @@ -208,17 +208,17 @@ where impl< AccountId: Clone + Send + Sync + From<[u8; 32]> + AsRef<[u8; 32]>, Hash: Copy + Send + From<[u8; 32]>, - Config: SandboxConfig, + S: Sandbox, E: Environment< AccountId = AccountId, - Balance = ContractsBalanceOf, + Balance = ContractsBalanceOf, Hash = Hash, > + 'static, - > BuilderClient for Client + > BuilderClient for Client where - Config::Runtime: pallet_balances::Config + pallet_contracts::Config, - AccountIdFor: From<[u8; 32]> + AsRef<[u8; 32]>, - ContractsBalanceOf: Send + Sync, + S::Runtime: pallet_balances::Config + pallet_contracts::Config, + AccountIdFor: From<[u8; 32]> + AsRef<[u8; 32]>, + ContractsBalanceOf: Send + Sync, { async fn bare_instantiate( &mut self, @@ -267,8 +267,8 @@ where ) -> Result, Self::Error> { let code = self.contracts.load_code(contract_name); let data = constructor_exec_input(constructor.clone()); - let result = self.sandbox.dry_run(|r| { - r.deploy_contract( + let result = self.sandbox.dry_run(|sandbox| { + sandbox.deploy_contract( code, value, data, @@ -280,8 +280,8 @@ where }); let account_id_raw = match &result.result { - Err(_) => { - panic!("Instantiate dry-run failed!") + Err(err) => { + panic!("Instantiate dry-run failed: {err:?}!") } Ok(res) => *res.account_id.as_ref(), }; @@ -397,8 +397,8 @@ where let exec_input = Encode::encode(message.clone().params().exec_input()); let account_id = (*account_id.as_ref()).into(); - let result = self.sandbox.dry_run(|r| { - r.call_contract( + let result = self.sandbox.dry_run(|sandbox| { + sandbox.call_contract( account_id, value, exec_input, @@ -425,7 +425,7 @@ where impl< AccountId: Clone + Send + Sync + From<[u8; 32]> + AsRef<[u8; 32]>, Hash: Copy + Send + From<[u8; 32]>, - Config: SandboxConfig, + Config: Sandbox, E: Environment< AccountId = AccountId, Balance = ContractsBalanceOf, @@ -447,17 +447,101 @@ fn keypair_to_account>(keypair: &Keypair) -> AccountId impl< AccountId: Clone + Send + Sync + From<[u8; 32]> + AsRef<[u8; 32]>, Hash: Copy + From<[u8; 32]>, - Config: SandboxConfig, + S: Sandbox, E: Environment< AccountId = AccountId, - Balance = ContractsBalanceOf, + Balance = ContractsBalanceOf, Hash = Hash, > + 'static, - > ContractsBackend for Client + > ContractsBackend for Client where - Config::Runtime: pallet_balances::Config + pallet_contracts::Config, - AccountIdFor: From<[u8; 32]> + AsRef<[u8; 32]>, + S::Runtime: pallet_balances::Config + pallet_contracts::Config, + AccountIdFor: From<[u8; 32]> + AsRef<[u8; 32]>, { type Error = DrinkErr; type EventLog = (); } + +/// Exposes preset sandbox configurations to be used in tests. +pub mod preset { + pub mod mock_network { + use drink::{ + frame_system, + minimal, + runtime::{ + AccountIdFor, + RuntimeMetadataPrefixed, + }, + Extension, + Sandbox, + }; + pub use pallet_contracts_mock_network::*; + use sp_runtime::traits::Dispatchable; + + /// A [`drink::Sandbox`] that can be used to test contracts + /// with a mock network of relay chain and parachains. + /// + /// ```no_compile + /// #[ink_e2e::test(backend(runtime_only(sandbox = MockNetworkSandbox)))] + /// async fn my_test(mut client: Client) -> E2EResult<()> { + /// // ... + /// } + /// ``` + #[derive(Default)] + pub struct MockNetworkSandbox; + impl Sandbox for MockNetworkSandbox { + type Runtime = parachain::Runtime; + + fn execute_with(&mut self, execute: impl FnOnce() -> T) -> T { + ParaA::execute_with(execute) + } + + fn dry_run(&mut self, action: impl FnOnce(&mut Self) -> T) -> T { + EXT_PARAA.with(|v| { + let backend_backup = v.borrow_mut().as_backend(); + let result = action(self); + + let mut v = v.borrow_mut(); + v.commit_all().expect("Failed to commit changes"); + v.backend = backend_backup; + result + }) + } + + fn register_extension(&mut self, ext: E) { + EXT_PARAA.with(|v| v.borrow_mut().register_extension(ext)); + } + + fn initialize_block( + height: frame_system::pallet_prelude::BlockNumberFor, + parent_hash: ::Hash, + ) { + minimal::BlockBuilder::::initialize_block( + height, + parent_hash, + ) + } + + fn finalize_block( + height: frame_system::pallet_prelude::BlockNumberFor, + ) -> ::Hash { + minimal::BlockBuilder::::finalize_block(height) + } + + fn default_actor() -> AccountIdFor { + ALICE + } + + fn get_metadata() -> RuntimeMetadataPrefixed { + parachain::Runtime::metadata() + } + + fn convert_account_to_origin( + account: AccountIdFor, + ) -> <::RuntimeCall as Dispatchable>::RuntimeOrigin + { + Some(account).into() + } + } + } +} diff --git a/crates/e2e/src/lib.rs b/crates/e2e/src/lib.rs index 35f538281ab..4edf6901043 100644 --- a/crates/e2e/src/lib.rs +++ b/crates/e2e/src/lib.rs @@ -50,6 +50,8 @@ pub use contract_results::{ InstantiationResult, UploadResult, }; +#[cfg(feature = "drink")] +pub use drink_client::Client as DrinkClient; pub use ink_e2e_macro::test; pub use node_proc::{ TestNodeProcess, @@ -66,18 +68,19 @@ pub use subxt_client::{ Client, Error, }; -pub use subxt_signer::sr25519::{ +pub use subxt_signer::{ self, - dev::*, - Keypair, + sr25519::{ + self, + dev::*, + Keypair, + }, }; pub use tokio; pub use tracing_subscriber; + #[cfg(feature = "drink")] -pub use { - drink::runtime::MinimalRuntime, - drink_client::Client as DrinkClient, -}; +pub use drink::runtime::MinimalSandbox; use ink::codegen::ContractCallBuilder; use ink_env::{ diff --git a/crates/ink/codegen/Cargo.toml b/crates/ink/codegen/Cargo.toml index ee6c1dab0be..7d4437dfe96 100644 --- a/crates/ink/codegen/Cargo.toml +++ b/crates/ink/codegen/Cargo.toml @@ -19,7 +19,7 @@ name = "ink_codegen" [dependencies] ink_primitives = { workspace = true } -ir = { version = "=5.0.0-rc.3", package = "ink_ir", path = "../ir", default-features = false } +ir = { version = "=5.0.0", package = "ink_ir", path = "../ir", default-features = false } quote = { workspace = true } syn = { workspace = true, features = ["parsing", "full", "extra-traits"] } proc-macro2 = { workspace = true } diff --git a/integration-tests/call-builder-return-value/Cargo.toml b/integration-tests/call-builder-return-value/Cargo.toml index 465f8b68889..1fb472246be 100755 --- a/integration-tests/call-builder-return-value/Cargo.toml +++ b/integration-tests/call-builder-return-value/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "call_builder_return_value" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/call-runtime/Cargo.toml b/integration-tests/call-runtime/Cargo.toml index c6d170315ac..7926e818d6d 100644 --- a/integration-tests/call-runtime/Cargo.toml +++ b/integration-tests/call-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "call-runtime" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/combined-extension/Cargo.toml b/integration-tests/combined-extension/Cargo.toml index 8db7ad6a74e..17187764fd2 100755 --- a/integration-tests/combined-extension/Cargo.toml +++ b/integration-tests/combined-extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "combined_extension" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/conditional-compilation/Cargo.toml b/integration-tests/conditional-compilation/Cargo.toml index 2cc1c38a47c..580bb5749a9 100755 --- a/integration-tests/conditional-compilation/Cargo.toml +++ b/integration-tests/conditional-compilation/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "conditional-compilation" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/integration-tests/contract-storage/Cargo.toml b/integration-tests/contract-storage/Cargo.toml index 9dd39808d42..35dd5987c45 100755 --- a/integration-tests/contract-storage/Cargo.toml +++ b/integration-tests/contract-storage/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract-storage" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/contract-terminate/Cargo.toml b/integration-tests/contract-terminate/Cargo.toml index e0ba1a0e411..d4ffb31963e 100644 --- a/integration-tests/contract-terminate/Cargo.toml +++ b/integration-tests/contract-terminate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract_terminate" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/contract-transfer/Cargo.toml b/integration-tests/contract-transfer/Cargo.toml index 8ed961fc109..54e30caa0a4 100644 --- a/integration-tests/contract-transfer/Cargo.toml +++ b/integration-tests/contract-transfer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract_transfer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/cross-contract-calls/Cargo.toml b/integration-tests/cross-contract-calls/Cargo.toml index 457f8d52222..4a595aec36c 100755 --- a/integration-tests/cross-contract-calls/Cargo.toml +++ b/integration-tests/cross-contract-calls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cross-contract-calls" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/cross-contract-calls/other-contract/Cargo.toml b/integration-tests/cross-contract-calls/other-contract/Cargo.toml index cdc7c9e69fc..6fd54f3a986 100755 --- a/integration-tests/cross-contract-calls/other-contract/Cargo.toml +++ b/integration-tests/cross-contract-calls/other-contract/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "other-contract" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/custom-allocator/Cargo.toml b/integration-tests/custom-allocator/Cargo.toml index baa9b204e99..4d54b0db76b 100755 --- a/integration-tests/custom-allocator/Cargo.toml +++ b/integration-tests/custom-allocator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "custom-allocator" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/custom-environment/Cargo.toml b/integration-tests/custom-environment/Cargo.toml index 5e09b3dad3f..9198f70348d 100644 --- a/integration-tests/custom-environment/Cargo.toml +++ b/integration-tests/custom-environment/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "custom-environment" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/dns/Cargo.toml b/integration-tests/dns/Cargo.toml index c8235103ea6..d47dffb823b 100644 --- a/integration-tests/dns/Cargo.toml +++ b/integration-tests/dns/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dns" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/e2e-call-runtime/Cargo.toml b/integration-tests/e2e-call-runtime/Cargo.toml index 8a5092e63bd..4f53cd43981 100644 --- a/integration-tests/e2e-call-runtime/Cargo.toml +++ b/integration-tests/e2e-call-runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "e2e_call_runtime" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/e2e-runtime-only-backend/Cargo.toml b/integration-tests/e2e-runtime-only-backend/Cargo.toml index 1a8f87e363c..33535e4f550 100644 --- a/integration-tests/e2e-runtime-only-backend/Cargo.toml +++ b/integration-tests/e2e-runtime-only-backend/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "e2e-runtime-only-backend" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/e2e-runtime-only-backend/lib.rs b/integration-tests/e2e-runtime-only-backend/lib.rs index d4ca9d20336..8f19074099e 100644 --- a/integration-tests/e2e-runtime-only-backend/lib.rs +++ b/integration-tests/e2e-runtime-only-backend/lib.rs @@ -147,7 +147,7 @@ pub mod flipper { } /// Just instantiate a contract using non-default runtime. - #[ink_e2e::test(backend(runtime_only(runtime = ink_e2e::MinimalRuntime)))] + #[ink_e2e::test(backend(runtime_only(sandbox = ink_e2e::MinimalSandbox)))] async fn custom_runtime(mut client: Client) -> E2EResult<()> { client .instantiate( diff --git a/integration-tests/erc1155/Cargo.toml b/integration-tests/erc1155/Cargo.toml index fb81a02225f..f4fca450922 100644 --- a/integration-tests/erc1155/Cargo.toml +++ b/integration-tests/erc1155/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "erc1155" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/erc20/Cargo.toml b/integration-tests/erc20/Cargo.toml index 5c3d6cdcf45..e731bfc34d2 100644 --- a/integration-tests/erc20/Cargo.toml +++ b/integration-tests/erc20/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "erc20" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/erc721/Cargo.toml b/integration-tests/erc721/Cargo.toml index a61c026834d..3f7182df27b 100644 --- a/integration-tests/erc721/Cargo.toml +++ b/integration-tests/erc721/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "erc721" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/events/Cargo.toml b/integration-tests/events/Cargo.toml index e074aed376d..f0154707096 100644 --- a/integration-tests/events/Cargo.toml +++ b/integration-tests/events/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "events" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/flipper/Cargo.toml b/integration-tests/flipper/Cargo.toml index 6231b918a41..d67c4f4bfe7 100644 --- a/integration-tests/flipper/Cargo.toml +++ b/integration-tests/flipper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "flipper" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/incrementer/Cargo.toml b/integration-tests/incrementer/Cargo.toml index 1502ab77578..a1a675f66c7 100644 --- a/integration-tests/incrementer/Cargo.toml +++ b/integration-tests/incrementer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "incrementer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/lang-err-integration-tests/call-builder-delegate/Cargo.toml b/integration-tests/lang-err-integration-tests/call-builder-delegate/Cargo.toml index a5a884aa5f5..f3f226d290e 100755 --- a/integration-tests/lang-err-integration-tests/call-builder-delegate/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/call-builder-delegate/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "call_builder_delegate" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml index cdb9409ab23..7d193321219 100755 --- a/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/call-builder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "call_builder" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml index b8218846f7c..aa096989bcc 100644 --- a/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/constructors-return-value/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "constructors_return_value" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml index 53952099c90..10aaeb35754 100755 --- a/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/contract-ref/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "contract_ref" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml index d54377ffbec..94342b574f2 100644 --- a/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml +++ b/integration-tests/lang-err-integration-tests/integration-flipper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "integration_flipper" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/lazyvec-integration-test/Cargo.toml b/integration-tests/lazyvec-integration-test/Cargo.toml index 35332c40355..0a333b4ca06 100755 --- a/integration-tests/lazyvec-integration-test/Cargo.toml +++ b/integration-tests/lazyvec-integration-test/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "lazyvec-integration-tests" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/mapping-integration-tests/Cargo.toml b/integration-tests/mapping-integration-tests/Cargo.toml index b812b33918b..d5811a9cc43 100755 --- a/integration-tests/mapping-integration-tests/Cargo.toml +++ b/integration-tests/mapping-integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mapping-integration-tests" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/mother/Cargo.toml b/integration-tests/mother/Cargo.toml index 689429644a8..43bd748619f 100755 --- a/integration-tests/mother/Cargo.toml +++ b/integration-tests/mother/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "mother" description = "Mother of all contracts" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/multi-contract-caller/Cargo.toml b/integration-tests/multi-contract-caller/Cargo.toml index b3b53933a34..11eb115e9cc 100644 --- a/integration-tests/multi-contract-caller/Cargo.toml +++ b/integration-tests/multi-contract-caller/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multi-contract-caller" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/multi-contract-caller/accumulator/Cargo.toml b/integration-tests/multi-contract-caller/accumulator/Cargo.toml index b810287d9ed..39579b674af 100644 --- a/integration-tests/multi-contract-caller/accumulator/Cargo.toml +++ b/integration-tests/multi-contract-caller/accumulator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "accumulator" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/integration-tests/multi-contract-caller/adder/Cargo.toml b/integration-tests/multi-contract-caller/adder/Cargo.toml index 5af7d8698be..d85d65eb461 100644 --- a/integration-tests/multi-contract-caller/adder/Cargo.toml +++ b/integration-tests/multi-contract-caller/adder/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "adder" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/integration-tests/multi-contract-caller/subber/Cargo.toml b/integration-tests/multi-contract-caller/subber/Cargo.toml index 842586d3db8..cd7b7ebf86b 100644 --- a/integration-tests/multi-contract-caller/subber/Cargo.toml +++ b/integration-tests/multi-contract-caller/subber/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subber" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" diff --git a/integration-tests/multisig/Cargo.toml b/integration-tests/multisig/Cargo.toml index 94c4cbbadd8..28bb8d11b4f 100755 --- a/integration-tests/multisig/Cargo.toml +++ b/integration-tests/multisig/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "multisig" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/payment-channel/Cargo.toml b/integration-tests/payment-channel/Cargo.toml index cc307a3e8cc..e0e4cb4f15d 100755 --- a/integration-tests/payment-channel/Cargo.toml +++ b/integration-tests/payment-channel/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "payment_channel" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/psp22-extension/Cargo.toml b/integration-tests/psp22-extension/Cargo.toml index 292ea080f80..95ac5beca83 100755 --- a/integration-tests/psp22-extension/Cargo.toml +++ b/integration-tests/psp22-extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "psp22_extension" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/rand-extension/Cargo.toml b/integration-tests/rand-extension/Cargo.toml index 4896b8e6546..6d97ac3d5ff 100755 --- a/integration-tests/rand-extension/Cargo.toml +++ b/integration-tests/rand-extension/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rand_extension" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/sr25519-verification/Cargo.toml b/integration-tests/sr25519-verification/Cargo.toml index 525e0b3da99..68ab4454975 100644 --- a/integration-tests/sr25519-verification/Cargo.toml +++ b/integration-tests/sr25519-verification/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sr25519_verification" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies ", "George Oastler "] edition = "2021" publish = false diff --git a/integration-tests/static-buffer/Cargo.toml b/integration-tests/static-buffer/Cargo.toml index 7a7cd96b1dc..69346b7530e 100644 --- a/integration-tests/static-buffer/Cargo.toml +++ b/integration-tests/static-buffer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "static-buffer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-dyn-cross-contract-calls/Cargo.toml b/integration-tests/trait-dyn-cross-contract-calls/Cargo.toml index d6c7fa437f6..4a9e0923c31 100644 --- a/integration-tests/trait-dyn-cross-contract-calls/Cargo.toml +++ b/integration-tests/trait-dyn-cross-contract-calls/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait-incrementer-caller" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-dyn-cross-contract-calls/contracts/incrementer/Cargo.toml b/integration-tests/trait-dyn-cross-contract-calls/contracts/incrementer/Cargo.toml index fbc852563d1..101fe5f8358 100644 --- a/integration-tests/trait-dyn-cross-contract-calls/contracts/incrementer/Cargo.toml +++ b/integration-tests/trait-dyn-cross-contract-calls/contracts/incrementer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait-incrementer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-dyn-cross-contract-calls/traits/Cargo.toml b/integration-tests/trait-dyn-cross-contract-calls/traits/Cargo.toml index 3b4b9baa185..16aa99f191c 100644 --- a/integration-tests/trait-dyn-cross-contract-calls/traits/Cargo.toml +++ b/integration-tests/trait-dyn-cross-contract-calls/traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dyn-traits" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false @@ -15,4 +15,4 @@ path = "lib.rs" default = ["std"] std = [ "ink/std", -] \ No newline at end of file +] diff --git a/integration-tests/trait-erc20/Cargo.toml b/integration-tests/trait-erc20/Cargo.toml index d7f6ab3c80c..d9602588dec 100644 --- a/integration-tests/trait-erc20/Cargo.toml +++ b/integration-tests/trait-erc20/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait_erc20" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-flipper/Cargo.toml b/integration-tests/trait-flipper/Cargo.toml index 6655a5876a7..7d08cd28a91 100644 --- a/integration-tests/trait-flipper/Cargo.toml +++ b/integration-tests/trait-flipper/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait_flipper" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-incrementer/Cargo.toml b/integration-tests/trait-incrementer/Cargo.toml index 7b562c9f4a0..3af1c83eadf 100644 --- a/integration-tests/trait-incrementer/Cargo.toml +++ b/integration-tests/trait-incrementer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "trait-incrementer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/trait-incrementer/traits/Cargo.toml b/integration-tests/trait-incrementer/traits/Cargo.toml index aab7807c2c8..bb544f5d9ae 100644 --- a/integration-tests/trait-incrementer/traits/Cargo.toml +++ b/integration-tests/trait-incrementer/traits/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "traits" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/upgradeable-contracts/delegator/Cargo.toml b/integration-tests/upgradeable-contracts/delegator/Cargo.toml index 1c25a5f1128..a1b378343e8 100644 --- a/integration-tests/upgradeable-contracts/delegator/Cargo.toml +++ b/integration-tests/upgradeable-contracts/delegator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "delegator" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/upgradeable-contracts/delegator/delegatee/Cargo.toml b/integration-tests/upgradeable-contracts/delegator/delegatee/Cargo.toml index 1fbe1662296..73849460001 100644 --- a/integration-tests/upgradeable-contracts/delegator/delegatee/Cargo.toml +++ b/integration-tests/upgradeable-contracts/delegator/delegatee/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "delegatee" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/upgradeable-contracts/delegator/delegatee2/Cargo.toml b/integration-tests/upgradeable-contracts/delegator/delegatee2/Cargo.toml index 34d554f157a..ffc4304fc8c 100644 --- a/integration-tests/upgradeable-contracts/delegator/delegatee2/Cargo.toml +++ b/integration-tests/upgradeable-contracts/delegator/delegatee2/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "delegatee2" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml index 7de55e1ec20..c55dde3ed70 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "incrementer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml index fc9e1ce0a4e..f19f3d80d2d 100644 --- a/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml +++ b/integration-tests/upgradeable-contracts/set-code-hash/updated-incrementer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "updated-incrementer" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/integration-tests/wildcard-selector/Cargo.toml b/integration-tests/wildcard-selector/Cargo.toml index 3cf92b1a8ff..771f3b4296d 100644 --- a/integration-tests/wildcard-selector/Cargo.toml +++ b/integration-tests/wildcard-selector/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wildcard-selector" -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" publish = false diff --git a/linting/Cargo.toml b/linting/Cargo.toml index 9ce30da4bcd..9d8ce9e886d 100644 --- a/linting/Cargo.toml +++ b/linting/Cargo.toml @@ -7,7 +7,7 @@ members = [ ] [workspace.package] -version = "5.0.0-rc.3" +version = "5.0.0" authors = ["Parity Technologies "] edition = "2021" license = "Apache-2.0" @@ -16,7 +16,7 @@ homepage = "https://www.parity.io/" keywords = ["parity", "blockchain", "edsl", "dylint", "linting"] [workspace.dependencies] -ink_linting_utils = { version = "=5.0.0-rc.3", path = "utils" } +ink_linting_utils = { version = "=5.0.0", path = "utils" } curve25519-dalek = { version = "=4.1.1", default-features = false, features = [ "digest", "zeroize", diff --git a/linting/extra/Cargo.toml b/linting/extra/Cargo.toml index ba33dc47e80..8f1e0a9861c 100644 --- a/linting/extra/Cargo.toml +++ b/linting/extra/Cargo.toml @@ -22,7 +22,7 @@ if_chain = "1.0.2" log = "0.4.14" regex = "1.5.4" ink_linting_utils = { workspace = true } -ink_env = { version = "=5.0.0-rc.3", path = "../../crates/env", default-features = false } +ink_env = { version = "=5.0.0", path = "../../crates/env", default-features = false } [dev-dependencies] dylint_testing = "2.6.0" @@ -32,10 +32,10 @@ dylint_testing = "2.6.0" # # These cannot be moved to the workspace level because `cargo` does not provide # the `[[workspace.dev-dependencies]]` directive. -ink = { version = "=5.0.0-rc.3", path = "../../crates/ink", default-features = false, features = ["std"] } -ink_metadata = { version = "=5.0.0-rc.3", path = "../../crates/metadata", default-features = false } -ink_primitives = { version = "=5.0.0-rc.3", path = "../../crates/primitives", default-features = false } -ink_storage = { version = "=5.0.0-rc.3", path = "../../crates/storage", default-features = false } +ink = { version = "=5.0.0", path = "../../crates/ink", default-features = false, features = ["std"] } +ink_metadata = { version = "=5.0.0", path = "../../crates/metadata", default-features = false } +ink_primitives = { version = "=5.0.0", path = "../../crates/primitives", default-features = false } +ink_storage = { version = "=5.0.0", path = "../../crates/storage", default-features = false } scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"] } diff --git a/linting/mandatory/Cargo.toml b/linting/mandatory/Cargo.toml index 6c7f0c7090d..0a58cc33ded 100644 --- a/linting/mandatory/Cargo.toml +++ b/linting/mandatory/Cargo.toml @@ -32,11 +32,11 @@ dylint_testing = "2.6.0" # # These cannot be moved to the workspace level because `cargo` does not provide # the `[[workspace.dev-dependencies]]` directive. -ink = { version = "=5.0.0-rc.3", path = "../../crates/ink", default-features = false, features = ["std"] } -ink_env = { version = "=5.0.0-rc.3", path = "../../crates/env", default-features = false } -ink_metadata = { version = "=5.0.0-rc.3", path = "../../crates/metadata", default-features = false } -ink_primitives = { version = "=5.0.0-rc.3", path = "../../crates/primitives", default-features = false } -ink_storage = { version = "=5.0.0-rc.3", path = "../../crates/storage", default-features = false } +ink = { version = "=5.0.0", path = "../../crates/ink", default-features = false, features = ["std"] } +ink_env = { version = "=5.0.0", path = "../../crates/env", default-features = false } +ink_metadata = { version = "=5.0.0", path = "../../crates/metadata", default-features = false } +ink_primitives = { version = "=5.0.0", path = "../../crates/primitives", default-features = false } +ink_storage = { version = "=5.0.0", path = "../../crates/storage", default-features = false } scale = { package = "parity-scale-codec", version = "3.4", default-features = false, features = ["derive"] } scale-info = { version = "2.6", default-features = false, features = ["derive"] }