git.delta.rocks / unique-network / refs/commits / 1c910af804ae

difftreelog

build upgrade to polkadot v0.9.39

Yaroslav Bolyukin2023-03-10parent: #c91aad4.patch.diff
in: master

48 files changed

added.maintain/external-weight-template.hbsdiffbeforeafterboth
--- /dev/null
+++ b/.maintain/external-weight-template.hbs
@@ -0,0 +1,70 @@
+// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
+
+//! Autogenerated weights for {{pallet}}
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
+//! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
+//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
+//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
+
+// Executed Command:
+{{#each args as |arg|}}
+// {{arg}}
+{{/each}}
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+#![allow(clippy::unnecessary_cast)]
+
+use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
+use sp_std::marker::PhantomData;
+
+/// Weights for {{pallet}} using the Substrate node and recommended hardware.
+pub struct SubstrateWeight<T>(PhantomData<T>);
+{{#if (eq pallet "frame_system")}}
+impl<T: crate::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
+{{else}}
+impl<T: frame_system::Config> {{pallet}}::WeightInfo for SubstrateWeight<T> {
+{{/if}}
+	{{#each benchmarks as |benchmark|}}
+	{{#each benchmark.comments as |comment|}}
+	/// {{comment}}
+	{{/each}}
+	{{#each benchmark.component_ranges as |range|}}
+	/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
+	{{/each}}
+	fn {{benchmark.name~}}
+	(
+		{{~#each benchmark.components as |c| ~}}
+		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
+	) -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		//  Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
+		Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
+			{{#each benchmark.component_weight as |cw|}}
+			// Standard Error: {{underscore cw.error}}
+			.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
+			{{/each}}
+			{{#if (ne benchmark.base_reads "0")}}
+			.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
+			{{/if}}
+			{{#each benchmark.component_reads as |cr|}}
+			.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
+			{{/each}}
+			{{#if (ne benchmark.base_writes "0")}}
+			.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
+			{{/if}}
+			{{#each benchmark.component_writes as |cw|}}
+			.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
+			{{/each}}
+			{{#each benchmark.component_calculated_proof_size as |cp|}}
+			.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
+			{{/each}}
+	}
+	{{/each}}
+}
+
modified.maintain/frame-weight-template.hbsdiffbeforeafterboth
--- a/.maintain/frame-weight-template.hbs
+++ b/.maintain/frame-weight-template.hbs
@@ -4,6 +4,7 @@
 //!
 //! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION {{version}}
 //! DATE: {{date}}, STEPS: `{{cmd.steps}}`, REPEAT: {{cmd.repeat}}, LOW RANGE: `{{cmd.lowest_range_values}}`, HIGH RANGE: `{{cmd.highest_range_values}}`
+//! WORST CASE MAP SIZE: `{{cmd.worst_case_map_values}}`
 //! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
 
 // Executed Command:
@@ -40,29 +41,39 @@
 {{/if}}
 	{{#each benchmarks as |benchmark|}}
 	{{#each benchmark.comments as |comment|}}
-	// {{comment}}
+	/// {{comment}}
 	{{/each}}
+	{{#each benchmark.component_ranges as |range|}}
+	/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
+	{{/each}}
 	fn {{benchmark.name~}}
 	(
 		{{~#each benchmark.components as |c| ~}}
 		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
 	) -> Weight {
-		Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
+		// Proof Size summary in bytes:
+		//  Measured:  `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		//  Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
+		Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
 			{{#each benchmark.component_weight as |cw|}}
 			// Standard Error: {{underscore cw.error}}
-			.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
+			.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
 			{{/each}}
 			{{#if (ne benchmark.base_reads "0")}}
-			.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}} as u64))
+			.saturating_add(T::DbWeight::get().reads({{benchmark.base_reads}}_u64))
 			{{/if}}
 			{{#each benchmark.component_reads as |cr|}}
-			.saturating_add(T::DbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
+			.saturating_add(T::DbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
 			{{/each}}
 			{{#if (ne benchmark.base_writes "0")}}
-			.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}} as u64))
+			.saturating_add(T::DbWeight::get().writes({{benchmark.base_writes}}_u64))
 			{{/if}}
 			{{#each benchmark.component_writes as |cw|}}
-			.saturating_add(T::DbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
+			.saturating_add(T::DbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
+			{{/each}}
+			{{#each benchmark.component_calculated_proof_size as |cp|}}
+			.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
 			{{/each}}
 	}
 	{{/each}}
@@ -72,30 +83,41 @@
 impl WeightInfo for () {
 	{{#each benchmarks as |benchmark|}}
 	{{#each benchmark.comments as |comment|}}
-	// {{comment}}
+	/// {{comment}}
 	{{/each}}
+	{{#each benchmark.component_ranges as |range|}}
+	/// The range of component `{{range.name}}` is `[{{range.min}}, {{range.max}}]`.
+	{{/each}}
 	fn {{benchmark.name~}}
 	(
 		{{~#each benchmark.components as |c| ~}}
 		{{~#if (not c.is_used)}}_{{/if}}{{c.name}}: u32, {{/each~}}
 	) -> Weight {
-		Weight::from_ref_time({{underscore benchmark.base_weight}} as u64)
+		// Proof Size summary in bytes:
+		//  Measured:  `{{benchmark.base_recorded_proof_size}}{{#each benchmark.component_recorded_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		//  Estimated: `{{benchmark.base_calculated_proof_size}}{{#each benchmark.component_calculated_proof_size as |cp|}} + {{cp.name}} * ({{cp.slope}} ±{{underscore cp.error}}){{/each}}`
+		// Minimum execution time: {{underscore benchmark.min_execution_time}}_000 picoseconds.
+		Weight::from_parts({{underscore benchmark.base_weight}}, {{benchmark.base_calculated_proof_size}})
 			{{#each benchmark.component_weight as |cw|}}
 			// Standard Error: {{underscore cw.error}}
-			.saturating_add(Weight::from_ref_time({{underscore cw.slope}} as u64).saturating_mul({{cw.name}} as u64))
+			.saturating_add(Weight::from_parts({{underscore cw.slope}}, 0).saturating_mul({{cw.name}}.into()))
 			{{/each}}
 			{{#if (ne benchmark.base_reads "0")}}
-			.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}} as u64))
+			.saturating_add(RocksDbWeight::get().reads({{benchmark.base_reads}}_u64))
 			{{/if}}
 			{{#each benchmark.component_reads as |cr|}}
-			.saturating_add(RocksDbWeight::get().reads(({{cr.slope}} as u64).saturating_mul({{cr.name}} as u64)))
+			.saturating_add(RocksDbWeight::get().reads(({{cr.slope}}_u64).saturating_mul({{cr.name}}.into())))
 			{{/each}}
 			{{#if (ne benchmark.base_writes "0")}}
-			.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}} as u64))
+			.saturating_add(RocksDbWeight::get().writes({{benchmark.base_writes}}_u64))
 			{{/if}}
 			{{#each benchmark.component_writes as |cw|}}
-			.saturating_add(RocksDbWeight::get().writes(({{cw.slope}} as u64).saturating_mul({{cw.name}} as u64)))
+			.saturating_add(RocksDbWeight::get().writes(({{cw.slope}}_u64).saturating_mul({{cw.name}}.into())))
+			{{/each}}
+			{{#each benchmark.component_calculated_proof_size as |cp|}}
+			.saturating_add(Weight::from_parts(0, {{cp.slope}}).saturating_mul({{cp.name}}.into()))
 			{{/each}}
 	}
 	{{/each}}
 }
+
modifiedCargo.lockdiffbeforeafterboth
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -27,7 +27,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
 dependencies = [
- "gimli 0.27.1",
+ "gimli 0.27.2",
 ]
 
 [[package]]
@@ -56,6 +56,16 @@
 ]
 
 [[package]]
+name = "aead"
+version = "0.5.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5c192eb8f11fc081b0fe4259ba5af04217d4e0faddd02417310a927911abd7c8"
+dependencies = [
+ "crypto-common",
+ "generic-array 0.14.6",
+]
+
+[[package]]
 name = "aes"
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -79,17 +89,14 @@
 ]
 
 [[package]]
-name = "aes-gcm"
-version = "0.8.0"
+name = "aes"
+version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5278b5fabbb9bd46e24aa69b2fdea62c99088e0a950a9be40e3e0101298f88da"
+checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241"
 dependencies = [
- "aead 0.3.2",
- "aes 0.6.0",
- "cipher 0.2.5",
- "ctr 0.6.0",
- "ghash 0.3.1",
- "subtle",
+ "cfg-if",
+ "cipher 0.4.4",
+ "cpufeatures",
 ]
 
 [[package]]
@@ -107,6 +114,20 @@
 ]
 
 [[package]]
+name = "aes-gcm"
+version = "0.10.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "82e1366e0c69c9f927b1fa5ce2c7bf9eafc8f9268c0b9800729e8b267612447c"
+dependencies = [
+ "aead 0.5.1",
+ "aes 0.8.2",
+ "cipher 0.4.4",
+ "ctr 0.9.2",
+ "ghash 0.5.0",
+ "subtle",
+]
+
+[[package]]
 name = "aes-soft"
 version = "0.6.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -138,6 +159,18 @@
 ]
 
 [[package]]
+name = "ahash"
+version = "0.8.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f"
+dependencies = [
+ "cfg-if",
+ "getrandom 0.2.8",
+ "once_cell",
+ "version_check",
+]
+
+[[package]]
 name = "aho-corasick"
 version = "0.7.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -245,14 +278,14 @@
  "num-traits",
  "rusticata-macros",
  "thiserror",
- "time 0.3.17",
+ "time 0.3.20",
 ]
 
 [[package]]
 name = "asn1-rs"
-version = "0.5.1"
+version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cf6690c370453db30743b373a60ba498fc0d6d83b11f4abfd87a84a075db5dd4"
+checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0"
 dependencies = [
  "asn1-rs-derive 0.4.0",
  "asn1-rs-impl",
@@ -261,7 +294,7 @@
  "num-traits",
  "rusticata-macros",
  "thiserror",
- "time 0.3.17",
+ "time 0.3.20",
 ]
 
 [[package]]
@@ -333,19 +366,18 @@
 
 [[package]]
 name = "async-lock"
-version = "2.6.0"
+version = "2.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8101efe8695a6c17e02911402145357e718ac92d3ff88ae8419e84b1707b685"
+checksum = "fa24f727524730b077666307f2734b4a1a1c57acb79193127dcc8914d5242dd7"
 dependencies = [
  "event-listener",
- "futures-lite",
 ]
 
 [[package]]
 name = "async-trait"
-version = "0.1.64"
+version = "0.1.66"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2"
+checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -447,9 +479,9 @@
 
 [[package]]
 name = "base64ct"
-version = "1.5.3"
+version = "1.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf"
+checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b"
 
 [[package]]
 name = "beef"
@@ -463,7 +495,7 @@
 [[package]]
 name = "beefy-gadget"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "async-trait",
@@ -497,7 +529,7 @@
 [[package]]
 name = "beefy-gadget-rpc"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "beefy-gadget",
  "futures",
@@ -514,13 +546,12 @@
 ]
 
 [[package]]
-name = "beefy-merkle-tree"
+name = "binary-merkle-tree"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
- "sp-api",
- "sp-beefy",
- "sp-runtime",
+ "hash-db",
+ "log",
 ]
 
 [[package]]
@@ -534,9 +565,9 @@
 
 [[package]]
 name = "bindgen"
-version = "0.60.1"
+version = "0.64.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "062dddbc1ba4aca46de6338e2bf87771414c335f7b2f2036e8f3e9befebf88e6"
+checksum = "c4243e6031260db77ede97ad86c27e501d646a27ab57b59a574f725d98ab1fb4"
 dependencies = [
  "bitflags",
  "cexpr",
@@ -549,6 +580,7 @@
  "regex",
  "rustc-hash",
  "shlex",
+ "syn",
 ]
 
 [[package]]
@@ -580,24 +612,24 @@
 
 [[package]]
 name = "blake2b_simd"
-version = "1.0.0"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72936ee4afc7f8f736d1c38383b56480b5497b4617b4a77bdbf1d2ababc76127"
+checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc"
 dependencies = [
  "arrayref",
  "arrayvec 0.7.2",
- "constant_time_eq 0.1.5",
+ "constant_time_eq",
 ]
 
 [[package]]
 name = "blake2s_simd"
-version = "1.0.0"
+version = "1.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "db539cc2b5f6003621f1cd9ef92d7ded8ea5232c7de0f9faa2de251cd98730d4"
+checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f"
 dependencies = [
  "arrayref",
  "arrayvec 0.7.2",
- "constant_time_eq 0.1.5",
+ "constant_time_eq",
 ]
 
 [[package]]
@@ -610,7 +642,7 @@
  "arrayvec 0.7.2",
  "cc",
  "cfg-if",
- "constant_time_eq 0.2.4",
+ "constant_time_eq",
  "digest 0.10.6",
 ]
 
@@ -637,9 +669,9 @@
 
 [[package]]
 name = "block-buffer"
-version = "0.10.3"
+version = "0.10.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e"
+checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
 dependencies = [
  "generic-array 0.14.6",
 ]
@@ -690,10 +722,22 @@
 ]
 
 [[package]]
+name = "bounded-collections"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a071c348a5ef6da1d3a87166b408170b46002382b1dda83992b5c2208cefb370"
+dependencies = [
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+]
+
+[[package]]
 name = "bounded-vec"
-version = "0.6.0"
+version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3372be4090bf9d4da36bd8ba7ce6ca1669503d0cf6e667236c6df7f053153eb6"
+checksum = "68534a48cbf63a4b1323c433cf21238c9ec23711e0df13b08c33e5c2082663ce"
 dependencies = [
  "thiserror",
 ]
@@ -706,9 +750,9 @@
 
 [[package]]
 name = "bstr"
-version = "1.2.0"
+version = "1.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b7f0778972c64420fdedc63f09919c8a88bda7b25135357fd25a5d9f3257e832"
+checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1"
 dependencies = [
  "memchr",
  "serde",
@@ -742,6 +786,12 @@
 checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
 
 [[package]]
+name = "bytemuck"
+version = "1.13.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea"
+
+[[package]]
 name = "byteorder"
 version = "1.4.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -766,9 +816,9 @@
 
 [[package]]
 name = "camino"
-version = "1.1.2"
+version = "1.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055"
+checksum = "c530edf18f37068ac2d977409ed5cd50d53d73bc653c7647b48eb78976ac9ae2"
 dependencies = [
  "serde",
 ]
@@ -784,15 +834,16 @@
 
 [[package]]
 name = "cargo_metadata"
-version = "0.14.2"
+version = "0.15.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4acbb09d9ee8e23699b9634375c72795d095bf268439da88562cf9b501f181fa"
+checksum = "08a1ec454bc3eead8719cb56e15dbbfecdbc14e4b3a3ae4936cc6e31f5fc0d07"
 dependencies = [
  "camino",
  "cargo-platform",
  "semver 1.0.16",
  "serde",
  "serde_json",
+ "thiserror",
 ]
 
 [[package]]
@@ -893,7 +944,7 @@
 dependencies = [
  "core2",
  "multibase",
- "multihash",
+ "multihash 0.16.3",
  "serde",
  "unsigned-varint",
 ]
@@ -917,6 +968,16 @@
 ]
 
 [[package]]
+name = "cipher"
+version = "0.4.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad"
+dependencies = [
+ "crypto-common",
+ "inout",
+]
+
+[[package]]
 name = "ckb-merkle-mountain-range"
 version = "0.5.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -927,9 +988,9 @@
 
 [[package]]
 name = "clang-sys"
-version = "1.4.0"
+version = "1.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fa2e27ae6ab525c3d369ded447057bca5438d86dc3a68f6faafb8269ba82ebf3"
+checksum = "77ed9a53e5d4d9c573ae844bfac6872b159cb1d1585a83b29e7a64b7eef7332a"
 dependencies = [
  "glob",
  "libc",
@@ -938,9 +999,9 @@
 
 [[package]]
 name = "clap"
-version = "4.1.4"
+version = "4.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76"
+checksum = "c3d7ae14b20b94cb02149ed21a86c423859cbe18dc7ed69845cace50e52b40a5"
 dependencies = [
  "bitflags",
  "clap_derive",
@@ -953,9 +1014,9 @@
 
 [[package]]
 name = "clap_derive"
-version = "4.1.0"
+version = "4.1.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "684a277d672e91966334af371f1a7b5833f9aa00b07c84e92fbce95e00208ce8"
+checksum = "44bec8e5c9d09e439c4335b1af0abaab56dcf3b94999a936e1bb47b9134288f0"
 dependencies = [
  "heck",
  "proc-macro-error",
@@ -966,18 +1027,18 @@
 
 [[package]]
 name = "clap_lex"
-version = "0.3.1"
+version = "0.3.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "783fe232adfca04f90f56201b26d79682d4cd2625e0bc7290b95123afe558ade"
+checksum = "350b9cf31731f9957399229e9b2adc51eeabdfbe9d71d9a0552275fd12710d09"
 dependencies = [
  "os_str_bytes",
 ]
 
 [[package]]
 name = "coarsetime"
-version = "0.1.22"
+version = "0.1.23"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "454038500439e141804c655b4cd1bc6a70bcb95cd2bc9463af5661b6956f0e46"
+checksum = "a90d114103adbc625300f346d4d09dfb4ab1c4a8df6868435dd903392ecf4354"
 dependencies = [
  "libc",
  "once_cell",
@@ -1017,15 +1078,9 @@
 
 [[package]]
 name = "const-oid"
-version = "0.9.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cec318a675afcb6a1ea1d4340e2d377e56e47c266f28043ceccbf4412ddfdd3b"
-
-[[package]]
-name = "constant_time_eq"
-version = "0.1.5"
+version = "0.9.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc"
+checksum = "520fbf3c07483f94e3e3ca9d0cfd913d7718ef2483d2cfd91c0d9e91474ab913"
 
 [[package]]
 name = "constant_time_eq"
@@ -1091,27 +1146,21 @@
 dependencies = [
  "libc",
 ]
-
-[[package]]
-name = "cpuid-bool"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dcb25d077389e53838a8158c8e99174c5a9d902dee4904320db714f3c653ffba"
 
 [[package]]
 name = "cranelift-bforest"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "52056f6d0584484b57fa6c1a65c1fcb15f3780d8b6a758426d9e3084169b2ddd"
+checksum = "a7379abaacee0f14abf3204a7606118f0465785252169d186337bcb75030815a"
 dependencies = [
  "cranelift-entity",
 ]
 
 [[package]]
 name = "cranelift-codegen"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "18fed94c8770dc25d01154c3ffa64ed0b3ba9d583736f305fed7beebe5d9cf74"
+checksum = "9489fa336927df749631f1008007ced2871068544f40a202ce6d93fbf2366a7b"
 dependencies = [
  "arrayvec 0.7.2",
  "bumpalo",
@@ -1121,6 +1170,7 @@
  "cranelift-entity",
  "cranelift-isle",
  "gimli 0.26.2",
+ "hashbrown 0.12.3",
  "log",
  "regalloc2",
  "smallvec",
@@ -1129,33 +1179,33 @@
 
 [[package]]
 name = "cranelift-codegen-meta"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1c451b81faf237d11c7e4f3165eeb6bac61112762c5cfe7b4c0fb7241474358f"
+checksum = "05bbb67da91ec721ed57cef2f7c5ef7728e1cd9bde9ffd3ef8601022e73e3239"
 dependencies = [
  "cranelift-codegen-shared",
 ]
 
 [[package]]
 name = "cranelift-codegen-shared"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7c940133198426d26128f08be2b40b0bd117b84771fd36798969c4d712d81fc"
+checksum = "418ecb2f36032f6665dc1a5e2060a143dbab41d83b784882e97710e890a7a16d"
 
 [[package]]
 name = "cranelift-entity"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352"
+checksum = "7cf583f7b093f291005f9fb1323e2c37f6ee4c7909e39ce016b2e8360d461705"
 dependencies = [
  "serde",
 ]
 
 [[package]]
 name = "cranelift-frontend"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34897538b36b216cc8dd324e73263596d51b8cf610da6498322838b2546baf8a"
+checksum = "0b66bf9e916f57fbbd0f7703ec6286f4624866bf45000111627c70d272c8dda1"
 dependencies = [
  "cranelift-codegen",
  "log",
@@ -1165,15 +1215,15 @@
 
 [[package]]
 name = "cranelift-isle"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1b2629a569fae540f16a76b70afcc87ad7decb38dc28fa6c648ac73b51e78470"
+checksum = "649782a39ce99798dd6b4029e2bb318a2fbeaade1b4fa25330763c10c65bc358"
 
 [[package]]
 name = "cranelift-native"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "20937dab4e14d3e225c5adfc9c7106bafd4ac669bdb43027b911ff794c6fb318"
+checksum = "937e021e089c51f9749d09e7ad1c4f255c2f8686cb8c3df63a34b3ec9921bc41"
 dependencies = [
  "cranelift-codegen",
  "libc",
@@ -1182,9 +1232,9 @@
 
 [[package]]
 name = "cranelift-wasm"
-version = "0.88.2"
+version = "0.93.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80fc2288957a94fd342a015811479de1837850924166d1f1856d8406e6f3609b"
+checksum = "d850cf6775477747c9dfda9ae23355dd70512ffebc70cf82b85a5b111ae668b5"
 dependencies = [
  "cranelift-codegen",
  "cranelift-entity",
@@ -1222,9 +1272,9 @@
 
 [[package]]
 name = "crossbeam-channel"
-version = "0.5.6"
+version = "0.5.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521"
+checksum = "cf2b3e8478797446514c91ef04bafcb59faba183e621ad488df88983cc14128c"
 dependencies = [
  "cfg-if",
  "crossbeam-utils",
@@ -1232,9 +1282,9 @@
 
 [[package]]
 name = "crossbeam-deque"
-version = "0.8.2"
+version = "0.8.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc"
+checksum = "ce6fd6f855243022dcecf8702fef0c297d4338e226845fe067f6341ad9fa0cef"
 dependencies = [
  "cfg-if",
  "crossbeam-epoch",
@@ -1243,14 +1293,14 @@
 
 [[package]]
 name = "crossbeam-epoch"
-version = "0.9.13"
+version = "0.9.14"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a"
+checksum = "46bd5f3f85273295a9d14aedfb86f6aadbff6d8f5295c4a9edb08e819dcf5695"
 dependencies = [
  "autocfg",
  "cfg-if",
  "crossbeam-utils",
- "memoffset 0.7.1",
+ "memoffset 0.8.0",
  "scopeguard",
 ]
 
@@ -1266,9 +1316,9 @@
 
 [[package]]
 name = "crossbeam-utils"
-version = "0.8.14"
+version = "0.8.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f"
+checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b"
 dependencies = [
  "cfg-if",
 ]
@@ -1298,6 +1348,7 @@
 checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
 dependencies = [
  "generic-array 0.14.6",
+ "rand_core 0.6.4",
  "typenum",
 ]
 
@@ -1313,16 +1364,6 @@
 
 [[package]]
 name = "crypto-mac"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bff07008ec701e8028e2ceb8f83f0e4274ee62bd2dbdc4fefff2e9a91824081a"
-dependencies = [
- "generic-array 0.14.6",
- "subtle",
-]
-
-[[package]]
-name = "crypto-mac"
 version = "0.11.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714"
@@ -1343,26 +1384,26 @@
 
 [[package]]
 name = "ctr"
-version = "0.6.0"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fb4a30d54f7443bf3d6191dcd486aca19e67cb3c49fa7a06a319966346707e7f"
+checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
 dependencies = [
- "cipher 0.2.5",
+ "cipher 0.3.0",
 ]
 
 [[package]]
 name = "ctr"
-version = "0.8.0"
+version = "0.9.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea"
+checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835"
 dependencies = [
- "cipher 0.3.0",
+ "cipher 0.4.4",
 ]
 
 [[package]]
 name = "cumulus-client-cli"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "clap",
  "parity-scale-codec",
@@ -1377,7 +1418,7 @@
 [[package]]
 name = "cumulus-client-collator"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-client-consensus-common",
  "cumulus-client-network",
@@ -1400,7 +1441,7 @@
 [[package]]
 name = "cumulus-client-consensus-aura"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-client-consensus-common",
@@ -1429,7 +1470,7 @@
 [[package]]
 name = "cumulus-client-consensus-common"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-client-pov-recovery",
@@ -1442,6 +1483,7 @@
  "polkadot-primitives",
  "sc-client-api",
  "sc-consensus",
+ "schnellru",
  "sp-blockchain",
  "sp-consensus",
  "sp-runtime",
@@ -1452,7 +1494,7 @@
 [[package]]
 name = "cumulus-client-network"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-relay-chain-interface",
@@ -1475,8 +1517,9 @@
 [[package]]
 name = "cumulus-client-pov-recovery"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
+ "async-trait",
  "cumulus-primitives-core",
  "cumulus-relay-chain-interface",
  "futures",
@@ -1498,11 +1541,12 @@
 [[package]]
 name = "cumulus-client-service"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-client-cli",
  "cumulus-client-collator",
  "cumulus-client-consensus-common",
+ "cumulus-client-network",
  "cumulus-client-pov-recovery",
  "cumulus-primitives-core",
  "cumulus-relay-chain-inprocess-interface",
@@ -1513,20 +1557,26 @@
  "polkadot-primitives",
  "sc-client-api",
  "sc-consensus",
+ "sc-network",
+ "sc-network-transactions",
+ "sc-rpc",
  "sc-service",
  "sc-sysinfo",
  "sc-telemetry",
+ "sc-transaction-pool",
+ "sc-utils",
  "sp-api",
  "sp-blockchain",
  "sp-consensus",
  "sp-core",
  "sp-runtime",
+ "sp-transaction-pool",
 ]
 
 [[package]]
 name = "cumulus-pallet-aura-ext"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -1542,7 +1592,7 @@
 [[package]]
 name = "cumulus-pallet-dmp-queue"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
@@ -1559,7 +1609,7 @@
 [[package]]
 name = "cumulus-pallet-parachain-system"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "bytes",
  "cumulus-pallet-parachain-system-proc-macro",
@@ -1582,12 +1632,13 @@
  "sp-std",
  "sp-trie",
  "sp-version",
+ "xcm",
 ]
 
 [[package]]
 name = "cumulus-pallet-parachain-system-proc-macro"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -1598,7 +1649,7 @@
 [[package]]
 name = "cumulus-pallet-xcm"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
@@ -1614,15 +1665,17 @@
 [[package]]
 name = "cumulus-pallet-xcmp-queue"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
  "frame-system",
  "log",
  "parity-scale-codec",
+ "polkadot-runtime-common",
  "rand_chacha 0.3.1",
  "scale-info",
+ "sp-io",
  "sp-runtime",
  "sp-std",
  "xcm",
@@ -1632,7 +1685,7 @@
 [[package]]
 name = "cumulus-primitives-core"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "parity-scale-codec",
  "polkadot-core-primitives",
@@ -1642,12 +1695,13 @@
  "sp-runtime",
  "sp-std",
  "sp-trie",
+ "xcm",
 ]
 
 [[package]]
 name = "cumulus-primitives-parachain-inherent"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-primitives-core",
@@ -1670,7 +1724,7 @@
 [[package]]
 name = "cumulus-primitives-timestamp"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "futures",
@@ -1683,12 +1737,14 @@
 [[package]]
 name = "cumulus-primitives-utility"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
  "log",
  "parity-scale-codec",
+ "polkadot-runtime-common",
+ "sp-io",
  "sp-runtime",
  "sp-std",
  "xcm",
@@ -1699,7 +1755,7 @@
 [[package]]
 name = "cumulus-relay-chain-inprocess-interface"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-primitives-core",
@@ -1724,7 +1780,7 @@
 [[package]]
 name = "cumulus-relay-chain-interface"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-primitives-core",
@@ -1744,7 +1800,7 @@
 [[package]]
 name = "cumulus-relay-chain-minimal-node"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "array-bytes 6.0.0",
  "async-trait",
@@ -1752,7 +1808,7 @@
  "cumulus-relay-chain-interface",
  "cumulus-relay-chain-rpc-interface",
  "futures",
- "lru",
+ "lru 0.9.0",
  "polkadot-core-primitives",
  "polkadot-network-bridge",
  "polkadot-node-network-protocol",
@@ -1784,7 +1840,7 @@
 [[package]]
 name = "cumulus-relay-chain-rpc-interface"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "async-trait",
  "cumulus-primitives-core",
@@ -1792,7 +1848,7 @@
  "futures",
  "futures-timer",
  "jsonrpsee",
- "lru",
+ "lru 0.9.0",
  "parity-scale-codec",
  "polkadot-service",
  "sc-client-api",
@@ -1813,7 +1869,7 @@
 [[package]]
 name = "cumulus-test-relay-sproof-builder"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "parity-scale-codec",
@@ -1865,9 +1921,9 @@
 
 [[package]]
 name = "cxx"
-version = "1.0.89"
+version = "1.0.92"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc831ee6a32dd495436e317595e639a587aa9907bef96fe6e6abc290ab6204e9"
+checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72"
 dependencies = [
  "cc",
  "cxxbridge-flags",
@@ -1877,9 +1933,9 @@
 
 [[package]]
 name = "cxx-build"
-version = "1.0.89"
+version = "1.0.92"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "94331d54f1b1a8895cd81049f7eaaaef9d05a7dcb4d1fd08bf3ff0806246789d"
+checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613"
 dependencies = [
  "cc",
  "codespan-reporting",
@@ -1892,15 +1948,15 @@
 
 [[package]]
 name = "cxxbridge-flags"
-version = "1.0.89"
+version = "1.0.92"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "48dcd35ba14ca9b40d6e4b4b39961f23d835dbb8eed74565ded361d93e1feb8a"
+checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97"
 
 [[package]]
 name = "cxxbridge-macro"
-version = "1.0.89"
+version = "1.0.92"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81bbeb29798b407ccd82a3324ade1a7286e0d29851475990b612670f6f5124d2"
+checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1909,9 +1965,9 @@
 
 [[package]]
 name = "darling"
-version = "0.14.2"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa"
+checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850"
 dependencies = [
  "darling_core",
  "darling_macro",
@@ -1919,9 +1975,9 @@
 
 [[package]]
 name = "darling_core"
-version = "0.14.2"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f"
+checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0"
 dependencies = [
  "fnv",
  "ident_case",
@@ -1933,9 +1989,9 @@
 
 [[package]]
 name = "darling_macro"
-version = "0.14.2"
+version = "0.14.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e"
+checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e"
 dependencies = [
  "darling_core",
  "quote",
@@ -1995,11 +2051,11 @@
 
 [[package]]
 name = "der-parser"
-version = "8.1.0"
+version = "8.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42d4bc9b0db0a0df9ae64634ac5bdefb7afcb534e182275ca0beadbe486701c1"
+checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e"
 dependencies = [
- "asn1-rs 0.5.1",
+ "asn1-rs 0.5.2",
  "displaydoc",
  "nom",
  "num-bigint",
@@ -2019,6 +2075,17 @@
 ]
 
 [[package]]
+name = "derive-syn-parse"
+version = "0.1.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e79116f119dd1dba1abf1f3405f03b9b0e79a27a3883864bfebded8a3dc768cd"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
 name = "derive_builder"
 version = "0.11.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2058,7 +2125,7 @@
  "convert_case",
  "proc-macro2",
  "quote",
- "rustc_version 0.4.0",
+ "rustc_version",
  "syn",
 ]
 
@@ -2092,7 +2159,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f"
 dependencies = [
- "block-buffer 0.10.3",
+ "block-buffer 0.10.4",
  "crypto-common",
  "subtle",
 ]
@@ -2163,9 +2230,9 @@
 
 [[package]]
 name = "dtoa"
-version = "1.0.5"
+version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c00704156a7de8df8da0911424e30c2049957b0a714542a44e05fe693dd85313"
+checksum = "65d09067bfacaa79114679b279d7f5885b53295b1e2cfb4e79c8e4bd3d633169"
 
 [[package]]
 name = "dyn-clonable"
@@ -2190,9 +2257,9 @@
 
 [[package]]
 name = "dyn-clone"
-version = "1.0.10"
+version = "1.0.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c9b0705efd4599c15a38151f4721f7bc388306f61084d3bfd50bd07fbca5cb60"
+checksum = "68b0cf012f1230e43cd00ebb729c6bb58707ecfa8ad08b52ef3a4ccd2697fc30"
 
 [[package]]
 name = "ecdsa"
@@ -2236,7 +2303,7 @@
 checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6"
 dependencies = [
  "curve25519-dalek 3.2.0",
- "hashbrown",
+ "hashbrown 0.12.3",
  "hex",
  "rand_core 0.6.4",
  "sha2 0.9.9",
@@ -2305,9 +2372,9 @@
 
 [[package]]
 name = "enumn"
-version = "0.1.6"
+version = "0.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e88bcb3a067a6555d577aba299e75eff9942da276e6506fc6274327daa026132"
+checksum = "1940ea32e14d489b401074558be4567f35ca9507c4628b4b3fd6fe6eb2ca7b88"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -2562,9 +2629,9 @@
 
 [[package]]
 name = "fastrand"
-version = "1.8.0"
+version = "1.9.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499"
+checksum = "e51093e27b0797c359783294ca4f0a911c270184cb10f85783b118614a1501be"
 dependencies = [
  "instant",
 ]
@@ -2597,13 +2664,12 @@
 [[package]]
 name = "fc-consensus"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "async-trait",
  "fc-db",
  "fp-consensus",
  "fp-rpc",
- "sc-client-api",
  "sc-consensus",
  "sp-api",
  "sp-block-builder",
@@ -2616,7 +2682,7 @@
 [[package]]
 name = "fc-db"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "fp-storage",
  "kvdb-rocksdb",
@@ -2635,9 +2701,10 @@
 [[package]]
 name = "fc-mapping-sync"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "fc-db",
+ "fc-storage",
  "fp-consensus",
  "fp-rpc",
  "futures",
@@ -2652,13 +2719,14 @@
 [[package]]
 name = "fc-rpc"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "ethereum-types",
  "evm",
  "fc-db",
  "fc-rpc-core",
+ "fc-storage",
  "fp-ethereum",
  "fp-rpc",
  "fp-storage",
@@ -2667,7 +2735,7 @@
  "jsonrpsee",
  "libsecp256k1",
  "log",
- "lru",
+ "lru 0.8.1",
  "parity-scale-codec",
  "prometheus",
  "rand 0.8.5",
@@ -2686,7 +2754,6 @@
  "sp-core",
  "sp-io",
  "sp-runtime",
- "sp-storage",
  "substrate-prometheus-endpoint",
  "tokio",
 ]
@@ -2694,7 +2761,7 @@
 [[package]]
 name = "fc-rpc-core"
 version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -2705,6 +2772,24 @@
 ]
 
 [[package]]
+name = "fc-storage"
+version = "1.0.0-dev"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
+dependencies = [
+ "ethereum",
+ "ethereum-types",
+ "fp-rpc",
+ "fp-storage",
+ "parity-scale-codec",
+ "sc-client-api",
+ "sp-api",
+ "sp-blockchain",
+ "sp-io",
+ "sp-runtime",
+ "sp-storage",
+]
+
+[[package]]
 name = "fdlimit"
 version = "0.2.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2725,9 +2810,9 @@
 
 [[package]]
 name = "fiat-crypto"
-version = "0.1.17"
+version = "0.1.19"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a214f5bb88731d436478f3ae1f8a277b62124089ba9fb67f4f93fb100ef73c90"
+checksum = "93ace6ec7cc19c8ed33a32eaa9ea692d7faea05006b5356b9e2b668ec4bc3955"
 
 [[package]]
 name = "file-per-thread-logger"
@@ -2741,14 +2826,14 @@
 
 [[package]]
 name = "filetime"
-version = "0.2.19"
+version = "0.2.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9"
+checksum = "8a3de6e8d11b22ff9edc6d916f890800597d60f8b2da1caf2955c274638d6412"
 dependencies = [
  "cfg-if",
  "libc",
  "redox_syscall",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
 ]
 
 [[package]]
@@ -2814,7 +2899,7 @@
 [[package]]
 name = "fork-tree"
 version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
 ]
@@ -2831,7 +2916,7 @@
 [[package]]
 name = "fp-consensus"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "parity-scale-codec",
@@ -2843,7 +2928,7 @@
 [[package]]
 name = "fp-ethereum"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -2857,7 +2942,7 @@
 [[package]]
 name = "fp-evm"
 version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "evm",
  "frame-support",
@@ -2865,13 +2950,14 @@
  "parity-scale-codec",
  "serde",
  "sp-core",
+ "sp-runtime",
  "sp-std",
 ]
 
 [[package]]
 name = "fp-evm-mapping"
 version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "frame-support",
  "sp-core",
@@ -2880,7 +2966,7 @@
 [[package]]
 name = "fp-rpc"
 version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -2896,7 +2982,7 @@
 [[package]]
 name = "fp-self-contained"
 version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "frame-support",
  "parity-scale-codec",
@@ -2908,7 +2994,7 @@
 [[package]]
 name = "fp-storage"
 version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "parity-scale-codec",
  "serde",
@@ -2923,9 +3009,10 @@
 [[package]]
 name = "frame-benchmarking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
+ "frame-support-procedural",
  "frame-system",
  "linregress",
  "log",
@@ -2941,12 +3028,13 @@
  "sp-runtime-interface",
  "sp-std",
  "sp-storage",
+ "static_assertions",
 ]
 
 [[package]]
 name = "frame-benchmarking-cli"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "Inflector",
  "array-bytes 4.2.0",
@@ -2993,7 +3081,7 @@
 [[package]]
 name = "frame-election-provider-solution-type"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -3004,7 +3092,7 @@
 [[package]]
 name = "frame-election-provider-support"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-election-provider-solution-type",
  "frame-support",
@@ -3021,7 +3109,7 @@
 [[package]]
 name = "frame-executive"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -3050,7 +3138,7 @@
 [[package]]
 name = "frame-remote-externalities"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "log",
@@ -3066,7 +3154,7 @@
 [[package]]
 name = "frame-support"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "bitflags",
  "frame-metadata",
@@ -3098,10 +3186,11 @@
 [[package]]
 name = "frame-support-procedural"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "Inflector",
  "cfg-expr",
+ "derive-syn-parse",
  "frame-support-procedural-tools",
  "itertools",
  "proc-macro2",
@@ -3112,7 +3201,7 @@
 [[package]]
 name = "frame-support-procedural-tools"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support-procedural-tools-derive",
  "proc-macro-crate",
@@ -3124,7 +3213,7 @@
 [[package]]
 name = "frame-support-procedural-tools-derive"
 version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -3134,7 +3223,7 @@
 [[package]]
 name = "frame-system"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "log",
@@ -3152,7 +3241,7 @@
 [[package]]
 name = "frame-system-benchmarking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -3167,7 +3256,7 @@
 [[package]]
 name = "frame-system-rpc-runtime-api"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "sp-api",
@@ -3176,7 +3265,7 @@
 [[package]]
 name = "frame-try-runtime"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "parity-scale-codec",
@@ -3200,12 +3289,6 @@
  "libc",
  "winapi",
 ]
-
-[[package]]
-name = "fs_extra"
-version = "1.3.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c"
 
 [[package]]
 name = "funty"
@@ -3397,22 +3480,22 @@
 
 [[package]]
 name = "ghash"
-version = "0.3.1"
+version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "97304e4cd182c3846f7575ced3890c53012ce534ad9114046b0a9e00bb30a375"
+checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
 dependencies = [
  "opaque-debug 0.3.0",
- "polyval 0.4.5",
+ "polyval 0.5.3",
 ]
 
 [[package]]
 name = "ghash"
-version = "0.4.4"
+version = "0.5.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1583cc1656d7839fd3732b80cf4f38850336cdb9b8ded1cd399ca62958de3c99"
+checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
 dependencies = [
  "opaque-debug 0.3.0",
- "polyval 0.5.3",
+ "polyval 0.6.0",
 ]
 
 [[package]]
@@ -3428,9 +3511,9 @@
 
 [[package]]
 name = "gimli"
-version = "0.27.1"
+version = "0.27.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec"
+checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
 
 [[package]]
 name = "glob"
@@ -3464,9 +3547,9 @@
 
 [[package]]
 name = "h2"
-version = "0.3.15"
+version = "0.3.16"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4"
+checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d"
 dependencies = [
  "bytes",
  "fnv",
@@ -3516,7 +3599,16 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888"
 dependencies = [
- "ahash",
+ "ahash 0.7.6",
+]
+
+[[package]]
+name = "hashbrown"
+version = "0.13.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e"
+dependencies = [
+ "ahash 0.8.3",
 ]
 
 [[package]]
@@ -3545,9 +3637,9 @@
 
 [[package]]
 name = "hermit-abi"
-version = "0.3.0"
+version = "0.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "856b5cb0902c2b6d65d5fd97dfa30f9b70c7538e770b98eab5ed52d8db923e01"
+checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286"
 
 [[package]]
 name = "hex"
@@ -3577,16 +3669,6 @@
 checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840"
 dependencies = [
  "crypto-mac 0.8.0",
- "digest 0.9.0",
-]
-
-[[package]]
-name = "hmac"
-version = "0.10.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1441c6b1e930e2817404b5046f1f989899143a12bf92de603b69f4e0aee1e15"
-dependencies = [
- "crypto-mac 0.10.1",
  "digest 0.9.0",
 ]
 
@@ -3633,9 +3715,9 @@
 
 [[package]]
 name = "http"
-version = "0.2.8"
+version = "0.2.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399"
+checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482"
 dependencies = [
  "bytes",
  "fnv",
@@ -3841,11 +3923,20 @@
 checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399"
 dependencies = [
  "autocfg",
- "hashbrown",
+ "hashbrown 0.12.3",
  "serde",
 ]
 
 [[package]]
+name = "inout"
+version = "0.1.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5"
+dependencies = [
+ "generic-array 0.14.6",
+]
+
+[[package]]
 name = "instant"
 version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3890,15 +3981,9 @@
 
 [[package]]
 name = "io-lifetimes"
-version = "0.7.5"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074"
-
-[[package]]
-name = "io-lifetimes"
-version = "1.0.5"
+version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3"
+checksum = "cfa919a82ea574332e2de6e74b4c36e74d41982b335080fa59d4ef31be20fdf3"
 dependencies = [
  "libc",
  "windows-sys 0.45.0",
@@ -3930,13 +4015,13 @@
 
 [[package]]
 name = "is-terminal"
-version = "0.4.3"
+version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef"
+checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857"
 dependencies = [
- "hermit-abi 0.3.0",
- "io-lifetimes 1.0.5",
- "rustix 0.36.8",
+ "hermit-abi 0.3.1",
+ "io-lifetimes",
+ "rustix",
  "windows-sys 0.45.0",
 ]
 
@@ -3951,15 +4036,15 @@
 
 [[package]]
 name = "itoa"
-version = "1.0.5"
+version = "1.0.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440"
+checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6"
 
 [[package]]
 name = "jobserver"
-version = "0.1.25"
+version = "0.1.26"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b"
+checksum = "936cfd212a0155903bcbc060e316fb6cc7cbf2e1907329391ebadc1fe0ce77c2"
 dependencies = [
  "libc",
 ]
@@ -4120,8 +4205,8 @@
 
 [[package]]
 name = "kusama-runtime"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "frame-benchmarking",
@@ -4150,7 +4235,7 @@
  "pallet-elections-phragmen",
  "pallet-fast-unstake",
  "pallet-grandpa",
- "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39)",
  "pallet-im-online",
  "pallet-indices",
  "pallet-membership",
@@ -4171,6 +4256,7 @@
  "pallet-session-benchmarking",
  "pallet-society",
  "pallet-staking",
+ "pallet-staking-runtime-api",
  "pallet-timestamp",
  "pallet-tips",
  "pallet-transaction-payment",
@@ -4217,8 +4303,8 @@
 
 [[package]]
 name = "kusama-runtime-constants"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-support",
  "polkadot-primitives",
@@ -4276,9 +4362,9 @@
 
 [[package]]
 name = "libc"
-version = "0.2.139"
+version = "0.2.140"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79"
+checksum = "99227334921fae1a979cf0bfdfcc6b3e5ce376ef57e16fb6fb3ea2ed6095f80c"
 
 [[package]]
 name = "libloading"
@@ -4304,16 +4390,16 @@
 
 [[package]]
 name = "libp2p"
-version = "0.50.0"
+version = "0.50.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e0a0d2f693675f49ded13c5d510c48b78069e23cbd9108d7ccd59f6dc568819"
+checksum = "9c7b0104790be871edcf97db9bd2356604984e623a08d825c3f27852290266b8"
 dependencies = [
  "bytes",
  "futures",
  "futures-timer",
  "getrandom 0.2.8",
  "instant",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-dns",
  "libp2p-identify",
  "libp2p-kad",
@@ -4330,7 +4416,7 @@
  "libp2p-webrtc",
  "libp2p-websocket",
  "libp2p-yamux",
- "multiaddr",
+ "multiaddr 0.16.0",
  "parking_lot 0.12.1",
  "pin-project",
  "smallvec",
@@ -4351,8 +4437,8 @@
  "futures-timer",
  "instant",
  "log",
- "multiaddr",
- "multihash",
+ "multiaddr 0.16.0",
+ "multihash 0.16.3",
  "multistream-select",
  "once_cell",
  "parking_lot 0.12.1",
@@ -4371,13 +4457,47 @@
 ]
 
 [[package]]
+name = "libp2p-core"
+version = "0.39.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "881d9a54e97d97cdaa4125d48269d97ca8c40e5fefec6b85b30440dc60cc551f"
+dependencies = [
+ "asn1_der",
+ "bs58",
+ "ed25519-dalek",
+ "either",
+ "fnv",
+ "futures",
+ "futures-timer",
+ "instant",
+ "log",
+ "multiaddr 0.17.0",
+ "multihash 0.17.0",
+ "multistream-select",
+ "once_cell",
+ "parking_lot 0.12.1",
+ "pin-project",
+ "prost",
+ "prost-build",
+ "rand 0.8.5",
+ "rw-stream-sink",
+ "sec1",
+ "sha2 0.10.6",
+ "smallvec",
+ "thiserror",
+ "unsigned-varint",
+ "void",
+ "zeroize",
+]
+
+[[package]]
 name = "libp2p-dns"
 version = "0.38.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "8e42a271c1b49f789b92f7fc87749fa79ce5c7bdc88cbdfacb818a4bca47fec5"
 dependencies = [
  "futures",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "parking_lot 0.12.1",
  "smallvec",
@@ -4393,10 +4513,10 @@
  "asynchronous-codec",
  "futures",
  "futures-timer",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm",
  "log",
- "lru",
+ "lru 0.8.1",
  "prost",
  "prost-build",
  "prost-codec",
@@ -4419,7 +4539,7 @@
  "futures",
  "futures-timer",
  "instant",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm",
  "log",
  "prost",
@@ -4442,7 +4562,7 @@
  "data-encoding",
  "futures",
  "if-watch",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm",
  "log",
  "rand 0.8.5",
@@ -4459,7 +4579,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5ad8a64f29da86005c86a4d2728b8a0719e9b192f4092b609fd8790acb9dec55"
 dependencies = [
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-identify",
  "libp2p-kad",
  "libp2p-ping",
@@ -4476,7 +4596,7 @@
  "asynchronous-codec",
  "bytes",
  "futures",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "nohash-hasher",
  "parking_lot 0.12.1",
@@ -4494,7 +4614,7 @@
  "bytes",
  "curve25519-dalek 3.2.0",
  "futures",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "once_cell",
  "prost",
@@ -4517,7 +4637,7 @@
  "futures",
  "futures-timer",
  "instant",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm",
  "log",
  "rand 0.8.5",
@@ -4534,7 +4654,7 @@
  "futures",
  "futures-timer",
  "if-watch",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-tls",
  "log",
  "parking_lot 0.12.1",
@@ -4555,7 +4675,7 @@
  "bytes",
  "futures",
  "instant",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm",
  "log",
  "rand 0.8.5",
@@ -4574,7 +4694,7 @@
  "futures",
  "futures-timer",
  "instant",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-swarm-derive",
  "log",
  "pin-project",
@@ -4606,7 +4726,7 @@
  "futures-timer",
  "if-watch",
  "libc",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "socket2",
  "tokio",
@@ -4614,13 +4734,13 @@
 
 [[package]]
 name = "libp2p-tls"
-version = "0.1.0-alpha"
+version = "0.1.0-alpha.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f7905ce0d040576634e8a3229a7587cc8beab83f79db6023800f1792895defa8"
+checksum = "e9baf6f6292149e124ee737d9a79dbee783f29473fc368c7faad9d157841078a"
 dependencies = [
  "futures",
  "futures-rustls",
- "libp2p-core",
+ "libp2p-core 0.39.0",
  "rcgen 0.10.0",
  "ring",
  "rustls 0.20.8",
@@ -4638,7 +4758,7 @@
 dependencies = [
  "futures",
  "js-sys",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "parity-send-wrapper",
  "wasm-bindgen",
  "wasm-bindgen-futures",
@@ -4657,10 +4777,10 @@
  "futures-timer",
  "hex",
  "if-watch",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "libp2p-noise",
  "log",
- "multihash",
+ "multihash 0.16.3",
  "prost",
  "prost-build",
  "prost-codec",
@@ -4684,7 +4804,7 @@
  "either",
  "futures",
  "futures-rustls",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "parking_lot 0.12.1",
  "quicksink",
@@ -4701,7 +4821,7 @@
 checksum = "4f63594a0aa818642d9d4915c791945053877253f08a3626f13416b5cd928a29"
 dependencies = [
  "futures",
- "libp2p-core",
+ "libp2p-core 0.38.0",
  "log",
  "parking_lot 0.12.1",
  "thiserror",
@@ -4710,9 +4830,9 @@
 
 [[package]]
 name = "librocksdb-sys"
-version = "0.8.0+7.4.4"
+version = "0.8.3+7.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "611804e4666a25136fcc5f8cf425ab4d26c7f74ea245ffe92ea23b85b6420b5d"
+checksum = "557b255ff04123fcc176162f56ed0c9cd42d8f357cf55b3fabeb60f7413741b3"
 dependencies = [
  "bindgen",
  "bzip2-sys",
@@ -4808,22 +4928,15 @@
 
 [[package]]
 name = "linregress"
-version = "0.4.4"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8"
+checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52"
 dependencies = [
  "nalgebra",
- "statrs",
 ]
 
 [[package]]
 name = "linux-raw-sys"
-version = "0.0.46"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d"
-
-[[package]]
-name = "linux-raw-sys"
 version = "0.1.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "f051f77a7c8e6957c0696eac88f26b0117e54f52d3fc682ab19397a8812846a4"
@@ -4864,10 +4977,19 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909"
 dependencies = [
- "hashbrown",
+ "hashbrown 0.12.3",
 ]
 
 [[package]]
+name = "lru"
+version = "0.9.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "71e7d46de488603ffdd5f30afbc64fbba2378214a2c3a2fb83abf3d33126df17"
+dependencies = [
+ "hashbrown 0.13.2",
+]
+
+[[package]]
 name = "lru-cache"
 version = "0.1.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4956,14 +5078,14 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb"
 dependencies = [
- "rustix 0.36.8",
+ "rustix",
 ]
 
 [[package]]
 name = "memmap2"
-version = "0.5.8"
+version = "0.5.10"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b182332558b18d807c4ce1ca8ca983b34c3ee32765e47b3f0f69b90355cc1dc"
+checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327"
 dependencies = [
  "libc",
 ]
@@ -4987,13 +5109,22 @@
 ]
 
 [[package]]
+name = "memoffset"
+version = "0.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
+dependencies = [
+ "autocfg",
+]
+
+[[package]]
 name = "memory-db"
 version = "0.31.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66"
 dependencies = [
  "hash-db",
- "hashbrown",
+ "hashbrown 0.12.3",
 ]
 
 [[package]]
@@ -5042,20 +5173,20 @@
 
 [[package]]
 name = "mio"
-version = "0.8.5"
+version = "0.8.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de"
+checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9"
 dependencies = [
  "libc",
  "log",
  "wasi 0.11.0+wasi-snapshot-preview1",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
 ]
 
 [[package]]
 name = "mmr-gadget"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "log",
@@ -5074,7 +5205,7 @@
 [[package]]
 name = "mmr-rpc"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "anyhow",
  "jsonrpsee",
@@ -5124,7 +5255,25 @@
  "byteorder",
  "data-encoding",
  "multibase",
- "multihash",
+ "multihash 0.16.3",
+ "percent-encoding",
+ "serde",
+ "static_assertions",
+ "unsigned-varint",
+ "url",
+]
+
+[[package]]
+name = "multiaddr"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3b53e0cc5907a5c216ba6584bf74be8ab47d6d6289f72793b2dddbf15dc3bf8c"
+dependencies = [
+ "arrayref",
+ "byteorder",
+ "data-encoding",
+ "multibase",
+ "multihash 0.17.0",
  "percent-encoding",
  "serde",
  "static_assertions",
@@ -5161,6 +5310,19 @@
 ]
 
 [[package]]
+name = "multihash"
+version = "0.17.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "835d6ff01d610179fbce3de1694d007e500bf33a7f29689838941d6bf783ae40"
+dependencies = [
+ "core2",
+ "digest 0.10.6",
+ "multihash-derive",
+ "sha2 0.10.6",
+ "unsigned-varint",
+]
+
+[[package]]
 name = "multihash-derive"
 version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5196,9 +5358,9 @@
 
 [[package]]
 name = "nalgebra"
-version = "0.27.1"
+version = "0.32.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120"
+checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511"
 dependencies = [
  "approx",
  "matrixmultiply",
@@ -5206,17 +5368,15 @@
  "num-complex",
  "num-rational",
  "num-traits",
- "rand 0.8.5",
- "rand_distr",
  "simba",
  "typenum",
 ]
 
 [[package]]
 name = "nalgebra-macros"
-version = "0.1.0"
+version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218"
+checksum = "d232c68884c0c99810a5a4d333ef7e47689cfd0edc85efc9e54e1e6bf5212766"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -5293,9 +5453,9 @@
 
 [[package]]
 name = "netlink-sys"
-version = "0.8.4"
+version = "0.8.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "260e21fbb6f3d253a14df90eb0000a6066780a15dd901a7519ce02d77a94985b"
+checksum = "6471bf08e7ac0135876a9581bf3217ef0333c191c128d34878079f42ee150411"
 dependencies = [
  "bytes",
  "futures",
@@ -5317,6 +5477,20 @@
 ]
 
 [[package]]
+name = "nix"
+version = "0.26.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a"
+dependencies = [
+ "bitflags",
+ "cfg-if",
+ "libc",
+ "memoffset 0.7.1",
+ "pin-utils",
+ "static_assertions",
+]
+
+[[package]]
 name = "nohash-hasher"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5333,15 +5507,6 @@
 ]
 
 [[package]]
-name = "nom8"
-version = "0.2.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ae01545c9c7fc4486ab7debaf2aad7003ac19431791868fb2e8066df97fad2f8"
-dependencies = [
- "memchr",
-]
-
-[[package]]
 name = "normalize-line-endings"
 version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -5406,7 +5571,6 @@
 checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd"
 dependencies = [
  "autocfg",
- "libm 0.2.6",
 ]
 
 [[package]]
@@ -5421,18 +5585,18 @@
 
 [[package]]
 name = "num_enum"
-version = "0.5.9"
+version = "0.5.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8d829733185c1ca374f17e52b762f24f535ec625d2cc1f070e34c8a9068f341b"
+checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9"
 dependencies = [
  "num_enum_derive",
 ]
 
 [[package]]
 name = "num_enum_derive"
-version = "0.5.9"
+version = "0.5.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2be1598bf1c313dcdd12092e3f1920f463462525a21b7b4e11b4168353d0123e"
+checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -5447,7 +5611,7 @@
 checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53"
 dependencies = [
  "crc32fast",
- "hashbrown",
+ "hashbrown 0.12.3",
  "indexmap",
  "memchr",
 ]
@@ -5476,18 +5640,18 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff"
 dependencies = [
- "asn1-rs 0.5.1",
+ "asn1-rs 0.5.2",
 ]
 
 [[package]]
 name = "once_cell"
-version = "1.17.0"
+version = "1.17.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66"
+checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3"
 
 [[package]]
 name = "opal-runtime"
-version = "0.9.37"
+version = "0.9.39"
 dependencies = [
  "app-promotion-rpc",
  "cumulus-pallet-aura-ext",
@@ -5542,7 +5706,6 @@
  "pallet-maintenance",
  "pallet-nonfungible",
  "pallet-preimage",
- "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
  "pallet-structure",
@@ -5649,7 +5812,7 @@
 [[package]]
 name = "orml-tokens"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -5664,7 +5827,7 @@
 [[package]]
 name = "orml-traits"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "frame-support",
  "impl-trait-for-tuples",
@@ -5673,6 +5836,7 @@
  "parity-scale-codec",
  "scale-info",
  "serde",
+ "sp-core",
  "sp-io",
  "sp-runtime",
  "sp-std",
@@ -5682,7 +5846,7 @@
 [[package]]
 name = "orml-utilities"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "frame-support",
  "parity-scale-codec",
@@ -5696,7 +5860,7 @@
 [[package]]
 name = "orml-vesting"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -5711,7 +5875,7 @@
 [[package]]
 name = "orml-xcm-support"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "frame-support",
  "orml-traits",
@@ -5725,7 +5889,7 @@
 [[package]]
 name = "orml-xtokens"
 version = "0.4.1-dev"
-source = "git+https://github.com/open-web3-stack/open-runtime-module-library?branch=polkadot-v0.9.37#16b6c1149a15674d21c87244b7988a667e2c14d9"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=unique-polkadot-v0.9.39#1548fb8f65ff4d59b5396299b4be73102803974f"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
@@ -5807,7 +5971,7 @@
 [[package]]
 name = "pallet-aura"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -5823,7 +5987,7 @@
 [[package]]
 name = "pallet-authority-discovery"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -5839,14 +6003,13 @@
 [[package]]
 name = "pallet-authorship"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
  "impl-trait-for-tuples",
  "parity-scale-codec",
  "scale-info",
- "sp-authorship",
  "sp-runtime",
  "sp-std",
 ]
@@ -5854,7 +6017,7 @@
 [[package]]
 name = "pallet-babe"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -5878,7 +6041,7 @@
 [[package]]
 name = "pallet-bags-list"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -5898,7 +6061,7 @@
 [[package]]
 name = "pallet-balances"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -5913,7 +6076,7 @@
 [[package]]
 name = "pallet-base-fee"
 version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "fp-evm",
  "frame-support",
@@ -5927,26 +6090,29 @@
 [[package]]
 name = "pallet-beefy"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
+ "pallet-authorship",
  "pallet-session",
  "parity-scale-codec",
  "scale-info",
  "serde",
  "sp-beefy",
  "sp-runtime",
+ "sp-session",
+ "sp-staking",
  "sp-std",
 ]
 
 [[package]]
 name = "pallet-beefy-mmr"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
- "beefy-merkle-tree",
+ "binary-merkle-tree",
  "frame-support",
  "frame-system",
  "log",
@@ -5956,6 +6122,7 @@
  "parity-scale-codec",
  "scale-info",
  "serde",
+ "sp-api",
  "sp-beefy",
  "sp-core",
  "sp-io",
@@ -5966,7 +6133,7 @@
 [[package]]
 name = "pallet-bounties"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -5984,7 +6151,7 @@
 [[package]]
 name = "pallet-child-bounties"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6030,7 +6197,7 @@
 [[package]]
 name = "pallet-collective"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6084,7 +6251,7 @@
 [[package]]
 name = "pallet-conviction-voting"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "assert_matches",
  "frame-benchmarking",
@@ -6101,7 +6268,7 @@
 [[package]]
 name = "pallet-democracy"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6119,7 +6286,7 @@
 [[package]]
 name = "pallet-election-provider-multi-phase"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -6142,7 +6309,7 @@
 [[package]]
 name = "pallet-election-provider-support-benchmarking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -6155,7 +6322,7 @@
 [[package]]
 name = "pallet-elections-phragmen"
 version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6173,7 +6340,7 @@
 [[package]]
 name = "pallet-ethereum"
 version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "ethereum",
  "ethereum-types",
@@ -6200,7 +6367,7 @@
 [[package]]
 name = "pallet-evm"
 version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "environmental",
  "evm",
@@ -6280,7 +6447,7 @@
 [[package]]
 name = "pallet-evm-precompile-simple"
 version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.37#02eff174cf5235971da686e5ed09f34f59a93ed3"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#3b277e472854ebaeecb40accb3f87cfe1a43fb61"
 dependencies = [
  "fp-evm",
  "ripemd",
@@ -6306,7 +6473,7 @@
 [[package]]
 name = "pallet-fast-unstake"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -6366,7 +6533,7 @@
 [[package]]
 name = "pallet-grandpa"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6406,7 +6573,7 @@
 [[package]]
 name = "pallet-identity"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "enumflags2",
  "frame-benchmarking",
@@ -6422,7 +6589,7 @@
 [[package]]
 name = "pallet-im-online"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6442,7 +6609,7 @@
 [[package]]
 name = "pallet-indices"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6488,7 +6655,7 @@
 [[package]]
 name = "pallet-membership"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6505,7 +6672,7 @@
 [[package]]
 name = "pallet-mmr"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6522,7 +6689,7 @@
 [[package]]
 name = "pallet-multisig"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6538,7 +6705,7 @@
 [[package]]
 name = "pallet-nis"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6554,7 +6721,7 @@
 [[package]]
 name = "pallet-nomination-pools"
 version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -6571,7 +6738,7 @@
 [[package]]
 name = "pallet-nomination-pools-benchmarking"
 version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -6591,8 +6758,9 @@
 [[package]]
 name = "pallet-nomination-pools-runtime-api"
 version = "1.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
+ "pallet-nomination-pools",
  "parity-scale-codec",
  "sp-api",
  "sp-std",
@@ -6622,7 +6790,7 @@
 [[package]]
 name = "pallet-offences"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -6639,12 +6807,13 @@
 [[package]]
 name = "pallet-offences-benchmarking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
  "frame-support",
  "frame-system",
+ "log",
  "pallet-babe",
  "pallet-balances",
  "pallet-grandpa",
@@ -6662,7 +6831,7 @@
 [[package]]
 name = "pallet-preimage"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6679,7 +6848,7 @@
 [[package]]
 name = "pallet-proxy"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6692,23 +6861,9 @@
 ]
 
 [[package]]
-name = "pallet-randomness-collective-flip"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
-dependencies = [
- "frame-support",
- "frame-system",
- "parity-scale-codec",
- "safe-mix",
- "scale-info",
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
 name = "pallet-ranked-collective"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6726,7 +6881,7 @@
 [[package]]
 name = "pallet-recovery"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6741,7 +6896,7 @@
 [[package]]
 name = "pallet-referenda"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "assert_matches",
  "frame-benchmarking",
@@ -6780,7 +6935,7 @@
 [[package]]
 name = "pallet-scheduler"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6797,7 +6952,7 @@
 [[package]]
 name = "pallet-session"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -6818,7 +6973,7 @@
 [[package]]
 name = "pallet-session-benchmarking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6834,7 +6989,7 @@
 [[package]]
 name = "pallet-society"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -6848,7 +7003,7 @@
 [[package]]
 name = "pallet-staking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-election-provider-support",
@@ -6871,7 +7026,7 @@
 [[package]]
 name = "pallet-staking-reward-curve"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -6882,16 +7037,25 @@
 [[package]]
 name = "pallet-staking-reward-fn"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "log",
  "sp-arithmetic",
 ]
 
 [[package]]
+name = "pallet-staking-runtime-api"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+dependencies = [
+ "parity-scale-codec",
+ "sp-api",
+]
+
+[[package]]
 name = "pallet-state-trie-migration"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6924,7 +7088,7 @@
 [[package]]
 name = "pallet-sudo"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -6938,7 +7102,7 @@
 [[package]]
 name = "pallet-template-transaction-payment"
 version = "3.0.0"
-source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.37#72931fde262ecc4418928dd4bbeea10c64593175"
+source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.39#7e74e3937a2c08bf29a00084a5c2f1ca6676d87a"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6970,7 +7134,7 @@
 [[package]]
 name = "pallet-timestamp"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -6988,7 +7152,7 @@
 [[package]]
 name = "pallet-tips"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7007,7 +7171,7 @@
 [[package]]
 name = "pallet-transaction-payment"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-support",
  "frame-system",
@@ -7023,7 +7187,7 @@
 [[package]]
 name = "pallet-transaction-payment-rpc"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "jsonrpsee",
  "pallet-transaction-payment-rpc-runtime-api",
@@ -7039,7 +7203,7 @@
 [[package]]
 name = "pallet-transaction-payment-rpc-runtime-api"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "pallet-transaction-payment",
  "parity-scale-codec",
@@ -7051,7 +7215,7 @@
 [[package]]
 name = "pallet-treasury"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7109,7 +7273,7 @@
 [[package]]
 name = "pallet-utility"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7125,7 +7289,7 @@
 [[package]]
 name = "pallet-vesting"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7140,7 +7304,7 @@
 [[package]]
 name = "pallet-whitelist"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7154,9 +7318,11 @@
 
 [[package]]
 name = "pallet-xcm"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
+ "bounded-collections",
+ "frame-benchmarking",
  "frame-support",
  "frame-system",
  "log",
@@ -7164,6 +7330,7 @@
  "scale-info",
  "serde",
  "sp-core",
+ "sp-io",
  "sp-runtime",
  "sp-std",
  "xcm",
@@ -7172,8 +7339,8 @@
 
 [[package]]
 name = "pallet-xcm-benchmarks"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-benchmarking",
  "frame-support",
@@ -7181,16 +7348,18 @@
  "log",
  "parity-scale-codec",
  "scale-info",
+ "sp-io",
  "sp-runtime",
  "sp-std",
  "xcm",
+ "xcm-builder",
  "xcm-executor",
 ]
 
 [[package]]
 name = "parachain-info"
 version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.37#09418fc04c2608b123f36ca80f16df3d2096753b"
+source = "git+https://github.com/uniquenetwork/cumulus?branch=polkadot-v0.9.39#7321c5ba72724711faa1c4ee4da6a81a657184cd"
 dependencies = [
  "cumulus-primitives-core",
  "frame-support",
@@ -7201,9 +7370,9 @@
 
 [[package]]
 name = "parity-db"
-version = "0.4.3"
+version = "0.4.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dd684a725651d9588ef21f140a328b6b4f64e646b2e931f3e6f14f75eedf9980"
+checksum = "df89dd8311063c54ae4e03d9aeb597b04212a57e82c339344130a9cad9b3e2d9"
 dependencies = [
  "blake2",
  "crc32fast",
@@ -7215,14 +7384,15 @@
  "memmap2",
  "parking_lot 0.12.1",
  "rand 0.8.5",
+ "siphasher",
  "snap",
 ]
 
 [[package]]
 name = "parity-scale-codec"
-version = "3.3.0"
+version = "3.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3840933452adf7b3b9145e27086a5a3376c619dca1a21b1e5a5af0d54979bed"
+checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac"
 dependencies = [
  "arrayvec 0.7.2",
  "bitvec",
@@ -7313,9 +7483,9 @@
 
 [[package]]
 name = "paste"
-version = "1.0.11"
+version = "1.0.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba"
+checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79"
 
 [[package]]
 name = "pbkdf2"
@@ -7367,9 +7537,9 @@
 
 [[package]]
 name = "pest"
-version = "2.5.4"
+version = "2.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ab62d2fa33726dbe6321cc97ef96d8cde531e3eeaf858a058de53a8a6d40d8f"
+checksum = "8cbd939b234e95d72bc393d51788aec68aeeb5d51e748ca08ff3aad58cb722f7"
 dependencies = [
  "thiserror",
  "ucd-trie",
@@ -7377,9 +7547,9 @@
 
 [[package]]
 name = "pest_derive"
-version = "2.5.4"
+version = "2.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bf026e2d0581559db66d837fe5242320f525d85c76283c61f4d51a1238d65ea"
+checksum = "a81186863f3d0a27340815be8f2078dd8050b14cd71913db9fbda795e5f707d7"
 dependencies = [
  "pest",
  "pest_generator",
@@ -7387,9 +7557,9 @@
 
 [[package]]
 name = "pest_generator"
-version = "2.5.4"
+version = "2.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2b27bd18aa01d91c8ed2b61ea23406a676b42d82609c6e2581fba42f0c15f17f"
+checksum = "75a1ef20bf3193c15ac345acb32e26b3dc3223aff4d77ae4fc5359567683796b"
 dependencies = [
  "pest",
  "pest_meta",
@@ -7400,9 +7570,9 @@
 
 [[package]]
 name = "pest_meta"
-version = "2.5.4"
+version = "2.5.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f02b677c1859756359fc9983c2e56a0237f18624a3789528804406b7e915e5d"
+checksum = "5e3b284b1f13a20dc5ebc90aff59a51b8d7137c221131b52a7260c08cbc1cc80"
 dependencies = [
  "once_cell",
  "pest",
@@ -7411,9 +7581,9 @@
 
 [[package]]
 name = "petgraph"
-version = "0.6.2"
+version = "0.6.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e6d5014253a1331579ce62aa67443b4a658c5e7dd03d4bc6d302b94474888143"
+checksum = "4dd7d28ee937e54fe3080c91faa1c3a46c06de6252988a7f4592ba2310ef22a4"
 dependencies = [
  "fixedbitset",
  "indexmap",
@@ -7487,8 +7657,8 @@
 
 [[package]]
 name = "polkadot-approval-distribution"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "polkadot-node-metrics",
@@ -7502,8 +7672,8 @@
 
 [[package]]
 name = "polkadot-availability-bitfield-distribution"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "polkadot-node-network-protocol",
@@ -7516,13 +7686,13 @@
 
 [[package]]
 name = "polkadot-availability-distribution"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "derive_more",
  "fatality",
  "futures",
- "lru",
+ "lru 0.9.0",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -7539,12 +7709,12 @@
 
 [[package]]
 name = "polkadot-availability-recovery"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "fatality",
  "futures",
- "lru",
+ "lru 0.9.0",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -7560,8 +7730,8 @@
 
 [[package]]
 name = "polkadot-cli"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "clap",
  "frame-benchmarking-cli",
@@ -7575,6 +7745,7 @@
  "sc-cli",
  "sc-executor",
  "sc-service",
+ "sc-storage-monitor",
  "sc-sysinfo",
  "sc-tracing",
  "sp-core",
@@ -7587,8 +7758,8 @@
 
 [[package]]
 name = "polkadot-client"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "frame-benchmarking",
@@ -7629,8 +7800,8 @@
 
 [[package]]
 name = "polkadot-collator-protocol"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "always-assert",
  "bitvec",
@@ -7651,8 +7822,8 @@
 
 [[package]]
 name = "polkadot-core-primitives"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -7663,15 +7834,15 @@
 
 [[package]]
 name = "polkadot-dispute-distribution"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "derive_more",
  "fatality",
  "futures",
  "futures-timer",
  "indexmap",
- "lru",
+ "lru 0.9.0",
  "parity-scale-codec",
  "polkadot-erasure-coding",
  "polkadot-node-network-protocol",
@@ -7688,8 +7859,8 @@
 
 [[package]]
 name = "polkadot-erasure-coding"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "parity-scale-codec",
  "polkadot-node-primitives",
@@ -7702,8 +7873,8 @@
 
 [[package]]
 name = "polkadot-gossip-support"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "futures-timer",
@@ -7722,8 +7893,8 @@
 
 [[package]]
 name = "polkadot-network-bridge"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "always-assert",
  "async-trait",
@@ -7746,8 +7917,8 @@
 
 [[package]]
 name = "polkadot-node-collation-generation"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "parity-scale-codec",
@@ -7764,15 +7935,15 @@
 
 [[package]]
 name = "polkadot-node-core-approval-voting"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "derive_more",
  "futures",
  "futures-timer",
  "kvdb",
- "lru",
+ "lru 0.9.0",
  "merlin",
  "parity-scale-codec",
  "polkadot-node-jaeger",
@@ -7793,8 +7964,8 @@
 
 [[package]]
 name = "polkadot-node-core-av-store"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "futures",
@@ -7807,14 +7978,15 @@
  "polkadot-node-subsystem-util",
  "polkadot-overseer",
  "polkadot-primitives",
+ "sp-consensus",
  "thiserror",
  "tracing-gum",
 ]
 
 [[package]]
 name = "polkadot-node-core-backing"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "fatality",
@@ -7832,8 +8004,8 @@
 
 [[package]]
 name = "polkadot-node-core-bitfield-signing"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "polkadot-node-subsystem",
@@ -7847,8 +8019,8 @@
 
 [[package]]
 name = "polkadot-node-core-candidate-validation"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "futures",
@@ -7858,6 +8030,7 @@
  "polkadot-node-metrics",
  "polkadot-node-primitives",
  "polkadot-node-subsystem",
+ "polkadot-node-subsystem-util",
  "polkadot-parachain",
  "polkadot-primitives",
  "sp-maybe-compressed-blob",
@@ -7866,8 +8039,8 @@
 
 [[package]]
 name = "polkadot-node-core-chain-api"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "polkadot-node-metrics",
@@ -7881,8 +8054,8 @@
 
 [[package]]
 name = "polkadot-node-core-chain-selection"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "futures-timer",
@@ -7898,13 +8071,13 @@
 
 [[package]]
 name = "polkadot-node-core-dispute-coordinator"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "fatality",
  "futures",
  "kvdb",
- "lru",
+ "lru 0.9.0",
  "parity-scale-codec",
  "polkadot-node-primitives",
  "polkadot-node-subsystem",
@@ -7917,8 +8090,8 @@
 
 [[package]]
 name = "polkadot-node-core-parachains-inherent"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "futures",
@@ -7934,8 +8107,8 @@
 
 [[package]]
 name = "polkadot-node-core-provisioner"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "fatality",
@@ -7952,19 +8125,22 @@
 
 [[package]]
 name = "polkadot-node-core-pvf"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "always-assert",
  "assert_matches",
  "cpu-time",
  "futures",
  "futures-timer",
+ "libc",
  "parity-scale-codec",
  "pin-project",
  "polkadot-core-primitives",
  "polkadot-node-metrics",
+ "polkadot-node-primitives",
  "polkadot-parachain",
+ "polkadot-primitives",
  "rand 0.8.5",
  "rayon",
  "sc-executor",
@@ -7978,14 +8154,15 @@
  "sp-tracing",
  "sp-wasm-interface",
  "tempfile",
+ "tikv-jemalloc-ctl",
  "tokio",
  "tracing-gum",
 ]
 
 [[package]]
 name = "polkadot-node-core-pvf-checker"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
  "polkadot-node-primitives",
@@ -8000,11 +8177,11 @@
 
 [[package]]
 name = "polkadot-node-core-runtime-api"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "futures",
- "lru",
+ "lru 0.9.0",
  "polkadot-node-metrics",
  "polkadot-node-subsystem",
  "polkadot-node-subsystem-types",
@@ -8015,8 +8192,8 @@
 
 [[package]]
 name = "polkadot-node-jaeger"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "lazy_static",
  "log",
@@ -8033,8 +8210,8 @@
 
 [[package]]
 name = "polkadot-node-metrics"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bs58",
  "futures",
@@ -8052,8 +8229,8 @@
 
 [[package]]
 name = "polkadot-node-network-protocol"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "derive_more",
@@ -8075,8 +8252,8 @@
 
 [[package]]
 name = "polkadot-node-primitives"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bounded-vec",
  "futures",
@@ -8091,14 +8268,15 @@
  "sp-core",
  "sp-keystore",
  "sp-maybe-compressed-blob",
+ "sp-runtime",
  "thiserror",
  "zstd",
 ]
 
 [[package]]
 name = "polkadot-node-subsystem"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "polkadot-node-jaeger",
  "polkadot-node-subsystem-types",
@@ -8107,8 +8285,8 @@
 
 [[package]]
 name = "polkadot-node-subsystem-types"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "derive_more",
@@ -8130,8 +8308,8 @@
 
 [[package]]
 name = "polkadot-node-subsystem-util"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "derive_more",
@@ -8140,7 +8318,7 @@
  "futures-channel",
  "itertools",
  "kvdb",
- "lru",
+ "lru 0.9.0",
  "parity-db",
  "parity-scale-codec",
  "parking_lot 0.11.2",
@@ -8163,13 +8341,13 @@
 
 [[package]]
 name = "polkadot-overseer"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "futures",
  "futures-timer",
- "lru",
+ "lru 0.9.0",
  "orchestra",
  "parking_lot 0.12.1",
  "polkadot-node-metrics",
@@ -8186,9 +8364,10 @@
 
 [[package]]
 name = "polkadot-parachain"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
+ "bounded-collections",
  "derive_more",
  "frame-support",
  "parity-scale-codec",
@@ -8202,8 +8381,8 @@
 
 [[package]]
 name = "polkadot-performance-test"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "env_logger 0.9.3",
  "kusama-runtime",
@@ -8211,14 +8390,15 @@
  "polkadot-erasure-coding",
  "polkadot-node-core-pvf",
  "polkadot-node-primitives",
+ "polkadot-primitives",
  "quote",
  "thiserror",
 ]
 
 [[package]]
 name = "polkadot-primitives"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "hex-literal",
@@ -8243,8 +8423,8 @@
 
 [[package]]
 name = "polkadot-rpc"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "beefy-gadget",
  "beefy-gadget-rpc",
@@ -8275,8 +8455,8 @@
 
 [[package]]
 name = "polkadot-runtime"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "frame-benchmarking",
@@ -8303,7 +8483,7 @@
  "pallet-elections-phragmen",
  "pallet-fast-unstake",
  "pallet-grandpa",
- "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39)",
  "pallet-im-online",
  "pallet-indices",
  "pallet-membership",
@@ -8320,6 +8500,7 @@
  "pallet-session-benchmarking",
  "pallet-staking",
  "pallet-staking-reward-curve",
+ "pallet-staking-runtime-api",
  "pallet-timestamp",
  "pallet-tips",
  "pallet-transaction-payment",
@@ -8364,8 +8545,8 @@
 
 [[package]]
 name = "polkadot-runtime-common"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "frame-benchmarking",
@@ -8377,10 +8558,10 @@
  "log",
  "pallet-authorship",
  "pallet-babe",
- "pallet-bags-list",
  "pallet-balances",
  "pallet-beefy-mmr",
  "pallet-election-provider-multi-phase",
+ "pallet-fast-unstake",
  "pallet-session",
  "pallet-staking",
  "pallet-staking-reward-fn",
@@ -8412,8 +8593,8 @@
 
 [[package]]
 name = "polkadot-runtime-constants"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-support",
  "polkadot-primitives",
@@ -8426,8 +8607,8 @@
 
 [[package]]
 name = "polkadot-runtime-metrics"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bs58",
  "parity-scale-codec",
@@ -8438,8 +8619,8 @@
 
 [[package]]
 name = "polkadot-runtime-parachains"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitflags",
  "bitvec",
@@ -8457,6 +8638,7 @@
  "pallet-timestamp",
  "pallet-vesting",
  "parity-scale-codec",
+ "polkadot-parachain",
  "polkadot-primitives",
  "polkadot-runtime-metrics",
  "rand 0.8.5",
@@ -8481,11 +8663,12 @@
 
 [[package]]
 name = "polkadot-service"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "async-trait",
  "beefy-gadget",
+ "frame-benchmarking-cli",
  "frame-support",
  "frame-system-rpc-runtime-api",
  "futures",
@@ -8493,7 +8676,8 @@
  "kusama-runtime",
  "kvdb",
  "kvdb-rocksdb",
- "lru",
+ "log",
+ "lru 0.9.0",
  "mmr-gadget",
  "pallet-babe",
  "pallet-im-online",
@@ -8587,8 +8771,8 @@
 
 [[package]]
 name = "polkadot-statement-distribution"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "arrayvec 0.5.2",
  "fatality",
@@ -8608,8 +8792,8 @@
 
 [[package]]
 name = "polkadot-statement-table"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "parity-scale-codec",
  "polkadot-primitives",
@@ -8618,16 +8802,18 @@
 
 [[package]]
 name = "polling"
-version = "2.5.2"
+version = "2.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22122d5ec4f9fe1b3916419b76be1e80bcb93f618d071d2edf841b137b2a2bd6"
+checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa"
 dependencies = [
  "autocfg",
+ "bitflags",
  "cfg-if",
+ "concurrent-queue",
  "libc",
  "log",
- "wepoll-ffi",
- "windows-sys 0.42.0",
+ "pin-project-lite 0.2.9",
+ "windows-sys 0.45.0",
 ]
 
 [[package]]
@@ -8638,30 +8824,31 @@
 dependencies = [
  "cpufeatures",
  "opaque-debug 0.3.0",
- "universal-hash",
+ "universal-hash 0.4.1",
 ]
 
 [[package]]
 name = "polyval"
-version = "0.4.5"
+version = "0.5.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "eebcc4aa140b9abd2bc40d9c3f7ccec842679cd79045ac3a7ac698c1a064b7cd"
+checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
 dependencies = [
- "cpuid-bool",
+ "cfg-if",
+ "cpufeatures",
  "opaque-debug 0.3.0",
- "universal-hash",
+ "universal-hash 0.4.1",
 ]
 
 [[package]]
 name = "polyval"
-version = "0.5.3"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1"
+checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6"
 dependencies = [
  "cfg-if",
  "cpufeatures",
  "opaque-debug 0.3.0",
- "universal-hash",
+ "universal-hash 0.5.0",
 ]
 
 [[package]]
@@ -8713,9 +8900,9 @@
 
 [[package]]
 name = "prettyplease"
-version = "0.1.23"
+version = "0.1.24"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e97e3215779627f01ee256d2fad52f3d95e8e1c11e9fc6fd08f7cd455d5d5c78"
+checksum = "4ebcd279d20a4a0a2404a33056388e950504d891c855c7975b9a8fef75f3bf04"
 dependencies = [
  "proc-macro2",
  "syn",
@@ -8753,9 +8940,9 @@
 
 [[package]]
 name = "proc-macro-crate"
-version = "1.3.0"
+version = "1.3.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "66618389e4ec1c7afe67d51a9bf34ff9236480f8d51e7489b7d5ab0303c13f34"
+checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919"
 dependencies = [
  "once_cell",
  "toml_edit",
@@ -8839,9 +9026,9 @@
 
 [[package]]
 name = "prost"
-version = "0.11.6"
+version = "0.11.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21dc42e00223fc37204bd4aa177e69420c604ca4a183209a8f9de30c6d934698"
+checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537"
 dependencies = [
  "bytes",
  "prost-derive",
@@ -8849,9 +9036,9 @@
 
 [[package]]
 name = "prost-build"
-version = "0.11.6"
+version = "0.11.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a3f8ad728fb08fe212df3c05169e940fbb6d9d16a877ddde14644a983ba2012e"
+checksum = "2c828f93f5ca4826f97fedcbd3f9a536c16b12cff3dbbb4a007f932bbad95b12"
 dependencies = [
  "bytes",
  "heck",
@@ -8884,9 +9071,9 @@
 
 [[package]]
 name = "prost-derive"
-version = "0.11.6"
+version = "0.11.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8bda8c0881ea9f722eb9629376db3d0b903b462477c1aafcb0566610ac28ac5d"
+checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b"
 dependencies = [
  "anyhow",
  "itertools",
@@ -8897,11 +9084,10 @@
 
 [[package]]
 name = "prost-types"
-version = "0.11.6"
+version = "0.11.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a5e0526209433e96d83d750dd81a99118edbc55739e7e61a46764fd2ad537788"
+checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88"
 dependencies = [
- "bytes",
  "prost",
 ]
 
@@ -8916,7 +9102,7 @@
 
 [[package]]
 name = "quartz-runtime"
-version = "0.9.37"
+version = "0.9.39"
 dependencies = [
  "app-promotion-rpc",
  "cumulus-pallet-aura-ext",
@@ -8971,7 +9157,6 @@
  "pallet-maintenance",
  "pallet-nonfungible",
  "pallet-preimage",
- "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
  "pallet-structure",
@@ -9128,16 +9313,6 @@
 ]
 
 [[package]]
-name = "rand_distr"
-version = "0.4.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31"
-dependencies = [
- "num-traits",
- "rand 0.8.5",
-]
-
-[[package]]
 name = "rand_hc"
 version = "0.2.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -9163,9 +9338,9 @@
 
 [[package]]
 name = "rayon"
-version = "1.6.1"
+version = "1.7.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7"
+checksum = "1d2df5196e37bcc87abebc0053e20787d73847bb33134a69841207dd0a47f03b"
 dependencies = [
  "either",
  "rayon-core",
@@ -9173,9 +9348,9 @@
 
 [[package]]
 name = "rayon-core"
-version = "1.10.2"
+version = "1.11.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b"
+checksum = "4b8f95bd6966f5c87776639160a66bd8ab9895d9d4ab01ddba9fc60661aebe8d"
 dependencies = [
  "crossbeam-channel",
  "crossbeam-deque",
@@ -9191,7 +9366,7 @@
 dependencies = [
  "pem",
  "ring",
- "time 0.3.17",
+ "time 0.3.20",
  "x509-parser 0.13.2",
  "yasna",
 ]
@@ -9204,7 +9379,7 @@
 dependencies = [
  "pem",
  "ring",
- "time 0.3.17",
+ "time 0.3.20",
  "yasna",
 ]
 
@@ -9243,18 +9418,18 @@
 
 [[package]]
 name = "ref-cast"
-version = "1.0.14"
+version = "1.0.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c78fb8c9293bcd48ef6fce7b4ca950ceaf21210de6e105a883ee280c0f7b9ed"
+checksum = "a9af2cf09ef80e610097515e80095b7f76660a92743c4185aff5406cd5ce3dd5"
 dependencies = [
  "ref-cast-impl",
 ]
 
 [[package]]
 name = "ref-cast-impl"
-version = "1.0.14"
+version = "1.0.15"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9f9c0c92af03644e4806106281fe2e068ac5bc0ae74a707266d06ea27bccee5f"
+checksum = "9c501201393982e275433bc55de7d6ae6f00e7699cd5572c5b57581cd69c881b"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -9263,9 +9438,9 @@
 
 [[package]]
 name = "regalloc2"
-version = "0.3.2"
+version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d43a209257d978ef079f3d446331d0f1794f5e0fc19b306a199983857833a779"
+checksum = "300d4fbfb40c1c66a78ba3ddd41c1110247cf52f97b87d0f2fc9209bd49b030c"
 dependencies = [
  "fxhash",
  "log",
@@ -9300,11 +9475,14 @@
 checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848"
 
 [[package]]
-name = "remove_dir_all"
-version = "0.5.3"
+name = "region"
+version = "3.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
+checksum = "76e189c2369884dce920945e2ddf79b3dff49e071a167dd1817fa9c4c00d512e"
 dependencies = [
+ "bitflags",
+ "libc",
+ "mach",
  "winapi",
 ]
 
@@ -9387,10 +9565,10 @@
 
 [[package]]
 name = "rococo-runtime"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
- "beefy-merkle-tree",
+ "binary-merkle-tree",
  "frame-benchmarking",
  "frame-executive",
  "frame-support",
@@ -9412,7 +9590,7 @@
  "pallet-democracy",
  "pallet-elections-phragmen",
  "pallet-grandpa",
- "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39)",
  "pallet-im-online",
  "pallet-indices",
  "pallet-membership",
@@ -9473,8 +9651,8 @@
 
 [[package]]
 name = "rococo-runtime-constants"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-support",
  "polkadot-primitives",
@@ -9517,7 +9695,7 @@
  "log",
  "netlink-packet-route",
  "netlink-proto",
- "nix",
+ "nix 0.24.3",
  "thiserror",
  "tokio",
 ]
@@ -9566,15 +9744,6 @@
 
 [[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"
@@ -9593,29 +9762,15 @@
 
 [[package]]
 name = "rustix"
-version = "0.35.13"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9"
-dependencies = [
- "bitflags",
- "errno",
- "io-lifetimes 0.7.5",
- "libc",
- "linux-raw-sys 0.0.46",
- "windows-sys 0.42.0",
-]
-
-[[package]]
-name = "rustix"
-version = "0.36.8"
+version = "0.36.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644"
+checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc"
 dependencies = [
  "bitflags",
  "errno",
- "io-lifetimes 1.0.5",
+ "io-lifetimes",
  "libc",
- "linux-raw-sys 0.1.4",
+ "linux-raw-sys",
  "windows-sys 0.45.0",
 ]
 
@@ -9667,9 +9822,9 @@
 
 [[package]]
 name = "rustversion"
-version = "1.0.11"
+version = "1.0.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70"
+checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06"
 
 [[package]]
 name = "rw-stream-sink"
@@ -9684,17 +9839,17 @@
 
 [[package]]
 name = "ryu"
-version = "1.0.12"
+version = "1.0.13"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde"
+checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041"
 
 [[package]]
-name = "safe-mix"
-version = "1.0.1"
+name = "safe_arch"
+version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6d3d055a2582e6b00ed7a31c1524040aa391092bf636328350813f3a0605215c"
+checksum = "794821e4ccb0d9f979512f9c1973480123f9bd62a90d74ab0f9426fcf8f4a529"
 dependencies = [
- "rustc_version 0.2.3",
+ "bytemuck",
 ]
 
 [[package]]
@@ -9709,7 +9864,7 @@
 [[package]]
 name = "sc-allocator"
 version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "log",
  "sp-core",
@@ -9720,7 +9875,7 @@
 [[package]]
 name = "sc-authority-discovery"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -9747,7 +9902,7 @@
 [[package]]
 name = "sc-basic-authorship"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "futures-timer",
@@ -9770,7 +9925,7 @@
 [[package]]
 name = "sc-block-builder"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "sc-client-api",
@@ -9786,7 +9941,7 @@
 [[package]]
 name = "sc-chain-spec"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "memmap2",
  "sc-chain-spec-derive",
@@ -9801,7 +9956,7 @@
 [[package]]
 name = "sc-chain-spec-derive"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -9812,7 +9967,7 @@
 [[package]]
 name = "sc-cli"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "chrono",
@@ -9852,7 +10007,7 @@
 [[package]]
 name = "sc-client-api"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "fnv",
  "futures",
@@ -9878,7 +10033,7 @@
 [[package]]
 name = "sc-client-db"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "hash-db",
  "kvdb",
@@ -9891,6 +10046,7 @@
  "parking_lot 0.12.1",
  "sc-client-api",
  "sc-state-db",
+ "schnellru",
  "sp-arithmetic",
  "sp-blockchain",
  "sp-core",
@@ -9903,7 +10059,7 @@
 [[package]]
 name = "sc-consensus"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -9928,7 +10084,7 @@
 [[package]]
 name = "sc-consensus-aura"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -9957,7 +10113,7 @@
 [[package]]
 name = "sc-consensus-babe"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "fork-tree",
@@ -9975,6 +10131,7 @@
  "sc-consensus-slots",
  "sc-keystore",
  "sc-telemetry",
+ "scale-info",
  "schnorrkel",
  "sp-api",
  "sp-application-crypto",
@@ -9995,7 +10152,7 @@
 [[package]]
 name = "sc-consensus-babe-rpc"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "jsonrpsee",
@@ -10017,7 +10174,7 @@
 [[package]]
 name = "sc-consensus-epochs"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "fork-tree",
  "parity-scale-codec",
@@ -10030,7 +10187,7 @@
 [[package]]
 name = "sc-consensus-manual-seal"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "assert_matches",
  "async-trait",
@@ -10064,7 +10221,7 @@
 [[package]]
 name = "sc-consensus-slots"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -10087,9 +10244,9 @@
 [[package]]
 name = "sc-executor"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
- "lru",
+ "lru 0.8.1",
  "parity-scale-codec",
  "parking_lot 0.12.1",
  "sc-executor-common",
@@ -10111,7 +10268,7 @@
 [[package]]
 name = "sc-executor-common"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "sc-allocator",
  "sp-maybe-compressed-blob",
@@ -10124,7 +10281,7 @@
 [[package]]
 name = "sc-executor-wasmi"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "log",
  "sc-allocator",
@@ -10137,13 +10294,14 @@
 [[package]]
 name = "sc-executor-wasmtime"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
+ "anyhow",
  "cfg-if",
  "libc",
  "log",
  "once_cell",
- "rustix 0.35.13",
+ "rustix",
  "sc-allocator",
  "sc-executor-common",
  "sp-runtime-interface",
@@ -10154,9 +10312,9 @@
 [[package]]
 name = "sc-finality-grandpa"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
- "ahash",
+ "ahash 0.8.3",
  "array-bytes 4.2.0",
  "async-trait",
  "dyn-clone",
@@ -10194,7 +10352,7 @@
 [[package]]
 name = "sc-finality-grandpa-rpc"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "finality-grandpa",
  "futures",
@@ -10214,7 +10372,7 @@
 [[package]]
 name = "sc-informant"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "ansi_term",
  "futures",
@@ -10229,7 +10387,7 @@
 [[package]]
 name = "sc-keystore"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "async-trait",
@@ -10244,7 +10402,7 @@
 [[package]]
 name = "sc-network"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "async-trait",
@@ -10258,7 +10416,8 @@
  "ip_network",
  "libp2p",
  "log",
- "lru",
+ "lru 0.8.1",
+ "mockall",
  "parity-scale-codec",
  "parking_lot 0.12.1",
  "pin-project",
@@ -10286,7 +10445,7 @@
 [[package]]
 name = "sc-network-bitswap"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "cid",
  "futures",
@@ -10305,7 +10464,7 @@
 [[package]]
 name = "sc-network-common"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "bitflags",
@@ -10331,14 +10490,14 @@
 [[package]]
 name = "sc-network-gossip"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
- "ahash",
+ "ahash 0.8.3",
  "futures",
  "futures-timer",
  "libp2p",
  "log",
- "lru",
+ "lru 0.8.1",
  "sc-network-common",
  "sc-peerset",
  "sp-runtime",
@@ -10349,7 +10508,7 @@
 [[package]]
 name = "sc-network-light"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "futures",
@@ -10370,7 +10529,7 @@
 [[package]]
 name = "sc-network-sync"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "async-trait",
@@ -10378,7 +10537,7 @@
  "futures",
  "libp2p",
  "log",
- "lru",
+ "lru 0.8.1",
  "mockall",
  "parity-scale-codec",
  "prost",
@@ -10402,7 +10561,7 @@
 [[package]]
 name = "sc-network-transactions"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "futures",
@@ -10421,7 +10580,7 @@
 [[package]]
 name = "sc-offchain"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "bytes",
@@ -10451,7 +10610,7 @@
 [[package]]
 name = "sc-peerset"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "libp2p",
@@ -10464,7 +10623,7 @@
 [[package]]
 name = "sc-proposer-metrics"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "log",
  "substrate-prometheus-endpoint",
@@ -10473,7 +10632,7 @@
 [[package]]
 name = "sc-rpc"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "jsonrpsee",
@@ -10497,12 +10656,13 @@
  "sp-runtime",
  "sp-session",
  "sp-version",
+ "tokio",
 ]
 
 [[package]]
 name = "sc-rpc-api"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "jsonrpsee",
  "parity-scale-codec",
@@ -10521,7 +10681,7 @@
 [[package]]
 name = "sc-rpc-server"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "http",
  "jsonrpsee",
@@ -10536,7 +10696,7 @@
 [[package]]
 name = "sc-rpc-spec-v2"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "futures",
@@ -10562,7 +10722,7 @@
 [[package]]
 name = "sc-service"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "directories",
@@ -10593,6 +10753,7 @@
  "sc-rpc",
  "sc-rpc-server",
  "sc-rpc-spec-v2",
+ "sc-storage-monitor",
  "sc-sysinfo",
  "sc-telemetry",
  "sc-tracing",
@@ -10627,7 +10788,7 @@
 [[package]]
 name = "sc-state-db"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "log",
  "parity-scale-codec",
@@ -10636,9 +10797,25 @@
 ]
 
 [[package]]
+name = "sc-storage-monitor"
+version = "0.1.0"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+dependencies = [
+ "clap",
+ "futures",
+ "log",
+ "nix 0.26.2",
+ "sc-client-db",
+ "sc-utils",
+ "sp-core",
+ "thiserror",
+ "tokio",
+]
+
+[[package]]
 name = "sc-sync-state-rpc"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "jsonrpsee",
  "parity-scale-codec",
@@ -10657,7 +10834,7 @@
 [[package]]
 name = "sc-sysinfo"
 version = "6.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "libc",
@@ -10676,7 +10853,7 @@
 [[package]]
 name = "sc-telemetry"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "chrono",
  "futures",
@@ -10695,7 +10872,7 @@
 [[package]]
 name = "sc-tracing"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "ansi_term",
  "atty",
@@ -10726,7 +10903,7 @@
 [[package]]
 name = "sc-tracing-proc-macro"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -10737,13 +10914,14 @@
 [[package]]
 name = "sc-transaction-pool"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
  "futures-timer",
  "linked-hash-map",
  "log",
+ "num-traits",
  "parity-scale-codec",
  "parking_lot 0.12.1",
  "sc-client-api",
@@ -10763,7 +10941,7 @@
 [[package]]
 name = "sc-transaction-pool-api"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -10777,7 +10955,7 @@
 [[package]]
 name = "sc-utils"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "backtrace",
  "futures",
@@ -10824,6 +11002,17 @@
 ]
 
 [[package]]
+name = "schnellru"
+version = "0.2.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d"
+dependencies = [
+ "ahash 0.8.3",
+ "cfg-if",
+ "hashbrown 0.13.2",
+]
+
+[[package]]
 name = "schnorrkel"
 version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -10849,9 +11038,9 @@
 
 [[package]]
 name = "scratch"
-version = "1.0.3"
+version = "1.0.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2"
+checksum = "1792db035ce95be60c3f8853017b3999209281c24e2ba5bc8e59bf97a0c590c1"
 
 [[package]]
 name = "sct"
@@ -10954,15 +11143,6 @@
 version = "0.6.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "7a3186ec9e65071a2095434b1f5bb24838d4e8e130f584c790f6033c79943537"
-dependencies = [
- "semver-parser",
-]
-
-[[package]]
-name = "semver"
-version = "0.9.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
 dependencies = [
  "semver-parser",
 ]
@@ -10984,18 +11164,18 @@
 
 [[package]]
 name = "serde"
-version = "1.0.152"
+version = "1.0.154"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb"
+checksum = "8cdd151213925e7f1ab45a9bbfb129316bd00799784b174b7cc7bcd16961c49e"
 dependencies = [
  "serde_derive",
 ]
 
 [[package]]
 name = "serde_derive"
-version = "1.0.152"
+version = "1.0.154"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e"
+checksum = "4fc80d722935453bcafdc2c9a73cd6fac4dc1938f0346035d84bf99fa9e33217"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -11004,9 +11184,9 @@
 
 [[package]]
 name = "serde_json"
-version = "1.0.92"
+version = "1.0.94"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7434af0dc1cbd59268aa98b4c22c131c0584d2232f6fb166efb993e2832e896a"
+checksum = "1c533a59c9d8a93a09c6ab31f0fd5e5f4dd1b8fc9434804029839884765d04ea"
 dependencies = [
  "itoa",
  "ryu",
@@ -11027,6 +11207,17 @@
 ]
 
 [[package]]
+name = "sha1"
+version = "0.10.5"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3"
+dependencies = [
+ "cfg-if",
+ "cpufeatures",
+ "digest 0.10.6",
+]
+
+[[package]]
 name = "sha2"
 version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -11108,9 +11299,9 @@
 
 [[package]]
 name = "signal-hook-registry"
-version = "1.4.0"
+version = "1.4.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0"
+checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1"
 dependencies = [
  "libc",
 ]
@@ -11127,21 +11318,28 @@
 
 [[package]]
 name = "simba"
-version = "0.5.1"
+version = "0.8.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c"
+checksum = "50582927ed6f77e4ac020c057f37a268fc6aebc29225050365aacbb9deeeddc4"
 dependencies = [
  "approx",
  "num-complex",
  "num-traits",
  "paste",
+ "wide",
 ]
 
 [[package]]
+name = "siphasher"
+version = "0.3.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de"
+
+[[package]]
 name = "slab"
-version = "0.4.7"
+version = "0.4.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef"
+checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d"
 dependencies = [
  "autocfg",
 ]
@@ -11154,8 +11352,8 @@
 
 [[package]]
 name = "slot-range-helper"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "enumn",
  "parity-scale-codec",
@@ -11197,16 +11395,16 @@
  "curve25519-dalek 4.0.0-rc.0",
  "rand_core 0.6.4",
  "ring",
- "rustc_version 0.4.0",
+ "rustc_version",
  "sha2 0.10.6",
  "subtle",
 ]
 
 [[package]]
 name = "socket2"
-version = "0.4.7"
+version = "0.4.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd"
+checksum = "64a4a911eed85daf18834cfaa86a79b7d266ff93ff5ba14005426219480ed662"
 dependencies = [
  "libc",
  "winapi",
@@ -11232,7 +11430,7 @@
 [[package]]
 name = "sp-api"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "hash-db",
  "log",
@@ -11250,7 +11448,7 @@
 [[package]]
 name = "sp-api-proc-macro"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "blake2",
  "proc-macro-crate",
@@ -11262,7 +11460,7 @@
 [[package]]
 name = "sp-application-crypto"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11275,7 +11473,7 @@
 [[package]]
 name = "sp-arithmetic"
 version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "integer-sqrt",
  "num-traits",
@@ -11289,7 +11487,7 @@
 [[package]]
 name = "sp-authority-discovery"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11300,22 +11498,11 @@
 ]
 
 [[package]]
-name = "sp-authorship"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
-dependencies = [
- "async-trait",
- "parity-scale-codec",
- "sp-inherents",
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
 name = "sp-beefy"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
+ "lazy_static",
  "parity-scale-codec",
  "scale-info",
  "serde",
@@ -11326,12 +11513,13 @@
  "sp-mmr-primitives",
  "sp-runtime",
  "sp-std",
+ "strum",
 ]
 
 [[package]]
 name = "sp-block-builder"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "sp-api",
@@ -11343,11 +11531,11 @@
 [[package]]
 name = "sp-blockchain"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "log",
- "lru",
+ "lru 0.8.1",
  "parity-scale-codec",
  "parking_lot 0.12.1",
  "sp-api",
@@ -11361,7 +11549,7 @@
 [[package]]
 name = "sp-consensus"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -11379,7 +11567,7 @@
 [[package]]
 name = "sp-consensus-aura"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "parity-scale-codec",
@@ -11397,7 +11585,7 @@
 [[package]]
 name = "sp-consensus-babe"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "merlin",
@@ -11420,7 +11608,7 @@
 [[package]]
 name = "sp-consensus-slots"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11432,7 +11620,7 @@
 [[package]]
 name = "sp-consensus-vrf"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11445,12 +11633,13 @@
 [[package]]
 name = "sp-core"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "array-bytes 4.2.0",
  "base58",
  "bitflags",
  "blake2",
+ "bounded-collections",
  "dyn-clonable",
  "ed25519-zebra",
  "futures",
@@ -11487,7 +11676,7 @@
 [[package]]
 name = "sp-core-hashing"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "blake2",
  "byteorder",
@@ -11501,7 +11690,7 @@
 [[package]]
 name = "sp-core-hashing-proc-macro"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -11512,7 +11701,7 @@
 [[package]]
 name = "sp-database"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "kvdb",
  "parking_lot 0.12.1",
@@ -11521,7 +11710,7 @@
 [[package]]
 name = "sp-debug-derive"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -11531,7 +11720,7 @@
 [[package]]
 name = "sp-externalities"
 version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "environmental",
  "parity-scale-codec",
@@ -11542,7 +11731,7 @@
 [[package]]
 name = "sp-finality-grandpa"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "finality-grandpa",
  "log",
@@ -11560,11 +11749,12 @@
 [[package]]
 name = "sp-inherents"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "impl-trait-for-tuples",
  "parity-scale-codec",
+ "scale-info",
  "sp-core",
  "sp-runtime",
  "sp-std",
@@ -11574,7 +11764,7 @@
 [[package]]
 name = "sp-io"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "bytes",
  "ed25519",
@@ -11599,7 +11789,7 @@
 [[package]]
 name = "sp-keyring"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "lazy_static",
  "sp-core",
@@ -11610,7 +11800,7 @@
 [[package]]
 name = "sp-keystore"
 version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures",
@@ -11627,7 +11817,7 @@
 [[package]]
 name = "sp-maybe-compressed-blob"
 version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "thiserror",
  "zstd",
@@ -11636,7 +11826,7 @@
 [[package]]
 name = "sp-mmr-primitives"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "ckb-merkle-mountain-range",
  "log",
@@ -11654,7 +11844,7 @@
 [[package]]
 name = "sp-npos-elections"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11668,7 +11858,7 @@
 [[package]]
 name = "sp-offchain"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "sp-api",
  "sp-core",
@@ -11678,7 +11868,7 @@
 [[package]]
 name = "sp-panic-handler"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "backtrace",
  "lazy_static",
@@ -11688,7 +11878,7 @@
 [[package]]
 name = "sp-rpc"
 version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "rustc-hash",
  "serde",
@@ -11698,7 +11888,7 @@
 [[package]]
 name = "sp-runtime"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "either",
  "hash256-std-hasher",
@@ -11720,7 +11910,7 @@
 [[package]]
 name = "sp-runtime-interface"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "bytes",
  "impl-trait-for-tuples",
@@ -11738,7 +11928,7 @@
 [[package]]
 name = "sp-runtime-interface-proc-macro"
 version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "Inflector",
  "proc-macro-crate",
@@ -11750,7 +11940,7 @@
 [[package]]
 name = "sp-session"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11764,7 +11954,7 @@
 [[package]]
 name = "sp-staking"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11776,7 +11966,7 @@
 [[package]]
 name = "sp-state-machine"
 version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "hash-db",
  "log",
@@ -11796,12 +11986,12 @@
 [[package]]
 name = "sp-std"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 
 [[package]]
 name = "sp-storage"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "impl-serde",
  "parity-scale-codec",
@@ -11814,7 +12004,7 @@
 [[package]]
 name = "sp-timestamp"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "futures-timer",
@@ -11829,7 +12019,7 @@
 [[package]]
 name = "sp-tracing"
 version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "sp-std",
@@ -11841,7 +12031,7 @@
 [[package]]
 name = "sp-transaction-pool"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "sp-api",
  "sp-runtime",
@@ -11850,7 +12040,7 @@
 [[package]]
 name = "sp-transaction-storage-proof"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "log",
@@ -11866,30 +12056,30 @@
 [[package]]
 name = "sp-trie"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
- "ahash",
+ "ahash 0.8.3",
  "hash-db",
- "hashbrown",
+ "hashbrown 0.12.3",
  "lazy_static",
- "lru",
  "memory-db",
  "nohash-hasher",
  "parity-scale-codec",
  "parking_lot 0.12.1",
  "scale-info",
+ "schnellru",
  "sp-core",
  "sp-std",
  "thiserror",
  "tracing",
- "trie-db",
+ "trie-db 0.25.1",
  "trie-root",
 ]
 
 [[package]]
 name = "sp-version"
 version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "impl-serde",
  "parity-scale-codec",
@@ -11906,7 +12096,7 @@
 [[package]]
 name = "sp-version-proc-macro"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "proc-macro2",
@@ -11917,8 +12107,9 @@
 [[package]]
 name = "sp-wasm-interface"
 version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
+ "anyhow",
  "impl-trait-for-tuples",
  "log",
  "parity-scale-codec",
@@ -11930,7 +12121,7 @@
 [[package]]
 name = "sp-weights"
 version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "parity-scale-codec",
  "scale-info",
@@ -11982,9 +12173,9 @@
 
 [[package]]
 name = "ss58-registry"
-version = "1.38.0"
+version = "1.39.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e40c020d72bc0a9c5660bb71e4a6fdef081493583062c474740a7d59f55f0e7b"
+checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d"
 dependencies = [
  "Inflector",
  "num-format",
@@ -12058,19 +12249,6 @@
  "proc-macro2",
  "quote",
  "syn",
-]
-
-[[package]]
-name = "statrs"
-version = "0.15.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05"
-dependencies = [
- "approx",
- "lazy_static",
- "nalgebra",
- "num-traits",
- "rand 0.8.5",
 ]
 
 [[package]]
@@ -12144,7 +12322,7 @@
 [[package]]
 name = "substrate-build-script-utils"
 version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "platforms 2.0.0",
 ]
@@ -12152,7 +12330,7 @@
 [[package]]
 name = "substrate-frame-rpc-system"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "frame-system-rpc-runtime-api",
  "futures",
@@ -12171,7 +12349,7 @@
 [[package]]
 name = "substrate-prometheus-endpoint"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "hyper",
  "log",
@@ -12183,7 +12361,7 @@
 [[package]]
 name = "substrate-rpc-client"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "async-trait",
  "jsonrpsee",
@@ -12196,7 +12374,7 @@
 [[package]]
 name = "substrate-state-trie-migration-rpc"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "jsonrpsee",
  "log",
@@ -12209,13 +12387,13 @@
  "sp-runtime",
  "sp-state-machine",
  "sp-trie",
- "trie-db",
+ "trie-db 0.25.1",
 ]
 
 [[package]]
 name = "substrate-test-utils"
 version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "futures",
  "substrate-test-utils-derive",
@@ -12225,7 +12403,7 @@
 [[package]]
 name = "substrate-test-utils-derive"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "proc-macro-crate",
  "proc-macro2",
@@ -12236,7 +12414,7 @@
 [[package]]
 name = "substrate-wasm-builder"
 version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
  "ansi_term",
  "build-helper",
@@ -12267,9 +12445,9 @@
 
 [[package]]
 name = "syn"
-version = "1.0.107"
+version = "1.0.109"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5"
+checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -12317,22 +12495,21 @@
 
 [[package]]
 name = "target-lexicon"
-version = "0.12.5"
+version = "0.12.6"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d"
+checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5"
 
 [[package]]
 name = "tempfile"
-version = "3.3.0"
+version = "3.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4"
+checksum = "af18f7ae1acd354b992402e9ec5864359d693cd8a79dcbef59f76891701c1e95"
 dependencies = [
  "cfg-if",
  "fastrand",
- "libc",
  "redox_syscall",
- "remove_dir_all",
- "winapi",
+ "rustix",
+ "windows-sys 0.42.0",
 ]
 
 [[package]]
@@ -12360,6 +12537,7 @@
  "frame-system",
  "pallet-balances",
  "pallet-common",
+ "pallet-configuration",
  "pallet-ethereum",
  "pallet-evm",
  "pallet-evm-coder-substrate",
@@ -12378,22 +12556,23 @@
  "sp-std",
  "up-data-structs",
  "up-sponsorship",
+ "xcm",
 ]
 
 [[package]]
 name = "thiserror"
-version = "1.0.38"
+version = "1.0.39"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0"
+checksum = "a5ab016db510546d856297882807df8da66a16fb8c4101cb8b30054b0d5b2d9c"
 dependencies = [
  "thiserror-impl",
 ]
 
 [[package]]
 name = "thiserror-impl"
-version = "1.0.38"
+version = "1.0.39"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f"
+checksum = "5420d42e90af0c38c3290abcca25b9b3bdf379fc9f55c528f53a269d9c9a267e"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -12408,10 +12587,11 @@
 
 [[package]]
 name = "thread_local"
-version = "1.1.4"
+version = "1.1.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180"
+checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152"
 dependencies = [
+ "cfg-if",
  "once_cell",
 ]
 
@@ -12450,12 +12630,11 @@
 
 [[package]]
 name = "tikv-jemalloc-sys"
-version = "0.5.2+5.3.0-patched"
+version = "0.5.3+5.3.0-patched"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec45c14da997d0925c7835883e4d5c181f196fa142f8c19d7643d1e9af2592c3"
+checksum = "a678df20055b43e57ef8cddde41cdfda9a3c1a060b67f4c5836dfb1d78543ba8"
 dependencies = [
  "cc",
- "fs_extra",
  "libc",
 ]
 
@@ -12472,9 +12651,9 @@
 
 [[package]]
 name = "time"
-version = "0.3.17"
+version = "0.3.20"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376"
+checksum = "cd0cbfecb4d19b5ea75bb31ad904eb5b9fa13f21079c3b92017ebdf4999a5890"
 dependencies = [
  "itoa",
  "serde",
@@ -12490,9 +12669,9 @@
 
 [[package]]
 name = "time-macros"
-version = "0.2.6"
+version = "0.2.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2"
+checksum = "fd80a657e71da814b8e5d60d3374fc6d35045062245d80224748ae522dd76f36"
 dependencies = [
  "time-core",
 ]
@@ -12552,9 +12731,9 @@
 
 [[package]]
 name = "tokio"
-version = "1.25.0"
+version = "1.26.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af"
+checksum = "03201d01c3c27a29c8a5cee5b55a93ddae1ccf6f08f65365c2c918f8c1b76f64"
 dependencies = [
  "autocfg",
  "bytes",
@@ -12567,7 +12746,7 @@
  "signal-hook-registry",
  "socket2",
  "tokio-macros",
- "windows-sys 0.42.0",
+ "windows-sys 0.45.0",
 ]
 
 [[package]]
@@ -12594,9 +12773,9 @@
 
 [[package]]
 name = "tokio-stream"
-version = "0.1.11"
+version = "0.1.12"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d660770404473ccd7bc9f8b28494a811bc18542b915c0855c51e8f419d5223ce"
+checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313"
 dependencies = [
  "futures-core",
  "pin-project-lite 0.2.9",
@@ -12606,9 +12785,9 @@
 
 [[package]]
 name = "tokio-util"
-version = "0.7.4"
+version = "0.7.7"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740"
+checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2"
 dependencies = [
  "bytes",
  "futures-core",
@@ -12630,19 +12809,19 @@
 
 [[package]]
 name = "toml_datetime"
-version = "0.5.1"
+version = "0.6.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5"
+checksum = "3ab8ed2edee10b50132aed5f331333428b011c99402b5a534154ed15746f9622"
 
 [[package]]
 name = "toml_edit"
-version = "0.18.1"
+version = "0.19.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b"
+checksum = "9a1eb0622d28f4b9c90adc4ea4b2b46b47663fde9ac5fafcb14a1369d5508825"
 dependencies = [
  "indexmap",
- "nom8",
  "toml_datetime",
+ "winnow",
 ]
 
 [[package]]
@@ -12732,8 +12911,8 @@
 
 [[package]]
 name = "tracing-gum"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "polkadot-node-jaeger",
  "polkadot-primitives",
@@ -12743,8 +12922,8 @@
 
 [[package]]
 name = "tracing-gum-proc-macro"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "expander 0.0.6",
  "proc-macro-crate",
@@ -12804,7 +12983,19 @@
 checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908"
 dependencies = [
  "hash-db",
- "hashbrown",
+ "hashbrown 0.12.3",
+ "log",
+ "smallvec",
+]
+
+[[package]]
+name = "trie-db"
+version = "0.25.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920"
+dependencies = [
+ "hash-db",
+ "hashbrown 0.13.2",
  "log",
  "rustc-hex",
  "smallvec",
@@ -12884,8 +13075,9 @@
 [[package]]
 name = "try-runtime-cli"
 version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37#946507ba9ef13e263534176b7b74e26fc56efbd4"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
 dependencies = [
+ "async-trait",
  "clap",
  "frame-remote-externalities",
  "frame-try-runtime",
@@ -12898,14 +13090,19 @@
  "serde",
  "serde_json",
  "sp-api",
+ "sp-consensus-aura",
+ "sp-consensus-babe",
  "sp-core",
  "sp-debug-derive",
  "sp-externalities",
+ "sp-inherents",
  "sp-io",
  "sp-keystore",
  "sp-rpc",
  "sp-runtime",
  "sp-state-machine",
+ "sp-timestamp",
+ "sp-transaction-storage-proof",
  "sp-version",
  "sp-weights",
  "substrate-rpc-client",
@@ -12979,7 +13176,7 @@
  "sp-runtime",
  "sp-state-machine",
  "sp-trie",
- "trie-db",
+ "trie-db 0.24.0",
  "unique-runtime",
  "up-common",
  "up-data-structs",
@@ -13008,15 +13205,15 @@
 
 [[package]]
 name = "unicode-bidi"
-version = "0.3.10"
+version = "0.3.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58"
+checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c"
 
 [[package]]
 name = "unicode-ident"
-version = "1.0.6"
+version = "1.0.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc"
+checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4"
 
 [[package]]
 name = "unicode-normalization"
@@ -13041,7 +13238,7 @@
 
 [[package]]
 name = "unique-node"
-version = "0.9.37"
+version = "0.9.39"
 dependencies = [
  "app-promotion-rpc",
  "clap",
@@ -13147,7 +13344,7 @@
 
 [[package]]
 name = "unique-runtime"
-version = "0.9.37"
+version = "0.9.39"
 dependencies = [
  "app-promotion-rpc",
  "cumulus-pallet-aura-ext",
@@ -13202,7 +13399,6 @@
  "pallet-maintenance",
  "pallet-nonfungible",
  "pallet-preimage",
- "pallet-randomness-collective-flip",
  "pallet-refungible",
  "pallet-session",
  "pallet-structure",
@@ -13257,6 +13453,16 @@
 ]
 
 [[package]]
+name = "universal-hash"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "7d3160b73c9a19f7e2939a2fdad446c57c1bbbbf4d919d3213ff1267a580d8b5"
+dependencies = [
+ "crypto-common",
+ "subtle",
+]
+
+[[package]]
 name = "unsigned-varint"
 version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -13276,7 +13482,7 @@
 
 [[package]]
 name = "up-common"
-version = "0.9.37"
+version = "0.9.39"
 dependencies = [
  "cumulus-primitives-core",
  "fp-rpc",
@@ -13335,7 +13541,7 @@
 [[package]]
 name = "up-sponsorship"
 version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.37#72931fde262ecc4418928dd4bbeea10c64593175"
+source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.39#7e74e3937a2c08bf29a00084a5c2f1ca6676d87a"
 dependencies = [
  "impl-trait-for-tuples",
 ]
@@ -13525,9 +13731,9 @@
 
 [[package]]
 name = "wasm-opt"
-version = "0.110.2"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b68e8037b4daf711393f4be2056246d12d975651b14d581520ad5d1f19219cec"
+checksum = "84a303793cbc01fb96551badfc7367db6007396bba6bac97936b3c8b6f7fdb41"
 dependencies = [
  "anyhow",
  "libc",
@@ -13541,9 +13747,9 @@
 
 [[package]]
 name = "wasm-opt-cxx-sys"
-version = "0.110.2"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "91adbad477e97bba3fbd21dd7bfb594e7ad5ceb9169ab1c93ab9cb0ada636b6f"
+checksum = "d9c9deb56f8a9f2ec177b3bd642a8205621835944ed5da55f2388ef216aca5a4"
 dependencies = [
  "anyhow",
  "cxx",
@@ -13553,9 +13759,9 @@
 
 [[package]]
 name = "wasm-opt-sys"
-version = "0.110.2"
+version = "0.111.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ec4fa5a322a4e6ac22fd141f498d56afbdbf9df5debeac32380d2dcaa3e06941"
+checksum = "4432e28b542738a9776cedf92e8a99d8991c7b4667ee2c7ccddfb479dd2856a7"
 dependencies = [
  "anyhow",
  "cc",
@@ -13610,22 +13816,24 @@
  "memory_units",
  "num-rational",
  "num-traits",
+ "region",
 ]
 
 [[package]]
 name = "wasmparser"
-version = "0.89.1"
+version = "0.100.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef"
+checksum = "64b20236ab624147dfbb62cf12a19aaf66af0e41b8398838b66e997d07d269d4"
 dependencies = [
  "indexmap",
+ "url",
 ]
 
 [[package]]
 name = "wasmtime"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731"
+checksum = "f6e89f9819523447330ffd70367ef4a18d8c832e24e8150fe054d1d912841632"
 dependencies = [
  "anyhow",
  "bincode",
@@ -13646,23 +13854,23 @@
  "wasmtime-environ",
  "wasmtime-jit",
  "wasmtime-runtime",
- "windows-sys 0.36.1",
+ "windows-sys 0.42.0",
 ]
 
 [[package]]
 name = "wasmtime-asm-macros"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597"
+checksum = "9bd3a5e46c198032da934469f3a6e48649d1f9142438e4fd4617b68a35644b8a"
 dependencies = [
  "cfg-if",
 ]
 
 [[package]]
 name = "wasmtime-cache"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bcd849399d17d2270141cfe47fa0d91ee52d5f8ea9b98cf7ddde0d53e5f79882"
+checksum = "b389ae9b678b9c3851091a4804f4182d688d27aff7abc9aa37fa7be37d8ecffa"
 dependencies = [
  "anyhow",
  "base64 0.13.1",
@@ -13670,19 +13878,19 @@
  "directories-next",
  "file-per-thread-logger",
  "log",
- "rustix 0.35.13",
+ "rustix",
  "serde",
- "sha2 0.9.9",
+ "sha2 0.10.6",
  "toml",
- "windows-sys 0.36.1",
+ "windows-sys 0.42.0",
  "zstd",
 ]
 
 [[package]]
 name = "wasmtime-cranelift"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4bd91339b742ff20bfed4532a27b73c86b5bcbfedd6bea2dcdf2d64471e1b5c6"
+checksum = "59b2c92a08c0db6efffd88fdc97d7aa9c7c63b03edb0971dbca745469f820e8c"
 dependencies = [
  "anyhow",
  "cranelift-codegen",
@@ -13701,9 +13909,9 @@
 
 [[package]]
 name = "wasmtime-environ"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644"
+checksum = "9a6db9fc52985ba06ca601f2ff0ff1f526c5d724c7ac267b47326304b0c97883"
 dependencies = [
  "anyhow",
  "cranelift-entity",
@@ -13720,9 +13928,9 @@
 
 [[package]]
 name = "wasmtime-jit"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681"
+checksum = "b77e3a52cd84d0f7f18554afa8060cfe564ccac61e3b0802d3fd4084772fa5f6"
 dependencies = [
  "addr2line 0.17.0",
  "anyhow",
@@ -13733,32 +13941,42 @@
  "log",
  "object 0.29.0",
  "rustc-demangle",
- "rustix 0.35.13",
  "serde",
  "target-lexicon",
- "thiserror",
  "wasmtime-environ",
  "wasmtime-jit-debug",
+ "wasmtime-jit-icache-coherence",
  "wasmtime-runtime",
- "windows-sys 0.36.1",
+ "windows-sys 0.42.0",
 ]
 
 [[package]]
 name = "wasmtime-jit-debug"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731"
+checksum = "d0245e8a9347017c7185a72e215218a802ff561545c242953c11ba00fccc930f"
 dependencies = [
  "object 0.29.0",
  "once_cell",
- "rustix 0.35.13",
+ "rustix",
 ]
 
 [[package]]
+name = "wasmtime-jit-icache-coherence"
+version = "6.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "67d412e9340ab1c83867051d8d1d7c90aa8c9afc91da086088068e2734e25064"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
 name = "wasmtime-runtime"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd"
+checksum = "d594e791b5fdd4dbaf8cf7ae62f2e4ff85018ce90f483ca6f42947688e48827d"
 dependencies = [
  "anyhow",
  "cc",
@@ -13771,19 +13989,18 @@
  "memoffset 0.6.5",
  "paste",
  "rand 0.8.5",
- "rustix 0.35.13",
- "thiserror",
+ "rustix",
  "wasmtime-asm-macros",
  "wasmtime-environ",
  "wasmtime-jit-debug",
- "windows-sys 0.36.1",
+ "windows-sys 0.42.0",
 ]
 
 [[package]]
 name = "wasmtime-types"
-version = "1.0.2"
+version = "6.0.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb"
+checksum = "a6688d6f96d4dbc1f89fab626c56c1778936d122b5f4ae7a57c2eb42b8d982e2"
 dependencies = [
  "cranelift-entity",
  "serde",
@@ -13856,7 +14073,7 @@
  "sha2 0.10.6",
  "stun",
  "thiserror",
- "time 0.3.17",
+ "time 0.3.20",
  "tokio",
  "turn",
  "url",
@@ -13888,22 +14105,22 @@
 
 [[package]]
 name = "webrtc-dtls"
-version = "0.7.0"
+version = "0.7.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7021987ae0a2ed6c8cd33f68e98e49bb6e74ffe9543310267b48a1bbe3900e5f"
+checksum = "942be5bd85f072c3128396f6e5a9bfb93ca8c1939ded735d177b7bcba9a13d05"
 dependencies = [
  "aes 0.6.0",
- "aes-gcm 0.8.0",
+ "aes-gcm 0.10.1",
  "async-trait",
  "bincode",
  "block-modes",
  "byteorder",
  "ccm",
  "curve25519-dalek 3.2.0",
- "der-parser 8.1.0",
+ "der-parser 8.2.0",
  "elliptic-curve",
  "hkdf",
- "hmac 0.10.1",
+ "hmac 0.12.1",
  "log",
  "oid-registry 0.6.1",
  "p256",
@@ -13915,8 +14132,8 @@
  "rustls 0.19.1",
  "sec1",
  "serde",
- "sha-1",
- "sha2 0.9.9",
+ "sha1",
+ "sha2 0.10.6",
  "signature",
  "subtle",
  "thiserror",
@@ -13929,9 +14146,9 @@
 
 [[package]]
 name = "webrtc-ice"
-version = "0.9.0"
+version = "0.9.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "494483fbb2f5492620871fdc78b084aed8807377f6e3fe88b2e49f0a9c9c41d7"
+checksum = "465a03cc11e9a7d7b4f9f99870558fe37a102b65b93f8045392fef7c67b39e80"
 dependencies = [
  "arc-swap",
  "async-trait",
@@ -14035,26 +14252,17 @@
  "lazy_static",
  "libc",
  "log",
- "nix",
+ "nix 0.24.3",
  "rand 0.8.5",
  "thiserror",
  "tokio",
  "winapi",
-]
-
-[[package]]
-name = "wepoll-ffi"
-version = "0.1.2"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb"
-dependencies = [
- "cc",
 ]
 
 [[package]]
 name = "westend-runtime"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "bitvec",
  "frame-benchmarking",
@@ -14079,7 +14287,7 @@
  "pallet-elections-phragmen",
  "pallet-fast-unstake",
  "pallet-grandpa",
- "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.37)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39)",
  "pallet-im-online",
  "pallet-indices",
  "pallet-membership",
@@ -14098,6 +14306,8 @@
  "pallet-society",
  "pallet-staking",
  "pallet-staking-reward-curve",
+ "pallet-staking-runtime-api",
+ "pallet-state-trie-migration",
  "pallet-sudo",
  "pallet-timestamp",
  "pallet-transaction-payment",
@@ -14143,8 +14353,8 @@
 
 [[package]]
 name = "westend-runtime-constants"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-support",
  "polkadot-primitives",
@@ -14167,6 +14377,16 @@
 ]
 
 [[package]]
+name = "wide"
+version = "0.7.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b689b6c49d6549434bf944e6b0f39238cf63693cb7a147e9d887507fffa3b223"
+dependencies = [
+ "bytemuck",
+ "safe_arch",
+]
+
+[[package]]
 name = "widestring"
 version = "0.5.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -14218,19 +14438,6 @@
 
 [[package]]
 name = "windows-sys"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2"
-dependencies = [
- "windows_aarch64_msvc 0.36.1",
- "windows_i686_gnu 0.36.1",
- "windows_i686_msvc 0.36.1",
- "windows_x86_64_gnu 0.36.1",
- "windows_x86_64_msvc 0.36.1",
-]
-
-[[package]]
-name = "windows-sys"
 version = "0.42.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7"
@@ -14282,12 +14489,6 @@
 
 [[package]]
 name = "windows_aarch64_msvc"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47"
-
-[[package]]
-name = "windows_aarch64_msvc"
 version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7"
@@ -14300,12 +14501,6 @@
 
 [[package]]
 name = "windows_i686_gnu"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6"
-
-[[package]]
-name = "windows_i686_gnu"
 version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640"
@@ -14318,12 +14513,6 @@
 
 [[package]]
 name = "windows_i686_msvc"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024"
-
-[[package]]
-name = "windows_i686_msvc"
 version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605"
@@ -14333,12 +14522,6 @@
 version = "0.34.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4"
-
-[[package]]
-name = "windows_x86_64_gnu"
-version = "0.36.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1"
 
 [[package]]
 name = "windows_x86_64_gnu"
@@ -14360,15 +14543,18 @@
 
 [[package]]
 name = "windows_x86_64_msvc"
-version = "0.36.1"
+version = "0.42.1"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680"
+checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
 
 [[package]]
-name = "windows_x86_64_msvc"
-version = "0.42.1"
+name = "winnow"
+version = "0.3.5"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd"
+checksum = "ee7b2c67f962bf5042bfd8b6a916178df33a26eec343ae064cb8e069f638fa6f"
+dependencies = [
+ "memchr",
+]
 
 [[package]]
 name = "winreg"
@@ -14426,7 +14612,7 @@
  "ring",
  "rusticata-macros",
  "thiserror",
- "time 0.3.17",
+ "time 0.3.20",
 ]
 
 [[package]]
@@ -14435,39 +14621,42 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8"
 dependencies = [
- "asn1-rs 0.5.1",
+ "asn1-rs 0.5.2",
  "base64 0.13.1",
  "data-encoding",
- "der-parser 8.1.0",
+ "der-parser 8.2.0",
  "lazy_static",
  "nom",
  "oid-registry 0.6.1",
  "rusticata-macros",
  "thiserror",
- "time 0.3.17",
+ "time 0.3.20",
 ]
 
 [[package]]
 name = "xcm"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
+ "bounded-collections",
  "derivative",
  "impl-trait-for-tuples",
  "log",
  "parity-scale-codec",
  "scale-info",
- "sp-runtime",
+ "serde",
+ "sp-weights",
  "xcm-procedural",
 ]
 
 [[package]]
 name = "xcm-builder"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "frame-support",
  "frame-system",
+ "impl-trait-for-tuples",
  "log",
  "pallet-transaction-payment",
  "parity-scale-codec",
@@ -14483,9 +14672,10 @@
 
 [[package]]
 name = "xcm-executor"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
+ "environmental",
  "frame-benchmarking",
  "frame-support",
  "impl-trait-for-tuples",
@@ -14496,13 +14686,14 @@
  "sp-io",
  "sp-runtime",
  "sp-std",
+ "sp-weights",
  "xcm",
 ]
 
 [[package]]
 name = "xcm-procedural"
-version = "0.9.37"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.37#645723987cf9662244be8faf4e9b63e8b9a1b3a3"
+version = "0.9.39-1"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#298b4aefe1b07b864b6ef7ede041d73f6a0a7f93"
 dependencies = [
  "Inflector",
  "proc-macro2",
@@ -14530,7 +14721,7 @@
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "aed2e7a52e3744ab4d0c05c20aa065258e84c49fd4226f5191b2ed29712710b4"
 dependencies = [
- "time 0.3.17",
+ "time 0.3.20",
 ]
 
 [[package]]
@@ -14575,9 +14766,9 @@
 
 [[package]]
 name = "zstd-sys"
-version = "2.0.6+zstd.1.5.2"
+version = "2.0.7+zstd.1.5.4"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "68a3f9792c0c3dc6c165840a75f47ae1f4da402c2d006881129579f6597e801b"
+checksum = "94509c3ba2fe55294d752b79842c530ccfab760192521df74a081a78d2b3c7f5"
 dependencies = [
  "cc",
  "libc",
modifiedCargo.tomldiffbeforeafterboth
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@
 	'runtime/tests',
 	'runtime/unique',
 ]
-package.version = "0.9.37"
+package.version = "0.9.39"
 resolver = "2"
 
 [profile.release]
@@ -29,7 +29,7 @@
 app-promotion-rpc = { path = "primitives/app_promotion_rpc", default-features = false }
 evm-coder = { git = "https://github.com/uniquenetwork/evm-coder", tag = "v0.3.1", default-features = false }
 pallet-app-promotion = { path = "pallets/app-promotion", default-features = false }
-pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.37" }
+pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
 pallet-collator-selection = { default-features = false, path = "pallets/collator-selection" }
 pallet-common = { default-features = false, path = "pallets/common" }
 pallet-configuration = { default-features = false, path = "pallets/configuration" }
@@ -56,7 +56,7 @@
 up-data-structs = { path = "primitives/data-structs", default-features = false }
 up-pov-estimate-rpc = { path = "primitives/pov-estimate-rpc", default-features = false }
 up-rpc = { path = "primitives/rpc", default-features = false }
-up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.37" }
+up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
 
 # Unique: Runtimes
 opal-runtime = { path = "runtime/opal" }
@@ -64,124 +64,123 @@
 unique-runtime = { path = "runtime/unique" }
 
 # Frontier (Unique patches over the Parity version)
-fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
+fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
 
 # Parity
 codec = { default-features = false, features = ['derive'], package = 'parity-scale-codec', version = "3.2.2" }
-cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-pallet-aura-ext = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-pallet-dmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-pallet-parachain-system = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-pallet-xcm = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-pallet-xcmp-queue = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-primitives-core = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-primitives-timestamp = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-primitives-utility = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37", default-features = false }
-cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-randomness-collective-flip = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
-parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.37" }
-polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
-polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
-polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
-polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37" }
-sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+cumulus-client-cli = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-client-consensus-aura = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-client-consensus-common = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-client-network = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-client-service = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-pallet-aura-ext = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-pallet-dmp-queue = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-pallet-parachain-system = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-pallet-xcm = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-pallet-xcmp-queue = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-primitives-core = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-primitives-parachain-inherent = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-primitives-timestamp = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-primitives-utility = { default-features = false , git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-relay-chain-inprocess-interface = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-relay-chain-interface = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+cumulus-relay-chain-minimal-node = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39", default-features = false }
+parachain-info = { default-features = false, git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39", default-features = false }
+polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-finality-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 scale-info = { version = "2.1.1", default-features = false, features = ["derive"] }
-sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
-xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
-xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.37", default-features = false }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39", default-features = false }
+xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39", default-features = false }
+xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39", default-features = false }
 
 # Parity: Build utils
-substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
 # Parity: Benchmarking
-frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
 # Parity: Try Runtime
-frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
 # ORML
-orml-tokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.37", default-features = false }
-orml-traits = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.37", default-features = false }
-orml-vesting = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.37", default-features = false }
-orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.37", default-features = false }
+orml-tokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }
+orml-traits = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }
+orml-vesting = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }
+orml-xtokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "unique-polkadot-v0.9.39" }
 
 # Other
 derivative = { version = "2.2.0", features = ["use_core"] }
modifiedMakefilediffbeforeafterboth
--- a/Makefile
+++ b/Makefile
@@ -82,8 +82,8 @@
 	cargo run --release --features runtime-benchmarks,$(RUNTIME) -- \
 	benchmark pallet --pallet pallet-$(if $(PALLET),$(PALLET),$(error Must set PALLET)) \
 	--wasm-execution compiled --extrinsic '*' \
-	--template .maintain/frame-weight-template.hbs --steps=50 --repeat=80 --heap-pages=4096 \
-	--output=./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs
+	$(if $(TEMPLATE),$(TEMPLATE),--template=.maintain/frame-weight-template.hbs) --steps=50 --repeat=80 --heap-pages=4096 \
+	--output=$(if $(OUTPUT),$(OUTPUT),./pallets/$(if $(PALLET_DIR),$(PALLET_DIR),$(PALLET))/src/weights.rs)
 
 .PHONY: bench-evm-migration
 bench-evm-migration:
@@ -135,15 +135,19 @@
 
 .PHONY: bench-app-promotion
 bench-app-promotion:
-	make _bench PALLET=app-promotion PALLET_DIR=app-promotion
+	make _bench PALLET=app-promotion
 
 .PHONY: bench-maintenance
 bench-maintenance:
 	make _bench PALLET=maintenance
 
+.PHONY: bench-xcm
+bench-xcm:
+	make _bench PALLET=xcm OUTPUT=./runtime/common/weights/xcm.rs TEMPLATE="--template=.maintain/external-weight-template.hbs"
+
 .PHONY: bench
 # Disabled: bench-scheduler, bench-collator-selection, bench-identity
-bench: bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance
+bench: bench-common bench-evm-migration bench-unique bench-structure bench-fungible bench-refungible bench-nonfungible bench-configuration bench-foreign-assets bench-maintenance bench-xcm
 
 .PHONY: check
 check:
modifiedREADME.mddiffbeforeafterboth
--- a/README.md
+++ b/README.md
@@ -90,7 +90,7 @@
 ```
 git clone https://github.com/paritytech/polkadot.git
 cd polkadot
-git checkout release-v0.9.37
+git checkout release-v0.9.39
 cargo build --release
 ```
 
modifiedclient/rpc/src/lib.rsdiffbeforeafterboth
--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -28,7 +28,7 @@
 	RpcCollection, CollectionId, CollectionStats, CollectionLimits, TokenId, Property,
 	PropertyKeyPermission, TokenData, TokenChild,
 };
-use sp_api::{BlockId, BlockT, ProvideRuntimeApi, ApiExt};
+use sp_api::{BlockT, ProvideRuntimeApi, ApiExt};
 use sp_blockchain::HeaderBackend;
 use up_rpc::UniqueApi as UniqueRuntimeApi;
 use app_promotion_rpc::AppPromotionApi as AppPromotionRuntimeApi;
@@ -342,9 +342,9 @@
 			at: Option<<Block as BlockT>::Hash>,
 		) -> Result<$result> {
 			let api = self.client.runtime_api();
-			let at = BlockId::hash(at.unwrap_or_else(|| self.client.info().best_hash));
+			let at = at.unwrap_or_else(|| self.client.info().best_hash);
 			let _api_version = if let Ok(Some(api_version)) =
-				api.api_version::<$runtime_api_macro!()>(&at)
+				api.api_version::<$runtime_api_macro!()>(at)
 			{
 				api_version
 			} else {
@@ -353,9 +353,9 @@
 			};
 
 			let result = $(if _api_version < $ver {
-				api.$changed_method_name(&at, $($changed_name),*).map(|r| r.map($fixer))
+				api.$changed_method_name(at, $($changed_name),*).map(|r| r.map($fixer))
 			} else)*
-			{ api.$method_name(&at, $($((|$map_arg: $ty| $map))? ($name)),*) };
+			{ api.$method_name(at, $($((|$map_arg: $ty| $map))? ($name)),*) };
 
 			Ok(result
 				.map_err(|e| anyhow!("unable to query: {e}"))?
modifiednode/cli/src/chain_spec.rsdiffbeforeafterboth
--- a/node/cli/src/chain_spec.rs
+++ b/node/cli/src/chain_spec.rs
@@ -202,6 +202,9 @@
 				accounts: BTreeMap::new(),
 			},
 			ethereum: EthereumConfig {},
+			foreign_assets: Default::default(),
+			polkadot_xcm: Default::default(),
+			transaction_payment: Default::default(),
 		}
 	}};
 }
@@ -252,6 +255,9 @@
 				accounts: BTreeMap::new(),
 			},
 			ethereum: EthereumConfig {},
+			foreign_assets: Default::default(),
+			polkadot_xcm: Default::default(),
+			transaction_payment: Default::default(),
 		}
 	}};
 }
modifiednode/cli/src/service.rsdiffbeforeafterboth
--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -469,7 +469,7 @@
 			block_announce_validator_builder: Some(Box::new(|_| {
 				Box::new(block_announce_validator)
 			})),
-			warp_sync: None,
+			warp_sync_params: None,
 		})?;
 
 	let rpc_client = client.clone();
@@ -495,6 +495,7 @@
 			Duration::new(6, 0),
 			client.clone(),
 			backend.clone(),
+			overrides_handle::<_, _, Runtime>(client.clone()),
 			frontier_backend.clone(),
 			3,
 			0,
@@ -587,6 +588,10 @@
 
 	let relay_chain_slot_duration = Duration::from_secs(6);
 
+	let overseer_handle = relay_chain_interface
+		.overseer_handle()
+		.map_err(|e| sc_service::Error::Application(Box::new(e)))?;
+
 	if validator {
 		let parachain_consensus = build_consensus(
 			client.clone(),
@@ -615,6 +620,7 @@
 			collator_key: collator_key.expect("Command line arguments do not allow this. qed"),
 			relay_chain_interface,
 			relay_chain_slot_duration,
+			recovery_handle: Box::new(overseer_handle),
 		};
 
 		start_collator(params).await?;
@@ -627,6 +633,7 @@
 			import_queue: import_queue_service,
 			relay_chain_interface,
 			relay_chain_slot_duration,
+			recovery_handle: Box::new(overseer_handle),
 		};
 
 		start_full_node(params)?;
@@ -900,7 +907,7 @@
 			spawn_handle: task_manager.spawn_handle(),
 			import_queue,
 			block_announce_validator_builder: None,
-			warp_sync: None,
+			warp_sync_params: None,
 		})?;
 
 	if config.offchain_worker.enabled {
@@ -1016,6 +1023,7 @@
 			Duration::new(6, 0),
 			client.clone(),
 			backend.clone(),
+			overrides_handle::<_, _, Runtime>(client.clone()),
 			frontier_backend.clone(),
 			3,
 			0,
modifiednode/rpc/src/lib.rsdiffbeforeafterboth
--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -115,18 +115,15 @@
 	let mut overrides_map = BTreeMap::new();
 	overrides_map.insert(
 		EthereumStorageSchema::V1,
-		Box::new(SchemaV1Override::new(client.clone()))
-			as Box<dyn StorageOverride<_> + Send + Sync>,
+		Box::new(SchemaV1Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
 	);
 	overrides_map.insert(
 		EthereumStorageSchema::V2,
-		Box::new(SchemaV2Override::new(client.clone()))
-			as Box<dyn StorageOverride<_> + Send + Sync>,
+		Box::new(SchemaV2Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
 	);
 	overrides_map.insert(
 		EthereumStorageSchema::V3,
-		Box::new(SchemaV3Override::new(client.clone()))
-			as Box<dyn StorageOverride<_> + Send + Sync>,
+		Box::new(SchemaV3Override::new(client.clone())) as Box<dyn StorageOverride<_> + 'static>,
 	);
 
 	Arc::new(OverrideHandle {
modifiedpallets/app-promotion/Cargo.tomldiffbeforeafterboth
--- a/pallets/app-promotion/Cargo.toml
+++ b/pallets/app-promotion/Cargo.toml
@@ -69,4 +69,4 @@
 ################################################################################
 # Other
 
-log = { version = "0.4.16", default-features = false }
\ No newline at end of file
+log = { version = "0.4.16", default-features = false }
modifiedpallets/collator-selection/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/benchmarking.rs
+++ b/pallets/collator-selection/src/benchmarking.rs
@@ -119,8 +119,11 @@
 		.collect::<Vec<_>>();
 
 	for who in candidates {
-		<CollatorSelection<T>>::add_invulnerable(T::UpdateOrigin::successful_origin(), who)
-			.unwrap();
+		<CollatorSelection<T>>::add_invulnerable(
+			T::UpdateOrigin::try_successful_origin().unwrap(),
+			who,
+		)
+		.unwrap();
 	}
 }
 
@@ -178,7 +181,7 @@
 			Vec::new()
 		).unwrap();
 
-		let root_origin = T::UpdateOrigin::successful_origin();
+		let root_origin = T::UpdateOrigin::try_successful_origin().unwrap();
 	}: {
 		assert_ok!(
 			<CollatorSelection<T>>::add_invulnerable(root_origin, new_invulnerable.clone())
@@ -193,7 +196,7 @@
 		register_validators::<T>(b);
 		register_invulnerables::<T>(b);
 
-		let root_origin = T::UpdateOrigin::successful_origin();
+		let root_origin = T::UpdateOrigin::try_successful_origin().unwrap();
 		let leaving = <Invulnerables<T>>::get().last().unwrap().clone();
 		whitelist!(leaving);
 	}: {
@@ -304,7 +307,7 @@
 
 		let leaving = <Candidates<T>>::get().last().unwrap().clone();
 		whitelist!(leaving);
-		let origin = T::UpdateOrigin::successful_origin();
+		let origin = T::UpdateOrigin::try_successful_origin().unwrap();
 	}: {
 		assert_ok!(
 			<CollatorSelection<T>>::force_release_license(origin, leaving.clone())
modifiedpallets/collator-selection/src/lib.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/lib.rs
+++ b/pallets/collator-selection/src/lib.rs
@@ -609,10 +609,6 @@
 				DispatchClass::Mandatory,
 			);
 		}
-
-		fn note_uncle(_author: T::AccountId, _age: T::BlockNumber) {
-			//TODO can we ignore this?
-		}
 	}
 
 	/// Play the role of the session manager.
modifiedpallets/collator-selection/src/mock.rsdiffbeforeafterboth
--- a/pallets/collator-selection/src/mock.rs
+++ b/pallets/collator-selection/src/mock.rs
@@ -62,7 +62,7 @@
 		Aura: pallet_aura::{Pallet, Storage, Config<T>},
 		Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
 		CollatorSelection: collator_selection::{Pallet, Call, Storage, Event<T>},
-		Authorship: pallet_authorship::{Pallet, Call, Storage, Inherent},
+		Authorship: pallet_authorship::{Pallet, Storage},
 		Configuration: pallet_configuration::{Pallet, Call, Storage, Event<T>},
 	}
 );
@@ -128,8 +128,6 @@
 
 impl pallet_authorship::Config for Test {
 	type FindAuthor = Author4;
-	type UncleGenerations = ();
-	type FilterUncle = ();
 	type EventHandler = CollatorSelection;
 }
 
modifiedpallets/common/src/lib.rsdiffbeforeafterboth
before · pallets/common/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Common pallet18//!19//! The Common pallet provides functionality for handling collections.20//!21//! ## Overview22//!23//! The Common pallet provides an interface for common collection operations for different collection types24//! (see [CommonCollectionOperations]), as well as a generic dispatcher for these, see [dispatch] module.25//! It also provides this functionality to EVM, see [erc] and [eth] modules.26//!27//! The Common pallet provides functions for:28//!29//! - Setting and approving collection sponsor.30//! - Get\set\delete allow list.31//! - Get\set\delete collection properties.32//! - Get\set\delete collection property permissions.33//! - Get\set\delete token property permissions.34//! - Get\set\delete collection administrators.35//! - Checking access permissions.36//!37//! ### Terminology38//! **Collection sponsor** - For the collection, you can set a sponsor, at whose expense it will39//! be possible to mint tokens.40//!41//! **Allow list** - List of users who have the right to minting tokens.42//!43//! **Collection properties** - Collection properties are simply key-value stores where various44//! metadata can be placed.45//!46//! **Permissions on token properties** - For each property in the token can be set permission47//! to change, see [`PropertyPermission`].48//!49//! **Collection administrator** - For a collection, you can set administrators who have the right50//! to most actions on the collection.5152#![warn(missing_docs)]53#![cfg_attr(not(feature = "std"), no_std)]54extern crate alloc;5556use core::{57	ops::{Deref, DerefMut},58	slice::from_ref,59};60use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};61use sp_std::vec::Vec;62use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};63use evm_coder::ToLog;64use frame_support::{65	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},66	ensure,67	traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},68	dispatch::Pays,69	transactional, fail,70};71use pallet_evm::GasWeightMapping;72use up_data_structs::{73	AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionFlags,74	RpcCollectionFlags, CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH,75	COLLECTION_ADMINS_LIMIT, TokenId, TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP,76	CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,77	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,78	CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit, budget::Budget,79	PhantomType, Property, Properties, PropertiesPermissionMap, PropertyKey, PropertyValue,80	PropertyPermission, PropertiesError, TokenOwnerError, PropertyKeyPermission, TokenData,81	TrySetProperty, PropertyScope, CollectionPermissions,82};83use up_pov_estimate_rpc::PovInfo;8485pub use pallet::*;86use sp_core::H160;87use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};8889#[cfg(feature = "runtime-benchmarks")]90pub mod benchmarking;91pub mod dispatch;92pub mod erc;93pub mod eth;94pub mod weights;9596/// Weight info.97pub type SelfWeightOf<T> = <T as Config>::WeightInfo;9899/// Collection handle contains information about collection data and id.100/// Also provides functionality to count consumed gas.101///102/// CollectionHandle is used as a generic wrapper for collections of all types.103/// It allows to perform common operations and queries on any collection type,104/// both completely general for all, as well as their respective implementations of [`CommonCollectionOperations`].105#[must_use = "Should call submit_logs or save, otherwise some data will be lost for evm side"]106pub struct CollectionHandle<T: Config> {107	/// Collection id108	pub id: CollectionId,109	collection: Collection<T::AccountId>,110	/// Substrate recorder for counting consumed gas111	pub recorder: SubstrateRecorder<T>,112}113114impl<T: Config> WithRecorder<T> for CollectionHandle<T> {115	fn recorder(&self) -> &SubstrateRecorder<T> {116		&self.recorder117	}118	fn into_recorder(self) -> SubstrateRecorder<T> {119		self.recorder120	}121}122123impl<T: Config> CollectionHandle<T> {124	/// Same as [CollectionHandle::new] but with an explicit gas limit.125	pub fn new_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {126		<CollectionById<T>>::get(id).map(|collection| Self {127			id,128			collection,129			recorder: SubstrateRecorder::new(gas_limit),130		})131	}132133	/// Same as [CollectionHandle::new] but with an existed [`SubstrateRecorder`].134	pub fn new_with_recorder(id: CollectionId, recorder: SubstrateRecorder<T>) -> Option<Self> {135		<CollectionById<T>>::get(id).map(|collection| Self {136			id,137			collection,138			recorder,139		})140	}141142	/// Retrives collection data from storage and creates collection handle with default parameters.143	/// If collection not found return `None`144	pub fn new(id: CollectionId) -> Option<Self> {145		Self::new_with_gas_limit(id, u64::MAX)146	}147148	/// Same as [`CollectionHandle::new`] but if collection not found [CollectionNotFound](Error::CollectionNotFound) returned.149	pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {150		Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)151	}152153	/// Consume gas for reading.154	pub fn consume_store_reads(155		&self,156		reads: u64,157	) -> pallet_evm_coder_substrate::execution::Result<()> {158		self.recorder159			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(160				<T as frame_system::Config>::DbWeight::get()161					.read162					.saturating_mul(reads),163			)))164	}165166	/// Consume gas for writing.167	pub fn consume_store_writes(168		&self,169		writes: u64,170	) -> pallet_evm_coder_substrate::execution::Result<()> {171		self.recorder172			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(173				<T as frame_system::Config>::DbWeight::get()174					.write175					.saturating_mul(writes),176			)))177	}178179	/// Consume gas for reading and writing.180	pub fn consume_store_reads_and_writes(181		&self,182		reads: u64,183		writes: u64,184	) -> pallet_evm_coder_substrate::execution::Result<()> {185		let weight = <T as frame_system::Config>::DbWeight::get();186		let reads = weight.read.saturating_mul(reads);187		let writes = weight.read.saturating_mul(writes);188		self.recorder189			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(190				reads.saturating_add(writes),191			)))192	}193194	/// Save collection to storage.195	pub fn save(&self) -> DispatchResult {196		<CollectionById<T>>::insert(self.id, &self.collection);197		Ok(())198	}199200	/// Set collection sponsor.201	///202	/// Unique collections allows sponsoring for certain actions.203	/// This method allows you to set the sponsor of the collection.204	/// In order for sponsorship to become active, it must be confirmed through [`Self::confirm_sponsorship`].205	pub fn set_sponsor(206		&mut self,207		sender: &T::CrossAccountId,208		sponsor: T::AccountId,209	) -> DispatchResult {210		self.check_is_internal()?;211		self.check_is_owner_or_admin(sender)?;212213		self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor.clone());214215		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor));216		<PalletEvm<T>>::deposit_log(217			erc::CollectionHelpersEvents::CollectionChanged {218				collection_id: eth::collection_id_to_address(self.id),219			}220			.to_log(T::ContractAddress::get()),221		);222223		self.save()224	}225226	/// Force set `sponsor`.227	///228	/// Differs from [`set_sponsor`][`Self::set_sponsor`] in that confirmation229	/// from the `sponsor` is not required.230	///231	/// # Arguments232	///233	/// * `sender`: Caller's account.234	/// * `sponsor`: ID of the account of the sponsor-to-be.235	pub fn force_set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult {236		self.check_is_internal()?;237238		self.collection.sponsorship = SponsorshipState::Confirmed(sponsor.clone());239240		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor.clone()));241		<Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sponsor));242		<PalletEvm<T>>::deposit_log(243			erc::CollectionHelpersEvents::CollectionChanged {244				collection_id: eth::collection_id_to_address(self.id),245			}246			.to_log(T::ContractAddress::get()),247		);248249		self.save()250	}251252	/// Confirm sponsorship253	///254	/// In order for the sponsorship to become active, the user set as the sponsor must confirm their participation.255	/// Before confirming sponsorship, the user must be specified as the sponsor of the collection via [`Self::set_sponsor`].256	pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> DispatchResult {257		self.check_is_internal()?;258		ensure!(259			self.collection.sponsorship.pending_sponsor() == Some(sender),260			Error::<T>::ConfirmSponsorshipFail261		);262263		self.collection.sponsorship = SponsorshipState::Confirmed(sender.clone());264265		<Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sender.clone()));266		<PalletEvm<T>>::deposit_log(267			erc::CollectionHelpersEvents::CollectionChanged {268				collection_id: eth::collection_id_to_address(self.id),269			}270			.to_log(T::ContractAddress::get()),271		);272273		self.save()274	}275276	/// Remove collection sponsor.277	pub fn remove_sponsor(&mut self, sender: &T::CrossAccountId) -> DispatchResult {278		self.check_is_internal()?;279		self.check_is_owner_or_admin(sender)?;280281		self.collection.sponsorship = SponsorshipState::Disabled;282283		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));284		<PalletEvm<T>>::deposit_log(285			erc::CollectionHelpersEvents::CollectionChanged {286				collection_id: eth::collection_id_to_address(self.id),287			}288			.to_log(T::ContractAddress::get()),289		);290		self.save()291	}292293	/// Force remove `sponsor`.294	///295	/// Differs from `remove_sponsor` in that296	/// it doesn't require consent from the `owner` of the collection.297	pub fn force_remove_sponsor(&mut self) -> DispatchResult {298		self.check_is_internal()?;299300		self.collection.sponsorship = SponsorshipState::Disabled;301302		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));303		<PalletEvm<T>>::deposit_log(304			erc::CollectionHelpersEvents::CollectionChanged {305				collection_id: eth::collection_id_to_address(self.id),306			}307			.to_log(T::ContractAddress::get()),308		);309		self.save()310	}311312	/// Checks that the collection was created with, and must be operated upon through **Unique API**.313	/// Now check only the `external` flag and if it's **true**, then return [`Error::CollectionIsExternal`] error.314	pub fn check_is_internal(&self) -> DispatchResult {315		if self.flags.external {316			return Err(<Error<T>>::CollectionIsExternal)?;317		}318319		Ok(())320	}321322	/// Checks that the collection was created with, and must be operated upon through an **assimilated API**.323	/// Now check only the `external` flag and if it's **false**, then return [`Error::CollectionIsInternal`] error.324	pub fn check_is_external(&self) -> DispatchResult {325		if !self.flags.external {326			return Err(<Error<T>>::CollectionIsInternal)?;327		}328329		Ok(())330	}331}332333impl<T: Config> Deref for CollectionHandle<T> {334	type Target = Collection<T::AccountId>;335336	fn deref(&self) -> &Self::Target {337		&self.collection338	}339}340341impl<T: Config> DerefMut for CollectionHandle<T> {342	fn deref_mut(&mut self) -> &mut Self::Target {343		&mut self.collection344	}345}346347impl<T: Config> CollectionHandle<T> {348	/// Checks if the `user` is the owner of the collection.349	pub fn check_is_owner(&self, user: &T::CrossAccountId) -> DispatchResult {350		ensure!(*user.as_sub() == self.owner, <Error<T>>::NoPermission);351		Ok(())352	}353354	/// Returns **true** if the `user` is the owner or administrator of the collection.355	pub fn is_owner_or_admin(&self, user: &T::CrossAccountId) -> bool {356		*user.as_sub() == self.owner || <IsAdmin<T>>::get((self.id, user))357	}358359	/// Checks if the `user` is the owner or administrator of the collection.360	pub fn check_is_owner_or_admin(&self, user: &T::CrossAccountId) -> DispatchResult {361		ensure!(self.is_owner_or_admin(user), <Error<T>>::NoPermission);362		Ok(())363	}364365	/// Returns **true** if366	/// * the `user`is a collection owner or admin367	/// * the collection limits allow the owner/admins to transfer/burn any collection token368	pub fn ignores_token_restrictions(&self, user: &T::CrossAccountId) -> bool {369		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)370	}371372	/// Return **true** if `user` does not have enough token parts, and he can ignore such restrictions.373	pub fn ignores_owned_amount(&self, user: &T::CrossAccountId) -> bool {374		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)375	}376377	/// Checks if the user is in the allow list. If not [Error::AddressNotInAllowlist] returns.378	pub fn check_allowlist(&self, user: &T::CrossAccountId) -> DispatchResult {379		ensure!(380			<Allowlist<T>>::get((self.id, user)),381			<Error<T>>::AddressNotInAllowlist382		);383		Ok(())384	}385386	/// Changes collection owner to another account387	/// #### Store read/writes388	/// 1 writes389	pub fn change_owner(390		&mut self,391		caller: T::CrossAccountId,392		new_owner: T::CrossAccountId,393	) -> DispatchResult {394		self.check_is_internal()?;395		self.check_is_owner(&caller)?;396		self.collection.owner = new_owner.as_sub().clone();397398		<Pallet<T>>::deposit_event(Event::<T>::CollectionOwnerChanged(399			self.id,400			new_owner.as_sub().clone(),401		));402		<PalletEvm<T>>::deposit_log(403			erc::CollectionHelpersEvents::CollectionChanged {404				collection_id: eth::collection_id_to_address(self.id),405			}406			.to_log(T::ContractAddress::get()),407		);408409		self.save()410	}411}412413#[frame_support::pallet]414pub mod pallet {415	use super::*;416	use dispatch::CollectionDispatch;417	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};418	use frame_system::pallet_prelude::*;419	use frame_support::traits::Currency;420	use up_data_structs::{TokenId, mapping::TokenAddressMapping};421	use scale_info::TypeInfo;422	use weights::WeightInfo;423424	#[pallet::config]425	pub trait Config:426		frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config + TypeInfo427	{428		/// Weight information for functions of this pallet.429		type WeightInfo: WeightInfo;430431		/// Events compatible with [`frame_system::Config::Event`].432		type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;433434		/// Handler of accounts and payment.435		type Currency: Currency<Self::AccountId>;436437		/// Set price to create a collection.438		#[pallet::constant]439		type CollectionCreationPrice: Get<440			<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance,441		>;442443		/// Dispatcher of operations on collections.444		type CollectionDispatch: CollectionDispatch<Self>;445446		/// Account which holds the chain's treasury.447		type TreasuryAccountId: Get<Self::AccountId>;448449		/// Address under which the CollectionHelper contract would be available.450		#[pallet::constant]451		type ContractAddress: Get<H160>;452453		/// Mapper for token addresses to Ethereum addresses.454		type EvmTokenAddressMapping: TokenAddressMapping<H160>;455456		/// Mapper for token addresses to [`CrossAccountId`].457		type CrossTokenAddressMapping: TokenAddressMapping<Self::CrossAccountId>;458	}459460	const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);461462	#[pallet::pallet]463	#[pallet::storage_version(STORAGE_VERSION)]464	#[pallet::generate_store(pub(super) trait Store)]465	pub struct Pallet<T>(_);466467	#[pallet::extra_constants]468	impl<T: Config> Pallet<T> {469		/// Maximum admins per collection.470		pub fn collection_admins_limit() -> u32 {471			COLLECTION_ADMINS_LIMIT472		}473	}474475	impl<T: Config> Pallet<T> {476		/// Helper function that handles deposit events477		pub fn deposit_event(event: Event<T>) {478			let event = <T as Config>::RuntimeEvent::from(event);479			let event = event.into();480			<frame_system::Pallet<T>>::deposit_event(event)481		}482	}483484	#[pallet::event]485	pub enum Event<T: Config> {486		/// New collection was created487		CollectionCreated(488			/// Globally unique identifier of newly created collection.489			CollectionId,490			/// [`CollectionMode`] converted into _u8_.491			u8,492			/// Collection owner.493			T::AccountId,494		),495496		/// New collection was destroyed497		CollectionDestroyed(498			/// Globally unique identifier of collection.499			CollectionId,500		),501502		/// New item was created.503		ItemCreated(504			/// Id of the collection where item was created.505			CollectionId,506			/// Id of an item. Unique within the collection.507			TokenId,508			/// Owner of newly created item509			T::CrossAccountId,510			/// Always 1 for NFT511			u128,512		),513514		/// Collection item was burned.515		ItemDestroyed(516			/// Id of the collection where item was destroyed.517			CollectionId,518			/// Identifier of burned NFT.519			TokenId,520			/// Which user has destroyed its tokens.521			T::CrossAccountId,522			/// Amount of token pieces destroed. Always 1 for NFT.523			u128,524		),525526		/// Item was transferred527		Transfer(528			/// Id of collection to which item is belong.529			CollectionId,530			/// Id of an item.531			TokenId,532			/// Original owner of item.533			T::CrossAccountId,534			/// New owner of item.535			T::CrossAccountId,536			/// Amount of token pieces transfered. Always 1 for NFT.537			u128,538		),539540		/// Amount pieces of token owned by `sender` was approved for `spender`.541		Approved(542			/// Id of collection to which item is belong.543			CollectionId,544			/// Id of an item.545			TokenId,546			/// Original owner of item.547			T::CrossAccountId,548			/// Id for which the approval was granted.549			T::CrossAccountId,550			/// Amount of token pieces transfered. Always 1 for NFT.551			u128,552		),553554		/// A `sender` approves operations on all owned tokens for `spender`.555		ApprovedForAll(556			/// Id of collection to which item is belong.557			CollectionId,558			/// Owner of a wallet.559			T::CrossAccountId,560			/// Id for which operator status was granted or rewoked.561			T::CrossAccountId,562			/// Is operator status granted or revoked?563			bool,564		),565566		/// The colletion property has been added or edited.567		CollectionPropertySet(568			/// Id of collection to which property has been set.569			CollectionId,570			/// The property that was set.571			PropertyKey,572		),573574		/// The property has been deleted.575		CollectionPropertyDeleted(576			/// Id of collection to which property has been deleted.577			CollectionId,578			/// The property that was deleted.579			PropertyKey,580		),581582		/// The token property has been added or edited.583		TokenPropertySet(584			/// Identifier of the collection whose token has the property set.585			CollectionId,586			/// The token for which the property was set.587			TokenId,588			/// The property that was set.589			PropertyKey,590		),591592		/// The token property has been deleted.593		TokenPropertyDeleted(594			/// Identifier of the collection whose token has the property deleted.595			CollectionId,596			/// The token for which the property was deleted.597			TokenId,598			/// The property that was deleted.599			PropertyKey,600		),601602		/// The token property permission of a collection has been set.603		PropertyPermissionSet(604			/// ID of collection to which property permission has been set.605			CollectionId,606			/// The property permission that was set.607			PropertyKey,608		),609610		/// Address was added to the allow list.611		AllowListAddressAdded(612			/// ID of the affected collection.613			CollectionId,614			/// Address of the added account.615			T::CrossAccountId,616		),617618		/// Address was removed from the allow list.619		AllowListAddressRemoved(620			/// ID of the affected collection.621			CollectionId,622			/// Address of the removed account.623			T::CrossAccountId,624		),625626		/// Collection admin was added.627		CollectionAdminAdded(628			/// ID of the affected collection.629			CollectionId,630			/// Admin address.631			T::CrossAccountId,632		),633634		/// Collection admin was removed.635		CollectionAdminRemoved(636			/// ID of the affected collection.637			CollectionId,638			/// Removed admin address.639			T::CrossAccountId,640		),641642		/// Collection limits were set.643		CollectionLimitSet(644			/// ID of the affected collection.645			CollectionId,646		),647648		/// Collection owned was changed.649		CollectionOwnerChanged(650			/// ID of the affected collection.651			CollectionId,652			/// New owner address.653			T::AccountId,654		),655656		/// Collection permissions were set.657		CollectionPermissionSet(658			/// ID of the affected collection.659			CollectionId,660		),661662		/// Collection sponsor was set.663		CollectionSponsorSet(664			/// ID of the affected collection.665			CollectionId,666			/// New sponsor address.667			T::AccountId,668		),669670		/// New sponsor was confirm.671		SponsorshipConfirmed(672			/// ID of the affected collection.673			CollectionId,674			/// New sponsor address.675			T::AccountId,676		),677678		/// Collection sponsor was removed.679		CollectionSponsorRemoved(680			/// ID of the affected collection.681			CollectionId,682		),683	}684685	#[pallet::error]686	pub enum Error<T> {687		/// This collection does not exist.688		CollectionNotFound,689		/// Sender parameter and item owner must be equal.690		MustBeTokenOwner,691		/// No permission to perform action692		NoPermission,693		/// Destroying only empty collections is allowed694		CantDestroyNotEmptyCollection,695		/// Collection is not in mint mode.696		PublicMintingNotAllowed,697		/// Address is not in allow list.698		AddressNotInAllowlist,699700		/// Collection name can not be longer than 63 char.701		CollectionNameLimitExceeded,702		/// Collection description can not be longer than 255 char.703		CollectionDescriptionLimitExceeded,704		/// Token prefix can not be longer than 15 char.705		CollectionTokenPrefixLimitExceeded,706		/// Total collections bound exceeded.707		TotalCollectionsLimitExceeded,708		/// Exceeded max admin count709		CollectionAdminCountExceeded,710		/// Collection limit bounds per collection exceeded711		CollectionLimitBoundsExceeded,712		/// Tried to enable permissions which are only permitted to be disabled713		OwnerPermissionsCantBeReverted,714		/// Collection settings not allowing items transferring715		TransferNotAllowed,716		/// Account token limit exceeded per collection717		AccountTokenLimitExceeded,718		/// Collection token limit exceeded719		CollectionTokenLimitExceeded,720		/// Metadata flag frozen721		MetadataFlagFrozen,722723		/// Item does not exist724		TokenNotFound,725		/// Item is balance not enough726		TokenValueTooLow,727		/// Requested value is more than the approved728		ApprovedValueTooLow,729		/// Tried to approve more than owned730		CantApproveMoreThanOwned,731		/// Only spending from eth mirror could be approved732		AddressIsNotEthMirror,733734		/// Can't transfer tokens to ethereum zero address735		AddressIsZero,736737		/// The operation is not supported738		UnsupportedOperation,739740		/// Insufficient funds to perform an action741		NotSufficientFounds,742743		/// User does not satisfy the nesting rule744		UserIsNotAllowedToNest,745		/// Only tokens from specific collections may nest tokens under this one746		SourceCollectionIsNotAllowedToNest,747748		/// Tried to store more data than allowed in collection field749		CollectionFieldSizeExceeded,750751		/// Tried to store more property data than allowed752		NoSpaceForProperty,753754		/// Tried to store more property keys than allowed755		PropertyLimitReached,756757		/// Property key is too long758		PropertyKeyIsTooLong,759760		/// Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed761		InvalidCharacterInPropertyKey,762763		/// Empty property keys are forbidden764		EmptyPropertyKey,765766		/// Tried to access an external collection with an internal API767		CollectionIsExternal,768769		/// Tried to access an internal collection with an external API770		CollectionIsInternal,771772		/// This address is not set as sponsor, use setCollectionSponsor first.773		ConfirmSponsorshipFail,774775		/// The user is not an administrator.776		UserIsNotCollectionAdmin,777	}778779	/// Storage of the count of created collections. Essentially contains the last collection ID.780	#[pallet::storage]781	pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;782783	/// Storage of the count of deleted collections.784	#[pallet::storage]785	pub type DestroyedCollectionCount<T> =786		StorageValue<Value = CollectionId, QueryKind = ValueQuery>;787788	/// Storage of collection info.789	#[pallet::storage]790	pub type CollectionById<T> = StorageMap<791		Hasher = Blake2_128Concat,792		Key = CollectionId,793		Value = Collection<<T as frame_system::Config>::AccountId>,794		QueryKind = OptionQuery,795	>;796797	/// Storage of collection properties.798	#[pallet::storage]799	#[pallet::getter(fn collection_properties)]800	pub type CollectionProperties<T> = StorageMap<801		Hasher = Blake2_128Concat,802		Key = CollectionId,803		Value = Properties,804		QueryKind = ValueQuery,805		OnEmpty = up_data_structs::CollectionProperties,806	>;807808	/// Storage of token property permissions of a collection.809	#[pallet::storage]810	#[pallet::getter(fn property_permissions)]811	pub type CollectionPropertyPermissions<T> = StorageMap<812		Hasher = Blake2_128Concat,813		Key = CollectionId,814		Value = PropertiesPermissionMap,815		QueryKind = ValueQuery,816	>;817818	/// Storage of the amount of collection admins.819	#[pallet::storage]820	pub type AdminAmount<T> = StorageMap<821		Hasher = Blake2_128Concat,822		Key = CollectionId,823		Value = u32,824		QueryKind = ValueQuery,825	>;826827	/// List of collection admins.828	#[pallet::storage]829	pub type IsAdmin<T: Config> = StorageNMap<830		Key = (831			Key<Blake2_128Concat, CollectionId>,832			Key<Blake2_128Concat, T::CrossAccountId>,833		),834		Value = bool,835		QueryKind = ValueQuery,836	>;837838	/// Allowlisted collection users.839	#[pallet::storage]840	pub type Allowlist<T: Config> = StorageNMap<841		Key = (842			Key<Blake2_128Concat, CollectionId>,843			Key<Blake2_128Concat, T::CrossAccountId>,844		),845		Value = bool,846		QueryKind = ValueQuery,847	>;848849	/// Not used by code, exists only to provide some types to metadata.850	#[pallet::storage]851	pub type DummyStorageValue<T: Config> = StorageValue<852		Value = (853			CollectionStats,854			CollectionId,855			TokenId,856			TokenChild,857			PhantomType<(858				TokenData<T::CrossAccountId>,859				RpcCollection<T::AccountId>,860				// PoV Estimate Info861				PovInfo,862			)>,863		),864		QueryKind = OptionQuery,865	>;866867	#[pallet::hooks]868	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {869		fn on_runtime_upgrade() -> Weight {870			StorageVersion::new(1).put::<Pallet<T>>();871872			Weight::zero()873		}874	}875}876877impl<T: Config> Pallet<T> {878	/// Enshure that receiver address is correct.879	///880	/// Ethereum receiver 0x0000000000000000000000000000000000000000 is reserved, and shouldn't own tokens.881	pub fn ensure_correct_receiver(receiver: &T::CrossAccountId) -> DispatchResult {882		ensure!(883			&T::CrossAccountId::from_eth(H160([0; 20])) != receiver,884			<Error<T>>::AddressIsZero885		);886		Ok(())887	}888889	/// Get a vector of collection admins.890	pub fn adminlist(collection: CollectionId) -> Vec<T::CrossAccountId> {891		<IsAdmin<T>>::iter_prefix((collection,))892			.map(|(a, _)| a)893			.collect()894	}895896	/// Get a vector of users allowed to mint tokens.897	pub fn allowlist(collection: CollectionId) -> Vec<T::CrossAccountId> {898		<Allowlist<T>>::iter_prefix((collection,))899			.map(|(a, _)| a)900			.collect()901	}902903	/// Is `user` allowed to mint token in `collection`.904	pub fn allowed(collection: CollectionId, user: T::CrossAccountId) -> bool {905		<Allowlist<T>>::get((collection, user))906	}907908	/// Get statistics of collections.909	pub fn collection_stats() -> CollectionStats {910		let created = <CreatedCollectionCount<T>>::get();911		let destroyed = <DestroyedCollectionCount<T>>::get();912		CollectionStats {913			created: created.0,914			destroyed: destroyed.0,915			alive: created.0 - destroyed.0,916		}917	}918919	/// Get the effective limits for the collection.920	pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {921		let collection = <CollectionById<T>>::get(collection)?;922		let limits = collection.limits;923		let effective_limits = CollectionLimits {924			account_token_ownership_limit: Some(limits.account_token_ownership_limit()),925			sponsored_data_size: Some(limits.sponsored_data_size()),926			sponsored_data_rate_limit: Some(927				limits928					.sponsored_data_rate_limit929					.unwrap_or(SponsoringRateLimit::SponsoringDisabled),930			),931			token_limit: Some(limits.token_limit()),932			sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(933				match collection.mode {934					CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,935					CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,936					CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,937				},938			)),939			sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),940			owner_can_transfer: Some(limits.owner_can_transfer()),941			owner_can_destroy: Some(limits.owner_can_destroy()),942			transfers_enabled: Some(limits.transfers_enabled()),943		};944945		Some(effective_limits)946	}947948	/// Returns information about the `collection` adapted for rpc.949	pub fn rpc_collection(collection: CollectionId) -> Option<RpcCollection<T::AccountId>> {950		let Collection {951			name,952			description,953			owner,954			mode,955			token_prefix,956			sponsorship,957			limits,958			permissions,959			flags,960		} = <CollectionById<T>>::get(collection)?;961962		let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)963			.into_iter()964			.map(|(key, permission)| PropertyKeyPermission { key, permission })965			.collect();966967		let properties = <CollectionProperties<T>>::get(collection)968			.into_iter()969			.map(|(key, value)| Property { key, value })970			.collect();971972		let permissions = CollectionPermissions {973			access: Some(permissions.access()),974			mint_mode: Some(permissions.mint_mode()),975			nesting: Some(permissions.nesting().clone()),976		};977978		Some(RpcCollection {979			name: name.into_inner(),980			description: description.into_inner(),981			owner,982			mode,983			token_prefix: token_prefix.into_inner(),984			sponsorship,985			limits,986			permissions,987			token_property_permissions,988			properties,989			read_only: flags.external,990991			flags: RpcCollectionFlags {992				foreign: flags.foreign,993				erc721metadata: flags.erc721metadata,994			},995		})996	}997}998999macro_rules! limit_default {1000	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1001		$(1002			if let Some($new) = $new.$field {1003				let $old = $old.$field($($arg)?);1004				let _ = $new;1005				let _ = $old;1006				$check1007			} else {1008				$new.$field = $old.$field1009			}1010		)*1011	}};1012}1013macro_rules! limit_default_clone {1014	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1015		$(1016			if let Some($new) = $new.$field.clone() {1017				let $old = $old.$field($($arg)?);1018				let _ = $new;1019				let _ = $old;1020				$check1021			} else {1022				$new.$field = $old.$field.clone()1023			}1024		)*1025	}};1026}10271028impl<T: Config> Pallet<T> {1029	/// Create new collection.1030	///1031	/// * `owner` - The owner of the collection.1032	/// * `data` - Description of the created collection.1033	/// * `flags` - Extra flags to store.1034	pub fn init_collection(1035		owner: T::CrossAccountId,1036		payer: T::CrossAccountId,1037		data: CreateCollectionData<T::AccountId>,1038		flags: CollectionFlags,1039	) -> Result<CollectionId, DispatchError> {1040		{1041			ensure!(1042				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,1043				Error::<T>::CollectionTokenPrefixLimitExceeded1044			);1045		}10461047		let created_count = <CreatedCollectionCount<T>>::get()1048			.01049			.checked_add(1)1050			.ok_or(ArithmeticError::Overflow)?;1051		let destroyed_count = <DestroyedCollectionCount<T>>::get().0;1052		let id = CollectionId(created_count);10531054		// bound Total number of collections1055		ensure!(1056			created_count - destroyed_count <= COLLECTION_NUMBER_LIMIT,1057			<Error<T>>::TotalCollectionsLimitExceeded1058		);10591060		// =========10611062		let collection = Collection {1063			owner: owner.as_sub().clone(),1064			name: data.name,1065			mode: data.mode.clone(),1066			description: data.description,1067			token_prefix: data.token_prefix,1068			sponsorship: data1069				.pending_sponsor1070				.map(SponsorshipState::Unconfirmed)1071				.unwrap_or_default(),1072			limits: data1073				.limits1074				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))1075				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,1076			permissions: data1077				.permissions1078				.map(|permissions| {1079					Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)1080				})1081				.unwrap_or_else(|| Ok(CollectionPermissions::default()))?,1082			flags,1083		};10841085		let mut collection_properties = up_data_structs::CollectionProperties::get();1086		collection_properties1087			.try_set_from_iter(data.properties.into_iter())1088			.map_err(<Error<T>>::from)?;10891090		CollectionProperties::<T>::insert(id, collection_properties);10911092		let mut token_props_permissions = PropertiesPermissionMap::new();1093		token_props_permissions1094			.try_set_from_iter(data.token_property_permissions.into_iter())1095			.map_err(<Error<T>>::from)?;10961097		CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);10981099		// Take a (non-refundable) deposit of collection creation1100		{1101			let mut imbalance =1102				<<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();1103			imbalance.subsume(1104				<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(1105					&T::TreasuryAccountId::get(),1106					T::CollectionCreationPrice::get(),1107				),1108			);1109			<T as Config>::Currency::settle(1110				payer.as_sub(),1111				imbalance,1112				WithdrawReasons::TRANSFER,1113				ExistenceRequirement::KeepAlive,1114			)1115			.map_err(|_| Error::<T>::NotSufficientFounds)?;1116		}11171118		<CreatedCollectionCount<T>>::put(created_count);1119		<Pallet<T>>::deposit_event(Event::CollectionCreated(1120			id,1121			data.mode.id(),1122			owner.as_sub().clone(),1123		));1124		<PalletEvm<T>>::deposit_log(1125			erc::CollectionHelpersEvents::CollectionCreated {1126				owner: *owner.as_eth(),1127				collection_id: eth::collection_id_to_address(id),1128			}1129			.to_log(T::ContractAddress::get()),1130		);1131		<CollectionById<T>>::insert(id, collection);1132		Ok(id)1133	}11341135	/// Destroy collection.1136	///1137	/// * `collection` - Collection handler.1138	/// * `sender` - The owner or administrator of the collection.1139	pub fn destroy_collection(1140		collection: CollectionHandle<T>,1141		sender: &T::CrossAccountId,1142	) -> DispatchResult {1143		ensure!(1144			collection.limits.owner_can_destroy(),1145			<Error<T>>::NoPermission,1146		);1147		collection.check_is_owner(sender)?;11481149		let destroyed_collections = <DestroyedCollectionCount<T>>::get()1150			.01151			.checked_add(1)1152			.ok_or(ArithmeticError::Overflow)?;11531154		// =========11551156		<DestroyedCollectionCount<T>>::put(destroyed_collections);1157		<CollectionById<T>>::remove(collection.id);1158		<AdminAmount<T>>::remove(collection.id);1159		let _ = <IsAdmin<T>>::clear_prefix((collection.id,), u32::MAX, None);1160		let _ = <Allowlist<T>>::clear_prefix((collection.id,), u32::MAX, None);1161		<CollectionProperties<T>>::remove(collection.id);11621163		<Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));11641165		<PalletEvm<T>>::deposit_log(1166			erc::CollectionHelpersEvents::CollectionDestroyed {1167				collection_id: eth::collection_id_to_address(collection.id),1168			}1169			.to_log(T::ContractAddress::get()),1170		);1171		Ok(())1172	}11731174	/// This function sets or removes a collection properties according to1175	/// `properties_updates` contents:1176	/// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1177	/// * removes a property under the <key> if the value is `None` `(<key>, None)`.1178	///1179	/// This function fires an event for each property change.1180	/// In case of an error, all the changes (including the events) will be reverted1181	/// since the function is transactional.1182	#[transactional]1183	fn modify_collection_properties(1184		collection: &CollectionHandle<T>,1185		sender: &T::CrossAccountId,1186		properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1187	) -> DispatchResult {1188		collection.check_is_owner_or_admin(sender)?;11891190		let mut stored_properties = <CollectionProperties<T>>::get(collection.id);11911192		for (key, value) in properties_updates {1193			match value {1194				Some(value) => {1195					stored_properties1196						.try_set(key.clone(), value)1197						.map_err(<Error<T>>::from)?;11981199					Self::deposit_event(Event::CollectionPropertySet(collection.id, key));1200					<PalletEvm<T>>::deposit_log(1201						erc::CollectionHelpersEvents::CollectionChanged {1202							collection_id: eth::collection_id_to_address(collection.id),1203						}1204						.to_log(T::ContractAddress::get()),1205					);1206				}1207				None => {1208					stored_properties.remove(&key).map_err(<Error<T>>::from)?;12091210					Self::deposit_event(Event::CollectionPropertyDeleted(collection.id, key));1211					<PalletEvm<T>>::deposit_log(1212						erc::CollectionHelpersEvents::CollectionChanged {1213							collection_id: eth::collection_id_to_address(collection.id),1214						}1215						.to_log(T::ContractAddress::get()),1216					);1217				}1218			}1219		}12201221		<CollectionProperties<T>>::set(collection.id, stored_properties);12221223		Ok(())1224	}12251226	/// A batch operation to add, edit or remove properties for a token.1227	/// It sets or removes a token's properties according to1228	/// `properties_updates` contents:1229	/// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1230	/// * removes a property under the <key> if the value is `None` `(<key>, None)`.1231	///1232	/// - `nesting_budget`: Limit for searching parents in-depth to check ownership.1233	/// - `is_token_create`: Indicates that method is called during token initialization.1234	///   Allows to bypass ownership check.1235	///1236	/// All affected properties should have `mutable` permission1237	/// to be **deleted** or to be **set more than once**,1238	/// and the sender should have permission to edit those properties.1239	///1240	/// This function fires an event for each property change.1241	/// In case of an error, all the changes (including the events) will be reverted1242	/// since the function is transactional.1243	pub fn modify_token_properties(1244		collection: &CollectionHandle<T>,1245		sender: &T::CrossAccountId,1246		token_id: TokenId,1247		properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1248		is_token_create: bool,1249		mut stored_properties: Properties,1250		is_token_owner: impl Fn() -> Result<bool, DispatchError>,1251		set_token_properties: impl FnOnce(Properties),1252		log: evm_coder::ethereum::Log,1253	) -> DispatchResult {1254		let is_collection_admin = collection.is_owner_or_admin(sender);1255		let permissions = Self::property_permissions(collection.id);12561257		let mut token_owner_result = None;1258		let mut is_token_owner = || -> Result<bool, DispatchError> {1259			*token_owner_result.get_or_insert_with(&is_token_owner)1260		};12611262		for (key, value) in properties_updates {1263			let permission = permissions1264				.get(&key)1265				.cloned()1266				.unwrap_or_else(PropertyPermission::none);12671268			let is_property_exists = stored_properties.get(&key).is_some();12691270			match permission {1271				PropertyPermission { mutable: false, .. } if is_property_exists => {1272					return Err(<Error<T>>::NoPermission.into());1273				}12741275				PropertyPermission {1276					collection_admin,1277					token_owner,1278					..1279				} => {1280					//TODO: investigate threats during public minting.1281					let is_token_create =1282						is_token_create && (collection_admin || token_owner) && value.is_some();1283					if !(is_token_create1284						|| (collection_admin && is_collection_admin)1285						|| (token_owner && is_token_owner()?))1286					{1287						fail!(<Error<T>>::NoPermission);1288					}1289				}1290			}12911292			match value {1293				Some(value) => {1294					stored_properties1295						.try_set(key.clone(), value)1296						.map_err(<Error<T>>::from)?;12971298					Self::deposit_event(Event::TokenPropertySet(collection.id, token_id, key));1299				}1300				None => {1301					stored_properties.remove(&key).map_err(<Error<T>>::from)?;13021303					Self::deposit_event(Event::TokenPropertyDeleted(collection.id, token_id, key));1304				}1305			}13061307			<PalletEvm<T>>::deposit_log(log.clone());1308		}13091310		set_token_properties(stored_properties);13111312		Ok(())1313	}13141315	/// Sets or unsets the approval of a given operator.1316	///1317	/// The `operator` is allowed to transfer all token pieces of the `owner` on their behalf.1318	/// - `owner`: Token owner1319	/// - `operator`: Operator1320	/// - `approve`: Should operator status be granted or revoked?1321	pub fn set_allowance_for_all(1322		collection: &CollectionHandle<T>,1323		owner: &T::CrossAccountId,1324		operator: &T::CrossAccountId,1325		approve: bool,1326		set_allowance: impl FnOnce(),1327		log: evm_coder::ethereum::Log,1328	) -> DispatchResult {1329		if collection.permissions.access() == AccessMode::AllowList {1330			collection.check_allowlist(owner)?;1331			collection.check_allowlist(operator)?;1332		}13331334		Self::ensure_correct_receiver(operator)?;13351336		set_allowance();13371338		<PalletEvm<T>>::deposit_log(log);1339		Self::deposit_event(Event::ApprovedForAll(1340			collection.id,1341			owner.clone(),1342			operator.clone(),1343			approve,1344		));1345		Ok(())1346	}13471348	/// Set collection property.1349	///1350	/// * `collection` - Collection handler.1351	/// * `sender` - The owner or administrator of the collection.1352	/// * `property` - The property to set.1353	pub fn set_collection_property(1354		collection: &CollectionHandle<T>,1355		sender: &T::CrossAccountId,1356		property: Property,1357	) -> DispatchResult {1358		Self::set_collection_properties(collection, sender, [property].into_iter())1359	}13601361	/// Set a scoped collection property, where the scope is a special prefix1362	/// prohibiting a user access to change the property directly.1363	///1364	/// * `collection_id` - ID of the collection for which the property is being set.1365	/// * `scope` - Property scope.1366	/// * `property` - The property to set.1367	pub fn set_scoped_collection_property(1368		collection_id: CollectionId,1369		scope: PropertyScope,1370		property: Property,1371	) -> DispatchResult {1372		CollectionProperties::<T>::try_mutate(collection_id, |properties| {1373			properties.try_scoped_set(scope, property.key, property.value)1374		})1375		.map_err(<Error<T>>::from)?;13761377		Ok(())1378	}13791380	/// Set scoped collection properties, where the scope is a special prefix1381	/// prohibiting a user access to change the properties directly.1382	///1383	/// * `collection_id` - ID of the collection for which the properties is being set.1384	/// * `scope` - Property scope.1385	/// * `properties` - The properties to set.1386	pub fn set_scoped_collection_properties(1387		collection_id: CollectionId,1388		scope: PropertyScope,1389		properties: impl Iterator<Item = Property>,1390	) -> DispatchResult {1391		CollectionProperties::<T>::try_mutate(collection_id, |stored_properties| {1392			stored_properties.try_scoped_set_from_iter(scope, properties)1393		})1394		.map_err(<Error<T>>::from)?;13951396		Ok(())1397	}13981399	/// Set collection properties.1400	///1401	/// * `collection` - Collection handler.1402	/// * `sender` - The owner or administrator of the collection.1403	/// * `properties` - The properties to set.1404	pub fn set_collection_properties(1405		collection: &CollectionHandle<T>,1406		sender: &T::CrossAccountId,1407		properties: impl Iterator<Item = Property>,1408	) -> DispatchResult {1409		Self::modify_collection_properties(1410			collection,1411			sender,1412			properties.map(|property| (property.key, Some(property.value))),1413		)1414	}14151416	/// Delete collection property.1417	///1418	/// * `collection` - Collection handler.1419	/// * `sender` - The owner or administrator of the collection.1420	/// * `property` - The property to delete.1421	pub fn delete_collection_property(1422		collection: &CollectionHandle<T>,1423		sender: &T::CrossAccountId,1424		property_key: PropertyKey,1425	) -> DispatchResult {1426		Self::delete_collection_properties(collection, sender, [property_key].into_iter())1427	}14281429	/// Delete collection properties.1430	///1431	/// * `collection` - Collection handler.1432	/// * `sender` - The owner or administrator of the collection.1433	/// * `properties` - The properties to delete.1434	pub fn delete_collection_properties(1435		collection: &CollectionHandle<T>,1436		sender: &T::CrossAccountId,1437		property_keys: impl Iterator<Item = PropertyKey>,1438	) -> DispatchResult {1439		Self::modify_collection_properties(collection, sender, property_keys.map(|key| (key, None)))1440	}14411442	/// Set collection propetry permission without any checks.1443	///1444	/// Used for migrations.1445	///1446	/// * `collection` - Collection handler.1447	/// * `property_permissions` - Property permissions.1448	pub fn set_property_permission_unchecked(1449		collection: CollectionId,1450		property_permission: PropertyKeyPermission,1451	) -> DispatchResult {1452		<CollectionPropertyPermissions<T>>::try_mutate(collection, |permissions| {1453			permissions.try_set(property_permission.key, property_permission.permission)1454		})1455		.map_err(<Error<T>>::from)?;1456		Ok(())1457	}14581459	/// Set collection property permission.1460	///1461	/// * `collection` - Collection handler.1462	/// * `sender` - The owner or administrator of the collection.1463	/// * `property_permission` - Property permission.1464	pub fn set_property_permission(1465		collection: &CollectionHandle<T>,1466		sender: &T::CrossAccountId,1467		property_permission: PropertyKeyPermission,1468	) -> DispatchResult {1469		Self::set_scoped_property_permission(1470			collection,1471			sender,1472			PropertyScope::None,1473			property_permission,1474		)1475	}14761477	/// Set collection property permission with scope.1478	///1479	/// * `collection` - Collection handler.1480	/// * `sender` - The owner or administrator of the collection.1481	/// * `scope` - Property scope.1482	/// * `property_permission` - Property permission.1483	pub fn set_scoped_property_permission(1484		collection: &CollectionHandle<T>,1485		sender: &T::CrossAccountId,1486		scope: PropertyScope,1487		property_permission: PropertyKeyPermission,1488	) -> DispatchResult {1489		collection.check_is_owner_or_admin(sender)?;14901491		let all_permissions = CollectionPropertyPermissions::<T>::get(collection.id);1492		let current_permission = all_permissions.get(&property_permission.key);1493		if matches![1494			current_permission,1495			Some(PropertyPermission { mutable: false, .. })1496		] {1497			return Err(<Error<T>>::NoPermission.into());1498		}14991500		CollectionPropertyPermissions::<T>::try_mutate(collection.id, |permissions| {1501			let property_permission = property_permission.clone();1502			permissions.try_scoped_set(1503				scope,1504				property_permission.key,1505				property_permission.permission,1506			)1507		})1508		.map_err(<Error<T>>::from)?;15091510		Self::deposit_event(Event::PropertyPermissionSet(1511			collection.id,1512			property_permission.key,1513		));1514		<PalletEvm<T>>::deposit_log(1515			erc::CollectionHelpersEvents::CollectionChanged {1516				collection_id: eth::collection_id_to_address(collection.id),1517			}1518			.to_log(T::ContractAddress::get()),1519		);15201521		Ok(())1522	}15231524	/// Set token property permission.1525	///1526	/// * `collection` - Collection handler.1527	/// * `sender` - The owner or administrator of the collection.1528	/// * `property_permissions` - Property permissions.1529	#[transactional]1530	pub fn set_token_property_permissions(1531		collection: &CollectionHandle<T>,1532		sender: &T::CrossAccountId,1533		property_permissions: Vec<PropertyKeyPermission>,1534	) -> DispatchResult {1535		Self::set_scoped_token_property_permissions(1536			collection,1537			sender,1538			PropertyScope::None,1539			property_permissions,1540		)1541	}15421543	/// Set token property permission with scope.1544	///1545	/// * `collection` - Collection handler.1546	/// * `sender` - The owner or administrator of the collection.1547	/// * `scope` - Property scope.1548	/// * `property_permissions` - Property permissions.1549	#[transactional]1550	pub fn set_scoped_token_property_permissions(1551		collection: &CollectionHandle<T>,1552		sender: &T::CrossAccountId,1553		scope: PropertyScope,1554		property_permissions: Vec<PropertyKeyPermission>,1555	) -> DispatchResult {1556		for prop_pemission in property_permissions {1557			Self::set_scoped_property_permission(collection, sender, scope, prop_pemission)?;1558		}15591560		Ok(())1561	}15621563	/// Get collection property.1564	pub fn get_collection_property(1565		collection_id: CollectionId,1566		key: &PropertyKey,1567	) -> Option<PropertyValue> {1568		Self::collection_properties(collection_id).get(key).cloned()1569	}15701571	/// Convert byte vector to property key vector.1572	pub fn bytes_keys_to_property_keys(1573		keys: Vec<Vec<u8>>,1574	) -> Result<Vec<PropertyKey>, DispatchError> {1575		keys.into_iter()1576			.map(|key| -> Result<PropertyKey, DispatchError> {1577				key.try_into()1578					.map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())1579			})1580			.collect::<Result<Vec<PropertyKey>, DispatchError>>()1581	}15821583	/// Get properties according to given keys.1584	pub fn filter_collection_properties(1585		collection_id: CollectionId,1586		keys: Option<Vec<PropertyKey>>,1587	) -> Result<Vec<Property>, DispatchError> {1588		let properties = Self::collection_properties(collection_id);15891590		let properties = keys1591			.map(|keys| {1592				keys.into_iter()1593					.filter_map(|key| {1594						properties.get(&key).map(|value| Property {1595							key,1596							value: value.clone(),1597						})1598					})1599					.collect()1600			})1601			.unwrap_or_else(|| {1602				properties1603					.into_iter()1604					.map(|(key, value)| Property { key, value })1605					.collect()1606			});16071608		Ok(properties)1609	}16101611	/// Get property permissions according to given keys.1612	pub fn filter_property_permissions(1613		collection_id: CollectionId,1614		keys: Option<Vec<PropertyKey>>,1615	) -> Result<Vec<PropertyKeyPermission>, DispatchError> {1616		let permissions = Self::property_permissions(collection_id);16171618		let key_permissions = keys1619			.map(|keys| {1620				keys.into_iter()1621					.filter_map(|key| {1622						permissions1623							.get(&key)1624							.map(|permission| PropertyKeyPermission {1625								key,1626								permission: permission.clone(),1627							})1628					})1629					.collect()1630			})1631			.unwrap_or_else(|| {1632				permissions1633					.into_iter()1634					.map(|(key, permission)| PropertyKeyPermission { key, permission })1635					.collect()1636			});16371638		Ok(key_permissions)1639	}16401641	/// Toggle `user` participation in the `collection`'s allow list.1642	/// #### Store read/writes1643	/// 1 writes1644	pub fn toggle_allowlist(1645		collection: &CollectionHandle<T>,1646		sender: &T::CrossAccountId,1647		user: &T::CrossAccountId,1648		allowed: bool,1649	) -> DispatchResult {1650		collection.check_is_owner_or_admin(sender)?;16511652		// =========16531654		if allowed {1655			<Allowlist<T>>::insert((collection.id, user), true);1656			Self::deposit_event(Event::<T>::AllowListAddressAdded(1657				collection.id,1658				user.clone(),1659			));1660		} else {1661			<Allowlist<T>>::remove((collection.id, user));1662			Self::deposit_event(Event::<T>::AllowListAddressRemoved(1663				collection.id,1664				user.clone(),1665			));1666		}16671668		<PalletEvm<T>>::deposit_log(1669			erc::CollectionHelpersEvents::CollectionChanged {1670				collection_id: eth::collection_id_to_address(collection.id),1671			}1672			.to_log(T::ContractAddress::get()),1673		);16741675		Ok(())1676	}16771678	/// Toggle `user` participation in the `collection`'s admin list.1679	/// #### Store read/writes1680	/// 2 reads, 2 writes1681	pub fn toggle_admin(1682		collection: &CollectionHandle<T>,1683		sender: &T::CrossAccountId,1684		user: &T::CrossAccountId,1685		admin: bool,1686	) -> DispatchResult {1687		collection.check_is_internal()?;1688		collection.check_is_owner(sender)?;16891690		let is_admin = <IsAdmin<T>>::get((collection.id, user));1691		if is_admin == admin {1692			if admin {1693				return Ok(());1694			} else {1695				return Err(Error::<T>::UserIsNotCollectionAdmin.into());1696			}1697		}1698		let amount = <AdminAmount<T>>::get(collection.id);16991700		// =========17011702		if admin {1703			let amount = amount1704				.checked_add(1)1705				.ok_or(<Error<T>>::CollectionAdminCountExceeded)?;1706			ensure!(1707				amount <= Self::collection_admins_limit(),1708				<Error<T>>::CollectionAdminCountExceeded,1709			);17101711			<AdminAmount<T>>::insert(collection.id, amount);1712			<IsAdmin<T>>::insert((collection.id, user), true);17131714			Self::deposit_event(Event::<T>::CollectionAdminAdded(1715				collection.id,1716				user.clone(),1717			));1718		} else {1719			<AdminAmount<T>>::insert(collection.id, amount.saturating_sub(1));1720			<IsAdmin<T>>::remove((collection.id, user));17211722			Self::deposit_event(Event::<T>::CollectionAdminRemoved(1723				collection.id,1724				user.clone(),1725			));1726		}17271728		<PalletEvm<T>>::deposit_log(1729			erc::CollectionHelpersEvents::CollectionChanged {1730				collection_id: eth::collection_id_to_address(collection.id),1731			}1732			.to_log(T::ContractAddress::get()),1733		);17341735		Ok(())1736	}17371738	/// Update collection limits.1739	pub fn update_limits(1740		user: &T::CrossAccountId,1741		collection: &mut CollectionHandle<T>,1742		new_limit: CollectionLimits,1743	) -> DispatchResult {1744		collection.check_is_internal()?;1745		collection.check_is_owner_or_admin(user)?;17461747		collection.limits =1748			Self::clamp_limits(collection.mode.clone(), &collection.limits, new_limit)?;17491750		Self::deposit_event(Event::<T>::CollectionLimitSet(collection.id));1751		<PalletEvm<T>>::deposit_log(1752			erc::CollectionHelpersEvents::CollectionChanged {1753				collection_id: eth::collection_id_to_address(collection.id),1754			}1755			.to_log(T::ContractAddress::get()),1756		);17571758		collection.save()1759	}17601761	/// Merge set fields from `new_limit` to `old_limit`.1762	fn clamp_limits(1763		mode: CollectionMode,1764		old_limit: &CollectionLimits,1765		mut new_limit: CollectionLimits,1766	) -> Result<CollectionLimits, DispatchError> {1767		let limits = old_limit;1768		limit_default!(old_limit, new_limit,1769			account_token_ownership_limit => ensure!(1770				new_limit <= MAX_TOKEN_OWNERSHIP,1771				<Error<T>>::CollectionLimitBoundsExceeded,1772			),1773			sponsored_data_size => ensure!(1774				new_limit <= CUSTOM_DATA_LIMIT,1775				<Error<T>>::CollectionLimitBoundsExceeded,1776			),17771778			sponsored_data_rate_limit => {},1779			token_limit => ensure!(1780				old_limit >= new_limit && new_limit > 0,1781				<Error<T>>::CollectionTokenLimitExceeded1782			),17831784			sponsor_transfer_timeout(match mode {1785				CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,1786				CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1787				CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1788			}) => ensure!(1789				new_limit <= MAX_SPONSOR_TIMEOUT,1790				<Error<T>>::CollectionLimitBoundsExceeded,1791			),1792			sponsor_approve_timeout => {},1793			owner_can_transfer => ensure!(1794				!limits.owner_can_transfer_instaled() ||1795				old_limit || !new_limit,1796				<Error<T>>::OwnerPermissionsCantBeReverted,1797			),1798			owner_can_destroy => ensure!(1799				old_limit || !new_limit,1800				<Error<T>>::OwnerPermissionsCantBeReverted,1801			),1802			transfers_enabled => {},1803		);1804		Ok(new_limit)1805	}18061807	/// Update collection permissions.1808	pub fn update_permissions(1809		user: &T::CrossAccountId,1810		collection: &mut CollectionHandle<T>,1811		new_permission: CollectionPermissions,1812	) -> DispatchResult {1813		collection.check_is_internal()?;1814		collection.check_is_owner_or_admin(user)?;1815		collection.permissions = Self::clamp_permissions(1816			collection.mode.clone(),1817			&collection.permissions,1818			new_permission,1819		)?;18201821		Self::deposit_event(Event::<T>::CollectionPermissionSet(collection.id));1822		<PalletEvm<T>>::deposit_log(1823			erc::CollectionHelpersEvents::CollectionChanged {1824				collection_id: eth::collection_id_to_address(collection.id),1825			}1826			.to_log(T::ContractAddress::get()),1827		);18281829		collection.save()1830	}18311832	/// Merge set fields from `new_permission` to `old_permission`.1833	fn clamp_permissions(1834		_mode: CollectionMode,1835		old_permission: &CollectionPermissions,1836		mut new_permission: CollectionPermissions,1837	) -> Result<CollectionPermissions, DispatchError> {1838		limit_default_clone!(old_permission, new_permission,1839			access => {},1840			mint_mode => {},1841			nesting => { /* todo check for permissive, if only it gets out of benchmarks */ },1842		);1843		Ok(new_permission)1844	}18451846	/// Repair possibly broken properties of a collection.1847	pub fn repair_collection(collection_id: CollectionId) -> DispatchResult {1848		CollectionProperties::<T>::mutate(collection_id, |properties| {1849			properties.recompute_consumed_space();1850		});18511852		Ok(())1853	}1854}18551856/// Indicates unsupported methods by returning [Error::UnsupportedOperation].1857#[macro_export]1858macro_rules! unsupported {1859	($runtime:path) => {1860		Err($crate::Error::<$runtime>::UnsupportedOperation.into())1861	};1862}18631864/// Return weights for various worst-case operations.1865pub trait CommonWeightInfo<CrossAccountId> {1866	/// Weight of item creation.1867	fn create_item(data: &CreateItemData) -> Weight {1868		Self::create_multiple_items(from_ref(data))1869	}18701871	/// Weight of items creation.1872	fn create_multiple_items(amount: &[CreateItemData]) -> Weight;18731874	/// Weight of items creation.1875	fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;18761877	/// The weight of the burning item.1878	fn burn_item() -> Weight;18791880	/// Property setting weight.1881	///1882	/// * `amount`- The number of properties to set.1883	fn set_collection_properties(amount: u32) -> Weight;18841885	/// Collection property deletion weight.1886	///1887	/// * `amount`- The number of properties to set.1888	fn delete_collection_properties(amount: u32) -> Weight;18891890	/// Token property setting weight.1891	///1892	/// * `amount`- The number of properties to set.1893	fn set_token_properties(amount: u32) -> Weight;18941895	/// Token property deletion weight.1896	///1897	/// * `amount`- The number of properties to delete.1898	fn delete_token_properties(amount: u32) -> Weight;18991900	/// Token property permissions set weight.1901	///1902	/// * `amount`- The number of property permissions to set.1903	fn set_token_property_permissions(amount: u32) -> Weight;19041905	/// Transfer price of the token or its parts.1906	fn transfer() -> Weight;19071908	/// The price of setting the permission of the operation from another user.1909	fn approve() -> Weight;19101911	/// The price of setting the permission of the operation from another user for eth mirror.1912	fn approve_from() -> Weight;19131914	/// Transfer price from another user.1915	fn transfer_from() -> Weight;19161917	/// The price of burning a token from another user.1918	fn burn_from() -> Weight;19191920	/// Differs from burn_item in case of Fungible and Refungible, as it should burn1921	/// whole users's balance.1922	///1923	/// This method shouldn't be used directly, as it doesn't count breadth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1924	fn burn_recursively_self_raw() -> Weight;19251926	/// Cost of iterating over `amount` children while burning, without counting child burning itself.1927	///1928	/// This method shouldn't be used directly, as it doesn't count depth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1929	fn burn_recursively_breadth_raw(amount: u32) -> Weight;19301931	/// The price of recursive burning a token.1932	///1933	/// `max_selfs` - The maximum burning weight of the token itself.1934	/// `max_breadth` - The maximum number of nested tokens to burn.1935	fn burn_recursively(max_selfs: u32, max_breadth: u32) -> Weight {1936		Self::burn_recursively_self_raw()1937			.saturating_mul(max_selfs.max(1) as u64)1938			.saturating_add(Self::burn_recursively_breadth_raw(max_breadth))1939	}19401941	/// The price of retrieving token owner1942	fn token_owner() -> Weight;19431944	/// The price of setting approval for all1945	fn set_allowance_for_all() -> Weight;19461947	/// The price of repairing an item.1948	fn force_repair_item() -> Weight;1949}19501951/// Weight info extension trait for refungible pallet.1952pub trait RefungibleExtensionsWeightInfo {1953	/// Weight of token repartition.1954	fn repartition() -> Weight;1955}19561957/// Common collection operations.1958///1959/// It wraps methods in Fungible, Nonfungible and Refungible pallets1960/// and adds weight info.1961pub trait CommonCollectionOperations<T: Config> {1962	/// Create token.1963	///1964	/// * `sender` - The user who mint the token and pays for the transaction.1965	/// * `to` - The user who will own the token.1966	/// * `data` - Token data.1967	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1968	fn create_item(1969		&self,1970		sender: T::CrossAccountId,1971		to: T::CrossAccountId,1972		data: CreateItemData,1973		nesting_budget: &dyn Budget,1974	) -> DispatchResultWithPostInfo;19751976	/// Create multiple tokens.1977	///1978	/// * `sender` - The user who mint the token and pays for the transaction.1979	/// * `to` - The user who will own the token.1980	/// * `data` - Token data.1981	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1982	fn create_multiple_items(1983		&self,1984		sender: T::CrossAccountId,1985		to: T::CrossAccountId,1986		data: Vec<CreateItemData>,1987		nesting_budget: &dyn Budget,1988	) -> DispatchResultWithPostInfo;19891990	/// Create multiple tokens.1991	///1992	/// * `sender` - The user who mint the token and pays for the transaction.1993	/// * `to` - The user who will own the token.1994	/// * `data` - Token data.1995	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1996	fn create_multiple_items_ex(1997		&self,1998		sender: T::CrossAccountId,1999		data: CreateItemExData<T::CrossAccountId>,2000		nesting_budget: &dyn Budget,2001	) -> DispatchResultWithPostInfo;20022003	/// Burn token.2004	///2005	/// * `sender` - The user who owns the token.2006	/// * `token` - Token id that will burned.2007	/// * `amount` - The number of parts of the token that will be burned.2008	fn burn_item(2009		&self,2010		sender: T::CrossAccountId,2011		token: TokenId,2012		amount: u128,2013	) -> DispatchResultWithPostInfo;20142015	/// Burn token and all nested tokens recursievly.2016	///2017	/// * `sender` - The user who owns the token.2018	/// * `token` - Token id that will burned.2019	/// * `self_budget` - The budget that can be spent on burning tokens.2020	/// * `breadth_budget` - The budget that can be spent on burning nested tokens.2021	fn burn_item_recursively(2022		&self,2023		sender: T::CrossAccountId,2024		token: TokenId,2025		self_budget: &dyn Budget,2026		breadth_budget: &dyn Budget,2027	) -> DispatchResultWithPostInfo;20282029	/// Set collection properties.2030	///2031	/// * `sender` - Must be either the owner of the collection or its admin.2032	/// * `properties` - Properties to be set.2033	fn set_collection_properties(2034		&self,2035		sender: T::CrossAccountId,2036		properties: Vec<Property>,2037	) -> DispatchResultWithPostInfo;20382039	/// Delete collection properties.2040	///2041	/// * `sender` - Must be either the owner of the collection or its admin.2042	/// * `properties` - The properties to be removed.2043	fn delete_collection_properties(2044		&self,2045		sender: &T::CrossAccountId,2046		property_keys: Vec<PropertyKey>,2047	) -> DispatchResultWithPostInfo;20482049	/// Set token properties.2050	///2051	/// The appropriate [`PropertyPermission`] for the token property2052	/// must be set with [`Self::set_token_property_permissions`].2053	///2054	/// * `sender` - Must be either the owner of the token or its admin.2055	/// * `token_id` - The token for which the properties are being set.2056	/// * `properties` - Properties to be set.2057	/// * `budget` - Budget for setting properties.2058	fn set_token_properties(2059		&self,2060		sender: T::CrossAccountId,2061		token_id: TokenId,2062		properties: Vec<Property>,2063		budget: &dyn Budget,2064	) -> DispatchResultWithPostInfo;20652066	/// Remove token properties.2067	///2068	/// The appropriate [`PropertyPermission`] for the token property2069	/// must be set with [`Self::set_token_property_permissions`].2070	///2071	/// * `sender` - Must be either the owner of the token or its admin.2072	/// * `token_id` - The token for which the properties are being remove.2073	/// * `property_keys` - Keys to remove corresponding properties.2074	/// * `budget` - Budget for removing properties.2075	fn delete_token_properties(2076		&self,2077		sender: T::CrossAccountId,2078		token_id: TokenId,2079		property_keys: Vec<PropertyKey>,2080		budget: &dyn Budget,2081	) -> DispatchResultWithPostInfo;20822083	/// Set token property permissions.2084	///2085	/// * `sender` - Must be either the owner of the token or its admin.2086	/// * `token_id` - The token for which the properties are being set.2087	/// * `property_permissions` - Property permissions to be set.2088	/// * `budget` - Budget for setting properties.2089	fn set_token_property_permissions(2090		&self,2091		sender: &T::CrossAccountId,2092		property_permissions: Vec<PropertyKeyPermission>,2093	) -> DispatchResultWithPostInfo;20942095	/// Transfer amount of token pieces.2096	///2097	/// * `sender` - Donor user.2098	/// * `to` - Recepient user.2099	/// * `token` - The token of which parts are being sent.2100	/// * `amount` - The number of parts of the token that will be transferred.2101	/// * `budget` - The maximum budget that can be spent on the transfer.2102	fn transfer(2103		&self,2104		sender: T::CrossAccountId,2105		to: T::CrossAccountId,2106		token: TokenId,2107		amount: u128,2108		budget: &dyn Budget,2109	) -> DispatchResultWithPostInfo;21102111	/// Grant access to another account to transfer parts of the token owned by the calling user via [Self::transfer_from].2112	///2113	/// * `sender` - The user who grants access to the token.2114	/// * `spender` - The user to whom the rights are granted.2115	/// * `token` - The token to which access is granted.2116	/// * `amount` - The amount of pieces that another user can dispose of.2117	fn approve(2118		&self,2119		sender: T::CrossAccountId,2120		spender: T::CrossAccountId,2121		token: TokenId,2122		amount: u128,2123	) -> DispatchResultWithPostInfo;21242125	/// Grant access to another account to transfer parts of the token owned by the calling user's eth mirror via [Self::transfer_from].2126	///2127	/// * `sender` - The user who grants access to the token.2128	/// * `from` - Spender's eth mirror.2129	/// * `to` - The user to whom the rights are granted.2130	/// * `token` - The token to which access is granted.2131	/// * `amount` - The amount of pieces that another user can dispose of.2132	fn approve_from(2133		&self,2134		sender: T::CrossAccountId,2135		from: T::CrossAccountId,2136		to: T::CrossAccountId,2137		token: TokenId,2138		amount: u128,2139	) -> DispatchResultWithPostInfo;21402141	/// Send parts of a token owned by another user.2142	///2143	/// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2144	///2145	/// * `sender` - The user who must have access to the token (see [`Self::approve`]).2146	/// * `from` - The user who owns the token.2147	/// * `to` - Recepient user.2148	/// * `token` - The token of which parts are being sent.2149	/// * `amount` - The number of parts of the token that will be transferred.2150	/// * `budget` - The maximum budget that can be spent on the transfer.2151	fn transfer_from(2152		&self,2153		sender: T::CrossAccountId,2154		from: T::CrossAccountId,2155		to: T::CrossAccountId,2156		token: TokenId,2157		amount: u128,2158		budget: &dyn Budget,2159	) -> DispatchResultWithPostInfo;21602161	/// Burn parts of a token owned by another user.2162	///2163	/// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2164	///2165	/// * `sender` - The user who must have access to the token (see [`Self::approve`]).2166	/// * `from` - The user who owns the token.2167	/// * `token` - The token of which parts are being sent.2168	/// * `amount` - The number of parts of the token that will be transferred.2169	/// * `budget` - The maximum budget that can be spent on the burn.2170	fn burn_from(2171		&self,2172		sender: T::CrossAccountId,2173		from: T::CrossAccountId,2174		token: TokenId,2175		amount: u128,2176		budget: &dyn Budget,2177	) -> DispatchResultWithPostInfo;21782179	/// Check permission to nest token.2180	///2181	/// * `sender` - The user who initiated the check.2182	/// * `from` - The token that is checked for embedding.2183	/// * `under` - Token under which to check.2184	/// * `budget` - The maximum budget that can be spent on the check.2185	fn check_nesting(2186		&self,2187		sender: T::CrossAccountId,2188		from: (CollectionId, TokenId),2189		under: TokenId,2190		budget: &dyn Budget,2191	) -> DispatchResult;21922193	/// Nest one token into another.2194	///2195	/// * `under` - Token holder.2196	/// * `to_nest` - Nested token.2197	fn nest(&self, under: TokenId, to_nest: (CollectionId, TokenId));21982199	/// Unnest token.2200	///2201	/// * `under` - Token holder.2202	/// * `to_nest` - Token to unnest.2203	fn unnest(&self, under: TokenId, to_nest: (CollectionId, TokenId));22042205	/// Get all user tokens.2206	///2207	/// * `account` - Account for which you need to get tokens.2208	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;22092210	/// Get all the tokens in the collection.2211	fn collection_tokens(&self) -> Vec<TokenId>;22122213	/// Check if the token exists.2214	///2215	/// * `token` - Id token to check.2216	fn token_exists(&self, token: TokenId) -> bool;22172218	/// Get the id of the last minted token.2219	fn last_token_id(&self) -> TokenId;22202221	/// Get the owner of the token.2222	///2223	/// * `token` - The token for which you need to find out the owner.2224	fn token_owner(&self, token: TokenId) -> Result<T::CrossAccountId, TokenOwnerError>;22252226	/// Returns 10 tokens owners in no particular order.2227	///2228	/// * `token` - The token for which you need to find out the owners.2229	fn token_owners(&self, token: TokenId) -> Vec<T::CrossAccountId>;22302231	/// Get the value of the token property by key.2232	///2233	/// * `token` - Token with the property to get.2234	/// * `key` - Property name.2235	fn token_property(&self, token_id: TokenId, key: &PropertyKey) -> Option<PropertyValue>;22362237	/// Get a set of token properties by key vector.2238	///2239	/// * `token` - Token with the property to get.2240	/// * `keys` - Vector of property keys. If this parameter is [None](sp_std::result::Result),2241	/// then all properties are returned.2242	fn token_properties(&self, token: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;22432244	/// Amount of unique collection tokens2245	fn total_supply(&self) -> u32;22462247	/// Amount of different tokens account has.2248	///2249	/// * `account` - The account for which need to get the balance.2250	fn account_balance(&self, account: T::CrossAccountId) -> u32;22512252	/// Amount of specific token account have.2253	fn balance(&self, account: T::CrossAccountId, token: TokenId) -> u128;22542255	/// Amount of token pieces2256	fn total_pieces(&self, token: TokenId) -> Option<u128>;22572258	/// Get the number of parts of the token that a trusted user can manage.2259	///2260	/// * `sender` - Trusted user.2261	/// * `spender` - Owner of the token.2262	/// * `token` - The token for which to get the value.2263	fn allowance(2264		&self,2265		sender: T::CrossAccountId,2266		spender: T::CrossAccountId,2267		token: TokenId,2268	) -> u128;22692270	/// Get extension for RFT collection.2271	fn refungible_extensions(&self) -> Option<&dyn RefungibleExtensions<T>>;22722273	/// The `operator` is allowed to transfer all tokens of the `owner` on their behalf.2274	/// * `owner` - Token owner2275	/// * `operator` - Operator2276	/// * `approve` - Should operator status be granted or revoked?2277	fn set_allowance_for_all(2278		&self,2279		owner: T::CrossAccountId,2280		operator: T::CrossAccountId,2281		approve: bool,2282	) -> DispatchResultWithPostInfo;22832284	/// Tells whether the given `owner` approves the `operator`.2285	fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;22862287	/// Repairs a possibly broken item.2288	fn repair_item(&self, token: TokenId) -> DispatchResultWithPostInfo;2289}22902291/// Extension for RFT collection.2292pub trait RefungibleExtensions<T>2293where2294	T: Config,2295{2296	/// Change the number of parts of the token.2297	///2298	/// When the value changes down, this function is equivalent to burning parts of the token.2299	///2300	/// * `sender` - The user calling the repartition operation. Must be the owner of the token.2301	/// * `token` - The token for which you want to change the number of parts.2302	/// * `amount` - The new value of the parts of the token.2303	fn repartition(2304		&self,2305		sender: &T::CrossAccountId,2306		token: TokenId,2307		amount: u128,2308	) -> DispatchResultWithPostInfo;2309}23102311/// Merge [`DispatchResult`] with [`Weight`] into [`DispatchResultWithPostInfo`].2312///2313/// Used for [`CommonCollectionOperations`] implementations and flexible enough to do so.2314pub fn with_weight(res: DispatchResult, weight: Weight) -> DispatchResultWithPostInfo {2315	let post_info = PostDispatchInfo {2316		actual_weight: Some(weight),2317		pays_fee: Pays::Yes,2318	};2319	match res {2320		Ok(()) => Ok(post_info),2321		Err(error) => Err(DispatchErrorWithPostInfo { post_info, error }),2322	}2323}23242325impl<T: Config> From<PropertiesError> for Error<T> {2326	fn from(error: PropertiesError) -> Self {2327		match error {2328			PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,2329			PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,2330			PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,2331			PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,2332			PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,2333		}2334	}2335}
after · pallets/common/src/lib.rs
1// Copyright 2019-2022 Unique Network (Gibraltar) Ltd.2// This file is part of Unique Network.34// Unique Network is free software: you can redistribute it and/or modify5// it under the terms of the GNU General Public License as published by6// the Free Software Foundation, either version 3 of the License, or7// (at your option) any later version.89// Unique Network is distributed in the hope that it will be useful,10// but WITHOUT ANY WARRANTY; without even the implied warranty of11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the12// GNU General Public License for more details.1314// You should have received a copy of the GNU General Public License15// along with Unique Network. If not, see <http://www.gnu.org/licenses/>.1617//! # Common pallet18//!19//! The Common pallet provides functionality for handling collections.20//!21//! ## Overview22//!23//! The Common pallet provides an interface for common collection operations for different collection types24//! (see [CommonCollectionOperations]), as well as a generic dispatcher for these, see [dispatch] module.25//! It also provides this functionality to EVM, see [erc] and [eth] modules.26//!27//! The Common pallet provides functions for:28//!29//! - Setting and approving collection sponsor.30//! - Get\set\delete allow list.31//! - Get\set\delete collection properties.32//! - Get\set\delete collection property permissions.33//! - Get\set\delete token property permissions.34//! - Get\set\delete collection administrators.35//! - Checking access permissions.36//!37//! ### Terminology38//! **Collection sponsor** - For the collection, you can set a sponsor, at whose expense it will39//! be possible to mint tokens.40//!41//! **Allow list** - List of users who have the right to minting tokens.42//!43//! **Collection properties** - Collection properties are simply key-value stores where various44//! metadata can be placed.45//!46//! **Permissions on token properties** - For each property in the token can be set permission47//! to change, see [`PropertyPermission`].48//!49//! **Collection administrator** - For a collection, you can set administrators who have the right50//! to most actions on the collection.5152#![warn(missing_docs)]53#![cfg_attr(not(feature = "std"), no_std)]54extern crate alloc;5556use core::{57	ops::{Deref, DerefMut},58	slice::from_ref,59};60use pallet_evm_coder_substrate::{SubstrateRecorder, WithRecorder};61use sp_std::vec::Vec;62use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};63use evm_coder::ToLog;64use frame_support::{65	dispatch::{DispatchErrorWithPostInfo, DispatchResultWithPostInfo, Weight, PostDispatchInfo},66	ensure,67	traits::{Imbalance, Get, Currency, WithdrawReasons, ExistenceRequirement},68	dispatch::Pays,69	transactional, fail,70};71use pallet_evm::GasWeightMapping;72use up_data_structs::{73	AccessMode, COLLECTION_NUMBER_LIMIT, Collection, RpcCollection, CollectionFlags,74	RpcCollectionFlags, CollectionId, CreateItemData, MAX_TOKEN_PREFIX_LENGTH,75	COLLECTION_ADMINS_LIMIT, TokenId, TokenChild, CollectionStats, MAX_TOKEN_OWNERSHIP,76	CollectionMode, NFT_SPONSOR_TRANSFER_TIMEOUT, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,77	REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, MAX_SPONSOR_TIMEOUT, CUSTOM_DATA_LIMIT, CollectionLimits,78	CreateCollectionData, SponsorshipState, CreateItemExData, SponsoringRateLimit, budget::Budget,79	PhantomType, Property, CollectionProperties as CollectionPropertiesT, TokenProperties,80	PropertiesPermissionMap, PropertyKey, PropertyValue, PropertyPermission, PropertiesError,81	TokenOwnerError, PropertyKeyPermission, TokenData, TrySetProperty, PropertyScope,82	CollectionPermissions,83};84use up_pov_estimate_rpc::PovInfo;8586pub use pallet::*;87use sp_core::H160;88use sp_runtime::{ArithmeticError, DispatchError, DispatchResult};8990#[cfg(feature = "runtime-benchmarks")]91pub mod benchmarking;92pub mod dispatch;93pub mod erc;94pub mod eth;95pub mod weights;9697/// Weight info.98pub type SelfWeightOf<T> = <T as Config>::WeightInfo;99100/// Collection handle contains information about collection data and id.101/// Also provides functionality to count consumed gas.102///103/// CollectionHandle is used as a generic wrapper for collections of all types.104/// It allows to perform common operations and queries on any collection type,105/// both completely general for all, as well as their respective implementations of [`CommonCollectionOperations`].106#[must_use = "Should call submit_logs or save, otherwise some data will be lost for evm side"]107pub struct CollectionHandle<T: Config> {108	/// Collection id109	pub id: CollectionId,110	collection: Collection<T::AccountId>,111	/// Substrate recorder for counting consumed gas112	pub recorder: SubstrateRecorder<T>,113}114115impl<T: Config> WithRecorder<T> for CollectionHandle<T> {116	fn recorder(&self) -> &SubstrateRecorder<T> {117		&self.recorder118	}119	fn into_recorder(self) -> SubstrateRecorder<T> {120		self.recorder121	}122}123124impl<T: Config> CollectionHandle<T> {125	/// Same as [CollectionHandle::new] but with an explicit gas limit.126	pub fn new_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {127		<CollectionById<T>>::get(id).map(|collection| Self {128			id,129			collection,130			recorder: SubstrateRecorder::new(gas_limit),131		})132	}133134	/// Same as [CollectionHandle::new] but with an existed [`SubstrateRecorder`].135	pub fn new_with_recorder(id: CollectionId, recorder: SubstrateRecorder<T>) -> Option<Self> {136		<CollectionById<T>>::get(id).map(|collection| Self {137			id,138			collection,139			recorder,140		})141	}142143	/// Retrives collection data from storage and creates collection handle with default parameters.144	/// If collection not found return `None`145	pub fn new(id: CollectionId) -> Option<Self> {146		Self::new_with_gas_limit(id, u64::MAX)147	}148149	/// Same as [`CollectionHandle::new`] but if collection not found [CollectionNotFound](Error::CollectionNotFound) returned.150	pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {151		Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)152	}153154	/// Consume gas for reading.155	pub fn consume_store_reads(156		&self,157		reads: u64,158	) -> pallet_evm_coder_substrate::execution::Result<()> {159		self.recorder160			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(161				<T as frame_system::Config>::DbWeight::get()162					.read163					.saturating_mul(reads),164			)))165	}166167	/// Consume gas for writing.168	pub fn consume_store_writes(169		&self,170		writes: u64,171	) -> pallet_evm_coder_substrate::execution::Result<()> {172		self.recorder173			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(174				<T as frame_system::Config>::DbWeight::get()175					.write176					.saturating_mul(writes),177			)))178	}179180	/// Consume gas for reading and writing.181	pub fn consume_store_reads_and_writes(182		&self,183		reads: u64,184		writes: u64,185	) -> pallet_evm_coder_substrate::execution::Result<()> {186		let weight = <T as frame_system::Config>::DbWeight::get();187		let reads = weight.read.saturating_mul(reads);188		let writes = weight.read.saturating_mul(writes);189		self.recorder190			.consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_ref_time(191				reads.saturating_add(writes),192			)))193	}194195	/// Save collection to storage.196	pub fn save(&self) -> DispatchResult {197		<CollectionById<T>>::insert(self.id, &self.collection);198		Ok(())199	}200201	/// Set collection sponsor.202	///203	/// Unique collections allows sponsoring for certain actions.204	/// This method allows you to set the sponsor of the collection.205	/// In order for sponsorship to become active, it must be confirmed through [`Self::confirm_sponsorship`].206	pub fn set_sponsor(207		&mut self,208		sender: &T::CrossAccountId,209		sponsor: T::AccountId,210	) -> DispatchResult {211		self.check_is_internal()?;212		self.check_is_owner_or_admin(sender)?;213214		self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor.clone());215216		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor));217		<PalletEvm<T>>::deposit_log(218			erc::CollectionHelpersEvents::CollectionChanged {219				collection_id: eth::collection_id_to_address(self.id),220			}221			.to_log(T::ContractAddress::get()),222		);223224		self.save()225	}226227	/// Force set `sponsor`.228	///229	/// Differs from [`set_sponsor`][`Self::set_sponsor`] in that confirmation230	/// from the `sponsor` is not required.231	///232	/// # Arguments233	///234	/// * `sender`: Caller's account.235	/// * `sponsor`: ID of the account of the sponsor-to-be.236	pub fn force_set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult {237		self.check_is_internal()?;238239		self.collection.sponsorship = SponsorshipState::Confirmed(sponsor.clone());240241		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor.clone()));242		<Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sponsor));243		<PalletEvm<T>>::deposit_log(244			erc::CollectionHelpersEvents::CollectionChanged {245				collection_id: eth::collection_id_to_address(self.id),246			}247			.to_log(T::ContractAddress::get()),248		);249250		self.save()251	}252253	/// Confirm sponsorship254	///255	/// In order for the sponsorship to become active, the user set as the sponsor must confirm their participation.256	/// Before confirming sponsorship, the user must be specified as the sponsor of the collection via [`Self::set_sponsor`].257	pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> DispatchResult {258		self.check_is_internal()?;259		ensure!(260			self.collection.sponsorship.pending_sponsor() == Some(sender),261			Error::<T>::ConfirmSponsorshipFail262		);263264		self.collection.sponsorship = SponsorshipState::Confirmed(sender.clone());265266		<Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sender.clone()));267		<PalletEvm<T>>::deposit_log(268			erc::CollectionHelpersEvents::CollectionChanged {269				collection_id: eth::collection_id_to_address(self.id),270			}271			.to_log(T::ContractAddress::get()),272		);273274		self.save()275	}276277	/// Remove collection sponsor.278	pub fn remove_sponsor(&mut self, sender: &T::CrossAccountId) -> DispatchResult {279		self.check_is_internal()?;280		self.check_is_owner_or_admin(sender)?;281282		self.collection.sponsorship = SponsorshipState::Disabled;283284		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));285		<PalletEvm<T>>::deposit_log(286			erc::CollectionHelpersEvents::CollectionChanged {287				collection_id: eth::collection_id_to_address(self.id),288			}289			.to_log(T::ContractAddress::get()),290		);291		self.save()292	}293294	/// Force remove `sponsor`.295	///296	/// Differs from `remove_sponsor` in that297	/// it doesn't require consent from the `owner` of the collection.298	pub fn force_remove_sponsor(&mut self) -> DispatchResult {299		self.check_is_internal()?;300301		self.collection.sponsorship = SponsorshipState::Disabled;302303		<Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));304		<PalletEvm<T>>::deposit_log(305			erc::CollectionHelpersEvents::CollectionChanged {306				collection_id: eth::collection_id_to_address(self.id),307			}308			.to_log(T::ContractAddress::get()),309		);310		self.save()311	}312313	/// Checks that the collection was created with, and must be operated upon through **Unique API**.314	/// Now check only the `external` flag and if it's **true**, then return [`Error::CollectionIsExternal`] error.315	pub fn check_is_internal(&self) -> DispatchResult {316		if self.flags.external {317			return Err(<Error<T>>::CollectionIsExternal)?;318		}319320		Ok(())321	}322323	/// Checks that the collection was created with, and must be operated upon through an **assimilated API**.324	/// Now check only the `external` flag and if it's **false**, then return [`Error::CollectionIsInternal`] error.325	pub fn check_is_external(&self) -> DispatchResult {326		if !self.flags.external {327			return Err(<Error<T>>::CollectionIsInternal)?;328		}329330		Ok(())331	}332}333334impl<T: Config> Deref for CollectionHandle<T> {335	type Target = Collection<T::AccountId>;336337	fn deref(&self) -> &Self::Target {338		&self.collection339	}340}341342impl<T: Config> DerefMut for CollectionHandle<T> {343	fn deref_mut(&mut self) -> &mut Self::Target {344		&mut self.collection345	}346}347348impl<T: Config> CollectionHandle<T> {349	/// Checks if the `user` is the owner of the collection.350	pub fn check_is_owner(&self, user: &T::CrossAccountId) -> DispatchResult {351		ensure!(*user.as_sub() == self.owner, <Error<T>>::NoPermission);352		Ok(())353	}354355	/// Returns **true** if the `user` is the owner or administrator of the collection.356	pub fn is_owner_or_admin(&self, user: &T::CrossAccountId) -> bool {357		*user.as_sub() == self.owner || <IsAdmin<T>>::get((self.id, user))358	}359360	/// Checks if the `user` is the owner or administrator of the collection.361	pub fn check_is_owner_or_admin(&self, user: &T::CrossAccountId) -> DispatchResult {362		ensure!(self.is_owner_or_admin(user), <Error<T>>::NoPermission);363		Ok(())364	}365366	/// Returns **true** if367	/// * the `user`is a collection owner or admin368	/// * the collection limits allow the owner/admins to transfer/burn any collection token369	pub fn ignores_token_restrictions(&self, user: &T::CrossAccountId) -> bool {370		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)371	}372373	/// Return **true** if `user` does not have enough token parts, and he can ignore such restrictions.374	pub fn ignores_owned_amount(&self, user: &T::CrossAccountId) -> bool {375		self.limits.owner_can_transfer() && self.is_owner_or_admin(user)376	}377378	/// Checks if the user is in the allow list. If not [Error::AddressNotInAllowlist] returns.379	pub fn check_allowlist(&self, user: &T::CrossAccountId) -> DispatchResult {380		ensure!(381			<Allowlist<T>>::get((self.id, user)),382			<Error<T>>::AddressNotInAllowlist383		);384		Ok(())385	}386387	/// Changes collection owner to another account388	/// #### Store read/writes389	/// 1 writes390	pub fn change_owner(391		&mut self,392		caller: T::CrossAccountId,393		new_owner: T::CrossAccountId,394	) -> DispatchResult {395		self.check_is_internal()?;396		self.check_is_owner(&caller)?;397		self.collection.owner = new_owner.as_sub().clone();398399		<Pallet<T>>::deposit_event(Event::<T>::CollectionOwnerChanged(400			self.id,401			new_owner.as_sub().clone(),402		));403		<PalletEvm<T>>::deposit_log(404			erc::CollectionHelpersEvents::CollectionChanged {405				collection_id: eth::collection_id_to_address(self.id),406			}407			.to_log(T::ContractAddress::get()),408		);409410		self.save()411	}412}413414#[frame_support::pallet]415pub mod pallet {416	use super::*;417	use dispatch::CollectionDispatch;418	use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};419	use frame_system::pallet_prelude::*;420	use frame_support::traits::Currency;421	use up_data_structs::{TokenId, mapping::TokenAddressMapping};422	use scale_info::TypeInfo;423	use weights::WeightInfo;424425	#[pallet::config]426	pub trait Config:427		frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config + TypeInfo428	{429		/// Weight information for functions of this pallet.430		type WeightInfo: WeightInfo;431432		/// Events compatible with [`frame_system::Config::Event`].433		type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;434435		/// Handler of accounts and payment.436		type Currency: Currency<Self::AccountId>;437438		/// Set price to create a collection.439		#[pallet::constant]440		type CollectionCreationPrice: Get<441			<<Self as Config>::Currency as Currency<Self::AccountId>>::Balance,442		>;443444		/// Dispatcher of operations on collections.445		type CollectionDispatch: CollectionDispatch<Self>;446447		/// Account which holds the chain's treasury.448		type TreasuryAccountId: Get<Self::AccountId>;449450		/// Address under which the CollectionHelper contract would be available.451		#[pallet::constant]452		type ContractAddress: Get<H160>;453454		/// Mapper for token addresses to Ethereum addresses.455		type EvmTokenAddressMapping: TokenAddressMapping<H160>;456457		/// Mapper for token addresses to [`CrossAccountId`].458		type CrossTokenAddressMapping: TokenAddressMapping<Self::CrossAccountId>;459	}460461	const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);462463	#[pallet::pallet]464	#[pallet::storage_version(STORAGE_VERSION)]465	#[pallet::generate_store(pub(super) trait Store)]466	pub struct Pallet<T>(_);467468	#[pallet::extra_constants]469	impl<T: Config> Pallet<T> {470		/// Maximum admins per collection.471		pub fn collection_admins_limit() -> u32 {472			COLLECTION_ADMINS_LIMIT473		}474	}475476	impl<T: Config> Pallet<T> {477		/// Helper function that handles deposit events478		pub fn deposit_event(event: Event<T>) {479			let event = <T as Config>::RuntimeEvent::from(event);480			let event = event.into();481			<frame_system::Pallet<T>>::deposit_event(event)482		}483	}484485	#[pallet::event]486	pub enum Event<T: Config> {487		/// New collection was created488		CollectionCreated(489			/// Globally unique identifier of newly created collection.490			CollectionId,491			/// [`CollectionMode`] converted into _u8_.492			u8,493			/// Collection owner.494			T::AccountId,495		),496497		/// New collection was destroyed498		CollectionDestroyed(499			/// Globally unique identifier of collection.500			CollectionId,501		),502503		/// New item was created.504		ItemCreated(505			/// Id of the collection where item was created.506			CollectionId,507			/// Id of an item. Unique within the collection.508			TokenId,509			/// Owner of newly created item510			T::CrossAccountId,511			/// Always 1 for NFT512			u128,513		),514515		/// Collection item was burned.516		ItemDestroyed(517			/// Id of the collection where item was destroyed.518			CollectionId,519			/// Identifier of burned NFT.520			TokenId,521			/// Which user has destroyed its tokens.522			T::CrossAccountId,523			/// Amount of token pieces destroed. Always 1 for NFT.524			u128,525		),526527		/// Item was transferred528		Transfer(529			/// Id of collection to which item is belong.530			CollectionId,531			/// Id of an item.532			TokenId,533			/// Original owner of item.534			T::CrossAccountId,535			/// New owner of item.536			T::CrossAccountId,537			/// Amount of token pieces transfered. Always 1 for NFT.538			u128,539		),540541		/// Amount pieces of token owned by `sender` was approved for `spender`.542		Approved(543			/// Id of collection to which item is belong.544			CollectionId,545			/// Id of an item.546			TokenId,547			/// Original owner of item.548			T::CrossAccountId,549			/// Id for which the approval was granted.550			T::CrossAccountId,551			/// Amount of token pieces transfered. Always 1 for NFT.552			u128,553		),554555		/// A `sender` approves operations on all owned tokens for `spender`.556		ApprovedForAll(557			/// Id of collection to which item is belong.558			CollectionId,559			/// Owner of a wallet.560			T::CrossAccountId,561			/// Id for which operator status was granted or rewoked.562			T::CrossAccountId,563			/// Is operator status granted or revoked?564			bool,565		),566567		/// The colletion property has been added or edited.568		CollectionPropertySet(569			/// Id of collection to which property has been set.570			CollectionId,571			/// The property that was set.572			PropertyKey,573		),574575		/// The property has been deleted.576		CollectionPropertyDeleted(577			/// Id of collection to which property has been deleted.578			CollectionId,579			/// The property that was deleted.580			PropertyKey,581		),582583		/// The token property has been added or edited.584		TokenPropertySet(585			/// Identifier of the collection whose token has the property set.586			CollectionId,587			/// The token for which the property was set.588			TokenId,589			/// The property that was set.590			PropertyKey,591		),592593		/// The token property has been deleted.594		TokenPropertyDeleted(595			/// Identifier of the collection whose token has the property deleted.596			CollectionId,597			/// The token for which the property was deleted.598			TokenId,599			/// The property that was deleted.600			PropertyKey,601		),602603		/// The token property permission of a collection has been set.604		PropertyPermissionSet(605			/// ID of collection to which property permission has been set.606			CollectionId,607			/// The property permission that was set.608			PropertyKey,609		),610611		/// Address was added to the allow list.612		AllowListAddressAdded(613			/// ID of the affected collection.614			CollectionId,615			/// Address of the added account.616			T::CrossAccountId,617		),618619		/// Address was removed from the allow list.620		AllowListAddressRemoved(621			/// ID of the affected collection.622			CollectionId,623			/// Address of the removed account.624			T::CrossAccountId,625		),626627		/// Collection admin was added.628		CollectionAdminAdded(629			/// ID of the affected collection.630			CollectionId,631			/// Admin address.632			T::CrossAccountId,633		),634635		/// Collection admin was removed.636		CollectionAdminRemoved(637			/// ID of the affected collection.638			CollectionId,639			/// Removed admin address.640			T::CrossAccountId,641		),642643		/// Collection limits were set.644		CollectionLimitSet(645			/// ID of the affected collection.646			CollectionId,647		),648649		/// Collection owned was changed.650		CollectionOwnerChanged(651			/// ID of the affected collection.652			CollectionId,653			/// New owner address.654			T::AccountId,655		),656657		/// Collection permissions were set.658		CollectionPermissionSet(659			/// ID of the affected collection.660			CollectionId,661		),662663		/// Collection sponsor was set.664		CollectionSponsorSet(665			/// ID of the affected collection.666			CollectionId,667			/// New sponsor address.668			T::AccountId,669		),670671		/// New sponsor was confirm.672		SponsorshipConfirmed(673			/// ID of the affected collection.674			CollectionId,675			/// New sponsor address.676			T::AccountId,677		),678679		/// Collection sponsor was removed.680		CollectionSponsorRemoved(681			/// ID of the affected collection.682			CollectionId,683		),684	}685686	#[pallet::error]687	pub enum Error<T> {688		/// This collection does not exist.689		CollectionNotFound,690		/// Sender parameter and item owner must be equal.691		MustBeTokenOwner,692		/// No permission to perform action693		NoPermission,694		/// Destroying only empty collections is allowed695		CantDestroyNotEmptyCollection,696		/// Collection is not in mint mode.697		PublicMintingNotAllowed,698		/// Address is not in allow list.699		AddressNotInAllowlist,700701		/// Collection name can not be longer than 63 char.702		CollectionNameLimitExceeded,703		/// Collection description can not be longer than 255 char.704		CollectionDescriptionLimitExceeded,705		/// Token prefix can not be longer than 15 char.706		CollectionTokenPrefixLimitExceeded,707		/// Total collections bound exceeded.708		TotalCollectionsLimitExceeded,709		/// Exceeded max admin count710		CollectionAdminCountExceeded,711		/// Collection limit bounds per collection exceeded712		CollectionLimitBoundsExceeded,713		/// Tried to enable permissions which are only permitted to be disabled714		OwnerPermissionsCantBeReverted,715		/// Collection settings not allowing items transferring716		TransferNotAllowed,717		/// Account token limit exceeded per collection718		AccountTokenLimitExceeded,719		/// Collection token limit exceeded720		CollectionTokenLimitExceeded,721		/// Metadata flag frozen722		MetadataFlagFrozen,723724		/// Item does not exist725		TokenNotFound,726		/// Item is balance not enough727		TokenValueTooLow,728		/// Requested value is more than the approved729		ApprovedValueTooLow,730		/// Tried to approve more than owned731		CantApproveMoreThanOwned,732		/// Only spending from eth mirror could be approved733		AddressIsNotEthMirror,734735		/// Can't transfer tokens to ethereum zero address736		AddressIsZero,737738		/// The operation is not supported739		UnsupportedOperation,740741		/// Insufficient funds to perform an action742		NotSufficientFounds,743744		/// User does not satisfy the nesting rule745		UserIsNotAllowedToNest,746		/// Only tokens from specific collections may nest tokens under this one747		SourceCollectionIsNotAllowedToNest,748749		/// Tried to store more data than allowed in collection field750		CollectionFieldSizeExceeded,751752		/// Tried to store more property data than allowed753		NoSpaceForProperty,754755		/// Tried to store more property keys than allowed756		PropertyLimitReached,757758		/// Property key is too long759		PropertyKeyIsTooLong,760761		/// Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed762		InvalidCharacterInPropertyKey,763764		/// Empty property keys are forbidden765		EmptyPropertyKey,766767		/// Tried to access an external collection with an internal API768		CollectionIsExternal,769770		/// Tried to access an internal collection with an external API771		CollectionIsInternal,772773		/// This address is not set as sponsor, use setCollectionSponsor first.774		ConfirmSponsorshipFail,775776		/// The user is not an administrator.777		UserIsNotCollectionAdmin,778	}779780	/// Storage of the count of created collections. Essentially contains the last collection ID.781	#[pallet::storage]782	pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;783784	/// Storage of the count of deleted collections.785	#[pallet::storage]786	pub type DestroyedCollectionCount<T> =787		StorageValue<Value = CollectionId, QueryKind = ValueQuery>;788789	/// Storage of collection info.790	#[pallet::storage]791	pub type CollectionById<T> = StorageMap<792		Hasher = Blake2_128Concat,793		Key = CollectionId,794		Value = Collection<<T as frame_system::Config>::AccountId>,795		QueryKind = OptionQuery,796	>;797798	/// Storage of collection properties.799	#[pallet::storage]800	#[pallet::getter(fn collection_properties)]801	pub type CollectionProperties<T> = StorageMap<802		Hasher = Blake2_128Concat,803		Key = CollectionId,804		Value = CollectionPropertiesT,805		QueryKind = ValueQuery,806	>;807808	/// Storage of token property permissions of a collection.809	#[pallet::storage]810	#[pallet::getter(fn property_permissions)]811	pub type CollectionPropertyPermissions<T> = StorageMap<812		Hasher = Blake2_128Concat,813		Key = CollectionId,814		Value = PropertiesPermissionMap,815		QueryKind = ValueQuery,816	>;817818	/// Storage of the amount of collection admins.819	#[pallet::storage]820	pub type AdminAmount<T> = StorageMap<821		Hasher = Blake2_128Concat,822		Key = CollectionId,823		Value = u32,824		QueryKind = ValueQuery,825	>;826827	/// List of collection admins.828	#[pallet::storage]829	pub type IsAdmin<T: Config> = StorageNMap<830		Key = (831			Key<Blake2_128Concat, CollectionId>,832			Key<Blake2_128Concat, T::CrossAccountId>,833		),834		Value = bool,835		QueryKind = ValueQuery,836	>;837838	/// Allowlisted collection users.839	#[pallet::storage]840	pub type Allowlist<T: Config> = StorageNMap<841		Key = (842			Key<Blake2_128Concat, CollectionId>,843			Key<Blake2_128Concat, T::CrossAccountId>,844		),845		Value = bool,846		QueryKind = ValueQuery,847	>;848849	/// Not used by code, exists only to provide some types to metadata.850	#[pallet::storage]851	pub type DummyStorageValue<T: Config> = StorageValue<852		Value = (853			CollectionStats,854			CollectionId,855			TokenId,856			TokenChild,857			PhantomType<(858				TokenData<T::CrossAccountId>,859				RpcCollection<T::AccountId>,860				// PoV Estimate Info861				PovInfo,862			)>,863		),864		QueryKind = OptionQuery,865	>;866867	#[pallet::hooks]868	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {869		fn on_runtime_upgrade() -> Weight {870			StorageVersion::new(1).put::<Pallet<T>>();871872			Weight::zero()873		}874	}875}876877impl<T: Config> Pallet<T> {878	/// Enshure that receiver address is correct.879	///880	/// Ethereum receiver 0x0000000000000000000000000000000000000000 is reserved, and shouldn't own tokens.881	pub fn ensure_correct_receiver(receiver: &T::CrossAccountId) -> DispatchResult {882		ensure!(883			&T::CrossAccountId::from_eth(H160([0; 20])) != receiver,884			<Error<T>>::AddressIsZero885		);886		Ok(())887	}888889	/// Get a vector of collection admins.890	pub fn adminlist(collection: CollectionId) -> Vec<T::CrossAccountId> {891		<IsAdmin<T>>::iter_prefix((collection,))892			.map(|(a, _)| a)893			.collect()894	}895896	/// Get a vector of users allowed to mint tokens.897	pub fn allowlist(collection: CollectionId) -> Vec<T::CrossAccountId> {898		<Allowlist<T>>::iter_prefix((collection,))899			.map(|(a, _)| a)900			.collect()901	}902903	/// Is `user` allowed to mint token in `collection`.904	pub fn allowed(collection: CollectionId, user: T::CrossAccountId) -> bool {905		<Allowlist<T>>::get((collection, user))906	}907908	/// Get statistics of collections.909	pub fn collection_stats() -> CollectionStats {910		let created = <CreatedCollectionCount<T>>::get();911		let destroyed = <DestroyedCollectionCount<T>>::get();912		CollectionStats {913			created: created.0,914			destroyed: destroyed.0,915			alive: created.0 - destroyed.0,916		}917	}918919	/// Get the effective limits for the collection.920	pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {921		let collection = <CollectionById<T>>::get(collection)?;922		let limits = collection.limits;923		let effective_limits = CollectionLimits {924			account_token_ownership_limit: Some(limits.account_token_ownership_limit()),925			sponsored_data_size: Some(limits.sponsored_data_size()),926			sponsored_data_rate_limit: Some(927				limits928					.sponsored_data_rate_limit929					.unwrap_or(SponsoringRateLimit::SponsoringDisabled),930			),931			token_limit: Some(limits.token_limit()),932			sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(933				match collection.mode {934					CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,935					CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,936					CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,937				},938			)),939			sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),940			owner_can_transfer: Some(limits.owner_can_transfer()),941			owner_can_destroy: Some(limits.owner_can_destroy()),942			transfers_enabled: Some(limits.transfers_enabled()),943		};944945		Some(effective_limits)946	}947948	/// Returns information about the `collection` adapted for rpc.949	pub fn rpc_collection(collection: CollectionId) -> Option<RpcCollection<T::AccountId>> {950		let Collection {951			name,952			description,953			owner,954			mode,955			token_prefix,956			sponsorship,957			limits,958			permissions,959			flags,960		} = <CollectionById<T>>::get(collection)?;961962		let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)963			.into_iter()964			.map(|(key, permission)| PropertyKeyPermission { key, permission })965			.collect();966967		let properties = <CollectionProperties<T>>::get(collection)968			.into_iter()969			.map(|(key, value)| Property { key, value })970			.collect();971972		let permissions = CollectionPermissions {973			access: Some(permissions.access()),974			mint_mode: Some(permissions.mint_mode()),975			nesting: Some(permissions.nesting().clone()),976		};977978		Some(RpcCollection {979			name: name.into_inner(),980			description: description.into_inner(),981			owner,982			mode,983			token_prefix: token_prefix.into_inner(),984			sponsorship,985			limits,986			permissions,987			token_property_permissions,988			properties,989			read_only: flags.external,990991			flags: RpcCollectionFlags {992				foreign: flags.foreign,993				erc721metadata: flags.erc721metadata,994			},995		})996	}997}998999macro_rules! limit_default {1000	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1001		$(1002			if let Some($new) = $new.$field {1003				let $old = $old.$field($($arg)?);1004				let _ = $new;1005				let _ = $old;1006				$check1007			} else {1008				$new.$field = $old.$field1009			}1010		)*1011	}};1012}1013macro_rules! limit_default_clone {1014	($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1015		$(1016			if let Some($new) = $new.$field.clone() {1017				let $old = $old.$field($($arg)?);1018				let _ = $new;1019				let _ = $old;1020				$check1021			} else {1022				$new.$field = $old.$field.clone()1023			}1024		)*1025	}};1026}10271028impl<T: Config> Pallet<T> {1029	/// Create new collection.1030	///1031	/// * `owner` - The owner of the collection.1032	/// * `data` - Description of the created collection.1033	/// * `flags` - Extra flags to store.1034	pub fn init_collection(1035		owner: T::CrossAccountId,1036		payer: T::CrossAccountId,1037		data: CreateCollectionData<T::AccountId>,1038		flags: CollectionFlags,1039	) -> Result<CollectionId, DispatchError> {1040		{1041			ensure!(1042				data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,1043				Error::<T>::CollectionTokenPrefixLimitExceeded1044			);1045		}10461047		let created_count = <CreatedCollectionCount<T>>::get()1048			.01049			.checked_add(1)1050			.ok_or(ArithmeticError::Overflow)?;1051		let destroyed_count = <DestroyedCollectionCount<T>>::get().0;1052		let id = CollectionId(created_count);10531054		// bound Total number of collections1055		ensure!(1056			created_count - destroyed_count <= COLLECTION_NUMBER_LIMIT,1057			<Error<T>>::TotalCollectionsLimitExceeded1058		);10591060		// =========10611062		let collection = Collection {1063			owner: owner.as_sub().clone(),1064			name: data.name,1065			mode: data.mode.clone(),1066			description: data.description,1067			token_prefix: data.token_prefix,1068			sponsorship: data1069				.pending_sponsor1070				.map(SponsorshipState::Unconfirmed)1071				.unwrap_or_default(),1072			limits: data1073				.limits1074				.map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))1075				.unwrap_or_else(|| Ok(CollectionLimits::default()))?,1076			permissions: data1077				.permissions1078				.map(|permissions| {1079					Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)1080				})1081				.unwrap_or_else(|| Ok(CollectionPermissions::default()))?,1082			flags,1083		};10841085		let mut collection_properties = CollectionPropertiesT::new();1086		collection_properties1087			.try_set_from_iter(data.properties.into_iter())1088			.map_err(<Error<T>>::from)?;10891090		CollectionProperties::<T>::insert(id, collection_properties);10911092		let mut token_props_permissions = PropertiesPermissionMap::new();1093		token_props_permissions1094			.try_set_from_iter(data.token_property_permissions.into_iter())1095			.map_err(<Error<T>>::from)?;10961097		CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);10981099		// Take a (non-refundable) deposit of collection creation1100		{1101			let mut imbalance =1102				<<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();1103			imbalance.subsume(1104				<<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(1105					&T::TreasuryAccountId::get(),1106					T::CollectionCreationPrice::get(),1107				),1108			);1109			<T as Config>::Currency::settle(1110				payer.as_sub(),1111				imbalance,1112				WithdrawReasons::TRANSFER,1113				ExistenceRequirement::KeepAlive,1114			)1115			.map_err(|_| Error::<T>::NotSufficientFounds)?;1116		}11171118		<CreatedCollectionCount<T>>::put(created_count);1119		<Pallet<T>>::deposit_event(Event::CollectionCreated(1120			id,1121			data.mode.id(),1122			owner.as_sub().clone(),1123		));1124		<PalletEvm<T>>::deposit_log(1125			erc::CollectionHelpersEvents::CollectionCreated {1126				owner: *owner.as_eth(),1127				collection_id: eth::collection_id_to_address(id),1128			}1129			.to_log(T::ContractAddress::get()),1130		);1131		<CollectionById<T>>::insert(id, collection);1132		Ok(id)1133	}11341135	/// Destroy collection.1136	///1137	/// * `collection` - Collection handler.1138	/// * `sender` - The owner or administrator of the collection.1139	pub fn destroy_collection(1140		collection: CollectionHandle<T>,1141		sender: &T::CrossAccountId,1142	) -> DispatchResult {1143		ensure!(1144			collection.limits.owner_can_destroy(),1145			<Error<T>>::NoPermission,1146		);1147		collection.check_is_owner(sender)?;11481149		let destroyed_collections = <DestroyedCollectionCount<T>>::get()1150			.01151			.checked_add(1)1152			.ok_or(ArithmeticError::Overflow)?;11531154		// =========11551156		<DestroyedCollectionCount<T>>::put(destroyed_collections);1157		<CollectionById<T>>::remove(collection.id);1158		<AdminAmount<T>>::remove(collection.id);1159		let _ = <IsAdmin<T>>::clear_prefix((collection.id,), u32::MAX, None);1160		let _ = <Allowlist<T>>::clear_prefix((collection.id,), u32::MAX, None);1161		<CollectionProperties<T>>::remove(collection.id);11621163		<Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));11641165		<PalletEvm<T>>::deposit_log(1166			erc::CollectionHelpersEvents::CollectionDestroyed {1167				collection_id: eth::collection_id_to_address(collection.id),1168			}1169			.to_log(T::ContractAddress::get()),1170		);1171		Ok(())1172	}11731174	/// This function sets or removes a collection properties according to1175	/// `properties_updates` contents:1176	/// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1177	/// * removes a property under the <key> if the value is `None` `(<key>, None)`.1178	///1179	/// This function fires an event for each property change.1180	/// In case of an error, all the changes (including the events) will be reverted1181	/// since the function is transactional.1182	#[transactional]1183	fn modify_collection_properties(1184		collection: &CollectionHandle<T>,1185		sender: &T::CrossAccountId,1186		properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1187	) -> DispatchResult {1188		collection.check_is_owner_or_admin(sender)?;11891190		let mut stored_properties = <CollectionProperties<T>>::get(collection.id);11911192		for (key, value) in properties_updates {1193			match value {1194				Some(value) => {1195					stored_properties1196						.try_set(key.clone(), value)1197						.map_err(<Error<T>>::from)?;11981199					Self::deposit_event(Event::CollectionPropertySet(collection.id, key));1200					<PalletEvm<T>>::deposit_log(1201						erc::CollectionHelpersEvents::CollectionChanged {1202							collection_id: eth::collection_id_to_address(collection.id),1203						}1204						.to_log(T::ContractAddress::get()),1205					);1206				}1207				None => {1208					stored_properties.remove(&key).map_err(<Error<T>>::from)?;12091210					Self::deposit_event(Event::CollectionPropertyDeleted(collection.id, key));1211					<PalletEvm<T>>::deposit_log(1212						erc::CollectionHelpersEvents::CollectionChanged {1213							collection_id: eth::collection_id_to_address(collection.id),1214						}1215						.to_log(T::ContractAddress::get()),1216					);1217				}1218			}1219		}12201221		<CollectionProperties<T>>::set(collection.id, stored_properties);12221223		Ok(())1224	}12251226	/// A batch operation to add, edit or remove properties for a token.1227	/// It sets or removes a token's properties according to1228	/// `properties_updates` contents:1229	/// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1230	/// * removes a property under the <key> if the value is `None` `(<key>, None)`.1231	///1232	/// - `nesting_budget`: Limit for searching parents in-depth to check ownership.1233	/// - `is_token_create`: Indicates that method is called during token initialization.1234	///   Allows to bypass ownership check.1235	///1236	/// All affected properties should have `mutable` permission1237	/// to be **deleted** or to be **set more than once**,1238	/// and the sender should have permission to edit those properties.1239	///1240	/// This function fires an event for each property change.1241	/// In case of an error, all the changes (including the events) will be reverted1242	/// since the function is transactional.1243	pub fn modify_token_properties(1244		collection: &CollectionHandle<T>,1245		sender: &T::CrossAccountId,1246		token_id: TokenId,1247		properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1248		is_token_create: bool,1249		mut stored_properties: TokenProperties,1250		is_token_owner: impl Fn() -> Result<bool, DispatchError>,1251		set_token_properties: impl FnOnce(TokenProperties),1252		log: evm_coder::ethereum::Log,1253	) -> DispatchResult {1254		let is_collection_admin = collection.is_owner_or_admin(sender);1255		let permissions = Self::property_permissions(collection.id);12561257		let mut token_owner_result = None;1258		let mut is_token_owner = || -> Result<bool, DispatchError> {1259			*token_owner_result.get_or_insert_with(&is_token_owner)1260		};12611262		for (key, value) in properties_updates {1263			let permission = permissions1264				.get(&key)1265				.cloned()1266				.unwrap_or_else(PropertyPermission::none);12671268			let is_property_exists = stored_properties.get(&key).is_some();12691270			match permission {1271				PropertyPermission { mutable: false, .. } if is_property_exists => {1272					return Err(<Error<T>>::NoPermission.into());1273				}12741275				PropertyPermission {1276					collection_admin,1277					token_owner,1278					..1279				} => {1280					//TODO: investigate threats during public minting.1281					let is_token_create =1282						is_token_create && (collection_admin || token_owner) && value.is_some();1283					if !(is_token_create1284						|| (collection_admin && is_collection_admin)1285						|| (token_owner && is_token_owner()?))1286					{1287						fail!(<Error<T>>::NoPermission);1288					}1289				}1290			}12911292			match value {1293				Some(value) => {1294					stored_properties1295						.try_set(key.clone(), value)1296						.map_err(<Error<T>>::from)?;12971298					Self::deposit_event(Event::TokenPropertySet(collection.id, token_id, key));1299				}1300				None => {1301					stored_properties.remove(&key).map_err(<Error<T>>::from)?;13021303					Self::deposit_event(Event::TokenPropertyDeleted(collection.id, token_id, key));1304				}1305			}13061307			<PalletEvm<T>>::deposit_log(log.clone());1308		}13091310		set_token_properties(stored_properties);13111312		Ok(())1313	}13141315	/// Sets or unsets the approval of a given operator.1316	///1317	/// The `operator` is allowed to transfer all token pieces of the `owner` on their behalf.1318	/// - `owner`: Token owner1319	/// - `operator`: Operator1320	/// - `approve`: Should operator status be granted or revoked?1321	pub fn set_allowance_for_all(1322		collection: &CollectionHandle<T>,1323		owner: &T::CrossAccountId,1324		operator: &T::CrossAccountId,1325		approve: bool,1326		set_allowance: impl FnOnce(),1327		log: evm_coder::ethereum::Log,1328	) -> DispatchResult {1329		if collection.permissions.access() == AccessMode::AllowList {1330			collection.check_allowlist(owner)?;1331			collection.check_allowlist(operator)?;1332		}13331334		Self::ensure_correct_receiver(operator)?;13351336		set_allowance();13371338		<PalletEvm<T>>::deposit_log(log);1339		Self::deposit_event(Event::ApprovedForAll(1340			collection.id,1341			owner.clone(),1342			operator.clone(),1343			approve,1344		));1345		Ok(())1346	}13471348	/// Set collection property.1349	///1350	/// * `collection` - Collection handler.1351	/// * `sender` - The owner or administrator of the collection.1352	/// * `property` - The property to set.1353	pub fn set_collection_property(1354		collection: &CollectionHandle<T>,1355		sender: &T::CrossAccountId,1356		property: Property,1357	) -> DispatchResult {1358		Self::set_collection_properties(collection, sender, [property].into_iter())1359	}13601361	/// Set a scoped collection property, where the scope is a special prefix1362	/// prohibiting a user access to change the property directly.1363	///1364	/// * `collection_id` - ID of the collection for which the property is being set.1365	/// * `scope` - Property scope.1366	/// * `property` - The property to set.1367	pub fn set_scoped_collection_property(1368		collection_id: CollectionId,1369		scope: PropertyScope,1370		property: Property,1371	) -> DispatchResult {1372		CollectionProperties::<T>::try_mutate(collection_id, |properties| {1373			properties.try_scoped_set(scope, property.key, property.value)1374		})1375		.map_err(<Error<T>>::from)?;13761377		Ok(())1378	}13791380	/// Set scoped collection properties, where the scope is a special prefix1381	/// prohibiting a user access to change the properties directly.1382	///1383	/// * `collection_id` - ID of the collection for which the properties is being set.1384	/// * `scope` - Property scope.1385	/// * `properties` - The properties to set.1386	pub fn set_scoped_collection_properties(1387		collection_id: CollectionId,1388		scope: PropertyScope,1389		properties: impl Iterator<Item = Property>,1390	) -> DispatchResult {1391		CollectionProperties::<T>::try_mutate(collection_id, |stored_properties| {1392			stored_properties.try_scoped_set_from_iter(scope, properties)1393		})1394		.map_err(<Error<T>>::from)?;13951396		Ok(())1397	}13981399	/// Set collection properties.1400	///1401	/// * `collection` - Collection handler.1402	/// * `sender` - The owner or administrator of the collection.1403	/// * `properties` - The properties to set.1404	pub fn set_collection_properties(1405		collection: &CollectionHandle<T>,1406		sender: &T::CrossAccountId,1407		properties: impl Iterator<Item = Property>,1408	) -> DispatchResult {1409		Self::modify_collection_properties(1410			collection,1411			sender,1412			properties.map(|property| (property.key, Some(property.value))),1413		)1414	}14151416	/// Delete collection property.1417	///1418	/// * `collection` - Collection handler.1419	/// * `sender` - The owner or administrator of the collection.1420	/// * `property` - The property to delete.1421	pub fn delete_collection_property(1422		collection: &CollectionHandle<T>,1423		sender: &T::CrossAccountId,1424		property_key: PropertyKey,1425	) -> DispatchResult {1426		Self::delete_collection_properties(collection, sender, [property_key].into_iter())1427	}14281429	/// Delete collection properties.1430	///1431	/// * `collection` - Collection handler.1432	/// * `sender` - The owner or administrator of the collection.1433	/// * `properties` - The properties to delete.1434	pub fn delete_collection_properties(1435		collection: &CollectionHandle<T>,1436		sender: &T::CrossAccountId,1437		property_keys: impl Iterator<Item = PropertyKey>,1438	) -> DispatchResult {1439		Self::modify_collection_properties(collection, sender, property_keys.map(|key| (key, None)))1440	}14411442	/// Set collection propetry permission without any checks.1443	///1444	/// Used for migrations.1445	///1446	/// * `collection` - Collection handler.1447	/// * `property_permissions` - Property permissions.1448	pub fn set_property_permission_unchecked(1449		collection: CollectionId,1450		property_permission: PropertyKeyPermission,1451	) -> DispatchResult {1452		<CollectionPropertyPermissions<T>>::try_mutate(collection, |permissions| {1453			permissions.try_set(property_permission.key, property_permission.permission)1454		})1455		.map_err(<Error<T>>::from)?;1456		Ok(())1457	}14581459	/// Set collection property permission.1460	///1461	/// * `collection` - Collection handler.1462	/// * `sender` - The owner or administrator of the collection.1463	/// * `property_permission` - Property permission.1464	pub fn set_property_permission(1465		collection: &CollectionHandle<T>,1466		sender: &T::CrossAccountId,1467		property_permission: PropertyKeyPermission,1468	) -> DispatchResult {1469		Self::set_scoped_property_permission(1470			collection,1471			sender,1472			PropertyScope::None,1473			property_permission,1474		)1475	}14761477	/// Set collection property permission with scope.1478	///1479	/// * `collection` - Collection handler.1480	/// * `sender` - The owner or administrator of the collection.1481	/// * `scope` - Property scope.1482	/// * `property_permission` - Property permission.1483	pub fn set_scoped_property_permission(1484		collection: &CollectionHandle<T>,1485		sender: &T::CrossAccountId,1486		scope: PropertyScope,1487		property_permission: PropertyKeyPermission,1488	) -> DispatchResult {1489		collection.check_is_owner_or_admin(sender)?;14901491		let all_permissions = CollectionPropertyPermissions::<T>::get(collection.id);1492		let current_permission = all_permissions.get(&property_permission.key);1493		if matches![1494			current_permission,1495			Some(PropertyPermission { mutable: false, .. })1496		] {1497			return Err(<Error<T>>::NoPermission.into());1498		}14991500		CollectionPropertyPermissions::<T>::try_mutate(collection.id, |permissions| {1501			let property_permission = property_permission.clone();1502			permissions.try_scoped_set(1503				scope,1504				property_permission.key,1505				property_permission.permission,1506			)1507		})1508		.map_err(<Error<T>>::from)?;15091510		Self::deposit_event(Event::PropertyPermissionSet(1511			collection.id,1512			property_permission.key,1513		));1514		<PalletEvm<T>>::deposit_log(1515			erc::CollectionHelpersEvents::CollectionChanged {1516				collection_id: eth::collection_id_to_address(collection.id),1517			}1518			.to_log(T::ContractAddress::get()),1519		);15201521		Ok(())1522	}15231524	/// Set token property permission.1525	///1526	/// * `collection` - Collection handler.1527	/// * `sender` - The owner or administrator of the collection.1528	/// * `property_permissions` - Property permissions.1529	#[transactional]1530	pub fn set_token_property_permissions(1531		collection: &CollectionHandle<T>,1532		sender: &T::CrossAccountId,1533		property_permissions: Vec<PropertyKeyPermission>,1534	) -> DispatchResult {1535		Self::set_scoped_token_property_permissions(1536			collection,1537			sender,1538			PropertyScope::None,1539			property_permissions,1540		)1541	}15421543	/// Set token property permission with scope.1544	///1545	/// * `collection` - Collection handler.1546	/// * `sender` - The owner or administrator of the collection.1547	/// * `scope` - Property scope.1548	/// * `property_permissions` - Property permissions.1549	#[transactional]1550	pub fn set_scoped_token_property_permissions(1551		collection: &CollectionHandle<T>,1552		sender: &T::CrossAccountId,1553		scope: PropertyScope,1554		property_permissions: Vec<PropertyKeyPermission>,1555	) -> DispatchResult {1556		for prop_pemission in property_permissions {1557			Self::set_scoped_property_permission(collection, sender, scope, prop_pemission)?;1558		}15591560		Ok(())1561	}15621563	/// Get collection property.1564	pub fn get_collection_property(1565		collection_id: CollectionId,1566		key: &PropertyKey,1567	) -> Option<PropertyValue> {1568		Self::collection_properties(collection_id).get(key).cloned()1569	}15701571	/// Convert byte vector to property key vector.1572	pub fn bytes_keys_to_property_keys(1573		keys: Vec<Vec<u8>>,1574	) -> Result<Vec<PropertyKey>, DispatchError> {1575		keys.into_iter()1576			.map(|key| -> Result<PropertyKey, DispatchError> {1577				key.try_into()1578					.map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())1579			})1580			.collect::<Result<Vec<PropertyKey>, DispatchError>>()1581	}15821583	/// Get properties according to given keys.1584	pub fn filter_collection_properties(1585		collection_id: CollectionId,1586		keys: Option<Vec<PropertyKey>>,1587	) -> Result<Vec<Property>, DispatchError> {1588		let properties = Self::collection_properties(collection_id);15891590		let properties = keys1591			.map(|keys| {1592				keys.into_iter()1593					.filter_map(|key| {1594						properties.get(&key).map(|value| Property {1595							key,1596							value: value.clone(),1597						})1598					})1599					.collect()1600			})1601			.unwrap_or_else(|| {1602				properties1603					.into_iter()1604					.map(|(key, value)| Property { key, value })1605					.collect()1606			});16071608		Ok(properties)1609	}16101611	/// Get property permissions according to given keys.1612	pub fn filter_property_permissions(1613		collection_id: CollectionId,1614		keys: Option<Vec<PropertyKey>>,1615	) -> Result<Vec<PropertyKeyPermission>, DispatchError> {1616		let permissions = Self::property_permissions(collection_id);16171618		let key_permissions = keys1619			.map(|keys| {1620				keys.into_iter()1621					.filter_map(|key| {1622						permissions1623							.get(&key)1624							.map(|permission| PropertyKeyPermission {1625								key,1626								permission: permission.clone(),1627							})1628					})1629					.collect()1630			})1631			.unwrap_or_else(|| {1632				permissions1633					.into_iter()1634					.map(|(key, permission)| PropertyKeyPermission { key, permission })1635					.collect()1636			});16371638		Ok(key_permissions)1639	}16401641	/// Toggle `user` participation in the `collection`'s allow list.1642	/// #### Store read/writes1643	/// 1 writes1644	pub fn toggle_allowlist(1645		collection: &CollectionHandle<T>,1646		sender: &T::CrossAccountId,1647		user: &T::CrossAccountId,1648		allowed: bool,1649	) -> DispatchResult {1650		collection.check_is_owner_or_admin(sender)?;16511652		// =========16531654		if allowed {1655			<Allowlist<T>>::insert((collection.id, user), true);1656			Self::deposit_event(Event::<T>::AllowListAddressAdded(1657				collection.id,1658				user.clone(),1659			));1660		} else {1661			<Allowlist<T>>::remove((collection.id, user));1662			Self::deposit_event(Event::<T>::AllowListAddressRemoved(1663				collection.id,1664				user.clone(),1665			));1666		}16671668		<PalletEvm<T>>::deposit_log(1669			erc::CollectionHelpersEvents::CollectionChanged {1670				collection_id: eth::collection_id_to_address(collection.id),1671			}1672			.to_log(T::ContractAddress::get()),1673		);16741675		Ok(())1676	}16771678	/// Toggle `user` participation in the `collection`'s admin list.1679	/// #### Store read/writes1680	/// 2 reads, 2 writes1681	pub fn toggle_admin(1682		collection: &CollectionHandle<T>,1683		sender: &T::CrossAccountId,1684		user: &T::CrossAccountId,1685		admin: bool,1686	) -> DispatchResult {1687		collection.check_is_internal()?;1688		collection.check_is_owner(sender)?;16891690		let is_admin = <IsAdmin<T>>::get((collection.id, user));1691		if is_admin == admin {1692			if admin {1693				return Ok(());1694			} else {1695				return Err(Error::<T>::UserIsNotCollectionAdmin.into());1696			}1697		}1698		let amount = <AdminAmount<T>>::get(collection.id);16991700		// =========17011702		if admin {1703			let amount = amount1704				.checked_add(1)1705				.ok_or(<Error<T>>::CollectionAdminCountExceeded)?;1706			ensure!(1707				amount <= Self::collection_admins_limit(),1708				<Error<T>>::CollectionAdminCountExceeded,1709			);17101711			<AdminAmount<T>>::insert(collection.id, amount);1712			<IsAdmin<T>>::insert((collection.id, user), true);17131714			Self::deposit_event(Event::<T>::CollectionAdminAdded(1715				collection.id,1716				user.clone(),1717			));1718		} else {1719			<AdminAmount<T>>::insert(collection.id, amount.saturating_sub(1));1720			<IsAdmin<T>>::remove((collection.id, user));17211722			Self::deposit_event(Event::<T>::CollectionAdminRemoved(1723				collection.id,1724				user.clone(),1725			));1726		}17271728		<PalletEvm<T>>::deposit_log(1729			erc::CollectionHelpersEvents::CollectionChanged {1730				collection_id: eth::collection_id_to_address(collection.id),1731			}1732			.to_log(T::ContractAddress::get()),1733		);17341735		Ok(())1736	}17371738	/// Update collection limits.1739	pub fn update_limits(1740		user: &T::CrossAccountId,1741		collection: &mut CollectionHandle<T>,1742		new_limit: CollectionLimits,1743	) -> DispatchResult {1744		collection.check_is_internal()?;1745		collection.check_is_owner_or_admin(user)?;17461747		collection.limits =1748			Self::clamp_limits(collection.mode.clone(), &collection.limits, new_limit)?;17491750		Self::deposit_event(Event::<T>::CollectionLimitSet(collection.id));1751		<PalletEvm<T>>::deposit_log(1752			erc::CollectionHelpersEvents::CollectionChanged {1753				collection_id: eth::collection_id_to_address(collection.id),1754			}1755			.to_log(T::ContractAddress::get()),1756		);17571758		collection.save()1759	}17601761	/// Merge set fields from `new_limit` to `old_limit`.1762	fn clamp_limits(1763		mode: CollectionMode,1764		old_limit: &CollectionLimits,1765		mut new_limit: CollectionLimits,1766	) -> Result<CollectionLimits, DispatchError> {1767		let limits = old_limit;1768		limit_default!(old_limit, new_limit,1769			account_token_ownership_limit => ensure!(1770				new_limit <= MAX_TOKEN_OWNERSHIP,1771				<Error<T>>::CollectionLimitBoundsExceeded,1772			),1773			sponsored_data_size => ensure!(1774				new_limit <= CUSTOM_DATA_LIMIT,1775				<Error<T>>::CollectionLimitBoundsExceeded,1776			),17771778			sponsored_data_rate_limit => {},1779			token_limit => ensure!(1780				old_limit >= new_limit && new_limit > 0,1781				<Error<T>>::CollectionTokenLimitExceeded1782			),17831784			sponsor_transfer_timeout(match mode {1785				CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,1786				CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1787				CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1788			}) => ensure!(1789				new_limit <= MAX_SPONSOR_TIMEOUT,1790				<Error<T>>::CollectionLimitBoundsExceeded,1791			),1792			sponsor_approve_timeout => {},1793			owner_can_transfer => ensure!(1794				!limits.owner_can_transfer_instaled() ||1795				old_limit || !new_limit,1796				<Error<T>>::OwnerPermissionsCantBeReverted,1797			),1798			owner_can_destroy => ensure!(1799				old_limit || !new_limit,1800				<Error<T>>::OwnerPermissionsCantBeReverted,1801			),1802			transfers_enabled => {},1803		);1804		Ok(new_limit)1805	}18061807	/// Update collection permissions.1808	pub fn update_permissions(1809		user: &T::CrossAccountId,1810		collection: &mut CollectionHandle<T>,1811		new_permission: CollectionPermissions,1812	) -> DispatchResult {1813		collection.check_is_internal()?;1814		collection.check_is_owner_or_admin(user)?;1815		collection.permissions = Self::clamp_permissions(1816			collection.mode.clone(),1817			&collection.permissions,1818			new_permission,1819		)?;18201821		Self::deposit_event(Event::<T>::CollectionPermissionSet(collection.id));1822		<PalletEvm<T>>::deposit_log(1823			erc::CollectionHelpersEvents::CollectionChanged {1824				collection_id: eth::collection_id_to_address(collection.id),1825			}1826			.to_log(T::ContractAddress::get()),1827		);18281829		collection.save()1830	}18311832	/// Merge set fields from `new_permission` to `old_permission`.1833	fn clamp_permissions(1834		_mode: CollectionMode,1835		old_permission: &CollectionPermissions,1836		mut new_permission: CollectionPermissions,1837	) -> Result<CollectionPermissions, DispatchError> {1838		limit_default_clone!(old_permission, new_permission,1839			access => {},1840			mint_mode => {},1841			nesting => { /* todo check for permissive, if only it gets out of benchmarks */ },1842		);1843		Ok(new_permission)1844	}18451846	/// Repair possibly broken properties of a collection.1847	pub fn repair_collection(collection_id: CollectionId) -> DispatchResult {1848		CollectionProperties::<T>::mutate(collection_id, |properties| {1849			properties.recompute_consumed_space();1850		});18511852		Ok(())1853	}1854}18551856/// Indicates unsupported methods by returning [Error::UnsupportedOperation].1857#[macro_export]1858macro_rules! unsupported {1859	($runtime:path) => {1860		Err($crate::Error::<$runtime>::UnsupportedOperation.into())1861	};1862}18631864/// Return weights for various worst-case operations.1865pub trait CommonWeightInfo<CrossAccountId> {1866	/// Weight of item creation.1867	fn create_item(data: &CreateItemData) -> Weight {1868		Self::create_multiple_items(from_ref(data))1869	}18701871	/// Weight of items creation.1872	fn create_multiple_items(amount: &[CreateItemData]) -> Weight;18731874	/// Weight of items creation.1875	fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;18761877	/// The weight of the burning item.1878	fn burn_item() -> Weight;18791880	/// Property setting weight.1881	///1882	/// * `amount`- The number of properties to set.1883	fn set_collection_properties(amount: u32) -> Weight;18841885	/// Collection property deletion weight.1886	///1887	/// * `amount`- The number of properties to set.1888	fn delete_collection_properties(amount: u32) -> Weight;18891890	/// Token property setting weight.1891	///1892	/// * `amount`- The number of properties to set.1893	fn set_token_properties(amount: u32) -> Weight;18941895	/// Token property deletion weight.1896	///1897	/// * `amount`- The number of properties to delete.1898	fn delete_token_properties(amount: u32) -> Weight;18991900	/// Token property permissions set weight.1901	///1902	/// * `amount`- The number of property permissions to set.1903	fn set_token_property_permissions(amount: u32) -> Weight;19041905	/// Transfer price of the token or its parts.1906	fn transfer() -> Weight;19071908	/// The price of setting the permission of the operation from another user.1909	fn approve() -> Weight;19101911	/// The price of setting the permission of the operation from another user for eth mirror.1912	fn approve_from() -> Weight;19131914	/// Transfer price from another user.1915	fn transfer_from() -> Weight;19161917	/// The price of burning a token from another user.1918	fn burn_from() -> Weight;19191920	/// Differs from burn_item in case of Fungible and Refungible, as it should burn1921	/// whole users's balance.1922	///1923	/// This method shouldn't be used directly, as it doesn't count breadth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1924	fn burn_recursively_self_raw() -> Weight;19251926	/// Cost of iterating over `amount` children while burning, without counting child burning itself.1927	///1928	/// This method shouldn't be used directly, as it doesn't count depth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1929	fn burn_recursively_breadth_raw(amount: u32) -> Weight;19301931	/// The price of recursive burning a token.1932	///1933	/// `max_selfs` - The maximum burning weight of the token itself.1934	/// `max_breadth` - The maximum number of nested tokens to burn.1935	fn burn_recursively(max_selfs: u32, max_breadth: u32) -> Weight {1936		Self::burn_recursively_self_raw()1937			.saturating_mul(max_selfs.max(1) as u64)1938			.saturating_add(Self::burn_recursively_breadth_raw(max_breadth))1939	}19401941	/// The price of retrieving token owner1942	fn token_owner() -> Weight;19431944	/// The price of setting approval for all1945	fn set_allowance_for_all() -> Weight;19461947	/// The price of repairing an item.1948	fn force_repair_item() -> Weight;1949}19501951/// Weight info extension trait for refungible pallet.1952pub trait RefungibleExtensionsWeightInfo {1953	/// Weight of token repartition.1954	fn repartition() -> Weight;1955}19561957/// Common collection operations.1958///1959/// It wraps methods in Fungible, Nonfungible and Refungible pallets1960/// and adds weight info.1961pub trait CommonCollectionOperations<T: Config> {1962	/// Create token.1963	///1964	/// * `sender` - The user who mint the token and pays for the transaction.1965	/// * `to` - The user who will own the token.1966	/// * `data` - Token data.1967	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1968	fn create_item(1969		&self,1970		sender: T::CrossAccountId,1971		to: T::CrossAccountId,1972		data: CreateItemData,1973		nesting_budget: &dyn Budget,1974	) -> DispatchResultWithPostInfo;19751976	/// Create multiple tokens.1977	///1978	/// * `sender` - The user who mint the token and pays for the transaction.1979	/// * `to` - The user who will own the token.1980	/// * `data` - Token data.1981	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1982	fn create_multiple_items(1983		&self,1984		sender: T::CrossAccountId,1985		to: T::CrossAccountId,1986		data: Vec<CreateItemData>,1987		nesting_budget: &dyn Budget,1988	) -> DispatchResultWithPostInfo;19891990	/// Create multiple tokens.1991	///1992	/// * `sender` - The user who mint the token and pays for the transaction.1993	/// * `to` - The user who will own the token.1994	/// * `data` - Token data.1995	/// * `nesting_budget` - A budget that can be spent on nesting tokens.1996	fn create_multiple_items_ex(1997		&self,1998		sender: T::CrossAccountId,1999		data: CreateItemExData<T::CrossAccountId>,2000		nesting_budget: &dyn Budget,2001	) -> DispatchResultWithPostInfo;20022003	/// Burn token.2004	///2005	/// * `sender` - The user who owns the token.2006	/// * `token` - Token id that will burned.2007	/// * `amount` - The number of parts of the token that will be burned.2008	fn burn_item(2009		&self,2010		sender: T::CrossAccountId,2011		token: TokenId,2012		amount: u128,2013	) -> DispatchResultWithPostInfo;20142015	/// Burn token and all nested tokens recursievly.2016	///2017	/// * `sender` - The user who owns the token.2018	/// * `token` - Token id that will burned.2019	/// * `self_budget` - The budget that can be spent on burning tokens.2020	/// * `breadth_budget` - The budget that can be spent on burning nested tokens.2021	fn burn_item_recursively(2022		&self,2023		sender: T::CrossAccountId,2024		token: TokenId,2025		self_budget: &dyn Budget,2026		breadth_budget: &dyn Budget,2027	) -> DispatchResultWithPostInfo;20282029	/// Set collection properties.2030	///2031	/// * `sender` - Must be either the owner of the collection or its admin.2032	/// * `properties` - Properties to be set.2033	fn set_collection_properties(2034		&self,2035		sender: T::CrossAccountId,2036		properties: Vec<Property>,2037	) -> DispatchResultWithPostInfo;20382039	/// Delete collection properties.2040	///2041	/// * `sender` - Must be either the owner of the collection or its admin.2042	/// * `properties` - The properties to be removed.2043	fn delete_collection_properties(2044		&self,2045		sender: &T::CrossAccountId,2046		property_keys: Vec<PropertyKey>,2047	) -> DispatchResultWithPostInfo;20482049	/// Set token properties.2050	///2051	/// The appropriate [`PropertyPermission`] for the token property2052	/// must be set with [`Self::set_token_property_permissions`].2053	///2054	/// * `sender` - Must be either the owner of the token or its admin.2055	/// * `token_id` - The token for which the properties are being set.2056	/// * `properties` - Properties to be set.2057	/// * `budget` - Budget for setting properties.2058	fn set_token_properties(2059		&self,2060		sender: T::CrossAccountId,2061		token_id: TokenId,2062		properties: Vec<Property>,2063		budget: &dyn Budget,2064	) -> DispatchResultWithPostInfo;20652066	/// Remove token properties.2067	///2068	/// The appropriate [`PropertyPermission`] for the token property2069	/// must be set with [`Self::set_token_property_permissions`].2070	///2071	/// * `sender` - Must be either the owner of the token or its admin.2072	/// * `token_id` - The token for which the properties are being remove.2073	/// * `property_keys` - Keys to remove corresponding properties.2074	/// * `budget` - Budget for removing properties.2075	fn delete_token_properties(2076		&self,2077		sender: T::CrossAccountId,2078		token_id: TokenId,2079		property_keys: Vec<PropertyKey>,2080		budget: &dyn Budget,2081	) -> DispatchResultWithPostInfo;20822083	/// Set token property permissions.2084	///2085	/// * `sender` - Must be either the owner of the token or its admin.2086	/// * `token_id` - The token for which the properties are being set.2087	/// * `property_permissions` - Property permissions to be set.2088	/// * `budget` - Budget for setting properties.2089	fn set_token_property_permissions(2090		&self,2091		sender: &T::CrossAccountId,2092		property_permissions: Vec<PropertyKeyPermission>,2093	) -> DispatchResultWithPostInfo;20942095	/// Transfer amount of token pieces.2096	///2097	/// * `sender` - Donor user.2098	/// * `to` - Recepient user.2099	/// * `token` - The token of which parts are being sent.2100	/// * `amount` - The number of parts of the token that will be transferred.2101	/// * `budget` - The maximum budget that can be spent on the transfer.2102	fn transfer(2103		&self,2104		sender: T::CrossAccountId,2105		to: T::CrossAccountId,2106		token: TokenId,2107		amount: u128,2108		budget: &dyn Budget,2109	) -> DispatchResultWithPostInfo;21102111	/// Grant access to another account to transfer parts of the token owned by the calling user via [Self::transfer_from].2112	///2113	/// * `sender` - The user who grants access to the token.2114	/// * `spender` - The user to whom the rights are granted.2115	/// * `token` - The token to which access is granted.2116	/// * `amount` - The amount of pieces that another user can dispose of.2117	fn approve(2118		&self,2119		sender: T::CrossAccountId,2120		spender: T::CrossAccountId,2121		token: TokenId,2122		amount: u128,2123	) -> DispatchResultWithPostInfo;21242125	/// Grant access to another account to transfer parts of the token owned by the calling user's eth mirror via [Self::transfer_from].2126	///2127	/// * `sender` - The user who grants access to the token.2128	/// * `from` - Spender's eth mirror.2129	/// * `to` - The user to whom the rights are granted.2130	/// * `token` - The token to which access is granted.2131	/// * `amount` - The amount of pieces that another user can dispose of.2132	fn approve_from(2133		&self,2134		sender: T::CrossAccountId,2135		from: T::CrossAccountId,2136		to: T::CrossAccountId,2137		token: TokenId,2138		amount: u128,2139	) -> DispatchResultWithPostInfo;21402141	/// Send parts of a token owned by another user.2142	///2143	/// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2144	///2145	/// * `sender` - The user who must have access to the token (see [`Self::approve`]).2146	/// * `from` - The user who owns the token.2147	/// * `to` - Recepient user.2148	/// * `token` - The token of which parts are being sent.2149	/// * `amount` - The number of parts of the token that will be transferred.2150	/// * `budget` - The maximum budget that can be spent on the transfer.2151	fn transfer_from(2152		&self,2153		sender: T::CrossAccountId,2154		from: T::CrossAccountId,2155		to: T::CrossAccountId,2156		token: TokenId,2157		amount: u128,2158		budget: &dyn Budget,2159	) -> DispatchResultWithPostInfo;21602161	/// Burn parts of a token owned by another user.2162	///2163	/// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2164	///2165	/// * `sender` - The user who must have access to the token (see [`Self::approve`]).2166	/// * `from` - The user who owns the token.2167	/// * `token` - The token of which parts are being sent.2168	/// * `amount` - The number of parts of the token that will be transferred.2169	/// * `budget` - The maximum budget that can be spent on the burn.2170	fn burn_from(2171		&self,2172		sender: T::CrossAccountId,2173		from: T::CrossAccountId,2174		token: TokenId,2175		amount: u128,2176		budget: &dyn Budget,2177	) -> DispatchResultWithPostInfo;21782179	/// Check permission to nest token.2180	///2181	/// * `sender` - The user who initiated the check.2182	/// * `from` - The token that is checked for embedding.2183	/// * `under` - Token under which to check.2184	/// * `budget` - The maximum budget that can be spent on the check.2185	fn check_nesting(2186		&self,2187		sender: T::CrossAccountId,2188		from: (CollectionId, TokenId),2189		under: TokenId,2190		budget: &dyn Budget,2191	) -> DispatchResult;21922193	/// Nest one token into another.2194	///2195	/// * `under` - Token holder.2196	/// * `to_nest` - Nested token.2197	fn nest(&self, under: TokenId, to_nest: (CollectionId, TokenId));21982199	/// Unnest token.2200	///2201	/// * `under` - Token holder.2202	/// * `to_nest` - Token to unnest.2203	fn unnest(&self, under: TokenId, to_nest: (CollectionId, TokenId));22042205	/// Get all user tokens.2206	///2207	/// * `account` - Account for which you need to get tokens.2208	fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;22092210	/// Get all the tokens in the collection.2211	fn collection_tokens(&self) -> Vec<TokenId>;22122213	/// Check if the token exists.2214	///2215	/// * `token` - Id token to check.2216	fn token_exists(&self, token: TokenId) -> bool;22172218	/// Get the id of the last minted token.2219	fn last_token_id(&self) -> TokenId;22202221	/// Get the owner of the token.2222	///2223	/// * `token` - The token for which you need to find out the owner.2224	fn token_owner(&self, token: TokenId) -> Result<T::CrossAccountId, TokenOwnerError>;22252226	/// Returns 10 tokens owners in no particular order.2227	///2228	/// * `token` - The token for which you need to find out the owners.2229	fn token_owners(&self, token: TokenId) -> Vec<T::CrossAccountId>;22302231	/// Get the value of the token property by key.2232	///2233	/// * `token` - Token with the property to get.2234	/// * `key` - Property name.2235	fn token_property(&self, token_id: TokenId, key: &PropertyKey) -> Option<PropertyValue>;22362237	/// Get a set of token properties by key vector.2238	///2239	/// * `token` - Token with the property to get.2240	/// * `keys` - Vector of property keys. If this parameter is [None](sp_std::result::Result),2241	/// then all properties are returned.2242	fn token_properties(&self, token: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;22432244	/// Amount of unique collection tokens2245	fn total_supply(&self) -> u32;22462247	/// Amount of different tokens account has.2248	///2249	/// * `account` - The account for which need to get the balance.2250	fn account_balance(&self, account: T::CrossAccountId) -> u32;22512252	/// Amount of specific token account have.2253	fn balance(&self, account: T::CrossAccountId, token: TokenId) -> u128;22542255	/// Amount of token pieces2256	fn total_pieces(&self, token: TokenId) -> Option<u128>;22572258	/// Get the number of parts of the token that a trusted user can manage.2259	///2260	/// * `sender` - Trusted user.2261	/// * `spender` - Owner of the token.2262	/// * `token` - The token for which to get the value.2263	fn allowance(2264		&self,2265		sender: T::CrossAccountId,2266		spender: T::CrossAccountId,2267		token: TokenId,2268	) -> u128;22692270	/// Get extension for RFT collection.2271	fn refungible_extensions(&self) -> Option<&dyn RefungibleExtensions<T>>;22722273	/// The `operator` is allowed to transfer all tokens of the `owner` on their behalf.2274	/// * `owner` - Token owner2275	/// * `operator` - Operator2276	/// * `approve` - Should operator status be granted or revoked?2277	fn set_allowance_for_all(2278		&self,2279		owner: T::CrossAccountId,2280		operator: T::CrossAccountId,2281		approve: bool,2282	) -> DispatchResultWithPostInfo;22832284	/// Tells whether the given `owner` approves the `operator`.2285	fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;22862287	/// Repairs a possibly broken item.2288	fn repair_item(&self, token: TokenId) -> DispatchResultWithPostInfo;2289}22902291/// Extension for RFT collection.2292pub trait RefungibleExtensions<T>2293where2294	T: Config,2295{2296	/// Change the number of parts of the token.2297	///2298	/// When the value changes down, this function is equivalent to burning parts of the token.2299	///2300	/// * `sender` - The user calling the repartition operation. Must be the owner of the token.2301	/// * `token` - The token for which you want to change the number of parts.2302	/// * `amount` - The new value of the parts of the token.2303	fn repartition(2304		&self,2305		sender: &T::CrossAccountId,2306		token: TokenId,2307		amount: u128,2308	) -> DispatchResultWithPostInfo;2309}23102311/// Merge [`DispatchResult`] with [`Weight`] into [`DispatchResultWithPostInfo`].2312///2313/// Used for [`CommonCollectionOperations`] implementations and flexible enough to do so.2314pub fn with_weight(res: DispatchResult, weight: Weight) -> DispatchResultWithPostInfo {2315	let post_info = PostDispatchInfo {2316		actual_weight: Some(weight),2317		pays_fee: Pays::Yes,2318	};2319	match res {2320		Ok(()) => Ok(post_info),2321		Err(error) => Err(DispatchErrorWithPostInfo { post_info, error }),2322	}2323}23242325impl<T: Config> From<PropertiesError> for Error<T> {2326	fn from(error: PropertiesError) -> Self {2327		match error {2328			PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,2329			PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,2330			PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,2331			PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,2332			PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,2333		}2334	}2335}
modifiedpallets/configuration/src/lib.rsdiffbeforeafterboth
--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -116,7 +116,7 @@
 
 	#[pallet::storage]
 	pub type XcmAllowedLocationsOverride<T: Config> = StorageValue<
-		Value = BoundedVec<xcm::v2::MultiLocation, T::MaxXcmAllowedLocations>,
+		Value = BoundedVec<xcm::v3::MultiLocation, T::MaxXcmAllowedLocations>,
 		QueryKind = OptionQuery,
 	>;
 
modifiedpallets/foreign-assets/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/benchmarking.rs
+++ b/pallets/foreign-assets/src/benchmarking.rs
@@ -22,15 +22,14 @@
 use crate::AssetMetadata;
 use xcm::opaque::latest::Junction::Parachain;
 use xcm::VersionedMultiLocation;
-use frame_support::{
-	traits::{Currency},
-};
+use xcm::v3::Junctions::X1;
+use frame_support::traits::Currency;
 use sp_std::boxed::Box;
 
 benchmarks! {
 	register_foreign_asset {
 		let owner: T::AccountId = account("user", 0, 1);
-		let location: VersionedMultiLocation = VersionedMultiLocation::from(Parachain(1000).into());
+		let location: VersionedMultiLocation = VersionedMultiLocation::from(X1(Parachain(1000)));
 		let metadata: AssetMetadata<<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance> = AssetMetadata{
 			name: "name".into(),
 			symbol: "symbol".into(),
@@ -46,7 +45,7 @@
 
 	update_foreign_asset {
 		let owner: T::AccountId = account("user", 0, 1);
-		let location: VersionedMultiLocation = VersionedMultiLocation::from(Parachain(2000).into());
+		let location: VersionedMultiLocation = VersionedMultiLocation::from(X1(Parachain(2000)));
 		let metadata: AssetMetadata<<<T as Config>::Currency as Currency<<T as frame_system::Config>::AccountId>>::Balance> = AssetMetadata{
 			name: "name".into(),
 			symbol: "symbol".into(),
modifiedpallets/foreign-assets/src/lib.rsdiffbeforeafterboth
--- a/pallets/foreign-assets/src/lib.rs
+++ b/pallets/foreign-assets/src/lib.rs
@@ -250,7 +250,7 @@
 	#[pallet::storage]
 	#[pallet::getter(fn foreign_asset_locations)]
 	pub type ForeignAssetLocations<T: Config> =
-		StorageMap<_, Twox64Concat, ForeignAssetId, xcm::v2::MultiLocation, OptionQuery>;
+		StorageMap<_, Twox64Concat, ForeignAssetId, xcm::v3::MultiLocation, OptionQuery>;
 
 	/// The storages for CurrencyIds.
 	///
@@ -258,7 +258,7 @@
 	#[pallet::storage]
 	#[pallet::getter(fn location_to_currency_ids)]
 	pub type LocationToCurrencyIds<T: Config> =
-		StorageMap<_, Twox64Concat, xcm::v2::MultiLocation, ForeignAssetId, OptionQuery>;
+		StorageMap<_, Twox64Concat, xcm::v3::MultiLocation, ForeignAssetId, OptionQuery>;
 
 	/// The storages for AssetMetadatas.
 	///
@@ -279,6 +279,60 @@
 	#[pallet::without_storage_info]
 	pub struct Pallet<T>(_);
 
+	pub const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);
+	#[pallet::hooks]
+	impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {
+		fn on_runtime_upgrade() -> Weight {
+			let mut weight = Weight::default();
+			// 0-1 -- xcmv2 => xcmv3
+			if StorageVersion::get::<Pallet<T>>() <= 0 {
+				pub trait V0ToV1 {
+					type Pallet: 'static + PalletInfoAccess;
+				}
+				#[frame_support::storage_alias]
+				type LocationToCurrencyIds<T: Config> =
+					StorageMap<Pallet<T>, Twox64Concat, xcm::v2::MultiLocation, ForeignAssetId>;
+				<ForeignAssetLocations<T>>::translate_values::<xcm::v2::MultiLocation, _>(|loc| {
+					weight += T::DbWeight::get().reads_writes(1, 1);
+					Some(
+						xcm::v3::MultiLocation::try_from(loc)
+							.expect("failed to migrate multilocation from XCMv2 to XCMv3"),
+					)
+				});
+
+				let old_values: Vec<(xcm::v2::MultiLocation, _)> =
+					<LocationToCurrencyIds<T>>::drain().collect();
+				weight += T::DbWeight::get()
+					.reads_writes(old_values.len() as u64, old_values.len() as u64);
+				for (loc, asset_id) in old_values {
+					let loc = xcm::v3::MultiLocation::try_from(loc)
+						.expect("failed to migrate multilocation from XCMv2 to XCMv3");
+					<crate::LocationToCurrencyIds<T>>::insert(loc, asset_id);
+				}
+			}
+			STORAGE_VERSION.put::<Pallet<T>>();
+			weight += T::DbWeight::get().writes(1);
+			weight
+		}
+	}
+
+	#[pallet::genesis_config]
+	pub struct GenesisConfig;
+
+	#[cfg(feature = "std")]
+	impl Default for GenesisConfig {
+		fn default() -> Self {
+			Self
+		}
+	}
+
+	#[pallet::genesis_build]
+	impl<T: Config> GenesisBuild<T> for GenesisConfig {
+		fn build(&self) {
+			STORAGE_VERSION.put::<Pallet<T>>();
+		}
+	}
+
 	#[pallet::call]
 	impl<T: Config> Pallet<T> {
 		#[pallet::call_index(0)]
@@ -474,7 +528,7 @@
 	> WeightTrader for FreeForAll<WeightToFee, AssetId, AccountId, Currency, OnUnbalanced>
 {
 	fn new() -> Self {
-		Self(0, Zero::zero(), PhantomData)
+		Self(Weight::default(), Zero::zero(), PhantomData)
 	}
 
 	fn buy_weight(&mut self, weight: Weight, payment: Assets) -> Result<Assets, XcmError> {
modifiedpallets/identity/Cargo.tomldiffbeforeafterboth
--- a/pallets/identity/Cargo.toml
+++ b/pallets/identity/Cargo.toml
@@ -35,6 +35,7 @@
 	"frame-benchmarking/runtime-benchmarks",
 	"frame-support/runtime-benchmarks",
 	"frame-system/runtime-benchmarks",
+	"sp-runtime/runtime-benchmarks",
 ]
 std = [
 	"codec/std",
modifiedpallets/identity/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/identity/src/benchmarking.rs
+++ b/pallets/identity/src/benchmarking.rs
@@ -59,7 +59,7 @@
 		let registrar: T::AccountId = account("registrar", i, SEED);
 		let registrar_lookup = T::Lookup::unlookup(registrar.clone());
 		let _ = T::Currency::make_free_balance_be(&registrar, BalanceOf::<T>::max_value());
-		let registrar_origin = T::RegistrarOrigin::successful_origin();
+		let registrar_origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		Identity::<T>::add_registrar(registrar_origin, registrar_lookup)?;
 		Identity::<T>::set_fee(RawOrigin::Signed(registrar.clone()).into(), i, 10u32.into())?;
 		let fields = IdentityFields(
@@ -142,7 +142,7 @@
 	add_registrar {
 		let r in 1 .. T::MaxRegistrars::get() - 1 => add_registrars::<T>(r)?;
 		ensure!(Registrars::<T>::get().len() as u32 == r, "Registrars not set up correctly.");
-		let origin = T::RegistrarOrigin::successful_origin();
+		let origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		let account = T::Lookup::unlookup(account("registrar", r + 1, SEED));
 	}: _<T::RuntimeOrigin>(origin, account)
 	verify {
@@ -301,7 +301,7 @@
 
 		let r in 1 .. T::MaxRegistrars::get() - 1 => add_registrars::<T>(r)?;
 
-		let registrar_origin = T::RegistrarOrigin::successful_origin();
+		let registrar_origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		Identity::<T>::add_registrar(registrar_origin, caller_lookup)?;
 		let registrars = Registrars::<T>::get();
 		ensure!(registrars[r as usize].as_ref().unwrap().fee == 0u32.into(), "Fee already set.");
@@ -318,7 +318,7 @@
 
 		let r in 1 .. T::MaxRegistrars::get() - 1 => add_registrars::<T>(r)?;
 
-		let registrar_origin = T::RegistrarOrigin::successful_origin();
+		let registrar_origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		Identity::<T>::add_registrar(registrar_origin, caller_lookup)?;
 		let registrars = Registrars::<T>::get();
 		ensure!(registrars[r as usize].as_ref().unwrap().account == caller, "id not set.");
@@ -336,7 +336,7 @@
 
 		let r in 1 .. T::MaxRegistrars::get() - 1 => add_registrars::<T>(r)?;
 
-		let registrar_origin = T::RegistrarOrigin::successful_origin();
+		let registrar_origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		Identity::<T>::add_registrar(registrar_origin, caller_lookup)?;
 		let fields = IdentityFields(
 			IdentityField::Display | IdentityField::Legal | IdentityField::Web | IdentityField::Riot
@@ -368,7 +368,7 @@
 		let info_hash = T::Hashing::hash_of(&info);
 		Identity::<T>::set_identity(user_origin.clone(), Box::new(info))?;
 
-		let registrar_origin = T::RegistrarOrigin::successful_origin();
+		let registrar_origin = T::RegistrarOrigin::try_successful_origin().unwrap();
 		Identity::<T>::add_registrar(registrar_origin, caller_lookup)?;
 		Identity::<T>::request_judgement(user_origin, r, 10u32.into())?;
 	}: _(RawOrigin::Signed(caller), r, user_lookup, Judgement::Reasonable, info_hash)
@@ -406,7 +406,7 @@
 			)?;
 		}
 		ensure!(IdentityOf::<T>::contains_key(&target), "Identity not set");
-		let origin = T::ForceOrigin::successful_origin();
+		let origin = T::ForceOrigin::try_successful_origin().unwrap();
 	}: _<T::RuntimeOrigin>(origin, target_lookup)
 	verify {
 		ensure!(!IdentityOf::<T>::contains_key(&target), "Identity not removed");
@@ -424,14 +424,14 @@
 				info: create_identity_info::<T>(x),
 			},
 		)).collect::<Vec<_>>();
-		let origin = T::ForceOrigin::successful_origin();
+		let origin = T::ForceOrigin::try_successful_origin().unwrap();
 	}: _<T::RuntimeOrigin>(origin, identities)
 
 	force_remove_identities {
 		let x in 0 .. T::MaxAdditionalFields::get();
 		let n in 0..600;
 		use frame_benchmarking::account;
-		let origin = T::ForceOrigin::successful_origin();
+		let origin = T::ForceOrigin::try_successful_origin().unwrap();
 		let identities = (0..n).map(|i| (
 			account("caller", i, SEED),
 			Registration::<BalanceOf<T>, T::MaxRegistrars, T::MaxAdditionalFields> {
@@ -460,7 +460,7 @@
 				),
 			)
 		}).collect::<Vec<_>>();
-		let origin = T::ForceOrigin::successful_origin();
+		let origin = T::ForceOrigin::try_successful_origin().unwrap();
 	}: _<T::RuntimeOrigin>(origin, identities)
 
 	add_sub {
modifiedpallets/nonfungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -102,8 +102,8 @@
 use up_data_structs::{
 	AccessMode, CollectionId, CollectionFlags, CustomDataLimit, TokenId, CreateCollectionData,
 	CreateNftExData, mapping::TokenAddressMapping, budget::Budget, Property, PropertyKey,
-	PropertyValue, PropertyKeyPermission, Properties, PropertyScope, TrySetProperty, TokenChild,
-	AuxPropertyValue, PropertiesPermissionMap,
+	PropertyValue, PropertyKeyPermission, PropertyScope, TrySetProperty, TokenChild,
+	AuxPropertyValue, PropertiesPermissionMap, TokenProperties as TokenPropertiesT,
 };
 use pallet_evm::{account::CrossAccountId, Pallet as PalletEvm};
 use pallet_common::{
@@ -201,9 +201,8 @@
 	#[pallet::getter(fn token_properties)]
 	pub type TokenProperties<T: Config> = StorageNMap<
 		Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
-		Value = Properties,
+		Value = TokenPropertiesT,
 		QueryKind = ValueQuery,
-		OnEmpty = up_data_structs::TokenProperties,
 	>;
 
 	/// Custom data of a token that is serialized to bytes,
deletedpallets/nonfungible/src/weights.rsdiffbeforeafterboth
--- a/pallets/nonfungible/src/weights.rs
+++ /dev/null
@@ -1,410 +0,0 @@
-// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
-
-//! Autogenerated weights for pallet_nonfungible
-//!
-//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
-//! DATE: 2023-02-15, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
-//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
-
-// Executed Command:
-// target/release/unique-collator
-// benchmark
-// pallet
-// --pallet
-// pallet-nonfungible
-// --wasm-execution
-// compiled
-// --extrinsic
-// *
-// --template
-// .maintain/frame-weight-template.hbs
-// --steps=50
-// --repeat=80
-// --heap-pages=4096
-// --output=./pallets/nonfungible/src/weights.rs
-
-#![cfg_attr(rustfmt, rustfmt_skip)]
-#![allow(unused_parens)]
-#![allow(unused_imports)]
-#![allow(missing_docs)]
-#![allow(clippy::unnecessary_cast)]
-
-use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
-use sp_std::marker::PhantomData;
-
-/// Weight functions needed for pallet_nonfungible.
-pub trait WeightInfo {
-	fn create_item() -> Weight;
-	fn create_multiple_items(b: u32, ) -> Weight;
-	fn create_multiple_items_ex(b: u32, ) -> Weight;
-	fn burn_item() -> Weight;
-	fn burn_recursively_self_raw() -> Weight;
-	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight;
-	fn transfer() -> Weight;
-	fn approve() -> Weight;
-	fn approve_from() -> Weight;
-	fn transfer_from() -> Weight;
-	fn burn_from() -> Weight;
-	fn set_token_property_permissions(b: u32, ) -> Weight;
-	fn set_token_properties(b: u32, ) -> Weight;
-	fn delete_token_properties(b: u32, ) -> Weight;
-	fn token_owner() -> Weight;
-	fn set_allowance_for_all() -> Weight;
-	fn allowance_for_all() -> Weight;
-	fn repair_item() -> Weight;
-}
-
-/// Weights for pallet_nonfungible using the Substrate node and recommended hardware.
-pub struct SubstrateWeight<T>(PhantomData<T>);
-impl<T: frame_system::Config> WeightInfo for SubstrateWeight<T> {
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:1)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	fn create_item() -> Weight {
-		Weight::from_ref_time(35_333_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(4 as u64))
-			.saturating_add(T::DbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible TokenProperties (r:4 w:4)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:4)
-	// Storage: Nonfungible Owned (r:0 w:4)
-	fn create_multiple_items(b: u32, ) -> Weight {
-		Weight::from_ref_time(19_091_371 as u64)
-			// Standard Error: 3_221
-			.saturating_add(Weight::from_ref_time(7_304_849 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(3 as u64))
-			.saturating_add(T::DbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
-			.saturating_add(T::DbWeight::get().writes(2 as u64))
-			.saturating_add(T::DbWeight::get().writes((3 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:4 w:4)
-	// Storage: Nonfungible TokenProperties (r:4 w:4)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:4)
-	// Storage: Nonfungible Owned (r:0 w:4)
-	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		Weight::from_ref_time(12_655_339 as u64)
-			// Standard Error: 3_655
-			.saturating_add(Weight::from_ref_time(9_051_919 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_item() -> Weight {
-		Weight::from_ref_time(34_068_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(5 as u64))
-			.saturating_add(T::DbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_recursively_self_raw() -> Weight {
-		Weight::from_ref_time(44_840_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(5 as u64))
-			.saturating_add(T::DbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	// Storage: Common CollectionById (r:1 w:0)
-	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {
-		Weight::from_ref_time(44_567_000 as u64)
-			// Standard Error: 1_014_743
-			.saturating_add(Weight::from_ref_time(209_619_240 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(7 as u64))
-			.saturating_add(T::DbWeight::get().reads((4 as u64).saturating_mul(b as u64)))
-			.saturating_add(T::DbWeight::get().writes(6 as u64))
-			.saturating_add(T::DbWeight::get().writes((4 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:2 w:2)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:2)
-	fn transfer() -> Weight {
-		Weight::from_ref_time(29_508_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(4 as u64))
-			.saturating_add(T::DbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	fn approve() -> Weight {
-		Weight::from_ref_time(22_168_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	fn approve_from() -> Weight {
-		Weight::from_ref_time(22_063_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:2 w:2)
-	// Storage: Nonfungible Owned (r:0 w:2)
-	fn transfer_from() -> Weight {
-		Weight::from_ref_time(36_386_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(4 as u64))
-			.saturating_add(T::DbWeight::get().writes(6 as u64))
-	}
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_from() -> Weight {
-		Weight::from_ref_time(42_499_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(5 as u64))
-			.saturating_add(T::DbWeight::get().writes(6 as u64))
-	}
-	// Storage: Common CollectionPropertyPermissions (r:1 w:1)
-	fn set_token_property_permissions(b: u32, ) -> Weight {
-		Weight::from_ref_time(5_317_000 as u64)
-			// Standard Error: 42_045
-			.saturating_add(Weight::from_ref_time(12_179_871 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	fn set_token_properties(b: u32, ) -> Weight {
-		Weight::from_ref_time(15_428_000 as u64)
-			// Standard Error: 58_002
-			.saturating_add(Weight::from_ref_time(7_195_842 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	fn delete_token_properties(b: u32, ) -> Weight {
-		Weight::from_ref_time(15_498_000 as u64)
-			// Standard Error: 68_276
-			.saturating_add(Weight::from_ref_time(22_441_281 as u64).saturating_mul(b as u64))
-			.saturating_add(T::DbWeight::get().reads(2 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	fn token_owner() -> Weight {
-		Weight::from_ref_time(7_006_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-	}
-	// Storage: Nonfungible CollectionAllowance (r:0 w:1)
-	fn set_allowance_for_all() -> Weight {
-		Weight::from_ref_time(16_761_000 as u64)
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible CollectionAllowance (r:1 w:0)
-	fn allowance_for_all() -> Weight {
-		Weight::from_ref_time(5_577_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	fn repair_item() -> Weight {
-		Weight::from_ref_time(7_670_000 as u64)
-			.saturating_add(T::DbWeight::get().reads(1 as u64))
-			.saturating_add(T::DbWeight::get().writes(1 as u64))
-	}
-}
-
-// For backwards compatibility and tests
-impl WeightInfo for () {
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:1)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	fn create_item() -> Weight {
-		Weight::from_ref_time(35_333_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(4 as u64))
-			.saturating_add(RocksDbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible TokenProperties (r:4 w:4)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:4)
-	// Storage: Nonfungible Owned (r:0 w:4)
-	fn create_multiple_items(b: u32, ) -> Weight {
-		Weight::from_ref_time(19_091_371 as u64)
-			// Standard Error: 3_221
-			.saturating_add(Weight::from_ref_time(7_304_849 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(3 as u64))
-			.saturating_add(RocksDbWeight::get().reads((1 as u64).saturating_mul(b as u64)))
-			.saturating_add(RocksDbWeight::get().writes(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes((3 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokensMinted (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:4 w:4)
-	// Storage: Nonfungible TokenProperties (r:4 w:4)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:0 w:4)
-	// Storage: Nonfungible Owned (r:0 w:4)
-	fn create_multiple_items_ex(b: u32, ) -> Weight {
-		Weight::from_ref_time(12_655_339 as u64)
-			// Standard Error: 3_655
-			.saturating_add(Weight::from_ref_time(9_051_919 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().reads((2 as u64).saturating_mul(b as u64)))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_item() -> Weight {
-		Weight::from_ref_time(34_068_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(5 as u64))
-			.saturating_add(RocksDbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_recursively_self_raw() -> Weight {
-		Weight::from_ref_time(44_840_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(5 as u64))
-			.saturating_add(RocksDbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	// Storage: Common CollectionById (r:1 w:0)
-	fn burn_recursively_breadth_plus_self_plus_self_per_each_raw(b: u32, ) -> Weight {
-		Weight::from_ref_time(44_567_000 as u64)
-			// Standard Error: 1_014_743
-			.saturating_add(Weight::from_ref_time(209_619_240 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(7 as u64))
-			.saturating_add(RocksDbWeight::get().reads((4 as u64).saturating_mul(b as u64)))
-			.saturating_add(RocksDbWeight::get().writes(6 as u64))
-			.saturating_add(RocksDbWeight::get().writes((4 as u64).saturating_mul(b as u64)))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:2 w:2)
-	// Storage: Nonfungible Allowance (r:1 w:0)
-	// Storage: Nonfungible Owned (r:0 w:2)
-	fn transfer() -> Weight {
-		Weight::from_ref_time(29_508_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(4 as u64))
-			.saturating_add(RocksDbWeight::get().writes(5 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	fn approve() -> Weight {
-		Weight::from_ref_time(22_168_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	fn approve_from() -> Weight {
-		Weight::from_ref_time(22_063_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:2 w:2)
-	// Storage: Nonfungible Owned (r:0 w:2)
-	fn transfer_from() -> Weight {
-		Weight::from_ref_time(36_386_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(4 as u64))
-			.saturating_add(RocksDbWeight::get().writes(6 as u64))
-	}
-	// Storage: Nonfungible Allowance (r:1 w:1)
-	// Storage: Nonfungible TokenData (r:1 w:1)
-	// Storage: Nonfungible TokenChildren (r:1 w:0)
-	// Storage: Nonfungible TokensBurnt (r:1 w:1)
-	// Storage: Nonfungible AccountBalance (r:1 w:1)
-	// Storage: Nonfungible Owned (r:0 w:1)
-	// Storage: Nonfungible TokenProperties (r:0 w:1)
-	fn burn_from() -> Weight {
-		Weight::from_ref_time(42_499_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(5 as u64))
-			.saturating_add(RocksDbWeight::get().writes(6 as u64))
-	}
-	// Storage: Common CollectionPropertyPermissions (r:1 w:1)
-	fn set_token_property_permissions(b: u32, ) -> Weight {
-		Weight::from_ref_time(5_317_000 as u64)
-			// Standard Error: 42_045
-			.saturating_add(Weight::from_ref_time(12_179_871 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	fn set_token_properties(b: u32, ) -> Weight {
-		Weight::from_ref_time(15_428_000 as u64)
-			// Standard Error: 58_002
-			.saturating_add(Weight::from_ref_time(7_195_842 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	// Storage: Common CollectionPropertyPermissions (r:1 w:0)
-	fn delete_token_properties(b: u32, ) -> Weight {
-		Weight::from_ref_time(15_498_000 as u64)
-			// Standard Error: 68_276
-			.saturating_add(Weight::from_ref_time(22_441_281 as u64).saturating_mul(b as u64))
-			.saturating_add(RocksDbWeight::get().reads(2 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible TokenData (r:1 w:0)
-	fn token_owner() -> Weight {
-		Weight::from_ref_time(7_006_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-	}
-	// Storage: Nonfungible CollectionAllowance (r:0 w:1)
-	fn set_allowance_for_all() -> Weight {
-		Weight::from_ref_time(16_761_000 as u64)
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-	// Storage: Nonfungible CollectionAllowance (r:1 w:0)
-	fn allowance_for_all() -> Weight {
-		Weight::from_ref_time(5_577_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-	}
-	// Storage: Nonfungible TokenProperties (r:1 w:1)
-	fn repair_item() -> Weight {
-		Weight::from_ref_time(7_670_000 as u64)
-			.saturating_add(RocksDbWeight::get().reads(1 as u64))
-			.saturating_add(RocksDbWeight::get().writes(1 as u64))
-	}
-}
modifiedpallets/refungible/src/benchmarking.rsdiffbeforeafterboth
--- a/pallets/refungible/src/benchmarking.rs
+++ b/pallets/refungible/src/benchmarking.rs
@@ -297,7 +297,7 @@
 			sender: cross_from_sub(owner); owner: cross_sub;
 		};
 		let item = create_max_item(&collection, &sender, [(owner.clone(), 100)])?;
-	}: {<Pallet<T>>::token_owner(collection.id, item)}
+	}: {<Pallet<T>>::token_owner(collection.id, item).unwrap()}
 
 	set_allowance_for_all {
 		bench_init!{
modifiedpallets/refungible/src/lib.rsdiffbeforeafterboth
--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -108,6 +108,7 @@
 	mapping::TokenAddressMapping, MAX_REFUNGIBLE_PIECES, Property, PropertyKey,
 	PropertyKeyPermission, PropertyScope, PropertyValue, TokenId, TrySetProperty,
 	PropertiesPermissionMap, CreateRefungibleExMultipleOwners, TokenOwnerError,
+	TokenProperties as TokenPropertiesT,
 };
 
 pub use pallet::*;
@@ -175,9 +176,8 @@
 	#[pallet::getter(fn token_properties)]
 	pub type TokenProperties<T: Config> = StorageNMap<
 		Key = (Key<Twox64Concat, CollectionId>, Key<Twox64Concat, TokenId>),
-		Value = up_data_structs::Properties,
+		Value = TokenPropertiesT,
 		QueryKind = ValueQuery,
-		OnEmpty = up_data_structs::TokenProperties,
 	>;
 
 	/// Total amount of pieces for token
modifiedpallets/scheduler-v2/Cargo.tomldiffbeforeafterboth
--- a/pallets/scheduler-v2/Cargo.toml
+++ b/pallets/scheduler-v2/Cargo.toml
@@ -25,7 +25,7 @@
 
 [dev-dependencies]
 pallet-preimage = { workspace = true }
-substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
 [features]
 default = ["std"]
modifiedprimitives/common/src/constants.rsdiffbeforeafterboth
--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -19,7 +19,7 @@
 	parameter_types,
 	weights::{Weight, constants::WEIGHT_REF_TIME_PER_SECOND},
 };
-use cumulus_primitives_core::relay_chain::v2::MAX_POV_SIZE;
+use cumulus_primitives_core::relay_chain::MAX_POV_SIZE;
 use crate::types::{BlockNumber, Balance};
 
 pub const MILLISECS_PER_BLOCK: u64 = 12000;
modifiedprimitives/data-structs/src/lib.rsdiffbeforeafterboth
--- a/primitives/data-structs/src/lib.rs
+++ b/primitives/data-structs/src/lib.rs
@@ -24,10 +24,7 @@
 	convert::{TryFrom, TryInto},
 	fmt,
 };
-use frame_support::{
-	storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet},
-	traits::Get,
-};
+use frame_support::storage::{bounded_btree_map::BoundedBTreeMap, bounded_btree_set::BoundedBTreeSet};
 
 #[cfg(feature = "serde")]
 use serde::{Serialize, Deserialize};
@@ -1200,6 +1197,12 @@
 		self.0.contains_key(key)
 	}
 
+	fn metadata_encoded_len() -> usize {
+		// Max length of key length + max length of value length for max properties
+		// + max length of table size length
+		(4 * 4) * (MAX_PROPERTIES_PER_ITEM as usize) + 4
+	}
+
 	/// Check if map contains key with key validation.
 	fn check_property_key(key: &PropertyKey) -> Result<(), PropertiesError> {
 		if key.is_empty() {
@@ -1259,20 +1262,34 @@
 pub type PropertiesPermissionMap = PropertiesMap<PropertyPermission>;
 
 /// Wrapper for properties map with consumed space control.
-#[derive(Encode, Decode, TypeInfo, Clone, PartialEq, MaxEncodedLen)]
-pub struct Properties {
+#[derive(Encode, Decode, TypeInfo, Clone, PartialEq)]
+pub struct Properties<const S: u32> {
 	map: PropertiesMap<PropertyValue>,
 	consumed_space: u32,
 	space_limit: u32,
 }
 
-impl Properties {
+impl<const S: u32> MaxEncodedLen for Properties<S> {
+	fn max_encoded_len() -> usize {
+		<PropertiesMap<PropertyValue>>::metadata_encoded_len()
+			+ (u32::max_encoded_len() * 2)
+			+ S as usize
+	}
+}
+
+impl<const S: u32> Default for Properties<S> {
+	fn default() -> Self {
+		Self::new()
+	}
+}
+
+impl<const S: u32> Properties<S> {
 	/// Create new properies container.
-	pub fn new(space_limit: u32) -> Self {
+	pub fn new() -> Self {
 		Self {
 			map: PropertiesMap::new(),
 			consumed_space: 0,
-			space_limit,
+			space_limit: u32::MAX,
 		}
 	}
 
@@ -1300,7 +1317,7 @@
 	}
 }
 
-impl IntoIterator for Properties {
+impl<const S: u32> IntoIterator for Properties<S> {
 	type Item = (PropertyKey, PropertyValue);
 	type IntoIter = <PropertiesMap<PropertyValue> as IntoIterator>::IntoIter;
 
@@ -1309,7 +1326,7 @@
 	}
 }
 
-impl TrySetProperty for Properties {
+impl<const S: u32> TrySetProperty for Properties<S> {
 	type Value = PropertyValue;
 
 	fn try_scoped_set(
@@ -1320,7 +1337,7 @@
 	) -> Result<Option<Self::Value>, PropertiesError> {
 		let value_len = value.len();
 
-		if self.consumed_space as usize + value_len > self.space_limit as usize
+		if self.consumed_space as usize + value_len > self.space_limit.min(S) as usize
 			&& !cfg!(feature = "runtime-benchmarks")
 		{
 			return Err(PropertiesError::NoSpaceForProperty);
@@ -1341,20 +1358,5 @@
 	}
 }
 
-/// Utility struct for using in `StorageMap`.
-pub struct CollectionProperties;
-
-impl Get<Properties> for CollectionProperties {
-	fn get() -> Properties {
-		Properties::new(MAX_COLLECTION_PROPERTIES_SIZE)
-	}
-}
-
-/// Utility struct for using in `StorageMap`.
-pub struct TokenProperties;
-
-impl Get<Properties> for TokenProperties {
-	fn get() -> Properties {
-		Properties::new(MAX_TOKEN_PROPERTIES_SIZE)
-	}
-}
+pub type CollectionProperties = Properties<MAX_COLLECTION_PROPERTIES_SIZE>;
+pub type TokenProperties = Properties<MAX_TOKEN_PROPERTIES_SIZE>;
modifiedruntime/common/config/ethereum.rsdiffbeforeafterboth
--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -15,6 +15,7 @@
 	Runtime, Aura, Balances, RuntimeEvent, ChainId,
 };
 use pallet_evm::{EnsureAddressTruncated, HashedAddressMapping};
+use pallet_ethereum::PostLogContent;
 use up_common::constants::*;
 
 pub type CrossAccountId = pallet_evm::account::BasicCrossAccountId<Runtime>;
@@ -88,9 +89,14 @@
 	type WeightInfo = pallet_evm_migration::weights::SubstrateWeight<Self>;
 }
 
+parameter_types! {
+	pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
+}
+
 impl pallet_ethereum::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
 	type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
+	type PostLogContent = PostBlockAndTxnHashes;
 }
 
 parameter_types! {
modifiedruntime/common/config/orml.rsdiffbeforeafterboth
--- a/runtime/common/config/orml.rs
+++ b/runtime/common/config/orml.rs
@@ -21,8 +21,7 @@
 use frame_system::EnsureSigned;
 use orml_traits::{location::AbsoluteReserveProvider, parameter_type_with_key};
 use sp_runtime::traits::Convert;
-use xcm::latest::{Weight, Junction::*, Junctions::*, MultiLocation, NetworkId};
-use xcm_builder::LocationInverter;
+use xcm::latest::{Weight, Junction::*, Junctions::*, MultiLocation};
 use xcm_executor::XcmExecutor;
 use sp_std::{vec, vec::Vec};
 use pallet_foreign_assets::{CurrencyId, NativeCurrency};
@@ -30,7 +29,7 @@
 	Runtime, RuntimeEvent, RelayChainBlockNumberProvider,
 	runtime_common::config::{
 		xcm::{
-			SelfLocation, Weigher, XcmConfig, Ancestry,
+			SelfLocation, Weigher, XcmConfig, UniversalLocation,
 			xcm_assets::{CurrencyIdConvert},
 		},
 		pallets::TreasuryAccountId,
@@ -50,7 +49,7 @@
 	pub const MinVestedTransfer: Balance = 10 * UNIQUE;
 	pub const MaxVestingSchedules: u32 = 28;
 
-	pub const BaseXcmWeight: Weight = 100_000_000; // TODO: recheck this
+	pub const BaseXcmWeight: Weight = Weight::from_parts(100_000_000, 1000); // ? TODO: recheck this
 	pub const MaxAssetsForTransfer: usize = 2;
 }
 
@@ -87,7 +86,7 @@
 impl Convert<AccountId, MultiLocation> for AccountIdToMultiLocation {
 	fn convert(account: AccountId) -> MultiLocation {
 		X1(AccountId32 {
-			network: NetworkId::Any,
+			network: None,
 			id: account.into(),
 		})
 		.into()
@@ -142,9 +141,9 @@
 	type XcmExecutor = XcmExecutor<XcmConfig<Self>>;
 	type Weigher = Weigher;
 	type BaseXcmWeight = BaseXcmWeight;
-	type LocationInverter = LocationInverter<Ancestry>;
 	type MaxAssetsForTransfer = MaxAssetsForTransfer;
 	type MinXcmFee = ParachainMinFee;
 	type MultiLocationsFilter = Everything;
 	type ReserveProvider = AbsoluteReserveProvider;
+	type UniversalLocation = UniversalLocation;
 }
modifiedruntime/common/config/pallets/collator_selection.rsdiffbeforeafterboth
--- a/runtime/common/config/pallets/collator_selection.rs
+++ b/runtime/common/config/pallets/collator_selection.rs
@@ -48,8 +48,6 @@
 
 impl pallet_authorship::Config for Runtime {
 	type FindAuthor = pallet_session::FindAccountFromAuthorIndex<Self, Aura>;
-	type UncleGenerations = UncleGenerations;
-	type FilterUncle = ();
 	type EventHandler = CollatorSelection;
 }
 
modifiedruntime/common/config/substrate.rsdiffbeforeafterboth
--- a/runtime/common/config/substrate.rs
+++ b/runtime/common/config/substrate.rs
@@ -115,8 +115,6 @@
 	type MaxConsumers = ConstU32<16>;
 }
 
-impl pallet_randomness_collective_flip::Config for Runtime {}
-
 parameter_types! {
 	pub const MinimumPeriod: u64 = SLOT_DURATION / 2;
 }
modifiedruntime/common/config/xcm/foreignassets.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/foreignassets.rs
+++ b/runtime/common/config/xcm/foreignassets.rs
@@ -15,13 +15,13 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-	traits::{Contains, Get, fungibles},
+	traits::{Contains, Get, fungibles, ContainsPair},
 	parameter_types,
 };
 use sp_runtime::traits::Convert;
 use xcm::latest::{MultiAsset, Junction::*, MultiLocation, Junctions::*};
-use xcm_builder::{FungiblesAdapter, ConvertedConcreteAssetId};
-use xcm_executor::traits::{Convert as ConvertXcm, JustTry, FilterAssetLocation};
+use xcm_builder::{FungiblesAdapter, NonLocalMint, ConvertedConcreteId};
+use xcm_executor::traits::{Convert as ConvertXcm, JustTry};
 use pallet_foreign_assets::{
 	AssetIds, AssetIdMapping, XcmForeignAssetIdMapping, NativeCurrency, FreeForAll, TryAsForeign,
 	ForeignAssetId, CurrencyId,
@@ -126,13 +126,13 @@
 	// Use this fungibles implementation:
 	ForeignAssets,
 	// Use this currency when it is a fungible asset matching the given location or name:
-	ConvertedConcreteAssetId<AssetIds, Balance, AsInnerId<AssetIds, JustTry>, JustTry>,
+	ConvertedConcreteId<AssetIds, Balance, AsInnerId<AssetIds, JustTry>, JustTry>,
 	// Convert an XCM MultiLocation into a local account id:
 	LocationToAccountId,
 	// Our chain's account ID type (we can't get away without mentioning it explicitly):
 	AccountId,
 	// No teleports are allowed
-	NoTeleports<AccountId, ForeignAssets>,
+	NonLocalMint<NoTeleports<AccountId, ForeignAssets>>,
 	// The account to use for tracking teleports.
 	CheckingAccount,
 >;
@@ -141,8 +141,10 @@
 pub type AssetTransactors = FungiblesTransactor;
 
 pub struct AllAsset;
-impl FilterAssetLocation for AllAsset {
-	fn filter_asset_location(_asset: &MultiAsset, _origin: &MultiLocation) -> bool {
+impl ContainsPair<MultiAsset, MultiLocation> for AllAsset {
+	fn contains(_asset: &MultiAsset, _origin: &MultiLocation) -> bool {
+		// ? Shouldn't we query foreign-asset pallet here, because of the new non-local mint
+		// location logic?
 		true
 	}
 }
modifiedruntime/common/config/xcm/mod.rsdiffbeforeafterboth
--- a/runtime/common/config/xcm/mod.rs
+++ b/runtime/common/config/xcm/mod.rs
@@ -15,23 +15,24 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::{
-	traits::{Everything, Get},
+	traits::{Everything, Nothing, Get, ConstU32},
 	parameter_types,
 };
 use frame_system::EnsureRoot;
 use pallet_xcm::XcmPassthrough;
 use polkadot_parachain::primitives::Sibling;
 use xcm::latest::{prelude::*, Weight, MultiLocation};
+use xcm::v3::Instruction;
 use xcm_builder::{
-	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, LocationInverter, ParentAsSuperuser,
-	RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia,
-	SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, ParentIsPreset,
+	AccountId32Aliases, EnsureXcmOrigin, FixedWeightBounds, ParentAsSuperuser, RelayChainAsNative,
+	SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative,
+	SignedToAccountId32, SovereignSignedViaLocation, ParentIsPreset,
 };
 use xcm_executor::{Config, XcmExecutor, traits::ShouldExecute};
 use sp_std::{marker::PhantomData, vec::Vec};
 use crate::{
 	Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, ParachainInfo, ParachainSystem, PolkadotXcm,
-	XcmpQueue, xcm_barrier::Barrier, RelayNetwork,
+	XcmpQueue, xcm_barrier::Barrier, RelayNetwork, AllPalletsWithSystem, Balances,
 };
 
 use up_common::types::AccountId;
@@ -54,10 +55,11 @@
 	pub const RelayLocation: MultiLocation = MultiLocation::parent();
 	pub RelayOrigin: RuntimeOrigin = cumulus_pallet_xcm::Origin::Relay.into();
 	pub Ancestry: MultiLocation = Parachain(ParachainInfo::parachain_id().into()).into();
+	pub UniversalLocation: InteriorMultiLocation = Parachain(ParachainInfo::get().into()).into();
 	pub SelfLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(ParachainInfo::get().into())));
 
 	// One XCM operation is 1_000_000 weight - almost certainly a conservative estimate.
-	pub UnitWeightCost: Weight = 1_000_000;
+	pub UnitWeightCost: Weight = Weight::from_parts(1_000_000, 1000); // ?
 	pub const MaxInstructions: u32 = 100;
 }
 
@@ -80,7 +82,7 @@
 /// queues.
 pub type XcmRouter = (
 	// Two routers - use UMP to communicate with the relay chain:
-	cumulus_primitives_utility::ParentAsUmp<ParachainSystem, ()>,
+	cumulus_primitives_utility::ParentAsUmp<ParachainSystem, (), ()>,
 	// ..and XCMP to communicate with the sibling chains.
 	XcmpQueue,
 );
@@ -110,12 +112,12 @@
 );
 
 pub trait TryPass {
-	fn try_pass<Call>(origin: &MultiLocation, message: &mut Xcm<Call>) -> Result<(), ()>;
+	fn try_pass<Call>(origin: &MultiLocation, message: &mut [Instruction<Call>]) -> Result<(), ()>;
 }
 
 #[impl_trait_for_tuples::impl_for_tuples(30)]
 impl TryPass for Tuple {
-	fn try_pass<Call>(origin: &MultiLocation, message: &mut Xcm<Call>) -> Result<(), ()> {
+	fn try_pass<Call>(origin: &MultiLocation, message: &mut [Instruction<Call>]) -> Result<(), ()> {
 		for_tuples!( #(
 			Tuple::try_pass(origin, message)?;
 		)* );
@@ -126,9 +128,11 @@
 
 pub struct DenyTransact;
 impl TryPass for DenyTransact {
-	fn try_pass<Call>(_origin: &MultiLocation, message: &mut Xcm<Call>) -> Result<(), ()> {
+	fn try_pass<Call>(
+		_origin: &MultiLocation,
+		message: &mut [Instruction<Call>],
+	) -> Result<(), ()> {
 		let transact_inst = message
-			.0
 			.iter()
 			.find(|inst| matches![inst, Instruction::Transact { .. }]);
 
@@ -159,7 +163,7 @@
 {
 	fn should_execute<Call>(
 		origin: &MultiLocation,
-		message: &mut Xcm<Call>,
+		message: &mut [Instruction<Call>],
 		max_weight: Weight,
 		weight_credit: &mut Weight,
 	) -> Result<(), ()> {
@@ -171,22 +175,19 @@
 // Allow xcm exchange only with locations in list
 pub struct DenyExchangeWithUnknownLocation<T>(PhantomData<T>);
 impl<T: Get<Vec<MultiLocation>>> TryPass for DenyExchangeWithUnknownLocation<T> {
-	fn try_pass<Call>(origin: &MultiLocation, message: &mut Xcm<Call>) -> Result<(), ()> {
+	fn try_pass<Call>(origin: &MultiLocation, message: &mut [Instruction<Call>]) -> Result<(), ()> {
 		let allowed_locations = T::get();
 
 		// Check if deposit or transfer belongs to allowed parachains
 		let mut allowed = allowed_locations.contains(origin);
 
-		message.0.iter().for_each(|inst| match inst {
-			DepositReserveAsset { dest: dst, .. } => {
-				allowed |= allowed_locations.contains(dst);
-			}
-			TransferReserveAsset { dest: dst, .. } => {
-				allowed |= allowed_locations.contains(dst);
+		message.iter().for_each(|inst| match inst {
+			DepositReserveAsset { dest: dst, .. }
+			| TransferReserveAsset { dest: dst, .. }
+			| InitiateReserveWithdraw { reserve: dst, .. } => {
+				allowed |= allowed_locations.contains(&dst);
 			}
-			InitiateReserveWithdraw { reserve: dst, .. } => {
-				allowed |= allowed_locations.contains(dst);
-			}
+			// ? There are more instructions worth checking
 			_ => {}
 		});
 
@@ -217,17 +218,31 @@
 	type OriginConverter = XcmOriginToTransactDispatchOrigin;
 	type IsReserve = IsReserve;
 	type IsTeleporter = (); // Teleportation is disabled
-	type LocationInverter = LocationInverter<Ancestry>;
+	type UniversalLocation = UniversalLocation;
 	type Barrier = Barrier;
 	type Weigher = Weigher;
 	type Trader = Trader<T>;
 	type ResponseHandler = PolkadotXcm;
 	type SubscriptionService = PolkadotXcm;
+	type PalletInstancesInfo = AllPalletsWithSystem;
+	type MaxAssetsIntoHolding = ConstU32<64>;
 
 	type AssetTrap = PolkadotXcm;
 	type AssetClaims = PolkadotXcm;
+	type AssetLocker = ();
+	type AssetExchanger = ();
+	type FeeManager = ();
+	type MessageExporter = ();
+	type UniversalAliases = Nothing; // ?
+	type CallDispatcher = RuntimeCall;
+	type SafeCallFilter = Nothing; // ? Only non-recursive calls may go here, but do we need this?
 }
 
+#[cfg(feature = "runtime-benchmarks")]
+parameter_types! {
+	pub ReachableDest: Option<MultiLocation> = Some(Parent.into());
+}
+
 impl pallet_xcm::Config for Runtime {
 	type RuntimeEvent = RuntimeEvent;
 	type SendXcmOrigin = EnsureXcmOrigin<RuntimeOrigin, LocalOriginToLocation>;
@@ -238,11 +253,19 @@
 	type XcmTeleportFilter = Everything;
 	type XcmReserveTransferFilter = Everything;
 	type Weigher = FixedWeightBounds<UnitWeightCost, RuntimeCall, MaxInstructions>;
-	type LocationInverter = LocationInverter<Ancestry>;
 	type RuntimeOrigin = RuntimeOrigin;
 	type RuntimeCall = RuntimeCall;
 	const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100;
 	type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;
+	type UniversalLocation = UniversalLocation;
+	type Currency = Balances;
+	type CurrencyMatcher = (); // ?
+	type TrustedLockers = ();
+	type SovereignAccountOf = ();
+	type MaxLockers = ConstU32<8>;
+	type WeightInfo = crate::weights::xcm::SubstrateWeight<Runtime>;
+	#[cfg(feature = "runtime-benchmarks")]
+	type ReachableDest = ReachableDest;
 }
 
 impl cumulus_pallet_xcm::Config for Runtime {
@@ -259,6 +282,7 @@
 	type ExecuteOverweightOrigin = frame_system::EnsureRoot<AccountId>;
 	type ControllerOrigin = EnsureRoot<AccountId>;
 	type ControllerOriginConverter = XcmOriginToTransactDispatchOrigin;
+	type PriceForSiblingDelivery = ();
 }
 
 impl cumulus_pallet_dmp_queue::Config for Runtime {
modifiedruntime/common/construct_runtime.rsdiffbeforeafterboth
--- a/runtime/common/construct_runtime.rs
+++ b/runtime/common/construct_runtime.rs
@@ -16,99 +16,99 @@
 
 #[macro_export]
 macro_rules! construct_runtime {
-    () => {
-            frame_support::construct_runtime! {
+	() => {
+		frame_support::construct_runtime! {
 
-            pub enum Runtime where
-                Block = Block,
-                NodeBlock = opaque::Block,
-                UncheckedExtrinsic = UncheckedExtrinsic
-            {
-                System: frame_system = 0,
+			pub enum Runtime where
+				Block = Block,
+				NodeBlock = opaque::Block,
+				UncheckedExtrinsic = UncheckedExtrinsic
+			{
+				System: frame_system = 0,
 
-                ParachainSystem: cumulus_pallet_parachain_system::{Pallet, Call, Config, Storage, Inherent, Event<T>, ValidateUnsigned} = 20,
-                ParachainInfo: parachain_info::{Pallet, Storage, Config} = 21,
+				ParachainSystem: cumulus_pallet_parachain_system = 20,
+				ParachainInfo: parachain_info = 21,
 
-                #[cfg(feature = "collator-selection")]
-                Authorship: pallet_authorship::{Pallet, Call, Storage} = 22,
+				#[cfg(feature = "collator-selection")]
+				Authorship: pallet_authorship = 22,
 
-                #[cfg(feature = "collator-selection")]
-                CollatorSelection: pallet_collator_selection::{Pallet, Call, Storage, Event<T>, Config<T>} = 23,
+				#[cfg(feature = "collator-selection")]
+				CollatorSelection: pallet_collator_selection = 23,
 
-                #[cfg(feature = "collator-selection")]
-                Session: pallet_session::{Pallet, Call, Storage, Event, Config<T>} = 24,
+				#[cfg(feature = "collator-selection")]
+				Session: pallet_session = 24,
 
-                Aura: pallet_aura::{Pallet, Storage, Config<T>} = 25,
-                AuraExt: cumulus_pallet_aura_ext::{Pallet, Storage, Config} = 26,
+				Aura: pallet_aura = 25,
+				AuraExt: cumulus_pallet_aura_ext = 26,
 
-                Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>} = 30,
-                RandomnessCollectiveFlip: pallet_randomness_collective_flip::{Pallet, Storage} = 31,
-                Timestamp: pallet_timestamp::{Pallet, Call, Storage, Inherent} = 32,
-                TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event<T>} = 33,
-                Treasury: pallet_treasury::{Pallet, Call, Storage, Config, Event<T>} = 34,
-                Sudo: pallet_sudo::{Pallet, Call, Storage, Config<T>, Event<T>} = 35,
-                Vesting: orml_vesting::{Pallet, Storage, Call, Event<T>, Config<T>} = 37,
+				Balances: pallet_balances = 30,
+				// RandomnessCollectiveFlip = 31
+				Timestamp: pallet_timestamp = 32,
+				TransactionPayment: pallet_transaction_payment = 33,
+				Treasury: pallet_treasury = 34,
+				Sudo: pallet_sudo = 35,
+				Vesting: orml_vesting = 37,
 
-                XTokens: orml_xtokens = 38,
-                Tokens: orml_tokens = 39,
-                // Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,
+				XTokens: orml_xtokens = 38,
+				Tokens: orml_tokens = 39,
+				// Contracts: pallet_contracts::{Pallet, Call, Storage, Event<T>} = 38,
 
-                #[cfg(feature = "collator-selection")]
-                Identity: pallet_identity::{Pallet, Call, Storage, Event<T>} = 40,
+				#[cfg(feature = "collator-selection")]
+				Identity: pallet_identity = 40,
 
-                #[cfg(feature = "preimage")]
-                Preimage: pallet_preimage::{Pallet, Call, Storage, Event<T>} = 41,
+				#[cfg(feature = "preimage")]
+				Preimage: pallet_preimage = 41,
 
-                // XCM helpers.
-                XcmpQueue: cumulus_pallet_xcmp_queue::{Pallet, Call, Storage, Event<T>} = 50,
-                PolkadotXcm: pallet_xcm::{Pallet, Call, Storage, Event<T>, Origin} = 51,
-                CumulusXcm: cumulus_pallet_xcm::{Pallet, Call, Event<T>, Origin} = 52,
-                DmpQueue: cumulus_pallet_dmp_queue::{Pallet, Call, Storage, Event<T>} = 53,
+				// XCM helpers.
+				XcmpQueue: cumulus_pallet_xcmp_queue = 50,
+				PolkadotXcm: pallet_xcm = 51,
+				CumulusXcm: cumulus_pallet_xcm = 52,
+				DmpQueue: cumulus_pallet_dmp_queue = 53,
 
-                // Unique Pallets
-                Inflation: pallet_inflation::{Pallet, Call, Storage} = 60,
-                Unique: pallet_unique::{Pallet, Call, Storage} = 61,
+				// Unique Pallets
+				Inflation: pallet_inflation = 60,
+				Unique: pallet_unique::{Pallet, Call, Storage} = 61,
 
-                // #[cfg(feature = "scheduler")]
-                // Scheduler: pallet_unique_scheduler_v2::{Pallet, Call, Storage, Event<T>} = 62,
+				// #[cfg(feature = "scheduler")]
+				// Scheduler: pallet_unique_scheduler_v2 = 62,
 
-                Configuration: pallet_configuration::{Pallet, Call, Storage, Event<T>} = 63,
+				Configuration: pallet_configuration = 63,
 
-                Charging: pallet_charge_transaction::{Pallet, Call, Storage } = 64,
-                // ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
-                Common: pallet_common::{Pallet, Storage, Event<T>} = 66,
-                Fungible: pallet_fungible::{Pallet, Storage} = 67,
+				Charging: pallet_charge_transaction::{Pallet, Call, Storage} = 64,
+				// ContractHelpers: pallet_contract_helpers::{Pallet, Call, Storage} = 65,
+				Common: pallet_common = 66,
+				Fungible: pallet_fungible = 67,
 
-                #[cfg(feature = "refungible")]
-                Refungible: pallet_refungible::{Pallet, Storage} = 68,
+				#[cfg(feature = "refungible")]
+				Refungible: pallet_refungible = 68,
 
-                Nonfungible: pallet_nonfungible::{Pallet, Storage} = 69,
-                Structure: pallet_structure::{Pallet, Call, Storage, Event<T>} = 70,
+				Nonfungible: pallet_nonfungible = 69,
+				Structure: pallet_structure = 70,
 
-                // RmrkCore: pallet_proxy_rmrk_core::{Pallet, Call, Storage, Event<T>} = 71,
+				// RmrkCore: pallet_proxy_rmrk_core = 71,
 
-                // RmrkEquip: pallet_proxy_rmrk_equip::{Pallet, Call, Storage, Event<T>} = 72,
+				// RmrkEquip: pallet_proxy_rmrk_equip = 72,
 
-                #[cfg(feature = "app-promotion")]
-                AppPromotion: pallet_app_promotion::{Pallet, Call, Storage, Event<T>} = 73,
+				#[cfg(feature = "app-promotion")]
+				AppPromotion: pallet_app_promotion = 73,
 
-                #[cfg(feature = "foreign-assets")]
-                ForeignAssets: pallet_foreign_assets::{Pallet, Call, Storage, Event<T>} = 80,
+				#[cfg(feature = "foreign-assets")]
+				ForeignAssets: pallet_foreign_assets = 80,
 
-                // Frontier
-                EVM: pallet_evm::{Pallet, Config, Call, Storage, Event<T>} = 100,
-                Ethereum: pallet_ethereum::{Pallet, Config, Call, Storage, Event, Origin} = 101,
+				// Frontier
+				EVM: pallet_evm = 100,
+				Ethereum: pallet_ethereum = 101,
 
-                EvmCoderSubstrate: pallet_evm_coder_substrate::{Pallet, Storage} = 150,
-                EvmContractHelpers: pallet_evm_contract_helpers::{Pallet, Storage, Event<T>} = 151,
-                EvmTransactionPayment: pallet_evm_transaction_payment::{Pallet} = 152,
-                EvmMigration: pallet_evm_migration::{Pallet, Call, Storage, Event<T>} = 153,
+				EvmCoderSubstrate: pallet_evm_coder_substrate = 150,
+				EvmContractHelpers: pallet_evm_contract_helpers = 151,
+				EvmTransactionPayment: pallet_evm_transaction_payment = 152,
+				EvmMigration: pallet_evm_migration = 153,
 
-                Maintenance: pallet_maintenance::{Pallet, Call, Storage, Event<T>} = 154,
+				Maintenance: pallet_maintenance = 154,
 
-                #[cfg(feature = "pallet-test-utils")]
-                TestUtils: pallet_test_utils = 255,
-            }
-        }
-    }
+				#[cfg(feature = "pallet-test-utils")]
+				TestUtils: pallet_test_utils = 255,
+			}
+		}
+	};
 }
modifiedruntime/common/maintenance.rsdiffbeforeafterboth
--- a/runtime/common/maintenance.rs
+++ b/runtime/common/maintenance.rs
@@ -82,7 +82,6 @@
 
 				#[cfg(feature = "collator-selection")]
 				RuntimeCall::CollatorSelection(_)
-				| RuntimeCall::Authorship(_)
 				| RuntimeCall::Session(_)
 				| RuntimeCall::Identity(_) => Err(TransactionValidityError::Invalid(InvalidTransaction::Call)),
 
modifiedruntime/common/runtime_apis.rsdiffbeforeafterboth
--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -42,6 +42,7 @@
             transaction_validity::{TransactionSource, TransactionValidity},
             ApplyExtrinsicResult, DispatchError,
         };
+        use frame_support::pallet_prelude::Weight;
         use fp_rpc::TransactionStatus;
         use pallet_transaction_payment::{
             FeeDetails, RuntimeDispatchInfo,
@@ -486,6 +487,12 @@
                 fn query_fee_details(uxt: <Block as BlockT>::Extrinsic, len: u32) -> FeeDetails<Balance> {
                     TransactionPayment::query_fee_details(uxt, len)
                 }
+                fn query_weight_to_fee(weight: Weight) -> Balance {
+                    TransactionPayment::weight_to_fee(weight)
+                }
+                fn query_length_to_fee(length: u32) -> Balance {
+                    TransactionPayment::length_to_fee(length)
+                }
             }
 
             /*
@@ -539,6 +546,7 @@
                     use frame_support::traits::StorageInfoTrait;
 
                     let mut list = Vec::<BenchmarkList>::new();
+                    list_benchmark!(list, extra, pallet_xcm, PolkadotXcm);
 
                     list_benchmark!(list, extra, pallet_evm_migration, EvmMigration);
                     list_benchmark!(list, extra, pallet_common, Common);
@@ -604,6 +612,7 @@
 
                     let mut batches = Vec::<BenchmarkBatch>::new();
                     let params = (&config, &allowlist);
+                    add_benchmark!(params, batches, pallet_xcm, PolkadotXcm);
 
                     add_benchmark!(params, batches, pallet_evm_migration, EvmMigration);
                     add_benchmark!(params, batches, pallet_common, Common);
@@ -667,7 +676,7 @@
 
             #[cfg(feature = "try-runtime")]
             impl frame_try_runtime::TryRuntime<Block> for Runtime {
-                fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (frame_support::pallet_prelude::Weight, frame_support::pallet_prelude::Weight) {
+                fn on_runtime_upgrade(checks: frame_try_runtime::UpgradeCheckSelect) -> (Weight, Weight) {
                     log::info!("try-runtime::on_runtime_upgrade unique-chain.");
                     let weight = Executive::try_runtime_upgrade(checks).unwrap();
                     (weight, crate::config::substrate::RuntimeBlockWeights::get().max_block)
@@ -678,7 +687,7 @@
                     state_root_check: bool,
                     signature_check: bool,
                     select: frame_try_runtime::TryStateSelect
-                ) -> frame_support::pallet_prelude::Weight {
+                ) -> Weight {
                     log::info!(
                         target: "node-runtime",
                         "try-runtime: executing block {:?} / root checks: {:?} / try-state-select: {:?}",
modifiedruntime/common/tests/xcm.rsdiffbeforeafterboth
--- a/runtime/common/tests/xcm.rs
+++ b/runtime/common/tests/xcm.rs
@@ -19,6 +19,7 @@
 use logtest::Logger;
 use crate::RuntimeCall;
 use super::new_test_ext;
+use frame_support::pallet_prelude::Weight;
 
 fn catch_xcm_barrier_log(logger: &mut Logger, expected_msg: &str) -> Result<(), String> {
 	for record in logger {
@@ -45,16 +46,16 @@
 	// so it is irrelevant what we are passing to the `transact` cmd.
 	let fake_encoded_call = vec![0u8];
 
-	let transact_inst = Transact {
-		origin_type: OriginKind::Superuser,
-		require_weight_at_most: 0,
+	let transact_inst: Instruction<RuntimeCall> = Transact {
+		origin_kind: OriginKind::Superuser,
+		require_weight_at_most: Weight::default(),
 		call: fake_encoded_call.into(),
 	};
 
-	let mut xcm_program = Xcm::<RuntimeCall>(vec![transact_inst]);
+	let mut xcm_program = vec![transact_inst];
 
-	let max_weight = 100_000;
-	let mut weight_credit = 100_000_000;
+	let max_weight = Weight::from_parts(100_000, 100_000);
+	let mut weight_credit = Weight::from_parts(100_000_000, 100_000_000);
 
 	let result = B::should_execute(&location, &mut xcm_program, max_weight, &mut weight_credit);
 
@@ -69,11 +70,11 @@
 fn xcm_execute<B: ShouldExecute>(
 	self_para_id: u32,
 	location: &MultiLocation,
-	xcm: &mut Xcm<RuntimeCall>,
+	xcm: &mut [Instruction<RuntimeCall>],
 ) -> Result<(), ()> {
 	new_test_ext(self_para_id).execute_with(|| {
-		let max_weight = 100_000;
-		let mut weight_credit = 100_000_000;
+		let max_weight = Weight::from_parts(100_000, 100_000);
+		let mut weight_credit = Weight::from_parts(100_000_000, 100_000_000);
 
 		B::should_execute(&location, xcm, max_weight, &mut weight_credit)
 	})
@@ -102,7 +103,6 @@
 	let assets = make_multiassets(location);
 	let inst = DepositReserveAsset {
 		assets: assets.into(),
-		max_assets: 42,
 		dest: location.clone(),
 		xcm: Xcm(vec![]),
 	};
@@ -114,7 +114,7 @@
 	logger: &mut Logger,
 	self_para_id: u32,
 	location: &MultiLocation,
-	xcm: &mut Xcm<RuntimeCall>,
+	xcm: &mut [Instruction<RuntimeCall>],
 ) -> Result<(), String> {
 	let result = xcm_execute::<B>(self_para_id, location, xcm);
 
@@ -148,14 +148,14 @@
 		logger,
 		self_para_id,
 		&unknown_location,
-		&mut transfer_reserve_asset,
+		&mut transfer_reserve_asset.0,
 	)?;
 
 	expect_transfer_location_denied::<B>(
 		logger,
 		self_para_id,
 		&unknown_location,
-		&mut deposit_reserve_asset,
+		&mut deposit_reserve_asset.0,
 	)?;
 
 	Ok(())
modifiedruntime/common/weights.rsdiffbeforeafterboth
--- a/runtime/common/weights.rs
+++ b/runtime/common/weights.rs
@@ -27,6 +27,8 @@
 };
 use up_data_structs::{CreateItemExData, CreateItemData};
 
+pub mod xcm;
+
 macro_rules! max_weight_of {
 	($method:ident ( $($args:tt)* )) => {{
 		let max_weight = <FungibleWeights<T>>::$method($($args)*)
addedruntime/common/weights/xcm.rsdiffbeforeafterboth
--- /dev/null
+++ b/runtime/common/weights/xcm.rs
@@ -0,0 +1,218 @@
+// Template adopted from https://github.com/paritytech/substrate/blob/master/.maintain/frame-weight-template.hbs
+
+//! Autogenerated weights for pallet_xcm
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-03-10, STEPS: `50`, REPEAT: 80, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! EXECUTION: None, WASM-EXECUTION: Compiled, CHAIN: None, DB CACHE: 1024
+
+// Executed Command:
+// target/release/unique-collator
+// benchmark
+// pallet
+// --pallet
+// pallet-xcm
+// --wasm-execution
+// compiled
+// --extrinsic
+// *
+// --template=.maintain/external-weight-template.hbs
+// --steps=50
+// --repeat=80
+// --heap-pages=4096
+// --output=./runtime/common/weights/xcm.rs
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+#![allow(clippy::unnecessary_cast)]
+
+use frame_support::{traits::Get, weights::{Weight, constants::RocksDbWeight}};
+use sp_std::marker::PhantomData;
+
+/// Weights for pallet_xcm using the Substrate node and recommended hardware.
+pub struct SubstrateWeight<T>(PhantomData<T>);
+impl<T: frame_system::Config> pallet_xcm::WeightInfo for SubstrateWeight<T> {
+	/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
+	/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
+	/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
+	fn send() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `142`
+		//  Estimated: `1274`
+		// Minimum execution time: 11_382_000 picoseconds.
+		Weight::from_parts(11_812_000, 1274)
+			.saturating_add(T::DbWeight::get().reads(2_u64))
+			.saturating_add(T::DbWeight::get().writes(1_u64))
+	}
+	/// Storage: ParachainInfo ParachainId (r:1 w:0)
+	/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
+	fn teleport_assets() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `136`
+		//  Estimated: `499`
+		// Minimum execution time: 13_195_000 picoseconds.
+		Weight::from_parts(13_685_000, 499)
+			.saturating_add(T::DbWeight::get().reads(1_u64))
+	}
+	/// Storage: ParachainInfo ParachainId (r:1 w:0)
+	/// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
+	fn reserve_transfer_assets() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `136`
+		//  Estimated: `499`
+		// Minimum execution time: 12_784_000 picoseconds.
+		Weight::from_parts(13_155_000, 499)
+			.saturating_add(T::DbWeight::get().reads(1_u64))
+	}
+	fn execute() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `0`
+		//  Estimated: `0`
+		// Minimum execution time: 4_569_000 picoseconds.
+		Weight::from_parts(4_819_000, 0)
+	}
+	/// Storage: PolkadotXcm SupportedVersion (r:0 w:1)
+	/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
+	fn force_xcm_version() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `0`
+		//  Estimated: `0`
+		// Minimum execution time: 4_919_000 picoseconds.
+		Weight::from_parts(5_250_000, 0)
+			.saturating_add(T::DbWeight::get().writes(1_u64))
+	}
+	/// Storage: PolkadotXcm SafeXcmVersion (r:0 w:1)
+	/// Proof Skipped: PolkadotXcm SafeXcmVersion (max_values: Some(1), max_size: None, mode: Measured)
+	fn force_default_xcm_version() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `0`
+		//  Estimated: `0`
+		// Minimum execution time: 1_593_000 picoseconds.
+		Weight::from_parts(1_723_000, 0)
+			.saturating_add(T::DbWeight::get().writes(1_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifiers (r:1 w:1)
+	/// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
+	/// Storage: PolkadotXcm QueryCounter (r:1 w:1)
+	/// Proof Skipped: PolkadotXcm QueryCounter (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
+	/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
+	/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: PolkadotXcm Queries (r:0 w:1)
+	/// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured)
+	fn force_subscribe_version_notify() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `184`
+		//  Estimated: `4880`
+		// Minimum execution time: 16_832_000 picoseconds.
+		Weight::from_parts(17_984_000, 4880)
+			.saturating_add(T::DbWeight::get().reads(4_u64))
+			.saturating_add(T::DbWeight::get().writes(4_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifiers (r:1 w:1)
+	/// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
+	/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
+	/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
+	/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: PolkadotXcm Queries (r:0 w:1)
+	/// Proof Skipped: PolkadotXcm Queries (max_values: None, max_size: None, mode: Measured)
+	fn force_unsubscribe_version_notify() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `341`
+		//  Estimated: `4829`
+		// Minimum execution time: 19_256_000 picoseconds.
+		Weight::from_parts(20_228_000, 4829)
+			.saturating_add(T::DbWeight::get().reads(3_u64))
+			.saturating_add(T::DbWeight::get().writes(3_u64))
+	}
+	/// Storage: PolkadotXcm SupportedVersion (r:4 w:2)
+	/// Proof Skipped: PolkadotXcm SupportedVersion (max_values: None, max_size: None, mode: Measured)
+	fn migrate_supported_version() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `108`
+		//  Estimated: `10008`
+		// Minimum execution time: 14_437_000 picoseconds.
+		Weight::from_parts(15_750_000, 10008)
+			.saturating_add(T::DbWeight::get().reads(4_u64))
+			.saturating_add(T::DbWeight::get().writes(2_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifiers (r:4 w:2)
+	/// Proof Skipped: PolkadotXcm VersionNotifiers (max_values: None, max_size: None, mode: Measured)
+	fn migrate_version_notifiers() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `112`
+		//  Estimated: `10012`
+		// Minimum execution time: 14_617_000 picoseconds.
+		Weight::from_parts(16_000_000, 10012)
+			.saturating_add(T::DbWeight::get().reads(4_u64))
+			.saturating_add(T::DbWeight::get().writes(2_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifyTargets (r:5 w:0)
+	/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
+	fn already_notified_target() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `119`
+		//  Estimated: `12494`
+		// Minimum execution time: 18_395_000 picoseconds.
+		Weight::from_parts(19_858_000, 12494)
+			.saturating_add(T::DbWeight::get().reads(5_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifyTargets (r:2 w:1)
+	/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
+	/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
+	/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
+	/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
+	fn notify_current_targets() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `255`
+		//  Estimated: `6705`
+		// Minimum execution time: 17_443_000 picoseconds.
+		Weight::from_parts(18_435_000, 6705)
+			.saturating_add(T::DbWeight::get().reads(4_u64))
+			.saturating_add(T::DbWeight::get().writes(2_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifyTargets (r:3 w:0)
+	/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
+	fn notify_target_migration_fail() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `149`
+		//  Estimated: `7574`
+		// Minimum execution time: 7_714_000 picoseconds.
+		Weight::from_parts(8_526_000, 7574)
+			.saturating_add(T::DbWeight::get().reads(3_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2)
+	/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
+	fn migrate_version_notify_targets() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `119`
+		//  Estimated: `10019`
+		// Minimum execution time: 15_008_000 picoseconds.
+		Weight::from_parts(16_271_000, 10019)
+			.saturating_add(T::DbWeight::get().reads(4_u64))
+			.saturating_add(T::DbWeight::get().writes(2_u64))
+	}
+	/// Storage: PolkadotXcm VersionNotifyTargets (r:4 w:2)
+	/// Proof Skipped: PolkadotXcm VersionNotifyTargets (max_values: None, max_size: None, mode: Measured)
+	/// Storage: ParachainSystem HostConfiguration (r:1 w:0)
+	/// Proof Skipped: ParachainSystem HostConfiguration (max_values: Some(1), max_size: None, mode: Measured)
+	/// Storage: ParachainSystem PendingUpwardMessages (r:1 w:1)
+	/// Proof Skipped: ParachainSystem PendingUpwardMessages (max_values: Some(1), max_size: None, mode: Measured)
+	fn migrate_and_notify_old_targets() -> Weight {
+		// Proof Size summary in bytes:
+		//  Measured:  `261`
+		//  Estimated: `11673`
+		// Minimum execution time: 23_554_000 picoseconds.
+		Weight::from_parts(25_158_000, 11673)
+			.saturating_add(T::DbWeight::get().reads(6_u64))
+			.saturating_add(T::DbWeight::get().writes(3_u64))
+	}
+}
+
modifiedruntime/opal/Cargo.tomldiffbeforeafterboth
--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -95,7 +95,6 @@
 	'pallet-identity/std',
 	'pallet-inflation/std',
 	'pallet-nonfungible/std',
-	'pallet-randomness-collective-flip/std',
 	'pallet-refungible/std',
 	'pallet-structure/std',
 	'pallet-sudo/std',
@@ -174,7 +173,6 @@
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-randomness-collective-flip/try-runtime',
 	'pallet-refungible/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
@@ -223,7 +221,6 @@
 pallet-authorship = { workspace = true }
 pallet-balances = { workspace = true }
 pallet-preimage = { workspace = true }
-pallet-randomness-collective-flip = { workspace = true }
 pallet-session = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
modifiedruntime/opal/src/lib.rsdiffbeforeafterboth
--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -54,7 +54,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 937053,
+	spec_version: 939053,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/opal/src/xcm_barrier.rsdiffbeforeafterboth
--- a/runtime/opal/src/xcm_barrier.rs
+++ b/runtime/opal/src/xcm_barrier.rs
@@ -15,7 +15,8 @@
 // along with Unique Network. If not, see <http://www.gnu.org/licenses/>.
 
 use frame_support::traits::Everything;
-use xcm::latest::{Xcm, Weight, MultiLocation};
+use xcm::latest::{Weight, MultiLocation};
+use xcm::v3::Instruction;
 use xcm_builder::{AllowTopLevelPaidExecutionFrom, TakeWeightCredit};
 use xcm_executor::traits::ShouldExecute;
 
@@ -30,7 +31,7 @@
 impl ShouldExecute for AllowAllDebug {
 	fn should_execute<Call>(
 		_origin: &MultiLocation,
-		_message: &mut Xcm<Call>,
+		_message: &mut [Instruction<Call>],
 		_max_weight: Weight,
 		_weight_credit: &mut Weight,
 	) -> Result<(), ()> {
modifiedruntime/quartz/Cargo.tomldiffbeforeafterboth
--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -95,7 +95,6 @@
 	'pallet-fungible/std',
 	'pallet-inflation/std',
 	'pallet-nonfungible/std',
-	'pallet-randomness-collective-flip/std',
 	'pallet-refungible/std',
 	'pallet-structure/std',
 	'pallet-sudo/std',
@@ -169,7 +168,6 @@
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-randomness-collective-flip/try-runtime',
 	'pallet-refungible/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
@@ -215,7 +213,6 @@
 pallet-authorship = { workspace = true }
 pallet-balances = { workspace = true }
 pallet-preimage = { workspace = true }
-pallet-randomness-collective-flip = { workspace = true }
 pallet-session = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
modifiedruntime/quartz/src/lib.rsdiffbeforeafterboth
--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/src/lib.rs
@@ -57,7 +57,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 937053,
+	spec_version: 939053,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,
modifiedruntime/tests/Cargo.tomldiffbeforeafterboth
--- a/runtime/tests/Cargo.toml
+++ b/runtime/tests/Cargo.toml
@@ -11,22 +11,22 @@
 [dependencies]
 up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
 
-sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
-fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
+fp-evm-mapping = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
 
-frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+frame-support = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
-pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
-pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.37" }
+pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
 
-pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
-pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.37" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
 
 pallet-common.path = "../../pallets/common"
 pallet-fungible.path = "../../pallets/fungible"
@@ -41,4 +41,6 @@
 scale-info = "*"
 
 evm-coder = { workspace = true }
-up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.37" }
+up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
+xcm = { workspace = true }
+pallet-configuration = { workspace = true }
modifiedruntime/tests/src/lib.rsdiffbeforeafterboth
--- a/runtime/tests/src/lib.rs
+++ b/runtime/tests/src/lib.rs
@@ -27,11 +27,12 @@
 	traits::{BlakeTwo256, IdentityLookup},
 	testing::Header,
 };
-use pallet_transaction_payment::{CurrencyAdapter};
+use pallet_transaction_payment::CurrencyAdapter;
 use frame_system as system;
 use pallet_evm::{
 	AddressMapping, account::CrossAccountId, EnsureAddressNever, SubstrateBlockHashMapping,
 };
+use pallet_ethereum::PostLogContent;
 use fp_evm_mapping::EvmBackwardsAddressMapping;
 use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
 use scale_info::TypeInfo;
@@ -204,11 +205,13 @@
 parameter_types! {
 	pub BlockGasLimit: U256 = 0u32.into();
 	pub WeightPerGas: Weight = Weight::from_ref_time(20);
+	pub const PostBlockAndTxnHashes: PostLogContent = PostLogContent::BlockAndTxnHashes;
 }
 
 impl pallet_ethereum::Config for Test {
 	type RuntimeEvent = RuntimeEvent;
 	type StateRoot = pallet_ethereum::IntermediateStateRoot<Self>;
+	type PostLogContent = PostBlockAndTxnHashes;
 }
 
 impl pallet_evm::Config for Test {
modifiedruntime/unique/Cargo.tomldiffbeforeafterboth
--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -93,7 +93,6 @@
 	'pallet-fungible/std',
 	'pallet-inflation/std',
 	'pallet-nonfungible/std',
-	'pallet-randomness-collective-flip/std',
 	'pallet-refungible/std',
 	'pallet-structure/std',
 	'pallet-sudo/std',
@@ -167,7 +166,6 @@
 	'pallet-inflation/try-runtime',
 	'pallet-maintenance/try-runtime',
 	'pallet-nonfungible/try-runtime',
-	'pallet-randomness-collective-flip/try-runtime',
 	'pallet-refungible/try-runtime',
 	'pallet-structure/try-runtime',
 	'pallet-sudo/try-runtime',
@@ -214,7 +212,6 @@
 pallet-authorship = { workspace = true }
 pallet-balances = { workspace = true }
 pallet-preimage = { workspace = true }
-pallet-randomness-collective-flip = { workspace = true }
 pallet-session = { workspace = true }
 pallet-sudo = { workspace = true }
 pallet-timestamp = { workspace = true }
modifiedruntime/unique/src/lib.rsdiffbeforeafterboth
--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -54,7 +54,7 @@
 	spec_name: create_runtime_str!(RUNTIME_NAME),
 	impl_name: create_runtime_str!(RUNTIME_NAME),
 	authoring_version: 1,
-	spec_version: 937053,
+	spec_version: 939053,
 	impl_version: 0,
 	apis: RUNTIME_API_VERSIONS,
 	transaction_version: 3,