difftreelog
Merge pull request #917 from UniqueNetwork/feature/update-polkadot-v0.9.41
in: master
Upgrade polkadot to v0.9.41
42 files changed
.maintain/frame-weight-template.hbsdiffbeforeafterboth--- a/.maintain/frame-weight-template.hbs
+++ b/.maintain/frame-weight-template.hbs
@@ -3,8 +3,9 @@
//! 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}}`
+//! 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}}`
+//! HOSTNAME: `{{hostname}}`, CPU: `{{cpuname}}`
//! EXECUTION: {{cmd.execution}}, WASM-EXECUTION: {{cmd.wasm_execution}}, CHAIN: {{cmd.chain}}, DB CACHE: {{cmd.db_cache}}
// Executed Command:
@@ -15,8 +16,6 @@
#![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;
Cargo.lockdiffbeforeafterboth--- a/Cargo.lock
+++ b/Cargo.lock
@@ -205,42 +205,51 @@
[[package]]
name = "anstream"
-version = "0.2.6"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "342258dd14006105c2b75ab1bd7543a03bdf0cfc94383303ac212a04939dff6f"
+checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371"
dependencies = [
"anstyle",
"anstyle-parse",
+ "anstyle-query",
"anstyle-wincon",
- "concolor-override",
- "concolor-query",
+ "colorchoice",
"is-terminal",
"utf8parse",
]
[[package]]
name = "anstyle"
-version = "0.3.5"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23ea9e81bd02e310c216d080f6223c179012256e5151c41db88d12c88a1684d2"
+checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
[[package]]
name = "anstyle-parse"
-version = "0.1.1"
+version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a7d1bb534e9efed14f3e5f44e7dd1a4f709384023a4165199a4241e18dff0116"
+checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
dependencies = [
"utf8parse",
]
[[package]]
+name = "anstyle-query"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "5ca11d4be1bab0c8bc8734a9aa7bf4ee8316d462a08c6ac5052f888fef5b494b"
+dependencies = [
+ "windows-sys 0.48.0",
+]
+
+[[package]]
name = "anstyle-wincon"
-version = "0.2.0"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c3127af6145b149f3287bb9a0d10ad9c5692dba8c53ad48285e5bec4063834fa"
+checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd"
dependencies = [
"anstyle",
- "windows-sys 0.45.0",
+ "windows-sys 0.48.0",
]
[[package]]
@@ -385,6 +394,17 @@
checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9"
[[package]]
+name = "async-channel"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cf46fee83e5ccffc220104713af3292ff9bc7c64c7de289f66dae8e38d826833"
+dependencies = [
+ "concurrent-queue",
+ "event-listener",
+ "futures-core",
+]
+
+[[package]]
name = "async-io"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -421,7 +441,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -529,68 +549,15 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1"
dependencies = [
- "serde",
-]
-
-[[package]]
-name = "beefy-gadget"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "array-bytes 4.2.0",
- "async-trait",
- "fnv",
- "futures",
- "log",
- "parity-scale-codec",
- "parking_lot 0.12.1",
- "sc-client-api",
- "sc-consensus",
- "sc-keystore",
- "sc-network",
- "sc-network-common",
- "sc-network-gossip",
- "sc-utils",
- "sp-api",
- "sp-application-crypto",
- "sp-arithmetic",
- "sp-beefy",
- "sp-blockchain",
- "sp-consensus",
- "sp-core",
- "sp-keystore",
- "sp-mmr-primitives",
- "sp-runtime",
- "substrate-prometheus-endpoint",
- "thiserror",
- "wasm-timer",
-]
-
-[[package]]
-name = "beefy-gadget-rpc"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "beefy-gadget",
- "futures",
- "jsonrpsee",
- "log",
- "parity-scale-codec",
- "parking_lot 0.12.1",
- "sc-rpc",
"serde",
- "sp-beefy",
- "sp-core",
- "sp-runtime",
- "thiserror",
]
[[package]]
name = "binary-merkle-tree"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
"log",
]
@@ -1039,9 +1006,9 @@
[[package]]
name = "clap"
-version = "4.2.1"
+version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "046ae530c528f252094e4a77886ee1374437744b2bff1497aa898bbddbbb29b3"
+checksum = "9b802d85aaf3a1cdb02b224ba472ebdea62014fccfcb269b95a4d76443b5ee5a"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1050,9 +1017,9 @@
[[package]]
name = "clap_builder"
-version = "4.2.1"
+version = "4.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "223163f58c9a40c3b0a43e1c4b50a9ce09f007ea2cb1ec258a687945b4b7929f"
+checksum = "14a1a858f532119338887a4b8e1af9c60de8249cd7bafd68036a489e261e37b6"
dependencies = [
"anstream",
"anstyle",
@@ -1070,7 +1037,7 @@
"heck",
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -1102,6 +1069,12 @@
]
[[package]]
+name = "colorchoice"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7"
+
+[[package]]
name = "comfy-table"
version = "6.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1111,23 +1084,8 @@
"strum_macros",
"unicode-width",
]
-
-[[package]]
-name = "concolor-override"
-version = "1.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a855d4a1978dc52fb0536a04d384c2c0c1aa273597f08b77c8c4d3b2eec6037f"
[[package]]
-name = "concolor-query"
-version = "0.3.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88d11d52c3d7ca2e6d0040212be9e4dbbcd78b6447f535b6b561f449427944cf"
-dependencies = [
- "windows-sys 0.45.0",
-]
-
-[[package]]
name = "concurrent-queue"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1453,7 +1411,7 @@
[[package]]
name = "cumulus-client-cli"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"clap",
"parity-scale-codec",
@@ -1468,7 +1426,7 @@
[[package]]
name = "cumulus-client-collator"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-client-consensus-common",
"cumulus-client-network",
@@ -1491,7 +1449,7 @@
[[package]]
name = "cumulus-client-consensus-aura"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-client-consensus-common",
@@ -1520,7 +1478,7 @@
[[package]]
name = "cumulus-client-consensus-common"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-client-pov-recovery",
@@ -1544,7 +1502,7 @@
[[package]]
name = "cumulus-client-network"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-relay-chain-interface",
@@ -1567,7 +1525,7 @@
[[package]]
name = "cumulus-client-pov-recovery"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1591,7 +1549,7 @@
[[package]]
name = "cumulus-client-service"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-client-cli",
"cumulus-client-collator",
@@ -1603,11 +1561,11 @@
"cumulus-relay-chain-interface",
"cumulus-relay-chain-minimal-node",
"futures",
- "parking_lot 0.12.1",
"polkadot-primitives",
"sc-client-api",
"sc-consensus",
"sc-network",
+ "sc-network-sync",
"sc-network-transactions",
"sc-rpc",
"sc-service",
@@ -1626,7 +1584,7 @@
[[package]]
name = "cumulus-pallet-aura-ext"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"frame-support",
"frame-system",
@@ -1642,7 +1600,7 @@
[[package]]
name = "cumulus-pallet-dmp-queue"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1659,7 +1617,7 @@
[[package]]
name = "cumulus-pallet-parachain-system"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"bytes",
"cumulus-pallet-parachain-system-proc-macro",
@@ -1688,7 +1646,7 @@
[[package]]
name = "cumulus-pallet-parachain-system-proc-macro"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -1699,7 +1657,7 @@
[[package]]
name = "cumulus-pallet-xcm"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1715,7 +1673,7 @@
[[package]]
name = "cumulus-pallet-xcmp-queue"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1735,7 +1693,7 @@
[[package]]
name = "cumulus-primitives-core"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"parity-scale-codec",
"polkadot-core-primitives",
@@ -1751,7 +1709,7 @@
[[package]]
name = "cumulus-primitives-parachain-inherent"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1774,7 +1732,7 @@
[[package]]
name = "cumulus-primitives-timestamp"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"futures",
@@ -1787,7 +1745,7 @@
[[package]]
name = "cumulus-primitives-utility"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -1805,7 +1763,7 @@
[[package]]
name = "cumulus-relay-chain-inprocess-interface"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1830,7 +1788,7 @@
[[package]]
name = "cumulus-relay-chain-interface"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1838,19 +1796,17 @@
"jsonrpsee-core",
"parity-scale-codec",
"polkadot-overseer",
- "polkadot-service",
"sc-client-api",
"sp-api",
"sp-blockchain",
"sp-state-machine",
"thiserror",
- "tokio",
]
[[package]]
name = "cumulus-relay-chain-minimal-node"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"array-bytes 6.0.0",
"async-trait",
@@ -1868,15 +1824,11 @@
"polkadot-service",
"sc-authority-discovery",
"sc-client-api",
- "sc-consensus",
- "sc-keystore",
"sc-network",
"sc-network-common",
"sc-service",
- "sc-telemetry",
"sc-tracing",
- "sc-transaction-pool",
- "sc-transaction-pool-api",
+ "sc-utils",
"sp-api",
"sp-blockchain",
"sp-consensus",
@@ -1884,13 +1836,12 @@
"sp-runtime",
"tokio",
"tracing",
- "url",
]
[[package]]
name = "cumulus-relay-chain-rpc-interface"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"async-trait",
"cumulus-primitives-core",
@@ -1900,9 +1851,10 @@
"jsonrpsee",
"lru 0.9.0",
"parity-scale-codec",
- "polkadot-service",
+ "polkadot-overseer",
"sc-client-api",
"sc-rpc-api",
+ "sc-service",
"serde",
"serde_json",
"sp-api",
@@ -1919,7 +1871,7 @@
[[package]]
name = "cumulus-test-relay-sproof-builder"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"parity-scale-codec",
@@ -1993,7 +1945,7 @@
"proc-macro2",
"quote",
"scratch",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -2010,7 +1962,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -2417,7 +2369,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -2428,7 +2380,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -2465,6 +2417,17 @@
[[package]]
name = "errno"
+version = "0.2.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1"
+dependencies = [
+ "errno-dragonfly",
+ "libc",
+ "winapi",
+]
+
+[[package]]
+name = "errno"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bcfec3a70f97c962c307b2d2c56e358cf1d00b558d74262b5f929ee8cc7e73a"
@@ -2507,13 +2470,13 @@
dependencies = [
"bytes",
"ethereum-types",
- "hash-db",
+ "hash-db 0.15.2",
"hash256-std-hasher",
"parity-scale-codec",
"rlp",
"scale-info",
"serde",
- "sha3 0.10.6",
+ "sha3 0.10.7",
"triehash",
]
@@ -2557,7 +2520,7 @@
"rlp",
"scale-info",
"serde",
- "sha3 0.10.6",
+ "sha3 0.10.7",
]
[[package]]
@@ -2581,7 +2544,7 @@
"hex",
"proc-macro2",
"quote",
- "sha3 0.10.6",
+ "sha3 0.10.7",
"syn 1.0.109",
]
@@ -2628,7 +2591,7 @@
"environmental",
"evm-core",
"primitive-types",
- "sha3 0.10.6",
+ "sha3 0.10.7",
]
[[package]]
@@ -2666,6 +2629,19 @@
]
[[package]]
+name = "expander"
+version = "1.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f360349150728553f92e4c997a16af8915f418d3a0f21b440d34c5632f16ed84"
+dependencies = [
+ "blake2",
+ "fs-err",
+ "proc-macro2",
+ "quote",
+ "syn 1.0.109",
+]
+
+[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2714,7 +2690,7 @@
[[package]]
name = "fc-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"async-trait",
"fc-db",
@@ -2723,7 +2699,6 @@
"sc-consensus",
"sp-api",
"sp-block-builder",
- "sp-blockchain",
"sp-consensus",
"sp-runtime",
"thiserror",
@@ -2732,7 +2707,7 @@
[[package]]
name = "fc-db"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"fp-storage",
"kvdb-rocksdb",
@@ -2751,7 +2726,7 @@
[[package]]
name = "fc-mapping-sync"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"fc-db",
"fc-storage",
@@ -2769,7 +2744,7 @@
[[package]]
name = "fc-rpc"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2778,6 +2753,7 @@
"fc-rpc-core",
"fc-storage",
"fp-ethereum",
+ "fp-evm",
"fp-rpc",
"fp-storage",
"futures",
@@ -2786,6 +2762,7 @@
"libsecp256k1",
"log",
"lru 0.8.1",
+ "pallet-evm",
"parity-scale-codec",
"prometheus",
"rand 0.8.5",
@@ -2793,6 +2770,7 @@
"sc-client-api",
"sc-network",
"sc-network-common",
+ "sc-network-sync",
"sc-rpc",
"sc-service",
"sc-transaction-pool",
@@ -2804,6 +2782,8 @@
"sp-core",
"sp-io",
"sp-runtime",
+ "sp-state-machine",
+ "sp-storage",
"substrate-prometheus-endpoint",
"tokio",
]
@@ -2811,7 +2791,7 @@
[[package]]
name = "fc-rpc-core"
version = "1.1.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2824,7 +2804,7 @@
[[package]]
name = "fc-storage"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2949,7 +2929,7 @@
[[package]]
name = "fork-tree"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
]
@@ -2964,9 +2944,27 @@
]
[[package]]
+name = "fp-account"
+version = "1.0.0-dev"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
+dependencies = [
+ "hex",
+ "impl-serde",
+ "libsecp256k1",
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
name = "fp-consensus"
version = "2.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"parity-scale-codec",
@@ -2978,7 +2976,7 @@
[[package]]
name = "fp-ethereum"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -2992,7 +2990,7 @@
[[package]]
name = "fp-evm"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"evm",
"frame-support",
@@ -3002,21 +3000,12 @@
"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.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
-dependencies = [
- "frame-support",
- "sp-core",
]
[[package]]
name = "fp-rpc"
version = "3.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -3026,13 +3015,14 @@
"sp-api",
"sp-core",
"sp-runtime",
+ "sp-state-machine",
"sp-std",
]
[[package]]
name = "fp-self-contained"
version = "1.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -3044,7 +3034,7 @@
[[package]]
name = "fp-storage"
version = "2.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"parity-scale-codec",
"serde",
@@ -3059,7 +3049,7 @@
[[package]]
name = "frame-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-support-procedural",
@@ -3084,7 +3074,7 @@
[[package]]
name = "frame-benchmarking-cli"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"Inflector",
"array-bytes 4.2.0",
@@ -3131,7 +3121,7 @@
[[package]]
name = "frame-election-provider-solution-type"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -3142,7 +3132,7 @@
[[package]]
name = "frame-election-provider-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-election-provider-solution-type",
"frame-support",
@@ -3159,7 +3149,7 @@
[[package]]
name = "frame-executive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -3188,7 +3178,7 @@
[[package]]
name = "frame-remote-externalities"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"log",
@@ -3204,9 +3194,10 @@
[[package]]
name = "frame-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"bitflags",
+ "environmental",
"frame-metadata",
"frame-support-procedural",
"impl-trait-for-tuples",
@@ -3236,7 +3227,7 @@
[[package]]
name = "frame-support-procedural"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"Inflector",
"cfg-expr",
@@ -3251,7 +3242,7 @@
[[package]]
name = "frame-support-procedural-tools"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
@@ -3263,7 +3254,7 @@
[[package]]
name = "frame-support-procedural-tools-derive"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro2",
"quote",
@@ -3273,7 +3264,7 @@
[[package]]
name = "frame-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"log",
@@ -3291,7 +3282,7 @@
[[package]]
name = "frame-system-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -3306,7 +3297,7 @@
[[package]]
name = "frame-system-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -3315,7 +3306,7 @@
[[package]]
name = "frame-try-runtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -3341,6 +3332,17 @@
]
[[package]]
+name = "fs4"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8ea55201cc351fdb478217c0fb641b59813da9b4efe4c414a9d8f989a657d149"
+dependencies = [
+ "libc",
+ "rustix 0.35.13",
+ "winapi",
+]
+
+[[package]]
name = "funty"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3418,7 +3420,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -3597,9 +3599,9 @@
[[package]]
name = "h2"
-version = "0.3.16"
+version = "0.3.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5be7b54589b581f624f566bf5d8eb2bab1db736c51528720b6bd36b96b55924d"
+checksum = "66b91535aa35fea1523ad1b86cb6b53c28e0ae566ba4a460f4457e936cad7c6f"
dependencies = [
"bytes",
"fnv",
@@ -3635,6 +3637,12 @@
checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a"
[[package]]
+name = "hash-db"
+version = "0.16.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e7d7786361d7425ae2fe4f9e407eb0efaa0840f5212d109cc018c40c35c6ab4"
+
+[[package]]
name = "hash256-std-hasher"
version = "0.15.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -4031,6 +4039,12 @@
[[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.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c66c74d2ae7e79a5a8f7ac924adbe38ee42a859c6539ad869eb51f0b52dc220"
@@ -4071,7 +4085,7 @@
checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f"
dependencies = [
"hermit-abi 0.3.1",
- "io-lifetimes",
+ "io-lifetimes 1.0.10",
"rustix 0.37.11",
"windows-sys 0.48.0",
]
@@ -4256,8 +4270,8 @@
[[package]]
name = "kusama-runtime"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"frame-benchmarking",
@@ -4286,7 +4300,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.39)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41)",
"pallet-im-online",
"pallet-indices",
"pallet-membership",
@@ -4330,9 +4344,9 @@
"sp-api",
"sp-arithmetic",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-consensus-babe",
+ "sp-consensus-beefy",
"sp-core",
"sp-inherents",
"sp-io",
@@ -4354,8 +4368,8 @@
[[package]]
name = "kusama-runtime-constants"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -5001,6 +5015,12 @@
[[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"
@@ -5160,15 +5180,6 @@
[[package]]
name = "memoffset"
-version = "0.7.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4"
-dependencies = [
- "autocfg",
-]
-
-[[package]]
-name = "memoffset"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d61c719bcfbcf5d62b3a09efa6088de8c54bc0bfcd3ea7ae39fcc186108b8de1"
@@ -5178,12 +5189,11 @@
[[package]]
name = "memory-db"
-version = "0.31.0"
+version = "0.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66"
+checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe"
dependencies = [
- "hash-db",
- "hashbrown 0.12.3",
+ "hash-db 0.16.0",
]
[[package]]
@@ -5245,7 +5255,7 @@
[[package]]
name = "mmr-gadget"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"log",
@@ -5253,9 +5263,9 @@
"sc-client-api",
"sc-offchain",
"sp-api",
- "sp-beefy",
"sp-blockchain",
"sp-consensus",
+ "sp-consensus-beefy",
"sp-core",
"sp-mmr-primitives",
"sp-runtime",
@@ -5264,7 +5274,7 @@
[[package]]
name = "mmr-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"anyhow",
"jsonrpsee",
@@ -5365,7 +5375,7 @@
"digest 0.10.6",
"multihash-derive",
"sha2 0.10.6",
- "sha3 0.10.6",
+ "sha3 0.10.7",
"unsigned-varint",
]
@@ -5537,20 +5547,6 @@
]
[[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"
@@ -5711,7 +5707,7 @@
[[package]]
name = "opal-runtime"
-version = "0.9.39"
+version = "0.9.41"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -5725,7 +5721,6 @@
"derivative",
"evm-coder",
"fp-evm",
- "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -5830,9 +5825,9 @@
[[package]]
name = "orchestra"
-version = "0.0.4"
+version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17e7d5b6bb115db09390bed8842c94180893dd83df3dfce7354f2a2aa090a4ee"
+checksum = "227585216d05ba65c7ab0a0450a3cf2cbd81a98862a54c4df8e14d5ac6adb015"
dependencies = [
"async-trait",
"dyn-clonable",
@@ -5847,9 +5842,9 @@
[[package]]
name = "orchestra-proc-macro"
-version = "0.0.4"
+version = "0.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2af4dabb2286b0be0e9711d2d24e25f6217048b71210cffd3daddc3b5c84e1f"
+checksum = "2871aadd82a2c216ee68a69837a526dfe788ecbe74c4c5038a6acdbff6653066"
dependencies = [
"expander 0.0.6",
"itertools",
@@ -5872,7 +5867,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"frame-support",
"frame-system",
@@ -5887,7 +5882,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"frame-support",
"impl-trait-for-tuples",
@@ -5906,7 +5901,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -5920,7 +5915,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"frame-support",
"frame-system",
@@ -5935,7 +5930,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"frame-support",
"orml-traits",
@@ -5949,7 +5944,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.39#a0751540591c88ccc2d4029464de887933727183"
+source = "git+https://github.com/uniquenetwork/open-runtime-module-library?branch=polkadot-v0.9.41#71e9e0c73a2abc1ff8c1c3511869d60f57caa2c0"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -6025,7 +6020,7 @@
[[package]]
name = "pallet-aura"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6041,7 +6036,7 @@
[[package]]
name = "pallet-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6057,7 +6052,7 @@
[[package]]
name = "pallet-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6071,7 +6066,7 @@
[[package]]
name = "pallet-babe"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6095,7 +6090,7 @@
[[package]]
name = "pallet-bags-list"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6115,7 +6110,7 @@
[[package]]
name = "pallet-balances"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6130,7 +6125,7 @@
[[package]]
name = "pallet-base-fee"
version = "1.0.0"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"fp-evm",
"frame-support",
@@ -6144,7 +6139,7 @@
[[package]]
name = "pallet-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6153,7 +6148,7 @@
"parity-scale-codec",
"scale-info",
"serde",
- "sp-beefy",
+ "sp-consensus-beefy",
"sp-runtime",
"sp-session",
"sp-staking",
@@ -6163,7 +6158,7 @@
[[package]]
name = "pallet-beefy-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"binary-merkle-tree",
@@ -6177,7 +6172,7 @@
"scale-info",
"serde",
"sp-api",
- "sp-beefy",
+ "sp-consensus-beefy",
"sp-core",
"sp-io",
"sp-runtime",
@@ -6187,7 +6182,7 @@
[[package]]
name = "pallet-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6205,7 +6200,7 @@
[[package]]
name = "pallet-child-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6251,7 +6246,7 @@
[[package]]
name = "pallet-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6305,7 +6300,7 @@
[[package]]
name = "pallet-conviction-voting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"assert_matches",
"frame-benchmarking",
@@ -6322,7 +6317,7 @@
[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6340,7 +6335,7 @@
[[package]]
name = "pallet-election-provider-multi-phase"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6363,7 +6358,7 @@
[[package]]
name = "pallet-election-provider-support-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6376,7 +6371,7 @@
[[package]]
name = "pallet-elections-phragmen"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6394,7 +6389,7 @@
[[package]]
name = "pallet-ethereum"
version = "4.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"ethereum",
"ethereum-types",
@@ -6402,16 +6397,13 @@
"fp-consensus",
"fp-ethereum",
"fp-evm",
- "fp-evm-mapping",
"fp-rpc",
- "fp-self-contained",
"fp-storage",
"frame-support",
"frame-system",
"pallet-evm",
"pallet-timestamp",
"parity-scale-codec",
- "rlp",
"scale-info",
"sp-io",
"sp-runtime",
@@ -6421,12 +6413,12 @@
[[package]]
name = "pallet-evm"
version = "6.0.0-dev"
-source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"environmental",
"evm",
+ "fp-account",
"fp-evm",
- "fp-evm-mapping",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -6501,7 +6493,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.39#708aebf2255bcf90b15b309134bcf13b0ec7884b"
+source = "git+https://github.com/uniquenetwork/unique-frontier?branch=unique-polkadot-v0.9.41#1ed335108b39dcdaeacdaed8eeb33c2e7657273e"
dependencies = [
"fp-evm",
"ripemd",
@@ -6527,7 +6519,7 @@
[[package]]
name = "pallet-fast-unstake"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6587,7 +6579,7 @@
[[package]]
name = "pallet-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6598,8 +6590,8 @@
"parity-scale-codec",
"scale-info",
"sp-application-crypto",
+ "sp-consensus-grandpa",
"sp-core",
- "sp-finality-grandpa",
"sp-io",
"sp-runtime",
"sp-session",
@@ -6627,7 +6619,7 @@
[[package]]
name = "pallet-identity"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -6643,7 +6635,7 @@
[[package]]
name = "pallet-im-online"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6663,7 +6655,7 @@
[[package]]
name = "pallet-indices"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6709,7 +6701,7 @@
[[package]]
name = "pallet-membership"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6726,7 +6718,7 @@
[[package]]
name = "pallet-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6743,7 +6735,7 @@
[[package]]
name = "pallet-multisig"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6759,7 +6751,7 @@
[[package]]
name = "pallet-nis"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6775,7 +6767,7 @@
[[package]]
name = "pallet-nomination-pools"
version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6792,7 +6784,7 @@
[[package]]
name = "pallet-nomination-pools-benchmarking"
version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6812,7 +6804,7 @@
[[package]]
name = "pallet-nomination-pools-runtime-api"
version = "1.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"pallet-nomination-pools",
"parity-scale-codec",
@@ -6844,7 +6836,7 @@
[[package]]
name = "pallet-offences"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -6861,7 +6853,7 @@
[[package]]
name = "pallet-offences-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -6885,7 +6877,7 @@
[[package]]
name = "pallet-preimage"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6902,7 +6894,7 @@
[[package]]
name = "pallet-proxy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6917,7 +6909,7 @@
[[package]]
name = "pallet-ranked-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6935,7 +6927,7 @@
[[package]]
name = "pallet-recovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -6950,7 +6942,7 @@
[[package]]
name = "pallet-referenda"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"assert_matches",
"frame-benchmarking",
@@ -6989,7 +6981,7 @@
[[package]]
name = "pallet-scheduler"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7006,7 +6998,7 @@
[[package]]
name = "pallet-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -7027,7 +7019,7 @@
[[package]]
name = "pallet-session-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7043,7 +7035,7 @@
[[package]]
name = "pallet-society"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -7057,7 +7049,7 @@
[[package]]
name = "pallet-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7080,7 +7072,7 @@
[[package]]
name = "pallet-staking-reward-curve"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -7091,7 +7083,7 @@
[[package]]
name = "pallet-staking-reward-fn"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"log",
"sp-arithmetic",
@@ -7100,7 +7092,7 @@
[[package]]
name = "pallet-staking-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -7109,7 +7101,7 @@
[[package]]
name = "pallet-state-trie-migration"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7142,7 +7134,7 @@
[[package]]
name = "pallet-sudo"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -7156,7 +7148,7 @@
[[package]]
name = "pallet-template-transaction-payment"
version = "3.0.0"
-source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.39#7e74e3937a2c08bf29a00084a5c2f1ca6676d87a"
+source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.41#65d810e69aa1f5d79e08d0d4e607ffd70c877603"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7188,7 +7180,7 @@
[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7206,7 +7198,7 @@
[[package]]
name = "pallet-tips"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7225,7 +7217,7 @@
[[package]]
name = "pallet-transaction-payment"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-support",
"frame-system",
@@ -7241,7 +7233,7 @@
[[package]]
name = "pallet-transaction-payment-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"jsonrpsee",
"pallet-transaction-payment-rpc-runtime-api",
@@ -7257,7 +7249,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.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
@@ -7269,7 +7261,7 @@
[[package]]
name = "pallet-treasury"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7327,7 +7319,7 @@
[[package]]
name = "pallet-utility"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7343,7 +7335,7 @@
[[package]]
name = "pallet-vesting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7358,7 +7350,7 @@
[[package]]
name = "pallet-whitelist"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7372,8 +7364,8 @@
[[package]]
name = "pallet-xcm"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bounded-collections",
"frame-benchmarking",
@@ -7393,8 +7385,8 @@
[[package]]
name = "pallet-xcm-benchmarks"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7413,7 +7405,7 @@
[[package]]
name = "parachain-info"
version = "0.1.0"
-source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.39#d6eef144421ef5c3f339f681484d06bb729dfa82"
+source = "git+https://github.com/paritytech/cumulus?branch=polkadot-v0.9.41#ae4e75b077c220bdf29b299b36a63b87ccb46b4c"
dependencies = [
"cumulus-primitives-core",
"frame-support",
@@ -7619,7 +7611,7 @@
"pest_meta",
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -7711,8 +7703,8 @@
[[package]]
name = "polkadot-approval-distribution"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"polkadot-node-metrics",
@@ -7726,8 +7718,8 @@
[[package]]
name = "polkadot-availability-bitfield-distribution"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"polkadot-node-network-protocol",
@@ -7740,8 +7732,8 @@
[[package]]
name = "polkadot-availability-distribution"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"derive_more",
"fatality",
@@ -7763,8 +7755,8 @@
[[package]]
name = "polkadot-availability-recovery"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"fatality",
"futures",
@@ -7784,8 +7776,8 @@
[[package]]
name = "polkadot-cli"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"clap",
"frame-benchmarking-cli",
@@ -7812,8 +7804,8 @@
[[package]]
name = "polkadot-client"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"frame-benchmarking",
@@ -7834,13 +7826,13 @@
"sc-service",
"sp-api",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-blockchain",
"sp-consensus",
"sp-consensus-babe",
+ "sp-consensus-beefy",
+ "sp-consensus-grandpa",
"sp-core",
- "sp-finality-grandpa",
"sp-inherents",
"sp-keyring",
"sp-mmr-primitives",
@@ -7854,8 +7846,8 @@
[[package]]
name = "polkadot-collator-protocol"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"always-assert",
"bitvec",
@@ -7876,8 +7868,8 @@
[[package]]
name = "polkadot-core-primitives"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -7888,8 +7880,8 @@
[[package]]
name = "polkadot-dispute-distribution"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"derive_more",
"fatality",
@@ -7913,8 +7905,8 @@
[[package]]
name = "polkadot-erasure-coding"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"parity-scale-codec",
"polkadot-node-primitives",
@@ -7927,8 +7919,8 @@
[[package]]
name = "polkadot-gossip-support"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"futures-timer",
@@ -7947,8 +7939,8 @@
[[package]]
name = "polkadot-network-bridge"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"always-assert",
"async-trait",
@@ -7963,7 +7955,6 @@
"polkadot-overseer",
"polkadot-primitives",
"sc-network",
- "sc-network-common",
"sp-consensus",
"thiserror",
"tracing-gum",
@@ -7971,8 +7962,8 @@
[[package]]
name = "polkadot-node-collation-generation"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"parity-scale-codec",
@@ -7989,8 +7980,8 @@
[[package]]
name = "polkadot-node-core-approval-voting"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"derive_more",
@@ -8018,8 +8009,8 @@
[[package]]
name = "polkadot-node-core-av-store"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"futures",
@@ -8039,8 +8030,8 @@
[[package]]
name = "polkadot-node-core-backing"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"fatality",
@@ -8058,8 +8049,8 @@
[[package]]
name = "polkadot-node-core-bitfield-signing"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"polkadot-node-subsystem",
@@ -8073,8 +8064,8 @@
[[package]]
name = "polkadot-node-core-candidate-validation"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"futures",
@@ -8093,8 +8084,8 @@
[[package]]
name = "polkadot-node-core-chain-api"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"polkadot-node-metrics",
@@ -8108,8 +8099,8 @@
[[package]]
name = "polkadot-node-core-chain-selection"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"futures-timer",
@@ -8125,8 +8116,8 @@
[[package]]
name = "polkadot-node-core-dispute-coordinator"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"fatality",
"futures",
@@ -8144,8 +8135,8 @@
[[package]]
name = "polkadot-node-core-parachains-inherent"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"futures",
@@ -8161,8 +8152,8 @@
[[package]]
name = "polkadot-node-core-provisioner"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"fatality",
@@ -8179,8 +8170,8 @@
[[package]]
name = "polkadot-node-core-pvf"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"always-assert",
"assert_matches",
@@ -8207,6 +8198,7 @@
"sp-maybe-compressed-blob",
"sp-tracing",
"sp-wasm-interface",
+ "substrate-build-script-utils",
"tempfile",
"tikv-jemalloc-ctl",
"tokio",
@@ -8215,8 +8207,8 @@
[[package]]
name = "polkadot-node-core-pvf-checker"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"polkadot-node-primitives",
@@ -8231,8 +8223,8 @@
[[package]]
name = "polkadot-node-core-runtime-api"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"futures",
"lru 0.9.0",
@@ -8246,8 +8238,8 @@
[[package]]
name = "polkadot-node-jaeger"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"lazy_static",
"log",
@@ -8264,8 +8256,8 @@
[[package]]
name = "polkadot-node-metrics"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bs58",
"futures",
@@ -8283,8 +8275,8 @@
[[package]]
name = "polkadot-node-network-protocol"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"derive_more",
@@ -8298,7 +8290,6 @@
"rand 0.8.5",
"sc-authority-discovery",
"sc-network",
- "sc-network-common",
"strum",
"thiserror",
"tracing-gum",
@@ -8306,8 +8297,8 @@
[[package]]
name = "polkadot-node-primitives"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bounded-vec",
"futures",
@@ -8329,8 +8320,8 @@
[[package]]
name = "polkadot-node-subsystem"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"polkadot-node-jaeger",
"polkadot-node-subsystem-types",
@@ -8339,8 +8330,8 @@
[[package]]
name = "polkadot-node-subsystem-types"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"derive_more",
@@ -8362,8 +8353,8 @@
[[package]]
name = "polkadot-node-subsystem-util"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"derive_more",
@@ -8395,8 +8386,8 @@
[[package]]
name = "polkadot-overseer"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
"futures",
@@ -8418,8 +8409,8 @@
[[package]]
name = "polkadot-parachain"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bounded-collections",
"derive_more",
@@ -8435,8 +8426,8 @@
[[package]]
name = "polkadot-performance-test"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"env_logger 0.9.3",
"kusama-runtime",
@@ -8451,8 +8442,8 @@
[[package]]
name = "polkadot-primitives"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"hex-literal",
@@ -8477,11 +8468,9 @@
[[package]]
name = "polkadot-rpc"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
- "beefy-gadget",
- "beefy-gadget-rpc",
"jsonrpsee",
"mmr-rpc",
"pallet-transaction-payment-rpc",
@@ -8490,9 +8479,11 @@
"sc-client-api",
"sc-consensus-babe",
"sc-consensus-babe-rpc",
+ "sc-consensus-beefy",
+ "sc-consensus-beefy-rpc",
"sc-consensus-epochs",
- "sc-finality-grandpa",
- "sc-finality-grandpa-rpc",
+ "sc-consensus-grandpa",
+ "sc-consensus-grandpa-rpc",
"sc-rpc",
"sc-sync-state-rpc",
"sc-transaction-pool-api",
@@ -8509,8 +8500,8 @@
[[package]]
name = "polkadot-runtime"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"frame-benchmarking",
@@ -8537,7 +8528,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.39)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41)",
"pallet-im-online",
"pallet-indices",
"pallet-membership",
@@ -8575,9 +8566,9 @@
"smallvec",
"sp-api",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-consensus-babe",
+ "sp-consensus-beefy",
"sp-core",
"sp-inherents",
"sp-io",
@@ -8599,8 +8590,8 @@
[[package]]
name = "polkadot-runtime-common"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"frame-benchmarking",
@@ -8613,7 +8604,6 @@
"pallet-authorship",
"pallet-babe",
"pallet-balances",
- "pallet-beefy-mmr",
"pallet-election-provider-multi-phase",
"pallet-fast-unstake",
"pallet-session",
@@ -8632,7 +8622,6 @@
"serde_derive",
"slot-range-helper",
"sp-api",
- "sp-beefy",
"sp-core",
"sp-inherents",
"sp-io",
@@ -8647,8 +8636,8 @@
[[package]]
name = "polkadot-runtime-constants"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -8661,8 +8650,8 @@
[[package]]
name = "polkadot-runtime-metrics"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bs58",
"parity-scale-codec",
@@ -8673,8 +8662,8 @@
[[package]]
name = "polkadot-runtime-parachains"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitflags",
"bitvec",
@@ -8717,11 +8706,10 @@
[[package]]
name = "polkadot-service"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"async-trait",
- "beefy-gadget",
"frame-benchmarking-cli",
"frame-support",
"frame-system-rpc-runtime-api",
@@ -8782,12 +8770,14 @@
"sc-client-db",
"sc-consensus",
"sc-consensus-babe",
+ "sc-consensus-beefy",
+ "sc-consensus-grandpa",
"sc-consensus-slots",
"sc-executor",
- "sc-finality-grandpa",
"sc-keystore",
"sc-network",
"sc-network-common",
+ "sc-network-sync",
"sc-offchain",
"sc-service",
"sc-sync-state-rpc",
@@ -8798,13 +8788,13 @@
"serde_json",
"sp-api",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-blockchain",
"sp-consensus",
"sp-consensus-babe",
+ "sp-consensus-beefy",
+ "sp-consensus-grandpa",
"sp-core",
- "sp-finality-grandpa",
"sp-inherents",
"sp-io",
"sp-keystore",
@@ -8825,8 +8815,8 @@
[[package]]
name = "polkadot-statement-distribution"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"arrayvec 0.5.2",
"fatality",
@@ -8846,8 +8836,8 @@
[[package]]
name = "polkadot-statement-table"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"parity-scale-codec",
"polkadot-primitives",
@@ -9080,9 +9070,9 @@
[[package]]
name = "prost"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e48e50df39172a3e7eb17e14642445da64996989bc212b583015435d39a58537"
+checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd"
dependencies = [
"bytes",
"prost-derive",
@@ -9090,9 +9080,9 @@
[[package]]
name = "prost-build"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2c828f93f5ca4826f97fedcbd3f9a536c16b12cff3dbbb4a007f932bbad95b12"
+checksum = "119533552c9a7ffacc21e099c24a0ac8bb19c2a2a3f363de84cd9b844feab270"
dependencies = [
"bytes",
"heck",
@@ -9125,9 +9115,9 @@
[[package]]
name = "prost-derive"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4ea9b0f8cbe5e15a8a042d030bd96668db28ecb567ec37d691971ff5731d2b1b"
+checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4"
dependencies = [
"anyhow",
"itertools",
@@ -9138,9 +9128,9 @@
[[package]]
name = "prost-types"
-version = "0.11.8"
+version = "0.11.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "379119666929a1afd7a043aa6cf96fa67a6dce9af60c88095a4686dbce4c9c88"
+checksum = "213622a1460818959ac1181aaeb2dc9c7f63df720db7d788b3e24eacd1983e13"
dependencies = [
"prost",
]
@@ -9156,7 +9146,7 @@
[[package]]
name = "quartz-runtime"
-version = "0.9.39"
+version = "0.9.41"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -9170,7 +9160,6 @@
"derivative",
"evm-coder",
"fp-evm",
- "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -9505,7 +9494,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -9637,8 +9626,8 @@
[[package]]
name = "rococo-runtime"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"binary-merkle-tree",
"frame-benchmarking",
@@ -9662,7 +9651,7 @@
"pallet-democracy",
"pallet-elections-phragmen",
"pallet-grandpa",
- "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41)",
"pallet-im-online",
"pallet-indices",
"pallet-membership",
@@ -9700,9 +9689,9 @@
"smallvec",
"sp-api",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-consensus-babe",
+ "sp-consensus-beefy",
"sp-core",
"sp-inherents",
"sp-io",
@@ -9723,8 +9712,8 @@
[[package]]
name = "rococo-runtime-constants"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -9767,7 +9756,7 @@
"log",
"netlink-packet-route",
"netlink-proto",
- "nix 0.24.3",
+ "nix",
"thiserror",
"tokio",
]
@@ -9834,13 +9823,27 @@
[[package]]
name = "rustix"
+version = "0.35.13"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9"
+dependencies = [
+ "bitflags",
+ "errno 0.2.8",
+ "io-lifetimes 0.7.5",
+ "libc",
+ "linux-raw-sys 0.0.46",
+ "windows-sys 0.42.0",
+]
+
+[[package]]
+name = "rustix"
version = "0.36.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0af200a3324fa5bcd922e84e9b55a298ea9f431a489f01961acdebc6e908f25"
dependencies = [
"bitflags",
- "errno",
- "io-lifetimes",
+ "errno 0.3.1",
+ "io-lifetimes 1.0.10",
"libc",
"linux-raw-sys 0.1.4",
"windows-sys 0.45.0",
@@ -9853,8 +9856,8 @@
checksum = "85597d61f83914ddeba6a47b3b8ffe7365107221c2e557ed94426489fefb5f77"
dependencies = [
"bitflags",
- "errno",
- "io-lifetimes",
+ "errno 0.3.1",
+ "io-lifetimes 1.0.10",
"libc",
"linux-raw-sys 0.3.1",
"windows-sys 0.48.0",
@@ -9950,7 +9953,7 @@
[[package]]
name = "sc-allocator"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"log",
"sp-core",
@@ -9961,7 +9964,7 @@
[[package]]
name = "sc-authority-discovery"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -9974,6 +9977,7 @@
"prost-build",
"rand 0.8.5",
"sc-client-api",
+ "sc-network",
"sc-network-common",
"sp-api",
"sp-authority-discovery",
@@ -9988,7 +9992,7 @@
[[package]]
name = "sc-basic-authorship"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"futures-timer",
@@ -10011,7 +10015,7 @@
[[package]]
name = "sc-block-builder"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -10021,28 +10025,31 @@
"sp-core",
"sp-inherents",
"sp-runtime",
- "sp-state-machine",
]
[[package]]
name = "sc-chain-spec"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"memmap2",
"sc-chain-spec-derive",
- "sc-network-common",
+ "sc-client-api",
+ "sc-executor",
+ "sc-network",
"sc-telemetry",
"serde",
"serde_json",
+ "sp-blockchain",
"sp-core",
"sp-runtime",
+ "sp-state-machine",
]
[[package]]
name = "sc-chain-spec-derive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -10053,7 +10060,7 @@
[[package]]
name = "sc-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"chrono",
@@ -10093,7 +10100,7 @@
[[package]]
name = "sc-client-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"fnv",
"futures",
@@ -10119,9 +10126,9 @@
[[package]]
name = "sc-client-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
"kvdb",
"kvdb-memorydb",
"kvdb-rocksdb",
@@ -10145,7 +10152,7 @@
[[package]]
name = "sc-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -10170,7 +10177,7 @@
[[package]]
name = "sc-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -10199,7 +10206,7 @@
[[package]]
name = "sc-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"fork-tree",
@@ -10238,7 +10245,7 @@
[[package]]
name = "sc-consensus-babe-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"jsonrpsee",
@@ -10258,9 +10265,63 @@
]
[[package]]
+name = "sc-consensus-beefy"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "array-bytes 4.2.0",
+ "async-trait",
+ "fnv",
+ "futures",
+ "log",
+ "parity-scale-codec",
+ "parking_lot 0.12.1",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-keystore",
+ "sc-network",
+ "sc-network-common",
+ "sc-network-gossip",
+ "sc-network-sync",
+ "sc-utils",
+ "sp-api",
+ "sp-application-crypto",
+ "sp-arithmetic",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-beefy",
+ "sp-core",
+ "sp-keystore",
+ "sp-mmr-primitives",
+ "sp-runtime",
+ "substrate-prometheus-endpoint",
+ "thiserror",
+ "wasm-timer",
+]
+
+[[package]]
+name = "sc-consensus-beefy-rpc"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "futures",
+ "jsonrpsee",
+ "log",
+ "parity-scale-codec",
+ "parking_lot 0.12.1",
+ "sc-consensus-beefy",
+ "sc-rpc",
+ "serde",
+ "sp-consensus-beefy",
+ "sp-core",
+ "sp-runtime",
+ "thiserror",
+]
+
+[[package]]
name = "sc-consensus-epochs"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -10271,9 +10332,69 @@
]
[[package]]
+name = "sc-consensus-grandpa"
+version = "0.10.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "ahash 0.8.3",
+ "array-bytes 4.2.0",
+ "async-trait",
+ "dyn-clone",
+ "finality-grandpa",
+ "fork-tree",
+ "futures",
+ "futures-timer",
+ "log",
+ "parity-scale-codec",
+ "parking_lot 0.12.1",
+ "rand 0.8.5",
+ "sc-block-builder",
+ "sc-chain-spec",
+ "sc-client-api",
+ "sc-consensus",
+ "sc-network",
+ "sc-network-common",
+ "sc-network-gossip",
+ "sc-telemetry",
+ "sc-utils",
+ "serde_json",
+ "sp-api",
+ "sp-application-crypto",
+ "sp-arithmetic",
+ "sp-blockchain",
+ "sp-consensus",
+ "sp-consensus-grandpa",
+ "sp-core",
+ "sp-keystore",
+ "sp-runtime",
+ "substrate-prometheus-endpoint",
+ "thiserror",
+]
+
+[[package]]
+name = "sc-consensus-grandpa-rpc"
+version = "0.10.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "finality-grandpa",
+ "futures",
+ "jsonrpsee",
+ "log",
+ "parity-scale-codec",
+ "sc-client-api",
+ "sc-consensus-grandpa",
+ "sc-rpc",
+ "serde",
+ "sp-blockchain",
+ "sp-core",
+ "sp-runtime",
+ "thiserror",
+]
+
+[[package]]
name = "sc-consensus-manual-seal"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"assert_matches",
"async-trait",
@@ -10307,7 +10428,7 @@
[[package]]
name = "sc-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -10330,7 +10451,7 @@
[[package]]
name = "sc-executor"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"lru 0.8.1",
"parity-scale-codec",
@@ -10354,7 +10475,7 @@
[[package]]
name = "sc-executor-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"sc-allocator",
"sp-maybe-compressed-blob",
@@ -10367,7 +10488,7 @@
[[package]]
name = "sc-executor-wasmi"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"log",
"sc-allocator",
@@ -10380,7 +10501,7 @@
[[package]]
name = "sc-executor-wasmtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"anyhow",
"cfg-if",
@@ -10393,78 +10514,19 @@
"sp-runtime-interface",
"sp-wasm-interface",
"wasmtime",
-]
-
-[[package]]
-name = "sc-finality-grandpa"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "ahash 0.8.3",
- "array-bytes 4.2.0",
- "async-trait",
- "dyn-clone",
- "finality-grandpa",
- "fork-tree",
- "futures",
- "futures-timer",
- "log",
- "parity-scale-codec",
- "parking_lot 0.12.1",
- "rand 0.8.5",
- "sc-block-builder",
- "sc-chain-spec",
- "sc-client-api",
- "sc-consensus",
- "sc-network",
- "sc-network-common",
- "sc-network-gossip",
- "sc-telemetry",
- "sc-utils",
- "serde_json",
- "sp-api",
- "sp-application-crypto",
- "sp-arithmetic",
- "sp-blockchain",
- "sp-consensus",
- "sp-core",
- "sp-finality-grandpa",
- "sp-keystore",
- "sp-runtime",
- "substrate-prometheus-endpoint",
- "thiserror",
]
[[package]]
-name = "sc-finality-grandpa-rpc"
-version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "finality-grandpa",
- "futures",
- "jsonrpsee",
- "log",
- "parity-scale-codec",
- "sc-client-api",
- "sc-finality-grandpa",
- "sc-rpc",
- "serde",
- "sp-blockchain",
- "sp-core",
- "sp-runtime",
- "thiserror",
-]
-
-[[package]]
name = "sc-informant"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ansi_term",
"futures",
"futures-timer",
"log",
"sc-client-api",
+ "sc-network",
"sc-network-common",
"sp-blockchain",
"sp-runtime",
@@ -10473,7 +10535,7 @@
[[package]]
name = "sc-keystore"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"async-trait",
@@ -10488,12 +10550,12 @@
[[package]]
name = "sc-network"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
+ "async-channel",
"async-trait",
"asynchronous-codec",
- "backtrace",
"bytes",
"either",
"fnv",
@@ -10501,6 +10563,7 @@
"futures-timer",
"ip_network",
"libp2p",
+ "linked_hash_set",
"log",
"lru 0.8.1",
"mockall",
@@ -10531,7 +10594,7 @@
[[package]]
name = "sc-network-bitswap"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"cid",
"futures",
@@ -10540,6 +10603,7 @@
"prost",
"prost-build",
"sc-client-api",
+ "sc-network",
"sc-network-common",
"sp-blockchain",
"sp-runtime",
@@ -10550,33 +10614,35 @@
[[package]]
name = "sc-network-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
+ "array-bytes 4.2.0",
"async-trait",
"bitflags",
"bytes",
"futures",
"futures-timer",
"libp2p",
- "linked_hash_set",
"parity-scale-codec",
"prost-build",
"sc-consensus",
"sc-peerset",
+ "sc-utils",
"serde",
"smallvec",
"sp-blockchain",
"sp-consensus",
- "sp-finality-grandpa",
+ "sp-consensus-grandpa",
"sp-runtime",
"substrate-prometheus-endpoint",
"thiserror",
+ "zeroize",
]
[[package]]
name = "sc-network-gossip"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ahash 0.8.3",
"futures",
@@ -10584,6 +10650,7 @@
"libp2p",
"log",
"lru 0.8.1",
+ "sc-network",
"sc-network-common",
"sc-peerset",
"sp-runtime",
@@ -10594,7 +10661,7 @@
[[package]]
name = "sc-network-light"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"futures",
@@ -10604,6 +10671,7 @@
"prost",
"prost-build",
"sc-client-api",
+ "sc-network",
"sc-network-common",
"sc-peerset",
"sp-blockchain",
@@ -10615,12 +10683,13 @@
[[package]]
name = "sc-network-sync"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"async-trait",
"fork-tree",
"futures",
+ "futures-timer",
"libp2p",
"log",
"lru 0.8.1",
@@ -10630,6 +10699,7 @@
"prost-build",
"sc-client-api",
"sc-consensus",
+ "sc-network",
"sc-network-common",
"sc-peerset",
"sc-utils",
@@ -10637,8 +10707,8 @@
"sp-arithmetic",
"sp-blockchain",
"sp-consensus",
+ "sp-consensus-grandpa",
"sp-core",
- "sp-finality-grandpa",
"sp-runtime",
"substrate-prometheus-endpoint",
"thiserror",
@@ -10647,7 +10717,7 @@
[[package]]
name = "sc-network-transactions"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"futures",
@@ -10655,6 +10725,7 @@
"log",
"parity-scale-codec",
"pin-project",
+ "sc-network",
"sc-network-common",
"sc-peerset",
"sc-utils",
@@ -10666,7 +10737,7 @@
[[package]]
name = "sc-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"bytes",
@@ -10682,6 +10753,7 @@
"parking_lot 0.12.1",
"rand 0.8.5",
"sc-client-api",
+ "sc-network",
"sc-network-common",
"sc-peerset",
"sc-utils",
@@ -10696,7 +10768,7 @@
[[package]]
name = "sc-peerset"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"libp2p",
@@ -10709,7 +10781,7 @@
[[package]]
name = "sc-proposer-metrics"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -10718,7 +10790,7 @@
[[package]]
name = "sc-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"jsonrpsee",
@@ -10748,7 +10820,7 @@
[[package]]
name = "sc-rpc-api"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"jsonrpsee",
"parity-scale-codec",
@@ -10767,7 +10839,7 @@
[[package]]
name = "sc-rpc-server"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"http",
"jsonrpsee",
@@ -10782,7 +10854,7 @@
[[package]]
name = "sc-rpc-spec-v2"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"futures",
@@ -10808,7 +10880,7 @@
[[package]]
name = "sc-service"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"directories",
@@ -10874,7 +10946,7 @@
[[package]]
name = "sc-state-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"log",
"parity-scale-codec",
@@ -10885,12 +10957,12 @@
[[package]]
name = "sc-storage-monitor"
version = "0.1.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"clap",
+ "fs4",
"futures",
"log",
- "nix 0.26.2",
"sc-client-db",
"sc-utils",
"sp-core",
@@ -10901,7 +10973,7 @@
[[package]]
name = "sc-sync-state-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"jsonrpsee",
"parity-scale-codec",
@@ -10909,7 +10981,7 @@
"sc-client-api",
"sc-consensus-babe",
"sc-consensus-epochs",
- "sc-finality-grandpa",
+ "sc-consensus-grandpa",
"serde",
"serde_json",
"sp-blockchain",
@@ -10920,7 +10992,7 @@
[[package]]
name = "sc-sysinfo"
version = "6.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"libc",
@@ -10939,7 +11011,7 @@
[[package]]
name = "sc-telemetry"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"chrono",
"futures",
@@ -10958,7 +11030,7 @@
[[package]]
name = "sc-tracing"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ansi_term",
"atty",
@@ -10989,7 +11061,7 @@
[[package]]
name = "sc-tracing-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -11000,7 +11072,7 @@
[[package]]
name = "sc-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -11027,7 +11099,7 @@
[[package]]
name = "sc-transaction-pool-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -11041,15 +11113,16 @@
[[package]]
name = "sc-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "backtrace",
+ "async-channel",
"futures",
"futures-timer",
"lazy_static",
"log",
"parking_lot 0.12.1",
"prometheus",
+ "sp-arithmetic",
]
[[package]]
@@ -11250,29 +11323,29 @@
[[package]]
name = "serde"
-version = "1.0.159"
+version = "1.0.160"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3c04e8343c3daeec41f58990b9d77068df31209f2af111e059e9fe9646693065"
+checksum = "bb2f3770c8bce3bcda7e149193a069a0f4365bda1fa5cd88e03bca26afc1216c"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.159"
+version = "1.0.160"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c614d17805b093df4b147b51339e7e44bf05ef59fba1e45d83500bcfb4d8585"
+checksum = "291a097c63d8497e00160b166a967a4a79c64f3facdd01cbd7502231688d77df"
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
name = "serde_json"
-version = "1.0.95"
+version = "1.0.96"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d721eca97ac802aa7777b701877c8004d950fc142651367300d21c1cc0194744"
+checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
dependencies = [
"itoa",
"ryu",
@@ -11354,9 +11427,9 @@
[[package]]
name = "sha3"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9"
+checksum = "54c2bb1a323307527314a36bfb73f24febb08ce2b8a554bf4ffd6f51ad15198c"
dependencies = [
"digest 0.10.6",
"keccak",
@@ -11438,8 +11511,8 @@
[[package]]
name = "slot-range-helper"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"enumn",
"parity-scale-codec",
@@ -11516,9 +11589,9 @@
[[package]]
name = "sp-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
"log",
"parity-scale-codec",
"sp-api-proc-macro",
@@ -11534,9 +11607,11 @@
[[package]]
name = "sp-api-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
+ "Inflector",
"blake2",
+ "expander 1.0.0",
"proc-macro-crate",
"proc-macro2",
"quote",
@@ -11546,7 +11621,7 @@
[[package]]
name = "sp-application-crypto"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -11559,7 +11634,7 @@
[[package]]
name = "sp-arithmetic"
version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"integer-sqrt",
"num-traits",
@@ -11573,39 +11648,20 @@
[[package]]
name = "sp-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "parity-scale-codec",
- "scale-info",
- "sp-api",
- "sp-application-crypto",
- "sp-runtime",
- "sp-std",
-]
-
-[[package]]
-name = "sp-beefy"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "lazy_static",
"parity-scale-codec",
"scale-info",
- "serde",
"sp-api",
"sp-application-crypto",
- "sp-core",
- "sp-io",
- "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.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -11617,7 +11673,7 @@
[[package]]
name = "sp-blockchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"log",
@@ -11635,25 +11691,22 @@
[[package]]
name = "sp-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
"log",
- "parity-scale-codec",
"sp-core",
"sp-inherents",
"sp-runtime",
"sp-state-machine",
- "sp-std",
- "sp-version",
"thiserror",
]
[[package]]
name = "sp-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -11671,7 +11724,7 @@
[[package]]
name = "sp-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"merlin",
@@ -11692,9 +11745,46 @@
]
[[package]]
+name = "sp-consensus-beefy"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "lazy_static",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-api",
+ "sp-application-crypto",
+ "sp-core",
+ "sp-io",
+ "sp-mmr-primitives",
+ "sp-runtime",
+ "sp-std",
+ "strum",
+]
+
+[[package]]
+name = "sp-consensus-grandpa"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
+dependencies = [
+ "finality-grandpa",
+ "log",
+ "parity-scale-codec",
+ "scale-info",
+ "serde",
+ "sp-api",
+ "sp-application-crypto",
+ "sp-core",
+ "sp-keystore",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
name = "sp-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -11706,7 +11796,7 @@
[[package]]
name = "sp-consensus-vrf"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -11719,7 +11809,7 @@
[[package]]
name = "sp-core"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"array-bytes 4.2.0",
"base58",
@@ -11729,7 +11819,7 @@
"dyn-clonable",
"ed25519-zebra",
"futures",
- "hash-db",
+ "hash-db 0.16.0",
"hash256-std-hasher",
"impl-serde",
"lazy_static",
@@ -11762,13 +11852,13 @@
[[package]]
name = "sp-core-hashing"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "blake2",
+ "blake2b_simd",
"byteorder",
"digest 0.10.6",
"sha2 0.10.6",
- "sha3 0.10.6",
+ "sha3 0.10.7",
"sp-std",
"twox-hash",
]
@@ -11776,7 +11866,7 @@
[[package]]
name = "sp-core-hashing-proc-macro"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro2",
"quote",
@@ -11787,7 +11877,7 @@
[[package]]
name = "sp-database"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"kvdb",
"parking_lot 0.12.1",
@@ -11796,7 +11886,7 @@
[[package]]
name = "sp-debug-derive"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro2",
"quote",
@@ -11806,36 +11896,18 @@
[[package]]
name = "sp-externalities"
version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"environmental",
"parity-scale-codec",
"sp-std",
"sp-storage",
-]
-
-[[package]]
-name = "sp-finality-grandpa"
-version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
-dependencies = [
- "finality-grandpa",
- "log",
- "parity-scale-codec",
- "scale-info",
- "serde",
- "sp-api",
- "sp-application-crypto",
- "sp-core",
- "sp-keystore",
- "sp-runtime",
- "sp-std",
]
[[package]]
name = "sp-inherents"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"impl-trait-for-tuples",
@@ -11850,7 +11922,7 @@
[[package]]
name = "sp-io"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"bytes",
"ed25519",
@@ -11875,7 +11947,7 @@
[[package]]
name = "sp-keyring"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"lazy_static",
"sp-core",
@@ -11886,7 +11958,7 @@
[[package]]
name = "sp-keystore"
version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures",
@@ -11903,7 +11975,7 @@
[[package]]
name = "sp-maybe-compressed-blob"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"thiserror",
"zstd",
@@ -11912,7 +11984,7 @@
[[package]]
name = "sp-mmr-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ckb-merkle-mountain-range",
"log",
@@ -11930,7 +12002,7 @@
[[package]]
name = "sp-npos-elections"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -11944,7 +12016,7 @@
[[package]]
name = "sp-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"sp-api",
"sp-core",
@@ -11954,7 +12026,7 @@
[[package]]
name = "sp-panic-handler"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"backtrace",
"lazy_static",
@@ -11964,7 +12036,7 @@
[[package]]
name = "sp-rpc"
version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"rustc-hash",
"serde",
@@ -11974,7 +12046,7 @@
[[package]]
name = "sp-runtime"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"either",
"hash256-std-hasher",
@@ -11996,7 +12068,7 @@
[[package]]
name = "sp-runtime-interface"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"bytes",
"impl-trait-for-tuples",
@@ -12014,7 +12086,7 @@
[[package]]
name = "sp-runtime-interface-proc-macro"
version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"Inflector",
"proc-macro-crate",
@@ -12026,7 +12098,7 @@
[[package]]
name = "sp-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -12040,7 +12112,7 @@
[[package]]
name = "sp-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -12052,9 +12124,9 @@
[[package]]
name = "sp-state-machine"
version = "0.13.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
"log",
"parity-scale-codec",
"parking_lot 0.12.1",
@@ -12072,12 +12144,12 @@
[[package]]
name = "sp-std"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
[[package]]
name = "sp-storage"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -12090,7 +12162,7 @@
[[package]]
name = "sp-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"futures-timer",
@@ -12105,7 +12177,7 @@
[[package]]
name = "sp-tracing"
version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"sp-std",
@@ -12117,7 +12189,7 @@
[[package]]
name = "sp-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"sp-api",
"sp-runtime",
@@ -12126,7 +12198,7 @@
[[package]]
name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"log",
@@ -12142,10 +12214,10 @@
[[package]]
name = "sp-trie"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ahash 0.8.3",
- "hash-db",
+ "hash-db 0.16.0",
"hashbrown 0.12.3",
"lazy_static",
"memory-db",
@@ -12158,14 +12230,14 @@
"sp-std",
"thiserror",
"tracing",
- "trie-db 0.25.1",
+ "trie-db 0.27.1",
"trie-root",
]
[[package]]
name = "sp-version"
version = "5.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -12182,7 +12254,7 @@
[[package]]
name = "sp-version-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"proc-macro2",
@@ -12193,7 +12265,7 @@
[[package]]
name = "sp-wasm-interface"
version = "7.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"anyhow",
"impl-trait-for-tuples",
@@ -12207,7 +12279,7 @@
[[package]]
name = "sp-weights"
version = "4.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -12408,7 +12480,7 @@
[[package]]
name = "substrate-build-script-utils"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"platforms 2.0.0",
]
@@ -12416,7 +12488,7 @@
[[package]]
name = "substrate-frame-rpc-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"frame-system-rpc-runtime-api",
"futures",
@@ -12435,7 +12507,7 @@
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"hyper",
"log",
@@ -12447,7 +12519,7 @@
[[package]]
name = "substrate-rpc-client"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"jsonrpsee",
@@ -12460,7 +12532,7 @@
[[package]]
name = "substrate-state-trie-migration-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"jsonrpsee",
"log",
@@ -12473,13 +12545,13 @@
"sp-runtime",
"sp-state-machine",
"sp-trie",
- "trie-db 0.25.1",
+ "trie-db 0.27.1",
]
[[package]]
name = "substrate-test-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"futures",
"substrate-test-utils-derive",
@@ -12489,7 +12561,7 @@
[[package]]
name = "substrate-test-utils-derive"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -12500,7 +12572,7 @@
[[package]]
name = "substrate-wasm-builder"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"ansi_term",
"build-helper",
@@ -12542,9 +12614,9 @@
[[package]]
name = "syn"
-version = "2.0.13"
+version = "2.0.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4c9da457c5285ac1f936ebd076af6dac17a61cfe7826f2076b4d015cf47bc8ec"
+checksum = "a34fcf3e8b60f57e6a14301a2e916d323af98b0ea63c599441eec8558660c822"
dependencies = [
"proc-macro2",
"quote",
@@ -12629,7 +12701,6 @@
version = "0.1.1"
dependencies = [
"evm-coder",
- "fp-evm-mapping",
"frame-support",
"frame-system",
"pallet-balances",
@@ -12674,7 +12745,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -12854,7 +12925,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
@@ -13008,8 +13079,8 @@
[[package]]
name = "tracing-gum"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"polkadot-node-jaeger",
"polkadot-primitives",
@@ -13019,8 +13090,8 @@
[[package]]
name = "tracing-gum-proc-macro"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"expander 0.0.6",
"proc-macro-crate",
@@ -13079,7 +13150,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908"
dependencies = [
- "hash-db",
+ "hash-db 0.15.2",
"hashbrown 0.12.3",
"log",
"smallvec",
@@ -13087,11 +13158,11 @@
[[package]]
name = "trie-db"
-version = "0.25.1"
+version = "0.27.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3390c0409daaa6027d6681393316f4ccd3ff82e1590a1e4725014e3ae2bf1920"
+checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
"hashbrown 0.13.2",
"log",
"rustc-hex",
@@ -13100,11 +13171,11 @@
[[package]]
name = "trie-root"
-version = "0.17.0"
+version = "0.18.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891"
+checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b"
dependencies = [
- "hash-db",
+ "hash-db 0.16.0",
]
[[package]]
@@ -13113,7 +13184,7 @@
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a1631b201eb031b563d2e85ca18ec8092508e262a3196ce9bd10a67ec87b9f5c"
dependencies = [
- "hash-db",
+ "hash-db 0.15.2",
"rlp",
]
@@ -13172,7 +13243,7 @@
[[package]]
name = "try-runtime-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.39#1837f423b494254e1d27834b1c9da34b2c0c2375"
+source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41#980eb16791bab5d63b47c07657bb9dc198d9307b"
dependencies = [
"async-trait",
"clap",
@@ -13335,7 +13406,7 @@
[[package]]
name = "unique-node"
-version = "0.9.39"
+version = "0.9.41"
dependencies = [
"app-promotion-rpc",
"clap",
@@ -13374,6 +13445,7 @@
"sc-consensus-manual-seal",
"sc-executor",
"sc-network",
+ "sc-network-sync",
"sc-service",
"sc-sysinfo",
"sc-telemetry",
@@ -13420,8 +13492,9 @@
"jsonrpsee",
"pallet-transaction-payment-rpc",
"sc-client-api",
- "sc-finality-grandpa",
+ "sc-consensus-grandpa",
"sc-network",
+ "sc-network-sync",
"sc-rpc",
"sc-rpc-api",
"sc-service",
@@ -13441,7 +13514,7 @@
[[package]]
name = "unique-runtime"
-version = "0.9.39"
+version = "0.9.41"
dependencies = [
"app-promotion-rpc",
"cumulus-pallet-aura-ext",
@@ -13455,7 +13528,6 @@
"derivative",
"evm-coder",
"fp-evm",
- "fp-evm-mapping",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -13579,7 +13651,7 @@
[[package]]
name = "up-common"
-version = "0.9.39"
+version = "0.9.41"
dependencies = [
"cumulus-primitives-core",
"fp-rpc",
@@ -13638,7 +13710,7 @@
[[package]]
name = "up-sponsorship"
version = "0.1.0"
-source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.39#7e74e3937a2c08bf29a00084a5c2f1ca6676d87a"
+source = "git+https://github.com/uniquenetwork/pallet-sponsoring?branch=polkadot-v0.9.41#65d810e69aa1f5d79e08d0d4e607ffd70c877603"
dependencies = [
"impl-trait-for-tuples",
]
@@ -14344,7 +14416,7 @@
"lazy_static",
"libc",
"log",
- "nix 0.24.3",
+ "nix",
"rand 0.8.5",
"thiserror",
"tokio",
@@ -14353,8 +14425,8 @@
[[package]]
name = "westend-runtime"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bitvec",
"frame-benchmarking",
@@ -14379,7 +14451,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.39)",
+ "pallet-identity 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.41)",
"pallet-im-online",
"pallet-indices",
"pallet-membership",
@@ -14421,9 +14493,9 @@
"smallvec",
"sp-api",
"sp-authority-discovery",
- "sp-beefy",
"sp-block-builder",
"sp-consensus-babe",
+ "sp-consensus-beefy",
"sp-core",
"sp-inherents",
"sp-io",
@@ -14445,8 +14517,8 @@
[[package]]
name = "westend-runtime-constants"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-support",
"polkadot-primitives",
@@ -14802,8 +14874,8 @@
[[package]]
name = "xcm"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"bounded-collections",
"derivative",
@@ -14818,8 +14890,8 @@
[[package]]
name = "xcm-builder"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"frame-support",
"frame-system",
@@ -14839,8 +14911,8 @@
[[package]]
name = "xcm-executor"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"environmental",
"frame-benchmarking",
@@ -14859,8 +14931,8 @@
[[package]]
name = "xcm-procedural"
-version = "0.9.39-1"
-source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.39#c22e1c4173bf6966f5d1980f4299f7abe836f0c1"
+version = "0.9.41"
+source = "git+https://github.com/paritytech/polkadot?branch=release-v0.9.41#e203bfb396ed949f102720debf32fb98166787af"
dependencies = [
"Inflector",
"proc-macro2",
@@ -14908,7 +14980,7 @@
dependencies = [
"proc-macro2",
"quote",
- "syn 2.0.13",
+ "syn 2.0.15",
]
[[package]]
Cargo.tomldiffbeforeafterboth--- a/Cargo.toml
+++ b/Cargo.toml
@@ -11,7 +11,7 @@
'runtime/tests',
'runtime/unique',
]
-package.version = "0.9.39"
+package.version = "0.9.41"
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.39" }
+pallet-charge-transaction = { package = "pallet-template-transaction-payment", default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.41" }
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.39" }
+up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.41" }
# Unique: Runtimes
opal-runtime = { path = "runtime/opal" }
@@ -64,124 +64,124 @@
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.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" }
+fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fc-db = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fc-mapping-sync = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fc-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fc-rpc-core = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fp-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fp-rpc = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fp-self-contained = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+fp-storage = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+pallet-base-fee = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+pallet-ethereum = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
+pallet-evm-precompile-simple = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
# 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.39" }
-cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-pallet-aura-ext = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-pallet-dmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-pallet-parachain-system = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-pallet-xcm = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-pallet-xcmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-primitives-core = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-primitives-timestamp = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-primitives-utility = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.39" }
-cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/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/paritytech/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" }
+cumulus-client-cli = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-client-consensus-aura = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-client-consensus-common = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-client-network = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-client-service = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-pallet-aura-ext = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-pallet-dmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-pallet-parachain-system = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-pallet-xcm = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-pallet-xcmp-queue = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-primitives-core = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-primitives-parachain-inherent = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-primitives-timestamp = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-primitives-utility = { default-features = false , git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-relay-chain-inprocess-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-relay-chain-interface = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+cumulus-relay-chain-minimal-node = { git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+frame-executive = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+frame-support = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+frame-system = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+frame-system-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-authorship = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-preimage = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-sudo = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-timestamp = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-transaction-payment = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-transaction-payment-rpc-runtime-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-treasury = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }
+parachain-info = { default-features = false, git = "https://github.com/paritytech/cumulus", branch = "polkadot-v0.9.41" }
+polkadot-cli = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }
+polkadot-parachain = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }
+polkadot-primitives = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }
+polkadot-service = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41" }
+sc-basic-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-chain-spec = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-client-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-consensus = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-consensus-manual-seal = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-executor = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-consensus-grandpa = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-network = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-network-sync = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-rpc-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-service = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-sysinfo = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-telemetry = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sc-transaction-pool = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
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.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 }
+sp-api = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-arithmetic = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-block-builder = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-blockchain = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-consensus-aura = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-core = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-externalities = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-inherents = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-io = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-offchain = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-session = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-staking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-state-machine = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-std = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-tracing = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-transaction-pool = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-trie = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-version = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+substrate-frame-rpc-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+substrate-prometheus-endpoint = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }
+xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }
+xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.41", default-features = false }
# Parity: Build utils
-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" }
+substrate-build-script-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
# Parity: Benchmarking
-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" }
+frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+frame-benchmarking-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+frame-system-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
# Parity: Try Runtime
-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" }
+frame-try-runtime = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+try-runtime-cli = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
# ORML
-orml-tokens = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
-orml-traits = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
-orml-vesting = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
-orml-xtokens = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
-orml-xcm-support = { default-features = false , git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
+orml-tokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }
+orml-traits = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }
+orml-vesting = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }
+orml-xtokens = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }
+orml-xcm-support = { default-features = false , git = "https://github.com/uniquenetwork/open-runtime-module-library", branch = "polkadot-v0.9.41" }
# Other
derivative = { version = "2.2.0", features = ["use_core"] }
@@ -219,4 +219,89 @@
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" }
parachain-info = { git = "https://github.com/uniquenetwork/cumulus", branch = "polkadot-v0.9.39" }
+pallet-template-transaction-payment = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
+up-sponsorship = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
+frame-executive = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+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" }
+frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-aura = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-authorship = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-preimage = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-sudo = { 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-transaction-payment-rpc = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-transaction-payment-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+pallet-treasury = { git = "https://github.com/paritytech/substrate", branch = "polkadot-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-consensus-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" }
+sp-api = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-arithmetic = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-block-builder = { 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 = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-core = { 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 = { 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-keystore = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-offchain = { 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-session = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-staking = { 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 = { 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 = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-trie = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+sp-version = { 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" }
+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" }
+frame-benchmarking = { 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 = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+frame-try-runtime = { 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-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-module-library", branch = "polkadot-v0.9.39" }
+pallet-xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-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" }
+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" }
+xcm = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+xcm-builder = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+xcm-executor = { git = "https://github.com/paritytech/polkadot", branch = "release-v0.9.39" }
+fc-consensus = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-db = { 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 = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fc-rpc-core = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-evm = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-rpc = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-self-contained = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+fp-storage = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-base-fee = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm-precompile-simple = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
Makefilediffbeforeafterboth--- a/Makefile
+++ b/Makefile
@@ -147,7 +147,7 @@
.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-xcm
+bench: bench-app-promotion 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:
node/cli/Cargo.tomldiffbeforeafterboth--- a/node/cli/Cargo.toml
+++ b/node/cli/Cargo.toml
@@ -56,6 +56,7 @@
sc-consensus-manual-seal = { workspace = true }
sc-executor = { workspace = true }
sc-network = { workspace = true }
+sc-network-sync = { workspace = true }
sc-service = { workspace = true }
sc-sysinfo = { workspace = true }
sc-telemetry = { workspace = true }
node/cli/src/service.rsdiffbeforeafterboth--- a/node/cli/src/service.rs
+++ b/node/cli/src/service.rs
@@ -44,14 +44,15 @@
use cumulus_client_network::BlockAnnounceValidator;
use cumulus_primitives_core::ParaId;
use cumulus_relay_chain_inprocess_interface::build_inprocess_relay_chain;
-use cumulus_relay_chain_interface::{RelayChainError, RelayChainInterface, RelayChainResult};
+use cumulus_relay_chain_interface::{RelayChainInterface, RelayChainResult};
use cumulus_relay_chain_minimal_node::build_minimal_relay_chain_node;
// Substrate Imports
use sp_api::BlockT;
use sc_executor::NativeElseWasmExecutor;
use sc_executor::NativeExecutionDispatch;
-use sc_network::{NetworkService, NetworkBlock};
+use sc_network::NetworkBlock;
+use sc_network_sync::SyncingService;
use sc_service::{BasePath, Configuration, PartialComponents, TaskManager};
use sc_telemetry::{Telemetry, TelemetryHandle, TelemetryWorker, TelemetryWorkerHandle};
use sp_keystore::SyncCryptoStorePtr;
@@ -420,7 +421,7 @@
&TaskManager,
Arc<dyn RelayChainInterface>,
Arc<sc_transaction_pool::FullPool<Block, FullClient<RuntimeApi, ExecutorDispatch>>>,
- Arc<NetworkService<Block, Hash>>,
+ Arc<SyncingService<Block>>,
SyncCryptoStorePtr,
bool,
) -> Result<Box<dyn ParachainConsensus<Block>>, sc_service::Error>,
@@ -445,10 +446,7 @@
hwbench.clone(),
)
.await
- .map_err(|e| match e {
- RelayChainError::ServiceError(polkadot_service::Error::Sub(x)) => x,
- s => s.to_string().into(),
- })?;
+ .map_err(|e| sc_service::Error::Application(Box::new(e) as Box<_>))?;
let block_announce_validator = BlockAnnounceValidator::new(relay_chain_interface.clone(), id);
@@ -458,7 +456,7 @@
let transaction_pool = params.transaction_pool.clone();
let import_queue_service = params.import_queue.service();
- let (network, system_rpc_tx, tx_handler_controller, start_network) =
+ let (network, system_rpc_tx, tx_handler_controller, start_network, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: ¶chain_config,
client: client.clone(),
@@ -475,6 +473,7 @@
let rpc_pool = transaction_pool.clone();
let select_chain = params.select_chain.clone();
let rpc_network = network.clone();
+ let rpc_sync_service = sync_service.clone();
let rpc_frontier_backend = frontier_backend.clone();
@@ -532,6 +531,7 @@
enable_dev_signer: false,
filter_pool: filter_pool.clone(),
network: rpc_network.clone(),
+ sync: rpc_sync_service.clone(),
select_chain: select_chain.clone(),
is_authority: validator,
// TODO: Unhardcode
@@ -558,6 +558,7 @@
keystore: params.keystore_container.sync_keystore(),
backend: backend.clone(),
network: network.clone(),
+ sync_service: sync_service.clone(),
system_rpc_tx,
telemetry: telemetry.as_mut(),
tx_handler_controller,
@@ -577,9 +578,9 @@
}
let announce_block = {
- let network = network.clone();
+ let sync_service = sync_service.clone();
Arc::new(Box::new(move |hash, data| {
- network.announce_block(hash, data)
+ sync_service.announce_block(hash, data)
}))
};
@@ -598,7 +599,7 @@
&task_manager,
relay_chain_interface.clone(),
transaction_pool,
- network,
+ sync_service.clone(),
params.keystore_container.sync_keystore(),
force_authoring,
)?;
@@ -896,7 +897,7 @@
prometheus_registry.clone(),
));
- let (network, system_rpc_tx, tx_handler_controller, network_starter) =
+ let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &config,
client: client.clone(),
@@ -1032,6 +1033,7 @@
let rpc_client = client.clone();
let rpc_pool = transaction_pool.clone();
let rpc_network = network.clone();
+ let rpc_sync_service = sync_service.clone();
let rpc_frontier_backend = frontier_backend.clone();
#[cfg(feature = "pov-estimate")]
@@ -1062,6 +1064,7 @@
enable_dev_signer: false,
filter_pool: filter_pool.clone(),
network: rpc_network.clone(),
+ sync: rpc_sync_service.clone(),
select_chain: select_chain.clone(),
is_authority: collator,
// TODO: Unhardcode
@@ -1081,6 +1084,7 @@
sc_service::spawn_tasks(sc_service::SpawnTasksParams {
network,
+ sync_service,
client,
keystore: keystore_container.sync_keystore(),
task_manager: &mut task_manager,
node/rpc/Cargo.tomldiffbeforeafterboth--- a/node/rpc/Cargo.toml
+++ b/node/rpc/Cargo.toml
@@ -14,8 +14,9 @@
# pallet-contracts-rpc = { git = 'https://github.com/paritytech/substrate', branch = 'master' }
pallet-transaction-payment-rpc = { workspace = true }
sc-client-api = { workspace = true }
-sc-finality-grandpa = { workspace = true }
+sc-consensus-grandpa = { workspace = true }
sc-network = { workspace = true }
+sc-network-sync = { workspace = true }
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
sc-service = { workspace = true }
node/rpc/src/lib.rsdiffbeforeafterboth--- a/node/rpc/src/lib.rs
+++ b/node/rpc/src/lib.rs
@@ -27,10 +27,11 @@
client::BlockchainEvents,
StateBackend, Backend,
};
-use sc_finality_grandpa::{
+use sc_consensus_grandpa::{
FinalityProofProvider, GrandpaJustificationStream, SharedAuthoritySet, SharedVoterState,
};
use sc_network::NetworkService;
+use sc_network_sync::SyncingService;
use sc_rpc::SubscriptionTaskExecutor;
pub use sc_rpc_api::DenyUnsafe;
use sc_transaction_pool::{ChainApi, Pool};
@@ -75,6 +76,8 @@
pub enable_dev_signer: bool,
/// Network service
pub network: Arc<NetworkService<Block, Hash>>,
+ /// Syncing service
+ pub sync: Arc<SyncingService<Block>>,
/// Whether to deny unsafe calls
pub deny_unsafe: DenyUnsafe,
/// EthFilterApi pool.
@@ -162,6 +165,12 @@
CA: ChainApi<Block = Block> + 'static,
R: RuntimeInstance + Send + Sync + 'static,
<R as RuntimeInstance>::CrossAccountId: serde::Serialize,
+ C: sp_api::CallApiAt<
+ sp_runtime::generic::Block<
+ sp_runtime::generic::Header<u32, BlakeTwo256>,
+ sp_runtime::OpaqueExtrinsic,
+ >,
+ >,
for<'de> <R as RuntimeInstance>::CrossAccountId: serde::Deserialize<'de>,
{
use fc_rpc::{
@@ -191,6 +200,7 @@
enable_dev_signer,
is_authority,
network,
+ sync,
deny_unsafe,
filter_pool,
@@ -225,7 +235,7 @@
pool.clone(),
graph,
Some(<R as RuntimeInstance>::get_transaction_converter()),
- network.clone(),
+ sync.clone(),
signers,
overrides.clone(),
eth_backend.clone(),
@@ -280,9 +290,7 @@
io.merge(Web3::new(client.clone()).into_rpc())?;
- io.merge(
- EthPubSub::new(pool, client, network, subscription_task_executor, overrides).into_rpc(),
- )?;
+ io.merge(EthPubSub::new(pool, client, sync, subscription_task_executor, overrides).into_rpc())?;
Ok(io)
}
pallets/app-promotion/src/lib.rsdiffbeforeafterboth--- a/pallets/app-promotion/src/lib.rs
+++ b/pallets/app-promotion/src/lib.rs
@@ -152,7 +152,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
#[pallet::event]
pallets/collator-selection/src/lib.rsdiffbeforeafterboth--- a/pallets/collator-selection/src/lib.rs
+++ b/pallets/collator-selection/src/lib.rs
@@ -161,7 +161,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// The invulnerable, fixed collators.
pallets/common/src/dispatch.rsdiffbeforeafterboth--- a/pallets/common/src/dispatch.rs
+++ b/pallets/common/src/dispatch.rs
@@ -19,7 +19,7 @@
// Read collection
<T as frame_system::Config>::DbWeight::get().reads(1)
// Dynamic dispatch?
- + Weight::from_ref_time(6_000_000)
+ + Weight::from_parts(6_000_000, 0)
// submit_logs is measured as part of collection pallets
}
pallets/common/src/lib.rsdiffbeforeafterboth1// 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}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;95#[allow(missing_docs)]96pub mod weights;9798/// Weight info.99pub type SelfWeightOf<T> = <T as Config>::WeightInfo;100101/// Collection handle contains information about collection data and id.102/// Also provides functionality to count consumed gas.103///104/// CollectionHandle is used as a generic wrapper for collections of all types.105/// It allows to perform common operations and queries on any collection type,106/// both completely general for all, as well as their respective implementations of [`CommonCollectionOperations`].107#[must_use = "Should call submit_logs or save, otherwise some data will be lost for evm side"]108pub struct CollectionHandle<T: Config> {109 /// Collection id110 pub id: CollectionId,111 collection: Collection<T::AccountId>,112 /// Substrate recorder for counting consumed gas113 pub recorder: SubstrateRecorder<T>,114}115116impl<T: Config> WithRecorder<T> for CollectionHandle<T> {117 fn recorder(&self) -> &SubstrateRecorder<T> {118 &self.recorder119 }120 fn into_recorder(self) -> SubstrateRecorder<T> {121 self.recorder122 }123}124125impl<T: Config> CollectionHandle<T> {126 /// Same as [CollectionHandle::new] but with an explicit gas limit.127 pub fn new_with_gas_limit(id: CollectionId, gas_limit: u64) -> Option<Self> {128 <CollectionById<T>>::get(id).map(|collection| Self {129 id,130 collection,131 recorder: SubstrateRecorder::new(gas_limit),132 })133 }134135 /// Same as [CollectionHandle::new] but with an existed [`SubstrateRecorder`].136 pub fn new_with_recorder(id: CollectionId, recorder: SubstrateRecorder<T>) -> Option<Self> {137 <CollectionById<T>>::get(id).map(|collection| Self {138 id,139 collection,140 recorder,141 })142 }143144 /// Retrives collection data from storage and creates collection handle with default parameters.145 /// If collection not found return `None`146 pub fn new(id: CollectionId) -> Option<Self> {147 Self::new_with_gas_limit(id, u64::MAX)148 }149150 /// Same as [`CollectionHandle::new`] but if collection not found [CollectionNotFound](Error::CollectionNotFound) returned.151 pub fn try_get(id: CollectionId) -> Result<Self, DispatchError> {152 Ok(Self::new(id).ok_or(<Error<T>>::CollectionNotFound)?)153 }154155 /// Consume gas for reading.156 pub fn consume_store_reads(157 &self,158 reads: u64,159 ) -> pallet_evm_coder_substrate::execution::Result<()> {160 self.recorder161 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_parts(162 <T as frame_system::Config>::DbWeight::get()163 .read164 .saturating_mul(reads),165 // TODO: measure proof166 0,167 )))168 }169170 /// Consume gas for writing.171 pub fn consume_store_writes(172 &self,173 writes: u64,174 ) -> pallet_evm_coder_substrate::execution::Result<()> {175 self.recorder176 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_parts(177 <T as frame_system::Config>::DbWeight::get()178 .write179 .saturating_mul(writes),180 // TODO: measure proof181 0,182 )))183 }184185 /// Consume gas for reading and writing.186 pub fn consume_store_reads_and_writes(187 &self,188 reads: u64,189 writes: u64,190 ) -> pallet_evm_coder_substrate::execution::Result<()> {191 let weight = <T as frame_system::Config>::DbWeight::get();192 let reads = weight.read.saturating_mul(reads);193 let writes = weight.read.saturating_mul(writes);194 self.recorder195 .consume_gas(T::GasWeightMapping::weight_to_gas(Weight::from_parts(196 reads.saturating_add(writes),197 // TODO: measure proof198 0,199 )))200 }201202 /// Save collection to storage.203 pub fn save(&self) -> DispatchResult {204 <CollectionById<T>>::insert(self.id, &self.collection);205 Ok(())206 }207208 /// Set collection sponsor.209 ///210 /// Unique collections allows sponsoring for certain actions.211 /// This method allows you to set the sponsor of the collection.212 /// In order for sponsorship to become active, it must be confirmed through [`Self::confirm_sponsorship`].213 pub fn set_sponsor(214 &mut self,215 sender: &T::CrossAccountId,216 sponsor: T::AccountId,217 ) -> DispatchResult {218 self.check_is_internal()?;219 self.check_is_owner_or_admin(sender)?;220221 self.collection.sponsorship = SponsorshipState::Unconfirmed(sponsor.clone());222223 <Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor));224 <PalletEvm<T>>::deposit_log(225 erc::CollectionHelpersEvents::CollectionChanged {226 collection_id: eth::collection_id_to_address(self.id),227 }228 .to_log(T::ContractAddress::get()),229 );230231 self.save()232 }233234 /// Force set `sponsor`.235 ///236 /// Differs from [`set_sponsor`][`Self::set_sponsor`] in that confirmation237 /// from the `sponsor` is not required.238 ///239 /// # Arguments240 ///241 /// * `sender`: Caller's account.242 /// * `sponsor`: ID of the account of the sponsor-to-be.243 pub fn force_set_sponsor(&mut self, sponsor: T::AccountId) -> DispatchResult {244 self.check_is_internal()?;245246 self.collection.sponsorship = SponsorshipState::Confirmed(sponsor.clone());247248 <Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorSet(self.id, sponsor.clone()));249 <Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sponsor));250 <PalletEvm<T>>::deposit_log(251 erc::CollectionHelpersEvents::CollectionChanged {252 collection_id: eth::collection_id_to_address(self.id),253 }254 .to_log(T::ContractAddress::get()),255 );256257 self.save()258 }259260 /// Confirm sponsorship261 ///262 /// In order for the sponsorship to become active, the user set as the sponsor must confirm their participation.263 /// Before confirming sponsorship, the user must be specified as the sponsor of the collection via [`Self::set_sponsor`].264 pub fn confirm_sponsorship(&mut self, sender: &T::AccountId) -> DispatchResult {265 self.check_is_internal()?;266 ensure!(267 self.collection.sponsorship.pending_sponsor() == Some(sender),268 Error::<T>::ConfirmSponsorshipFail269 );270271 self.collection.sponsorship = SponsorshipState::Confirmed(sender.clone());272273 <Pallet<T>>::deposit_event(Event::<T>::SponsorshipConfirmed(self.id, sender.clone()));274 <PalletEvm<T>>::deposit_log(275 erc::CollectionHelpersEvents::CollectionChanged {276 collection_id: eth::collection_id_to_address(self.id),277 }278 .to_log(T::ContractAddress::get()),279 );280281 self.save()282 }283284 /// Remove collection sponsor.285 pub fn remove_sponsor(&mut self, sender: &T::CrossAccountId) -> DispatchResult {286 self.check_is_internal()?;287 self.check_is_owner_or_admin(sender)?;288289 self.collection.sponsorship = SponsorshipState::Disabled;290291 <Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));292 <PalletEvm<T>>::deposit_log(293 erc::CollectionHelpersEvents::CollectionChanged {294 collection_id: eth::collection_id_to_address(self.id),295 }296 .to_log(T::ContractAddress::get()),297 );298 self.save()299 }300301 /// Force remove `sponsor`.302 ///303 /// Differs from `remove_sponsor` in that304 /// it doesn't require consent from the `owner` of the collection.305 pub fn force_remove_sponsor(&mut self) -> DispatchResult {306 self.check_is_internal()?;307308 self.collection.sponsorship = SponsorshipState::Disabled;309310 <Pallet<T>>::deposit_event(Event::<T>::CollectionSponsorRemoved(self.id));311 <PalletEvm<T>>::deposit_log(312 erc::CollectionHelpersEvents::CollectionChanged {313 collection_id: eth::collection_id_to_address(self.id),314 }315 .to_log(T::ContractAddress::get()),316 );317 self.save()318 }319320 /// Checks that the collection was created with, and must be operated upon through **Unique API**.321 /// Now check only the `external` flag and if it's **true**, then return [`Error::CollectionIsExternal`] error.322 pub fn check_is_internal(&self) -> DispatchResult {323 if self.flags.external {324 return Err(<Error<T>>::CollectionIsExternal)?;325 }326327 Ok(())328 }329330 /// Checks that the collection was created with, and must be operated upon through an **assimilated API**.331 /// Now check only the `external` flag and if it's **false**, then return [`Error::CollectionIsInternal`] error.332 pub fn check_is_external(&self) -> DispatchResult {333 if !self.flags.external {334 return Err(<Error<T>>::CollectionIsInternal)?;335 }336337 Ok(())338 }339}340341impl<T: Config> Deref for CollectionHandle<T> {342 type Target = Collection<T::AccountId>;343344 fn deref(&self) -> &Self::Target {345 &self.collection346 }347}348349impl<T: Config> DerefMut for CollectionHandle<T> {350 fn deref_mut(&mut self) -> &mut Self::Target {351 &mut self.collection352 }353}354355impl<T: Config> CollectionHandle<T> {356 /// Checks if the `user` is the owner of the collection.357 pub fn check_is_owner(&self, user: &T::CrossAccountId) -> DispatchResult {358 ensure!(*user.as_sub() == self.owner, <Error<T>>::NoPermission);359 Ok(())360 }361362 /// Returns **true** if the `user` is the owner or administrator of the collection.363 pub fn is_owner_or_admin(&self, user: &T::CrossAccountId) -> bool {364 *user.as_sub() == self.owner || <IsAdmin<T>>::get((self.id, user))365 }366367 /// Checks if the `user` is the owner or administrator of the collection.368 pub fn check_is_owner_or_admin(&self, user: &T::CrossAccountId) -> DispatchResult {369 ensure!(self.is_owner_or_admin(user), <Error<T>>::NoPermission);370 Ok(())371 }372373 /// Returns **true** if374 /// * the `user`is a collection owner or admin375 /// * the collection limits allow the owner/admins to transfer/burn any collection token376 pub fn ignores_token_restrictions(&self, user: &T::CrossAccountId) -> bool {377 self.limits.owner_can_transfer() && self.is_owner_or_admin(user)378 }379380 /// Return **true** if `user` does not have enough token parts, and he can ignore such restrictions.381 pub fn ignores_owned_amount(&self, user: &T::CrossAccountId) -> bool {382 self.limits.owner_can_transfer() && self.is_owner_or_admin(user)383 }384385 /// Checks if the user is in the allow list. If not [Error::AddressNotInAllowlist] returns.386 pub fn check_allowlist(&self, user: &T::CrossAccountId) -> DispatchResult {387 ensure!(388 <Allowlist<T>>::get((self.id, user)),389 <Error<T>>::AddressNotInAllowlist390 );391 Ok(())392 }393394 /// Changes collection owner to another account395 /// #### Store read/writes396 /// 1 writes397 pub fn change_owner(398 &mut self,399 caller: T::CrossAccountId,400 new_owner: T::CrossAccountId,401 ) -> DispatchResult {402 self.check_is_internal()?;403 self.check_is_owner(&caller)?;404 self.collection.owner = new_owner.as_sub().clone();405406 <Pallet<T>>::deposit_event(Event::<T>::CollectionOwnerChanged(407 self.id,408 new_owner.as_sub().clone(),409 ));410 <PalletEvm<T>>::deposit_log(411 erc::CollectionHelpersEvents::CollectionChanged {412 collection_id: eth::collection_id_to_address(self.id),413 }414 .to_log(T::ContractAddress::get()),415 );416417 self.save()418 }419}420421#[frame_support::pallet]422pub mod pallet {423 use super::*;424 use dispatch::CollectionDispatch;425 use frame_support::{Blake2_128Concat, pallet_prelude::*, storage::Key, traits::StorageVersion};426 use frame_system::pallet_prelude::*;427 use frame_support::traits::Currency;428 use up_data_structs::{TokenId, mapping::TokenAddressMapping};429 use scale_info::TypeInfo;430 use weights::WeightInfo;431432 #[pallet::config]433 pub trait Config:434 frame_system::Config + pallet_evm_coder_substrate::Config + pallet_evm::Config + TypeInfo435 {436 /// Weight information for functions of this pallet.437 type WeightInfo: WeightInfo;438439 /// Events compatible with [`frame_system::Config::Event`].440 type RuntimeEvent: IsType<<Self as frame_system::Config>::RuntimeEvent> + From<Event<Self>>;441442 /// Handler of accounts and payment.443 type Currency: Currency<Self::AccountId>;444445 /// Set price to create a collection.446 #[pallet::constant]447 type CollectionCreationPrice: Get<448 <<Self as Config>::Currency as Currency<Self::AccountId>>::Balance,449 >;450451 /// Dispatcher of operations on collections.452 type CollectionDispatch: CollectionDispatch<Self>;453454 /// Account which holds the chain's treasury.455 type TreasuryAccountId: Get<Self::AccountId>;456457 /// Address under which the CollectionHelper contract would be available.458 #[pallet::constant]459 type ContractAddress: Get<H160>;460461 /// Mapper for token addresses to Ethereum addresses.462 type EvmTokenAddressMapping: TokenAddressMapping<H160>;463464 /// Mapper for token addresses to [`CrossAccountId`].465 type CrossTokenAddressMapping: TokenAddressMapping<Self::CrossAccountId>;466 }467468 const STORAGE_VERSION: StorageVersion = StorageVersion::new(1);469470 #[pallet::pallet]471 #[pallet::storage_version(STORAGE_VERSION)]472 pub struct Pallet<T>(_);473474 #[pallet::extra_constants]475 impl<T: Config> Pallet<T> {476 /// Maximum admins per collection.477 pub fn collection_admins_limit() -> u32 {478 COLLECTION_ADMINS_LIMIT479 }480 }481482 impl<T: Config> Pallet<T> {483 /// Helper function that handles deposit events484 pub fn deposit_event(event: Event<T>) {485 let event = <T as Config>::RuntimeEvent::from(event);486 let event = event.into();487 <frame_system::Pallet<T>>::deposit_event(event)488 }489 }490491 #[pallet::event]492 pub enum Event<T: Config> {493 /// New collection was created494 CollectionCreated(495 /// Globally unique identifier of newly created collection.496 CollectionId,497 /// [`CollectionMode`] converted into _u8_.498 u8,499 /// Collection owner.500 T::AccountId,501 ),502503 /// New collection was destroyed504 CollectionDestroyed(505 /// Globally unique identifier of collection.506 CollectionId,507 ),508509 /// New item was created.510 ItemCreated(511 /// Id of the collection where item was created.512 CollectionId,513 /// Id of an item. Unique within the collection.514 TokenId,515 /// Owner of newly created item516 T::CrossAccountId,517 /// Always 1 for NFT518 u128,519 ),520521 /// Collection item was burned.522 ItemDestroyed(523 /// Id of the collection where item was destroyed.524 CollectionId,525 /// Identifier of burned NFT.526 TokenId,527 /// Which user has destroyed its tokens.528 T::CrossAccountId,529 /// Amount of token pieces destroed. Always 1 for NFT.530 u128,531 ),532533 /// Item was transferred534 Transfer(535 /// Id of collection to which item is belong.536 CollectionId,537 /// Id of an item.538 TokenId,539 /// Original owner of item.540 T::CrossAccountId,541 /// New owner of item.542 T::CrossAccountId,543 /// Amount of token pieces transfered. Always 1 for NFT.544 u128,545 ),546547 /// Amount pieces of token owned by `sender` was approved for `spender`.548 Approved(549 /// Id of collection to which item is belong.550 CollectionId,551 /// Id of an item.552 TokenId,553 /// Original owner of item.554 T::CrossAccountId,555 /// Id for which the approval was granted.556 T::CrossAccountId,557 /// Amount of token pieces transfered. Always 1 for NFT.558 u128,559 ),560561 /// A `sender` approves operations on all owned tokens for `spender`.562 ApprovedForAll(563 /// Id of collection to which item is belong.564 CollectionId,565 /// Owner of a wallet.566 T::CrossAccountId,567 /// Id for which operator status was granted or rewoked.568 T::CrossAccountId,569 /// Is operator status granted or revoked?570 bool,571 ),572573 /// The colletion property has been added or edited.574 CollectionPropertySet(575 /// Id of collection to which property has been set.576 CollectionId,577 /// The property that was set.578 PropertyKey,579 ),580581 /// The property has been deleted.582 CollectionPropertyDeleted(583 /// Id of collection to which property has been deleted.584 CollectionId,585 /// The property that was deleted.586 PropertyKey,587 ),588589 /// The token property has been added or edited.590 TokenPropertySet(591 /// Identifier of the collection whose token has the property set.592 CollectionId,593 /// The token for which the property was set.594 TokenId,595 /// The property that was set.596 PropertyKey,597 ),598599 /// The token property has been deleted.600 TokenPropertyDeleted(601 /// Identifier of the collection whose token has the property deleted.602 CollectionId,603 /// The token for which the property was deleted.604 TokenId,605 /// The property that was deleted.606 PropertyKey,607 ),608609 /// The token property permission of a collection has been set.610 PropertyPermissionSet(611 /// ID of collection to which property permission has been set.612 CollectionId,613 /// The property permission that was set.614 PropertyKey,615 ),616617 /// Address was added to the allow list.618 AllowListAddressAdded(619 /// ID of the affected collection.620 CollectionId,621 /// Address of the added account.622 T::CrossAccountId,623 ),624625 /// Address was removed from the allow list.626 AllowListAddressRemoved(627 /// ID of the affected collection.628 CollectionId,629 /// Address of the removed account.630 T::CrossAccountId,631 ),632633 /// Collection admin was added.634 CollectionAdminAdded(635 /// ID of the affected collection.636 CollectionId,637 /// Admin address.638 T::CrossAccountId,639 ),640641 /// Collection admin was removed.642 CollectionAdminRemoved(643 /// ID of the affected collection.644 CollectionId,645 /// Removed admin address.646 T::CrossAccountId,647 ),648649 /// Collection limits were set.650 CollectionLimitSet(651 /// ID of the affected collection.652 CollectionId,653 ),654655 /// Collection owned was changed.656 CollectionOwnerChanged(657 /// ID of the affected collection.658 CollectionId,659 /// New owner address.660 T::AccountId,661 ),662663 /// Collection permissions were set.664 CollectionPermissionSet(665 /// ID of the affected collection.666 CollectionId,667 ),668669 /// Collection sponsor was set.670 CollectionSponsorSet(671 /// ID of the affected collection.672 CollectionId,673 /// New sponsor address.674 T::AccountId,675 ),676677 /// New sponsor was confirm.678 SponsorshipConfirmed(679 /// ID of the affected collection.680 CollectionId,681 /// New sponsor address.682 T::AccountId,683 ),684685 /// Collection sponsor was removed.686 CollectionSponsorRemoved(687 /// ID of the affected collection.688 CollectionId,689 ),690 }691692 #[pallet::error]693 pub enum Error<T> {694 /// This collection does not exist.695 CollectionNotFound,696 /// Sender parameter and item owner must be equal.697 MustBeTokenOwner,698 /// No permission to perform action699 NoPermission,700 /// Destroying only empty collections is allowed701 CantDestroyNotEmptyCollection,702 /// Collection is not in mint mode.703 PublicMintingNotAllowed,704 /// Address is not in allow list.705 AddressNotInAllowlist,706707 /// Collection name can not be longer than 63 char.708 CollectionNameLimitExceeded,709 /// Collection description can not be longer than 255 char.710 CollectionDescriptionLimitExceeded,711 /// Token prefix can not be longer than 15 char.712 CollectionTokenPrefixLimitExceeded,713 /// Total collections bound exceeded.714 TotalCollectionsLimitExceeded,715 /// Exceeded max admin count716 CollectionAdminCountExceeded,717 /// Collection limit bounds per collection exceeded718 CollectionLimitBoundsExceeded,719 /// Tried to enable permissions which are only permitted to be disabled720 OwnerPermissionsCantBeReverted,721 /// Collection settings not allowing items transferring722 TransferNotAllowed,723 /// Account token limit exceeded per collection724 AccountTokenLimitExceeded,725 /// Collection token limit exceeded726 CollectionTokenLimitExceeded,727 /// Metadata flag frozen728 MetadataFlagFrozen,729730 /// Item does not exist731 TokenNotFound,732 /// Item is balance not enough733 TokenValueTooLow,734 /// Requested value is more than the approved735 ApprovedValueTooLow,736 /// Tried to approve more than owned737 CantApproveMoreThanOwned,738 /// Only spending from eth mirror could be approved739 AddressIsNotEthMirror,740741 /// Can't transfer tokens to ethereum zero address742 AddressIsZero,743744 /// The operation is not supported745 UnsupportedOperation,746747 /// Insufficient funds to perform an action748 NotSufficientFounds,749750 /// User does not satisfy the nesting rule751 UserIsNotAllowedToNest,752 /// Only tokens from specific collections may nest tokens under this one753 SourceCollectionIsNotAllowedToNest,754755 /// Tried to store more data than allowed in collection field756 CollectionFieldSizeExceeded,757758 /// Tried to store more property data than allowed759 NoSpaceForProperty,760761 /// Tried to store more property keys than allowed762 PropertyLimitReached,763764 /// Property key is too long765 PropertyKeyIsTooLong,766767 /// Only ASCII letters, digits, and symbols `_`, `-`, and `.` are allowed768 InvalidCharacterInPropertyKey,769770 /// Empty property keys are forbidden771 EmptyPropertyKey,772773 /// Tried to access an external collection with an internal API774 CollectionIsExternal,775776 /// Tried to access an internal collection with an external API777 CollectionIsInternal,778779 /// This address is not set as sponsor, use setCollectionSponsor first.780 ConfirmSponsorshipFail,781782 /// The user is not an administrator.783 UserIsNotCollectionAdmin,784 }785786 /// Storage of the count of created collections. Essentially contains the last collection ID.787 #[pallet::storage]788 pub type CreatedCollectionCount<T> = StorageValue<Value = CollectionId, QueryKind = ValueQuery>;789790 /// Storage of the count of deleted collections.791 #[pallet::storage]792 pub type DestroyedCollectionCount<T> =793 StorageValue<Value = CollectionId, QueryKind = ValueQuery>;794795 /// Storage of collection info.796 #[pallet::storage]797 pub type CollectionById<T> = StorageMap<798 Hasher = Blake2_128Concat,799 Key = CollectionId,800 Value = Collection<<T as frame_system::Config>::AccountId>,801 QueryKind = OptionQuery,802 >;803804 /// Storage of collection properties.805 #[pallet::storage]806 #[pallet::getter(fn collection_properties)]807 pub type CollectionProperties<T> = StorageMap<808 Hasher = Blake2_128Concat,809 Key = CollectionId,810 Value = CollectionPropertiesT,811 QueryKind = ValueQuery,812 >;813814 /// Storage of token property permissions of a collection.815 #[pallet::storage]816 #[pallet::getter(fn property_permissions)]817 pub type CollectionPropertyPermissions<T> = StorageMap<818 Hasher = Blake2_128Concat,819 Key = CollectionId,820 Value = PropertiesPermissionMap,821 QueryKind = ValueQuery,822 >;823824 /// Storage of the amount of collection admins.825 #[pallet::storage]826 pub type AdminAmount<T> = StorageMap<827 Hasher = Blake2_128Concat,828 Key = CollectionId,829 Value = u32,830 QueryKind = ValueQuery,831 >;832833 /// List of collection admins.834 #[pallet::storage]835 pub type IsAdmin<T: Config> = StorageNMap<836 Key = (837 Key<Blake2_128Concat, CollectionId>,838 Key<Blake2_128Concat, T::CrossAccountId>,839 ),840 Value = bool,841 QueryKind = ValueQuery,842 >;843844 /// Allowlisted collection users.845 #[pallet::storage]846 pub type Allowlist<T: Config> = StorageNMap<847 Key = (848 Key<Blake2_128Concat, CollectionId>,849 Key<Blake2_128Concat, T::CrossAccountId>,850 ),851 Value = bool,852 QueryKind = ValueQuery,853 >;854855 /// Not used by code, exists only to provide some types to metadata.856 #[pallet::storage]857 pub type DummyStorageValue<T: Config> = StorageValue<858 Value = (859 CollectionStats,860 CollectionId,861 TokenId,862 TokenChild,863 PhantomType<(864 TokenData<T::CrossAccountId>,865 RpcCollection<T::AccountId>,866 // PoV Estimate Info867 PovInfo,868 )>,869 ),870 QueryKind = OptionQuery,871 >;872873 #[pallet::hooks]874 impl<T: Config> Hooks<BlockNumberFor<T>> for Pallet<T> {875 fn on_runtime_upgrade() -> Weight {876 StorageVersion::new(1).put::<Pallet<T>>();877878 Weight::zero()879 }880 }881}882883impl<T: Config> Pallet<T> {884 /// Enshure that receiver address is correct.885 ///886 /// Ethereum receiver 0x0000000000000000000000000000000000000000 is reserved, and shouldn't own tokens.887 pub fn ensure_correct_receiver(receiver: &T::CrossAccountId) -> DispatchResult {888 ensure!(889 &T::CrossAccountId::from_eth(H160([0; 20])) != receiver,890 <Error<T>>::AddressIsZero891 );892 Ok(())893 }894895 /// Get a vector of collection admins.896 pub fn adminlist(collection: CollectionId) -> Vec<T::CrossAccountId> {897 <IsAdmin<T>>::iter_prefix((collection,))898 .map(|(a, _)| a)899 .collect()900 }901902 /// Get a vector of users allowed to mint tokens.903 pub fn allowlist(collection: CollectionId) -> Vec<T::CrossAccountId> {904 <Allowlist<T>>::iter_prefix((collection,))905 .map(|(a, _)| a)906 .collect()907 }908909 /// Is `user` allowed to mint token in `collection`.910 pub fn allowed(collection: CollectionId, user: T::CrossAccountId) -> bool {911 <Allowlist<T>>::get((collection, user))912 }913914 /// Get statistics of collections.915 pub fn collection_stats() -> CollectionStats {916 let created = <CreatedCollectionCount<T>>::get();917 let destroyed = <DestroyedCollectionCount<T>>::get();918 CollectionStats {919 created: created.0,920 destroyed: destroyed.0,921 alive: created.0 - destroyed.0,922 }923 }924925 /// Get the effective limits for the collection.926 pub fn effective_collection_limits(collection: CollectionId) -> Option<CollectionLimits> {927 let collection = <CollectionById<T>>::get(collection)?;928 let limits = collection.limits;929 let effective_limits = CollectionLimits {930 account_token_ownership_limit: Some(limits.account_token_ownership_limit()),931 sponsored_data_size: Some(limits.sponsored_data_size()),932 sponsored_data_rate_limit: Some(933 limits934 .sponsored_data_rate_limit935 .unwrap_or(SponsoringRateLimit::SponsoringDisabled),936 ),937 token_limit: Some(limits.token_limit()),938 sponsor_transfer_timeout: Some(limits.sponsor_transfer_timeout(939 match collection.mode {940 CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,941 CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,942 CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,943 },944 )),945 sponsor_approve_timeout: Some(limits.sponsor_approve_timeout()),946 owner_can_transfer: Some(limits.owner_can_transfer()),947 owner_can_destroy: Some(limits.owner_can_destroy()),948 transfers_enabled: Some(limits.transfers_enabled()),949 };950951 Some(effective_limits)952 }953954 /// Returns information about the `collection` adapted for rpc.955 pub fn rpc_collection(collection: CollectionId) -> Option<RpcCollection<T::AccountId>> {956 let Collection {957 name,958 description,959 owner,960 mode,961 token_prefix,962 sponsorship,963 limits,964 permissions,965 flags,966 } = <CollectionById<T>>::get(collection)?;967968 let token_property_permissions = <CollectionPropertyPermissions<T>>::get(collection)969 .into_iter()970 .map(|(key, permission)| PropertyKeyPermission { key, permission })971 .collect();972973 let properties = <CollectionProperties<T>>::get(collection)974 .into_iter()975 .map(|(key, value)| Property { key, value })976 .collect();977978 let permissions = CollectionPermissions {979 access: Some(permissions.access()),980 mint_mode: Some(permissions.mint_mode()),981 nesting: Some(permissions.nesting().clone()),982 };983984 Some(RpcCollection {985 name: name.into_inner(),986 description: description.into_inner(),987 owner,988 mode,989 token_prefix: token_prefix.into_inner(),990 sponsorship,991 limits,992 permissions,993 token_property_permissions,994 properties,995 read_only: flags.external,996997 flags: RpcCollectionFlags {998 foreign: flags.foreign,999 erc721metadata: flags.erc721metadata,1000 },1001 })1002 }1003}10041005macro_rules! limit_default {1006 ($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1007 $(1008 if let Some($new) = $new.$field {1009 let $old = $old.$field($($arg)?);1010 let _ = $new;1011 let _ = $old;1012 $check1013 } else {1014 $new.$field = $old.$field1015 }1016 )*1017 }};1018}1019macro_rules! limit_default_clone {1020 ($old:ident, $new:ident, $($field:ident $(($arg:expr))? => $check:expr),* $(,)?) => {{1021 $(1022 if let Some($new) = $new.$field.clone() {1023 let $old = $old.$field($($arg)?);1024 let _ = $new;1025 let _ = $old;1026 $check1027 } else {1028 $new.$field = $old.$field.clone()1029 }1030 )*1031 }};1032}10331034impl<T: Config> Pallet<T> {1035 /// Create new collection.1036 ///1037 /// * `owner` - The owner of the collection.1038 /// * `data` - Description of the created collection.1039 /// * `flags` - Extra flags to store.1040 pub fn init_collection(1041 owner: T::CrossAccountId,1042 payer: T::CrossAccountId,1043 data: CreateCollectionData<T::AccountId>,1044 flags: CollectionFlags,1045 ) -> Result<CollectionId, DispatchError> {1046 {1047 ensure!(1048 data.token_prefix.len() <= MAX_TOKEN_PREFIX_LENGTH as usize,1049 Error::<T>::CollectionTokenPrefixLimitExceeded1050 );1051 }10521053 let created_count = <CreatedCollectionCount<T>>::get()1054 .01055 .checked_add(1)1056 .ok_or(ArithmeticError::Overflow)?;1057 let destroyed_count = <DestroyedCollectionCount<T>>::get().0;1058 let id = CollectionId(created_count);10591060 // bound Total number of collections1061 ensure!(1062 created_count - destroyed_count <= COLLECTION_NUMBER_LIMIT,1063 <Error<T>>::TotalCollectionsLimitExceeded1064 );10651066 // =========10671068 let collection = Collection {1069 owner: owner.as_sub().clone(),1070 name: data.name,1071 mode: data.mode.clone(),1072 description: data.description,1073 token_prefix: data.token_prefix,1074 sponsorship: data1075 .pending_sponsor1076 .map(SponsorshipState::Unconfirmed)1077 .unwrap_or_default(),1078 limits: data1079 .limits1080 .map(|limits| Self::clamp_limits(data.mode.clone(), &Default::default(), limits))1081 .unwrap_or_else(|| Ok(CollectionLimits::default()))?,1082 permissions: data1083 .permissions1084 .map(|permissions| {1085 Self::clamp_permissions(data.mode.clone(), &Default::default(), permissions)1086 })1087 .unwrap_or_else(|| Ok(CollectionPermissions::default()))?,1088 flags,1089 };10901091 let mut collection_properties = CollectionPropertiesT::new();1092 collection_properties1093 .try_set_from_iter(data.properties.into_iter())1094 .map_err(<Error<T>>::from)?;10951096 CollectionProperties::<T>::insert(id, collection_properties);10971098 let mut token_props_permissions = PropertiesPermissionMap::new();1099 token_props_permissions1100 .try_set_from_iter(data.token_property_permissions.into_iter())1101 .map_err(<Error<T>>::from)?;11021103 CollectionPropertyPermissions::<T>::insert(id, token_props_permissions);11041105 // Take a (non-refundable) deposit of collection creation1106 {1107 let mut imbalance =1108 <<<T as Config>::Currency as Currency<T::AccountId>>::PositiveImbalance>::zero();1109 imbalance.subsume(1110 <<T as Config>::Currency as Currency<T::AccountId>>::deposit_creating(1111 &T::TreasuryAccountId::get(),1112 T::CollectionCreationPrice::get(),1113 ),1114 );1115 <T as Config>::Currency::settle(1116 payer.as_sub(),1117 imbalance,1118 WithdrawReasons::TRANSFER,1119 ExistenceRequirement::KeepAlive,1120 )1121 .map_err(|_| Error::<T>::NotSufficientFounds)?;1122 }11231124 <CreatedCollectionCount<T>>::put(created_count);1125 <Pallet<T>>::deposit_event(Event::CollectionCreated(1126 id,1127 data.mode.id(),1128 owner.as_sub().clone(),1129 ));1130 <PalletEvm<T>>::deposit_log(1131 erc::CollectionHelpersEvents::CollectionCreated {1132 owner: *owner.as_eth(),1133 collection_id: eth::collection_id_to_address(id),1134 }1135 .to_log(T::ContractAddress::get()),1136 );1137 <CollectionById<T>>::insert(id, collection);1138 Ok(id)1139 }11401141 /// Destroy collection.1142 ///1143 /// * `collection` - Collection handler.1144 /// * `sender` - The owner or administrator of the collection.1145 pub fn destroy_collection(1146 collection: CollectionHandle<T>,1147 sender: &T::CrossAccountId,1148 ) -> DispatchResult {1149 ensure!(1150 collection.limits.owner_can_destroy(),1151 <Error<T>>::NoPermission,1152 );1153 collection.check_is_owner(sender)?;11541155 let destroyed_collections = <DestroyedCollectionCount<T>>::get()1156 .01157 .checked_add(1)1158 .ok_or(ArithmeticError::Overflow)?;11591160 // =========11611162 <DestroyedCollectionCount<T>>::put(destroyed_collections);1163 <CollectionById<T>>::remove(collection.id);1164 <AdminAmount<T>>::remove(collection.id);1165 let _ = <IsAdmin<T>>::clear_prefix((collection.id,), u32::MAX, None);1166 let _ = <Allowlist<T>>::clear_prefix((collection.id,), u32::MAX, None);1167 <CollectionProperties<T>>::remove(collection.id);11681169 <Pallet<T>>::deposit_event(Event::CollectionDestroyed(collection.id));11701171 <PalletEvm<T>>::deposit_log(1172 erc::CollectionHelpersEvents::CollectionDestroyed {1173 collection_id: eth::collection_id_to_address(collection.id),1174 }1175 .to_log(T::ContractAddress::get()),1176 );1177 Ok(())1178 }11791180 /// This function sets or removes a collection properties according to1181 /// `properties_updates` contents:1182 /// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1183 /// * removes a property under the <key> if the value is `None` `(<key>, None)`.1184 ///1185 /// This function fires an event for each property change.1186 /// In case of an error, all the changes (including the events) will be reverted1187 /// since the function is transactional.1188 #[transactional]1189 fn modify_collection_properties(1190 collection: &CollectionHandle<T>,1191 sender: &T::CrossAccountId,1192 properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1193 ) -> DispatchResult {1194 collection.check_is_owner_or_admin(sender)?;11951196 let mut stored_properties = <CollectionProperties<T>>::get(collection.id);11971198 for (key, value) in properties_updates {1199 match value {1200 Some(value) => {1201 stored_properties1202 .try_set(key.clone(), value)1203 .map_err(<Error<T>>::from)?;12041205 Self::deposit_event(Event::CollectionPropertySet(collection.id, key));1206 <PalletEvm<T>>::deposit_log(1207 erc::CollectionHelpersEvents::CollectionChanged {1208 collection_id: eth::collection_id_to_address(collection.id),1209 }1210 .to_log(T::ContractAddress::get()),1211 );1212 }1213 None => {1214 stored_properties.remove(&key).map_err(<Error<T>>::from)?;12151216 Self::deposit_event(Event::CollectionPropertyDeleted(collection.id, key));1217 <PalletEvm<T>>::deposit_log(1218 erc::CollectionHelpersEvents::CollectionChanged {1219 collection_id: eth::collection_id_to_address(collection.id),1220 }1221 .to_log(T::ContractAddress::get()),1222 );1223 }1224 }1225 }12261227 <CollectionProperties<T>>::set(collection.id, stored_properties);12281229 Ok(())1230 }12311232 /// A batch operation to add, edit or remove properties for a token.1233 /// It sets or removes a token's properties according to1234 /// `properties_updates` contents:1235 /// * sets a property under the <key> with the value provided `(<key>, Some(<value>))`1236 /// * removes a property under the <key> if the value is `None` `(<key>, None)`.1237 ///1238 /// - `nesting_budget`: Limit for searching parents in-depth to check ownership.1239 /// - `is_token_create`: Indicates that method is called during token initialization.1240 /// Allows to bypass ownership check.1241 ///1242 /// All affected properties should have `mutable` permission1243 /// to be **deleted** or to be **set more than once**,1244 /// and the sender should have permission to edit those properties.1245 ///1246 /// This function fires an event for each property change.1247 /// In case of an error, all the changes (including the events) will be reverted1248 /// since the function is transactional.1249 pub fn modify_token_properties(1250 collection: &CollectionHandle<T>,1251 sender: &T::CrossAccountId,1252 token_id: TokenId,1253 properties_updates: impl Iterator<Item = (PropertyKey, Option<PropertyValue>)>,1254 is_token_create: bool,1255 mut stored_properties: TokenProperties,1256 is_token_owner: impl Fn() -> Result<bool, DispatchError>,1257 set_token_properties: impl FnOnce(TokenProperties),1258 log: evm_coder::ethereum::Log,1259 ) -> DispatchResult {1260 let is_collection_admin = collection.is_owner_or_admin(sender);1261 let permissions = Self::property_permissions(collection.id);12621263 let mut token_owner_result = None;1264 let mut is_token_owner = || -> Result<bool, DispatchError> {1265 *token_owner_result.get_or_insert_with(&is_token_owner)1266 };12671268 for (key, value) in properties_updates {1269 let permission = permissions1270 .get(&key)1271 .cloned()1272 .unwrap_or_else(PropertyPermission::none);12731274 let is_property_exists = stored_properties.get(&key).is_some();12751276 match permission {1277 PropertyPermission { mutable: false, .. } if is_property_exists => {1278 return Err(<Error<T>>::NoPermission.into());1279 }12801281 PropertyPermission {1282 collection_admin,1283 token_owner,1284 ..1285 } => {1286 //TODO: investigate threats during public minting.1287 let is_token_create =1288 is_token_create && (collection_admin || token_owner) && value.is_some();1289 if !(is_token_create1290 || (collection_admin && is_collection_admin)1291 || (token_owner && is_token_owner()?))1292 {1293 fail!(<Error<T>>::NoPermission);1294 }1295 }1296 }12971298 match value {1299 Some(value) => {1300 stored_properties1301 .try_set(key.clone(), value)1302 .map_err(<Error<T>>::from)?;13031304 Self::deposit_event(Event::TokenPropertySet(collection.id, token_id, key));1305 }1306 None => {1307 stored_properties.remove(&key).map_err(<Error<T>>::from)?;13081309 Self::deposit_event(Event::TokenPropertyDeleted(collection.id, token_id, key));1310 }1311 }13121313 <PalletEvm<T>>::deposit_log(log.clone());1314 }13151316 set_token_properties(stored_properties);13171318 Ok(())1319 }13201321 /// Sets or unsets the approval of a given operator.1322 ///1323 /// The `operator` is allowed to transfer all token pieces of the `owner` on their behalf.1324 /// - `owner`: Token owner1325 /// - `operator`: Operator1326 /// - `approve`: Should operator status be granted or revoked?1327 pub fn set_allowance_for_all(1328 collection: &CollectionHandle<T>,1329 owner: &T::CrossAccountId,1330 operator: &T::CrossAccountId,1331 approve: bool,1332 set_allowance: impl FnOnce(),1333 log: evm_coder::ethereum::Log,1334 ) -> DispatchResult {1335 if collection.permissions.access() == AccessMode::AllowList {1336 collection.check_allowlist(owner)?;1337 collection.check_allowlist(operator)?;1338 }13391340 Self::ensure_correct_receiver(operator)?;13411342 set_allowance();13431344 <PalletEvm<T>>::deposit_log(log);1345 Self::deposit_event(Event::ApprovedForAll(1346 collection.id,1347 owner.clone(),1348 operator.clone(),1349 approve,1350 ));1351 Ok(())1352 }13531354 /// Set collection property.1355 ///1356 /// * `collection` - Collection handler.1357 /// * `sender` - The owner or administrator of the collection.1358 /// * `property` - The property to set.1359 pub fn set_collection_property(1360 collection: &CollectionHandle<T>,1361 sender: &T::CrossAccountId,1362 property: Property,1363 ) -> DispatchResult {1364 Self::set_collection_properties(collection, sender, [property].into_iter())1365 }13661367 /// Set a scoped collection property, where the scope is a special prefix1368 /// prohibiting a user access to change the property directly.1369 ///1370 /// * `collection_id` - ID of the collection for which the property is being set.1371 /// * `scope` - Property scope.1372 /// * `property` - The property to set.1373 pub fn set_scoped_collection_property(1374 collection_id: CollectionId,1375 scope: PropertyScope,1376 property: Property,1377 ) -> DispatchResult {1378 CollectionProperties::<T>::try_mutate(collection_id, |properties| {1379 properties.try_scoped_set(scope, property.key, property.value)1380 })1381 .map_err(<Error<T>>::from)?;13821383 Ok(())1384 }13851386 /// Set scoped collection properties, where the scope is a special prefix1387 /// prohibiting a user access to change the properties directly.1388 ///1389 /// * `collection_id` - ID of the collection for which the properties is being set.1390 /// * `scope` - Property scope.1391 /// * `properties` - The properties to set.1392 pub fn set_scoped_collection_properties(1393 collection_id: CollectionId,1394 scope: PropertyScope,1395 properties: impl Iterator<Item = Property>,1396 ) -> DispatchResult {1397 CollectionProperties::<T>::try_mutate(collection_id, |stored_properties| {1398 stored_properties.try_scoped_set_from_iter(scope, properties)1399 })1400 .map_err(<Error<T>>::from)?;14011402 Ok(())1403 }14041405 /// Set collection properties.1406 ///1407 /// * `collection` - Collection handler.1408 /// * `sender` - The owner or administrator of the collection.1409 /// * `properties` - The properties to set.1410 pub fn set_collection_properties(1411 collection: &CollectionHandle<T>,1412 sender: &T::CrossAccountId,1413 properties: impl Iterator<Item = Property>,1414 ) -> DispatchResult {1415 Self::modify_collection_properties(1416 collection,1417 sender,1418 properties.map(|property| (property.key, Some(property.value))),1419 )1420 }14211422 /// Delete collection property.1423 ///1424 /// * `collection` - Collection handler.1425 /// * `sender` - The owner or administrator of the collection.1426 /// * `property` - The property to delete.1427 pub fn delete_collection_property(1428 collection: &CollectionHandle<T>,1429 sender: &T::CrossAccountId,1430 property_key: PropertyKey,1431 ) -> DispatchResult {1432 Self::delete_collection_properties(collection, sender, [property_key].into_iter())1433 }14341435 /// Delete collection properties.1436 ///1437 /// * `collection` - Collection handler.1438 /// * `sender` - The owner or administrator of the collection.1439 /// * `properties` - The properties to delete.1440 pub fn delete_collection_properties(1441 collection: &CollectionHandle<T>,1442 sender: &T::CrossAccountId,1443 property_keys: impl Iterator<Item = PropertyKey>,1444 ) -> DispatchResult {1445 Self::modify_collection_properties(collection, sender, property_keys.map(|key| (key, None)))1446 }14471448 /// Set collection propetry permission without any checks.1449 ///1450 /// Used for migrations.1451 ///1452 /// * `collection` - Collection handler.1453 /// * `property_permissions` - Property permissions.1454 pub fn set_property_permission_unchecked(1455 collection: CollectionId,1456 property_permission: PropertyKeyPermission,1457 ) -> DispatchResult {1458 <CollectionPropertyPermissions<T>>::try_mutate(collection, |permissions| {1459 permissions.try_set(property_permission.key, property_permission.permission)1460 })1461 .map_err(<Error<T>>::from)?;1462 Ok(())1463 }14641465 /// Set collection property permission.1466 ///1467 /// * `collection` - Collection handler.1468 /// * `sender` - The owner or administrator of the collection.1469 /// * `property_permission` - Property permission.1470 pub fn set_property_permission(1471 collection: &CollectionHandle<T>,1472 sender: &T::CrossAccountId,1473 property_permission: PropertyKeyPermission,1474 ) -> DispatchResult {1475 Self::set_scoped_property_permission(1476 collection,1477 sender,1478 PropertyScope::None,1479 property_permission,1480 )1481 }14821483 /// Set collection property permission with scope.1484 ///1485 /// * `collection` - Collection handler.1486 /// * `sender` - The owner or administrator of the collection.1487 /// * `scope` - Property scope.1488 /// * `property_permission` - Property permission.1489 pub fn set_scoped_property_permission(1490 collection: &CollectionHandle<T>,1491 sender: &T::CrossAccountId,1492 scope: PropertyScope,1493 property_permission: PropertyKeyPermission,1494 ) -> DispatchResult {1495 collection.check_is_owner_or_admin(sender)?;14961497 let all_permissions = CollectionPropertyPermissions::<T>::get(collection.id);1498 let current_permission = all_permissions.get(&property_permission.key);1499 if matches![1500 current_permission,1501 Some(PropertyPermission { mutable: false, .. })1502 ] {1503 return Err(<Error<T>>::NoPermission.into());1504 }15051506 CollectionPropertyPermissions::<T>::try_mutate(collection.id, |permissions| {1507 let property_permission = property_permission.clone();1508 permissions.try_scoped_set(1509 scope,1510 property_permission.key,1511 property_permission.permission,1512 )1513 })1514 .map_err(<Error<T>>::from)?;15151516 Self::deposit_event(Event::PropertyPermissionSet(1517 collection.id,1518 property_permission.key,1519 ));1520 <PalletEvm<T>>::deposit_log(1521 erc::CollectionHelpersEvents::CollectionChanged {1522 collection_id: eth::collection_id_to_address(collection.id),1523 }1524 .to_log(T::ContractAddress::get()),1525 );15261527 Ok(())1528 }15291530 /// Set token property permission.1531 ///1532 /// * `collection` - Collection handler.1533 /// * `sender` - The owner or administrator of the collection.1534 /// * `property_permissions` - Property permissions.1535 #[transactional]1536 pub fn set_token_property_permissions(1537 collection: &CollectionHandle<T>,1538 sender: &T::CrossAccountId,1539 property_permissions: Vec<PropertyKeyPermission>,1540 ) -> DispatchResult {1541 Self::set_scoped_token_property_permissions(1542 collection,1543 sender,1544 PropertyScope::None,1545 property_permissions,1546 )1547 }15481549 /// Set token property permission with scope.1550 ///1551 /// * `collection` - Collection handler.1552 /// * `sender` - The owner or administrator of the collection.1553 /// * `scope` - Property scope.1554 /// * `property_permissions` - Property permissions.1555 #[transactional]1556 pub fn set_scoped_token_property_permissions(1557 collection: &CollectionHandle<T>,1558 sender: &T::CrossAccountId,1559 scope: PropertyScope,1560 property_permissions: Vec<PropertyKeyPermission>,1561 ) -> DispatchResult {1562 for prop_pemission in property_permissions {1563 Self::set_scoped_property_permission(collection, sender, scope, prop_pemission)?;1564 }15651566 Ok(())1567 }15681569 /// Get collection property.1570 pub fn get_collection_property(1571 collection_id: CollectionId,1572 key: &PropertyKey,1573 ) -> Option<PropertyValue> {1574 Self::collection_properties(collection_id).get(key).cloned()1575 }15761577 /// Convert byte vector to property key vector.1578 pub fn bytes_keys_to_property_keys(1579 keys: Vec<Vec<u8>>,1580 ) -> Result<Vec<PropertyKey>, DispatchError> {1581 keys.into_iter()1582 .map(|key| -> Result<PropertyKey, DispatchError> {1583 key.try_into()1584 .map_err(|_| <Error<T>>::PropertyKeyIsTooLong.into())1585 })1586 .collect::<Result<Vec<PropertyKey>, DispatchError>>()1587 }15881589 /// Get properties according to given keys.1590 pub fn filter_collection_properties(1591 collection_id: CollectionId,1592 keys: Option<Vec<PropertyKey>>,1593 ) -> Result<Vec<Property>, DispatchError> {1594 let properties = Self::collection_properties(collection_id);15951596 let properties = keys1597 .map(|keys| {1598 keys.into_iter()1599 .filter_map(|key| {1600 properties.get(&key).map(|value| Property {1601 key,1602 value: value.clone(),1603 })1604 })1605 .collect()1606 })1607 .unwrap_or_else(|| {1608 properties1609 .into_iter()1610 .map(|(key, value)| Property { key, value })1611 .collect()1612 });16131614 Ok(properties)1615 }16161617 /// Get property permissions according to given keys.1618 pub fn filter_property_permissions(1619 collection_id: CollectionId,1620 keys: Option<Vec<PropertyKey>>,1621 ) -> Result<Vec<PropertyKeyPermission>, DispatchError> {1622 let permissions = Self::property_permissions(collection_id);16231624 let key_permissions = keys1625 .map(|keys| {1626 keys.into_iter()1627 .filter_map(|key| {1628 permissions1629 .get(&key)1630 .map(|permission| PropertyKeyPermission {1631 key,1632 permission: permission.clone(),1633 })1634 })1635 .collect()1636 })1637 .unwrap_or_else(|| {1638 permissions1639 .into_iter()1640 .map(|(key, permission)| PropertyKeyPermission { key, permission })1641 .collect()1642 });16431644 Ok(key_permissions)1645 }16461647 /// Toggle `user` participation in the `collection`'s allow list.1648 /// #### Store read/writes1649 /// 1 writes1650 pub fn toggle_allowlist(1651 collection: &CollectionHandle<T>,1652 sender: &T::CrossAccountId,1653 user: &T::CrossAccountId,1654 allowed: bool,1655 ) -> DispatchResult {1656 collection.check_is_owner_or_admin(sender)?;16571658 // =========16591660 if allowed {1661 <Allowlist<T>>::insert((collection.id, user), true);1662 Self::deposit_event(Event::<T>::AllowListAddressAdded(1663 collection.id,1664 user.clone(),1665 ));1666 } else {1667 <Allowlist<T>>::remove((collection.id, user));1668 Self::deposit_event(Event::<T>::AllowListAddressRemoved(1669 collection.id,1670 user.clone(),1671 ));1672 }16731674 <PalletEvm<T>>::deposit_log(1675 erc::CollectionHelpersEvents::CollectionChanged {1676 collection_id: eth::collection_id_to_address(collection.id),1677 }1678 .to_log(T::ContractAddress::get()),1679 );16801681 Ok(())1682 }16831684 /// Toggle `user` participation in the `collection`'s admin list.1685 /// #### Store read/writes1686 /// 2 reads, 2 writes1687 pub fn toggle_admin(1688 collection: &CollectionHandle<T>,1689 sender: &T::CrossAccountId,1690 user: &T::CrossAccountId,1691 admin: bool,1692 ) -> DispatchResult {1693 collection.check_is_internal()?;1694 collection.check_is_owner(sender)?;16951696 let is_admin = <IsAdmin<T>>::get((collection.id, user));1697 if is_admin == admin {1698 if admin {1699 return Ok(());1700 } else {1701 return Err(Error::<T>::UserIsNotCollectionAdmin.into());1702 }1703 }1704 let amount = <AdminAmount<T>>::get(collection.id);17051706 // =========17071708 if admin {1709 let amount = amount1710 .checked_add(1)1711 .ok_or(<Error<T>>::CollectionAdminCountExceeded)?;1712 ensure!(1713 amount <= Self::collection_admins_limit(),1714 <Error<T>>::CollectionAdminCountExceeded,1715 );17161717 <AdminAmount<T>>::insert(collection.id, amount);1718 <IsAdmin<T>>::insert((collection.id, user), true);17191720 Self::deposit_event(Event::<T>::CollectionAdminAdded(1721 collection.id,1722 user.clone(),1723 ));1724 } else {1725 <AdminAmount<T>>::insert(collection.id, amount.saturating_sub(1));1726 <IsAdmin<T>>::remove((collection.id, user));17271728 Self::deposit_event(Event::<T>::CollectionAdminRemoved(1729 collection.id,1730 user.clone(),1731 ));1732 }17331734 <PalletEvm<T>>::deposit_log(1735 erc::CollectionHelpersEvents::CollectionChanged {1736 collection_id: eth::collection_id_to_address(collection.id),1737 }1738 .to_log(T::ContractAddress::get()),1739 );17401741 Ok(())1742 }17431744 /// Update collection limits.1745 pub fn update_limits(1746 user: &T::CrossAccountId,1747 collection: &mut CollectionHandle<T>,1748 new_limit: CollectionLimits,1749 ) -> DispatchResult {1750 collection.check_is_internal()?;1751 collection.check_is_owner_or_admin(user)?;17521753 collection.limits =1754 Self::clamp_limits(collection.mode.clone(), &collection.limits, new_limit)?;17551756 Self::deposit_event(Event::<T>::CollectionLimitSet(collection.id));1757 <PalletEvm<T>>::deposit_log(1758 erc::CollectionHelpersEvents::CollectionChanged {1759 collection_id: eth::collection_id_to_address(collection.id),1760 }1761 .to_log(T::ContractAddress::get()),1762 );17631764 collection.save()1765 }17661767 /// Merge set fields from `new_limit` to `old_limit`.1768 fn clamp_limits(1769 mode: CollectionMode,1770 old_limit: &CollectionLimits,1771 mut new_limit: CollectionLimits,1772 ) -> Result<CollectionLimits, DispatchError> {1773 let limits = old_limit;1774 limit_default!(old_limit, new_limit,1775 account_token_ownership_limit => ensure!(1776 new_limit <= MAX_TOKEN_OWNERSHIP,1777 <Error<T>>::CollectionLimitBoundsExceeded,1778 ),1779 sponsored_data_size => ensure!(1780 new_limit <= CUSTOM_DATA_LIMIT,1781 <Error<T>>::CollectionLimitBoundsExceeded,1782 ),17831784 sponsored_data_rate_limit => {},1785 token_limit => ensure!(1786 old_limit >= new_limit && new_limit > 0,1787 <Error<T>>::CollectionTokenLimitExceeded1788 ),17891790 sponsor_transfer_timeout(match mode {1791 CollectionMode::NFT => NFT_SPONSOR_TRANSFER_TIMEOUT,1792 CollectionMode::Fungible(_) => FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1793 CollectionMode::ReFungible => REFUNGIBLE_SPONSOR_TRANSFER_TIMEOUT,1794 }) => ensure!(1795 new_limit <= MAX_SPONSOR_TIMEOUT,1796 <Error<T>>::CollectionLimitBoundsExceeded,1797 ),1798 sponsor_approve_timeout => {},1799 owner_can_transfer => ensure!(1800 !limits.owner_can_transfer_instaled() ||1801 old_limit || !new_limit,1802 <Error<T>>::OwnerPermissionsCantBeReverted,1803 ),1804 owner_can_destroy => ensure!(1805 old_limit || !new_limit,1806 <Error<T>>::OwnerPermissionsCantBeReverted,1807 ),1808 transfers_enabled => {},1809 );1810 Ok(new_limit)1811 }18121813 /// Update collection permissions.1814 pub fn update_permissions(1815 user: &T::CrossAccountId,1816 collection: &mut CollectionHandle<T>,1817 new_permission: CollectionPermissions,1818 ) -> DispatchResult {1819 collection.check_is_internal()?;1820 collection.check_is_owner_or_admin(user)?;1821 collection.permissions = Self::clamp_permissions(1822 collection.mode.clone(),1823 &collection.permissions,1824 new_permission,1825 )?;18261827 Self::deposit_event(Event::<T>::CollectionPermissionSet(collection.id));1828 <PalletEvm<T>>::deposit_log(1829 erc::CollectionHelpersEvents::CollectionChanged {1830 collection_id: eth::collection_id_to_address(collection.id),1831 }1832 .to_log(T::ContractAddress::get()),1833 );18341835 collection.save()1836 }18371838 /// Merge set fields from `new_permission` to `old_permission`.1839 fn clamp_permissions(1840 _mode: CollectionMode,1841 old_permission: &CollectionPermissions,1842 mut new_permission: CollectionPermissions,1843 ) -> Result<CollectionPermissions, DispatchError> {1844 limit_default_clone!(old_permission, new_permission,1845 access => {},1846 mint_mode => {},1847 nesting => { /* todo check for permissive, if only it gets out of benchmarks */ },1848 );1849 Ok(new_permission)1850 }18511852 /// Repair possibly broken properties of a collection.1853 pub fn repair_collection(collection_id: CollectionId) -> DispatchResult {1854 CollectionProperties::<T>::mutate(collection_id, |properties| {1855 properties.recompute_consumed_space();1856 });18571858 Ok(())1859 }1860}18611862/// Indicates unsupported methods by returning [Error::UnsupportedOperation].1863#[macro_export]1864macro_rules! unsupported {1865 ($runtime:path) => {1866 Err($crate::Error::<$runtime>::UnsupportedOperation.into())1867 };1868}18691870/// Return weights for various worst-case operations.1871pub trait CommonWeightInfo<CrossAccountId> {1872 /// Weight of item creation.1873 fn create_item(data: &CreateItemData) -> Weight {1874 Self::create_multiple_items(from_ref(data))1875 }18761877 /// Weight of items creation.1878 fn create_multiple_items(amount: &[CreateItemData]) -> Weight;18791880 /// Weight of items creation.1881 fn create_multiple_items_ex(cost: &CreateItemExData<CrossAccountId>) -> Weight;18821883 /// The weight of the burning item.1884 fn burn_item() -> Weight;18851886 /// Property setting weight.1887 ///1888 /// * `amount`- The number of properties to set.1889 fn set_collection_properties(amount: u32) -> Weight;18901891 /// Collection property deletion weight.1892 ///1893 /// * `amount`- The number of properties to set.1894 fn delete_collection_properties(amount: u32) -> Weight;18951896 /// Token property setting weight.1897 ///1898 /// * `amount`- The number of properties to set.1899 fn set_token_properties(amount: u32) -> Weight;19001901 /// Token property deletion weight.1902 ///1903 /// * `amount`- The number of properties to delete.1904 fn delete_token_properties(amount: u32) -> Weight;19051906 /// Token property permissions set weight.1907 ///1908 /// * `amount`- The number of property permissions to set.1909 fn set_token_property_permissions(amount: u32) -> Weight;19101911 /// Transfer price of the token or its parts.1912 fn transfer() -> Weight;19131914 /// The price of setting the permission of the operation from another user.1915 fn approve() -> Weight;19161917 /// The price of setting the permission of the operation from another user for eth mirror.1918 fn approve_from() -> Weight;19191920 /// Transfer price from another user.1921 fn transfer_from() -> Weight;19221923 /// The price of burning a token from another user.1924 fn burn_from() -> Weight;19251926 /// Differs from burn_item in case of Fungible and Refungible, as it should burn1927 /// whole users's balance.1928 ///1929 /// This method shouldn't be used directly, as it doesn't count breadth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1930 fn burn_recursively_self_raw() -> Weight;19311932 /// Cost of iterating over `amount` children while burning, without counting child burning itself.1933 ///1934 /// This method shouldn't be used directly, as it doesn't count depth price, use [burn_recursively](CommonWeightInfo::burn_recursively) instead1935 fn burn_recursively_breadth_raw(amount: u32) -> Weight;19361937 /// The price of recursive burning a token.1938 ///1939 /// `max_selfs` - The maximum burning weight of the token itself.1940 /// `max_breadth` - The maximum number of nested tokens to burn.1941 fn burn_recursively(max_selfs: u32, max_breadth: u32) -> Weight {1942 Self::burn_recursively_self_raw()1943 .saturating_mul(max_selfs.max(1) as u64)1944 .saturating_add(Self::burn_recursively_breadth_raw(max_breadth))1945 }19461947 /// The price of retrieving token owner1948 fn token_owner() -> Weight;19491950 /// The price of setting approval for all1951 fn set_allowance_for_all() -> Weight;19521953 /// The price of repairing an item.1954 fn force_repair_item() -> Weight;1955}19561957/// Weight info extension trait for refungible pallet.1958pub trait RefungibleExtensionsWeightInfo {1959 /// Weight of token repartition.1960 fn repartition() -> Weight;1961}19621963/// Common collection operations.1964///1965/// It wraps methods in Fungible, Nonfungible and Refungible pallets1966/// and adds weight info.1967pub trait CommonCollectionOperations<T: Config> {1968 /// Create token.1969 ///1970 /// * `sender` - The user who mint the token and pays for the transaction.1971 /// * `to` - The user who will own the token.1972 /// * `data` - Token data.1973 /// * `nesting_budget` - A budget that can be spent on nesting tokens.1974 fn create_item(1975 &self,1976 sender: T::CrossAccountId,1977 to: T::CrossAccountId,1978 data: CreateItemData,1979 nesting_budget: &dyn Budget,1980 ) -> DispatchResultWithPostInfo;19811982 /// Create multiple tokens.1983 ///1984 /// * `sender` - The user who mint the token and pays for the transaction.1985 /// * `to` - The user who will own the token.1986 /// * `data` - Token data.1987 /// * `nesting_budget` - A budget that can be spent on nesting tokens.1988 fn create_multiple_items(1989 &self,1990 sender: T::CrossAccountId,1991 to: T::CrossAccountId,1992 data: Vec<CreateItemData>,1993 nesting_budget: &dyn Budget,1994 ) -> DispatchResultWithPostInfo;19951996 /// Create multiple tokens.1997 ///1998 /// * `sender` - The user who mint the token and pays for the transaction.1999 /// * `to` - The user who will own the token.2000 /// * `data` - Token data.2001 /// * `nesting_budget` - A budget that can be spent on nesting tokens.2002 fn create_multiple_items_ex(2003 &self,2004 sender: T::CrossAccountId,2005 data: CreateItemExData<T::CrossAccountId>,2006 nesting_budget: &dyn Budget,2007 ) -> DispatchResultWithPostInfo;20082009 /// Burn token.2010 ///2011 /// * `sender` - The user who owns the token.2012 /// * `token` - Token id that will burned.2013 /// * `amount` - The number of parts of the token that will be burned.2014 fn burn_item(2015 &self,2016 sender: T::CrossAccountId,2017 token: TokenId,2018 amount: u128,2019 ) -> DispatchResultWithPostInfo;20202021 /// Burn token and all nested tokens recursievly.2022 ///2023 /// * `sender` - The user who owns the token.2024 /// * `token` - Token id that will burned.2025 /// * `self_budget` - The budget that can be spent on burning tokens.2026 /// * `breadth_budget` - The budget that can be spent on burning nested tokens.2027 fn burn_item_recursively(2028 &self,2029 sender: T::CrossAccountId,2030 token: TokenId,2031 self_budget: &dyn Budget,2032 breadth_budget: &dyn Budget,2033 ) -> DispatchResultWithPostInfo;20342035 /// Set collection properties.2036 ///2037 /// * `sender` - Must be either the owner of the collection or its admin.2038 /// * `properties` - Properties to be set.2039 fn set_collection_properties(2040 &self,2041 sender: T::CrossAccountId,2042 properties: Vec<Property>,2043 ) -> DispatchResultWithPostInfo;20442045 /// Delete collection properties.2046 ///2047 /// * `sender` - Must be either the owner of the collection or its admin.2048 /// * `properties` - The properties to be removed.2049 fn delete_collection_properties(2050 &self,2051 sender: &T::CrossAccountId,2052 property_keys: Vec<PropertyKey>,2053 ) -> DispatchResultWithPostInfo;20542055 /// Set token properties.2056 ///2057 /// The appropriate [`PropertyPermission`] for the token property2058 /// must be set with [`Self::set_token_property_permissions`].2059 ///2060 /// * `sender` - Must be either the owner of the token or its admin.2061 /// * `token_id` - The token for which the properties are being set.2062 /// * `properties` - Properties to be set.2063 /// * `budget` - Budget for setting properties.2064 fn set_token_properties(2065 &self,2066 sender: T::CrossAccountId,2067 token_id: TokenId,2068 properties: Vec<Property>,2069 budget: &dyn Budget,2070 ) -> DispatchResultWithPostInfo;20712072 /// Remove token properties.2073 ///2074 /// The appropriate [`PropertyPermission`] for the token property2075 /// must be set with [`Self::set_token_property_permissions`].2076 ///2077 /// * `sender` - Must be either the owner of the token or its admin.2078 /// * `token_id` - The token for which the properties are being remove.2079 /// * `property_keys` - Keys to remove corresponding properties.2080 /// * `budget` - Budget for removing properties.2081 fn delete_token_properties(2082 &self,2083 sender: T::CrossAccountId,2084 token_id: TokenId,2085 property_keys: Vec<PropertyKey>,2086 budget: &dyn Budget,2087 ) -> DispatchResultWithPostInfo;20882089 /// Set token property permissions.2090 ///2091 /// * `sender` - Must be either the owner of the token or its admin.2092 /// * `token_id` - The token for which the properties are being set.2093 /// * `property_permissions` - Property permissions to be set.2094 /// * `budget` - Budget for setting properties.2095 fn set_token_property_permissions(2096 &self,2097 sender: &T::CrossAccountId,2098 property_permissions: Vec<PropertyKeyPermission>,2099 ) -> DispatchResultWithPostInfo;21002101 /// Transfer amount of token pieces.2102 ///2103 /// * `sender` - Donor user.2104 /// * `to` - Recepient user.2105 /// * `token` - The token of which parts are being sent.2106 /// * `amount` - The number of parts of the token that will be transferred.2107 /// * `budget` - The maximum budget that can be spent on the transfer.2108 fn transfer(2109 &self,2110 sender: T::CrossAccountId,2111 to: T::CrossAccountId,2112 token: TokenId,2113 amount: u128,2114 budget: &dyn Budget,2115 ) -> DispatchResultWithPostInfo;21162117 /// Grant access to another account to transfer parts of the token owned by the calling user via [Self::transfer_from].2118 ///2119 /// * `sender` - The user who grants access to the token.2120 /// * `spender` - The user to whom the rights are granted.2121 /// * `token` - The token to which access is granted.2122 /// * `amount` - The amount of pieces that another user can dispose of.2123 fn approve(2124 &self,2125 sender: T::CrossAccountId,2126 spender: T::CrossAccountId,2127 token: TokenId,2128 amount: u128,2129 ) -> DispatchResultWithPostInfo;21302131 /// Grant access to another account to transfer parts of the token owned by the calling user's eth mirror via [Self::transfer_from].2132 ///2133 /// * `sender` - The user who grants access to the token.2134 /// * `from` - Spender's eth mirror.2135 /// * `to` - The user to whom the rights are granted.2136 /// * `token` - The token to which access is granted.2137 /// * `amount` - The amount of pieces that another user can dispose of.2138 fn approve_from(2139 &self,2140 sender: T::CrossAccountId,2141 from: T::CrossAccountId,2142 to: T::CrossAccountId,2143 token: TokenId,2144 amount: u128,2145 ) -> DispatchResultWithPostInfo;21462147 /// Send parts of a token owned by another user.2148 ///2149 /// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2150 ///2151 /// * `sender` - The user who must have access to the token (see [`Self::approve`]).2152 /// * `from` - The user who owns the token.2153 /// * `to` - Recepient user.2154 /// * `token` - The token of which parts are being sent.2155 /// * `amount` - The number of parts of the token that will be transferred.2156 /// * `budget` - The maximum budget that can be spent on the transfer.2157 fn transfer_from(2158 &self,2159 sender: T::CrossAccountId,2160 from: T::CrossAccountId,2161 to: T::CrossAccountId,2162 token: TokenId,2163 amount: u128,2164 budget: &dyn Budget,2165 ) -> DispatchResultWithPostInfo;21662167 /// Burn parts of a token owned by another user.2168 ///2169 /// Before calling this method, you must grant rights to the calling user via [`Self::approve`].2170 ///2171 /// * `sender` - The user who must have access to the token (see [`Self::approve`]).2172 /// * `from` - The user who owns the token.2173 /// * `token` - The token of which parts are being sent.2174 /// * `amount` - The number of parts of the token that will be transferred.2175 /// * `budget` - The maximum budget that can be spent on the burn.2176 fn burn_from(2177 &self,2178 sender: T::CrossAccountId,2179 from: T::CrossAccountId,2180 token: TokenId,2181 amount: u128,2182 budget: &dyn Budget,2183 ) -> DispatchResultWithPostInfo;21842185 /// Check permission to nest token.2186 ///2187 /// * `sender` - The user who initiated the check.2188 /// * `from` - The token that is checked for embedding.2189 /// * `under` - Token under which to check.2190 /// * `budget` - The maximum budget that can be spent on the check.2191 fn check_nesting(2192 &self,2193 sender: T::CrossAccountId,2194 from: (CollectionId, TokenId),2195 under: TokenId,2196 budget: &dyn Budget,2197 ) -> DispatchResult;21982199 /// Nest one token into another.2200 ///2201 /// * `under` - Token holder.2202 /// * `to_nest` - Nested token.2203 fn nest(&self, under: TokenId, to_nest: (CollectionId, TokenId));22042205 /// Unnest token.2206 ///2207 /// * `under` - Token holder.2208 /// * `to_nest` - Token to unnest.2209 fn unnest(&self, under: TokenId, to_nest: (CollectionId, TokenId));22102211 /// Get all user tokens.2212 ///2213 /// * `account` - Account for which you need to get tokens.2214 fn account_tokens(&self, account: T::CrossAccountId) -> Vec<TokenId>;22152216 /// Get all the tokens in the collection.2217 fn collection_tokens(&self) -> Vec<TokenId>;22182219 /// Check if the token exists.2220 ///2221 /// * `token` - Id token to check.2222 fn token_exists(&self, token: TokenId) -> bool;22232224 /// Get the id of the last minted token.2225 fn last_token_id(&self) -> TokenId;22262227 /// Get the owner of the token.2228 ///2229 /// * `token` - The token for which you need to find out the owner.2230 fn token_owner(&self, token: TokenId) -> Result<T::CrossAccountId, TokenOwnerError>;22312232 /// Returns 10 tokens owners in no particular order.2233 ///2234 /// * `token` - The token for which you need to find out the owners.2235 fn token_owners(&self, token: TokenId) -> Vec<T::CrossAccountId>;22362237 /// Get the value of the token property by key.2238 ///2239 /// * `token` - Token with the property to get.2240 /// * `key` - Property name.2241 fn token_property(&self, token_id: TokenId, key: &PropertyKey) -> Option<PropertyValue>;22422243 /// Get a set of token properties by key vector.2244 ///2245 /// * `token` - Token with the property to get.2246 /// * `keys` - Vector of property keys. If this parameter is [None](sp_std::result::Result),2247 /// then all properties are returned.2248 fn token_properties(&self, token: TokenId, keys: Option<Vec<PropertyKey>>) -> Vec<Property>;22492250 /// Amount of unique collection tokens2251 fn total_supply(&self) -> u32;22522253 /// Amount of different tokens account has.2254 ///2255 /// * `account` - The account for which need to get the balance.2256 fn account_balance(&self, account: T::CrossAccountId) -> u32;22572258 /// Amount of specific token account have.2259 fn balance(&self, account: T::CrossAccountId, token: TokenId) -> u128;22602261 /// Amount of token pieces2262 fn total_pieces(&self, token: TokenId) -> Option<u128>;22632264 /// Get the number of parts of the token that a trusted user can manage.2265 ///2266 /// * `sender` - Trusted user.2267 /// * `spender` - Owner of the token.2268 /// * `token` - The token for which to get the value.2269 fn allowance(2270 &self,2271 sender: T::CrossAccountId,2272 spender: T::CrossAccountId,2273 token: TokenId,2274 ) -> u128;22752276 /// Get extension for RFT collection.2277 fn refungible_extensions(&self) -> Option<&dyn RefungibleExtensions<T>>;22782279 /// The `operator` is allowed to transfer all tokens of the `owner` on their behalf.2280 /// * `owner` - Token owner2281 /// * `operator` - Operator2282 /// * `approve` - Should operator status be granted or revoked?2283 fn set_allowance_for_all(2284 &self,2285 owner: T::CrossAccountId,2286 operator: T::CrossAccountId,2287 approve: bool,2288 ) -> DispatchResultWithPostInfo;22892290 /// Tells whether the given `owner` approves the `operator`.2291 fn allowance_for_all(&self, owner: T::CrossAccountId, operator: T::CrossAccountId) -> bool;22922293 /// Repairs a possibly broken item.2294 fn repair_item(&self, token: TokenId) -> DispatchResultWithPostInfo;2295}22962297/// Extension for RFT collection.2298pub trait RefungibleExtensions<T>2299where2300 T: Config,2301{2302 /// Change the number of parts of the token.2303 ///2304 /// When the value changes down, this function is equivalent to burning parts of the token.2305 ///2306 /// * `sender` - The user calling the repartition operation. Must be the owner of the token.2307 /// * `token` - The token for which you want to change the number of parts.2308 /// * `amount` - The new value of the parts of the token.2309 fn repartition(2310 &self,2311 sender: &T::CrossAccountId,2312 token: TokenId,2313 amount: u128,2314 ) -> DispatchResultWithPostInfo;2315}23162317/// Merge [`DispatchResult`] with [`Weight`] into [`DispatchResultWithPostInfo`].2318///2319/// Used for [`CommonCollectionOperations`] implementations and flexible enough to do so.2320pub fn with_weight(res: DispatchResult, weight: Weight) -> DispatchResultWithPostInfo {2321 let post_info = PostDispatchInfo {2322 actual_weight: Some(weight),2323 pays_fee: Pays::Yes,2324 };2325 match res {2326 Ok(()) => Ok(post_info),2327 Err(error) => Err(DispatchErrorWithPostInfo { post_info, error }),2328 }2329}23302331impl<T: Config> From<PropertiesError> for Error<T> {2332 fn from(error: PropertiesError) -> Self {2333 match error {2334 PropertiesError::NoSpaceForProperty => Self::NoSpaceForProperty,2335 PropertiesError::PropertyLimitReached => Self::PropertyLimitReached,2336 PropertiesError::InvalidCharacterInPropertyKey => Self::InvalidCharacterInPropertyKey,2337 PropertiesError::PropertyKeyIsTooLong => Self::PropertyKeyIsTooLong,2338 PropertiesError::EmptyPropertyKey => Self::EmptyPropertyKey,2339 }2340 }2341}pallets/configuration/src/lib.rsdiffbeforeafterboth--- a/pallets/configuration/src/lib.rs
+++ b/pallets/configuration/src/lib.rs
@@ -249,7 +249,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
}
pallets/evm-coder-substrate/src/execution.rsdiffbeforeafterboth--- a/pallets/evm-coder-substrate/src/execution.rs
+++ b/pallets/evm-coder-substrate/src/execution.rs
@@ -61,7 +61,7 @@
fn dispatch_info(&self) -> DispatchInfo {
DispatchInfo {
// ERC165 impl should be cheap
- weight: Weight::from_ref_time(200),
+ weight: Weight::from_parts(200, 0),
}
}
}
@@ -77,10 +77,11 @@
Self { weight }
}
}
+// TODO: use 2-dimensional weight after frontier upgrade
impl From<u64> for DispatchInfo {
fn from(weight: u64) -> Self {
Self {
- weight: Weight::from_ref_time(weight),
+ weight: Weight::from_parts(weight, 0),
}
}
}
pallets/evm-contract-helpers/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-contract-helpers/src/lib.rs
+++ b/pallets/evm-contract-helpers/src/lib.rs
@@ -70,7 +70,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(trait Store)]
pub struct Pallet<T>(_);
/// Store owner for contract.
pallets/evm-migration/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-migration/src/lib.rs
+++ b/pallets/evm-migration/src/lib.rs
@@ -21,6 +21,7 @@
pub use pallet::*;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
+#[allow(missing_docs)]
pub mod weights;
#[frame_support::pallet]
@@ -46,7 +47,6 @@
type SelfWeightOf<T> = <T as Config>::WeightInfo;
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
#[pallet::event]
pallets/evm-transaction-payment/src/lib.rsdiffbeforeafterboth--- a/pallets/evm-transaction-payment/src/lib.rs
+++ b/pallets/evm-transaction-payment/src/lib.rs
@@ -50,7 +50,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
}
pallets/fungible/src/lib.rsdiffbeforeafterboth--- a/pallets/fungible/src/lib.rs
+++ b/pallets/fungible/src/lib.rs
@@ -141,7 +141,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// Total amount of fungible tokens inside a collection.
pallets/identity/src/lib.rsdiffbeforeafterboth--- a/pallets/identity/src/lib.rs
+++ b/pallets/identity/src/lib.rs
@@ -169,7 +169,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// Information that is pertinent to identify the entity behind an account.
pallets/inflation/src/lib.rsdiffbeforeafterboth--- a/pallets/inflation/src/lib.rs
+++ b/pallets/inflation/src/lib.rs
@@ -78,7 +78,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// starting year total issuance
pallets/maintenance/src/lib.rsdiffbeforeafterboth--- a/pallets/maintenance/src/lib.rs
+++ b/pallets/maintenance/src/lib.rs
@@ -66,7 +66,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
#[pallet::storage]
pallets/nonfungible/src/lib.rsdiffbeforeafterboth--- a/pallets/nonfungible/src/lib.rs
+++ b/pallets/nonfungible/src/lib.rs
@@ -175,7 +175,6 @@
#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// Total amount of minted tokens in a collection.
pallets/refungible/src/lib.rsdiffbeforeafterboth--- a/pallets/refungible/src/lib.rs
+++ b/pallets/refungible/src/lib.rs
@@ -158,7 +158,6 @@
#[pallet::pallet]
#[pallet::storage_version(STORAGE_VERSION)]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
/// Total amount of minted tokens in a collection.
pallets/scheduler-v2/Cargo.tomldiffbeforeafterboth--- a/pallets/scheduler-v2/Cargo.toml
+++ b/pallets/scheduler-v2/Cargo.toml
@@ -9,6 +9,9 @@
repository = "https://github.com/UniqueNetwork/unique-chain"
version = "0.1.0"
+[package.metadata.deppatcher.originals.dev-dependencies]
+substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+
[dependencies]
# Note: `package = "parity-scale-codec"` must be supplied since the `Encode` macro searches for it.
codec = { workspace = true, package = "parity-scale-codec" }
@@ -25,7 +28,7 @@
[dev-dependencies]
pallet-preimage = { workspace = true }
-substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.39" }
+substrate-test-utils = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
[features]
default = ["std"]
pallets/scheduler-v2/src/lib.rsdiffbeforeafterboth--- a/pallets/scheduler-v2/src/lib.rs
+++ b/pallets/scheduler-v2/src/lib.rs
@@ -460,7 +460,6 @@
const STORAGE_VERSION: StorageVersion = StorageVersion::new(0);
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
#[pallet::storage_version(STORAGE_VERSION)]
pub struct Pallet<T>(_);
pallets/scheduler-v2/src/mock.rsdiffbeforeafterboth--- a/pallets/scheduler-v2/src/mock.rs
+++ b/pallets/scheduler-v2/src/mock.rs
@@ -65,7 +65,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(PhantomData<T>);
#[pallet::hooks]
pallets/unique/src/benchmarking.rsdiffbeforeafterboth--- a/pallets/unique/src/benchmarking.rs
+++ b/pallets/unique/src/benchmarking.rs
@@ -26,6 +26,11 @@
Config as CommonConfig,
benchmarking::{create_data, create_u16_data},
};
+use up_data_structs::{
+ CollectionId, CollectionMode, MAX_COLLECTION_NAME_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
+ MAX_COLLECTION_DESCRIPTION_LENGTH, CollectionLimits,
+};
+use pallet_common::erc::CrossAccountId;
const SEED: u32 = 1;
@@ -34,9 +39,9 @@
mode: CollectionMode,
) -> Result<CollectionId, DispatchError> {
<T as CommonConfig>::Currency::deposit_creating(&owner, T::CollectionCreationPrice::get());
- let col_name = create_u16_data::<MAX_COLLECTION_NAME_LENGTH>();
- let col_desc = create_u16_data::<MAX_COLLECTION_DESCRIPTION_LENGTH>();
- let token_prefix = create_data::<MAX_TOKEN_PREFIX_LENGTH>();
+ let col_name = create_u16_data::<{ MAX_COLLECTION_NAME_LENGTH }>();
+ let col_desc = create_u16_data::<{ MAX_COLLECTION_DESCRIPTION_LENGTH }>();
+ let token_prefix = create_data::<{ MAX_TOKEN_PREFIX_LENGTH }>();
<Pallet<T>>::create_collection(
RawOrigin::Signed(owner).into(),
col_name,
@@ -54,9 +59,9 @@
benchmarks! {
create_collection {
- let col_name = create_u16_data::<MAX_COLLECTION_NAME_LENGTH>();
- let col_desc = create_u16_data::<MAX_COLLECTION_DESCRIPTION_LENGTH>();
- let token_prefix = create_data::<MAX_TOKEN_PREFIX_LENGTH>();
+ let col_name = create_u16_data::<{MAX_COLLECTION_NAME_LENGTH}>();
+ let col_desc = create_u16_data::<{MAX_COLLECTION_DESCRIPTION_LENGTH}>();
+ let token_prefix = create_data::<{MAX_TOKEN_PREFIX_LENGTH}>();
let mode: CollectionMode = CollectionMode::NFT;
let caller: T::AccountId = account("caller", 0, SEED);
<T as CommonConfig>::Currency::deposit_creating(&caller, T::CollectionCreationPrice::get());
pallets/unique/src/eth/mod.rsdiffbeforeafterboth--- a/pallets/unique/src/eth/mod.rs
+++ b/pallets/unique/src/eth/mod.rs
@@ -27,7 +27,7 @@
dispatch::CollectionDispatch,
erc::{CollectionHelpersEvents, static_property::key},
eth::{map_eth_to_id, collection_id_to_address},
- Pallet as PalletCommon,
+ Pallet as PalletCommon, CollectionHandle,
};
use pallet_evm::{account::CrossAccountId, OnMethodCall, PrecompileHandle, PrecompileResult};
use pallet_evm_coder_substrate::{
@@ -262,7 +262,7 @@
let collection =
pallet_common::eth::map_eth_to_id(&collection).ok_or("not a collection address")?;
let mut collection =
- <crate::CollectionHandle<T>>::new(collection).ok_or("collection not found")?;
+ <CollectionHandle<T>>::new(collection).ok_or("collection not found")?;
if !matches!(
collection.mode,
pallets/unique/src/lib.rsdiffbeforeafterboth--- a/pallets/unique/src/lib.rs
+++ b/pallets/unique/src/lib.rs
@@ -73,42 +73,44 @@
extern crate alloc;
-use frame_support::{
- decl_module, decl_storage, decl_error,
- dispatch::DispatchResult,
- ensure, fail,
- weights::{Weight},
- pallet_prelude::{DispatchResultWithPostInfo, ConstU32},
- BoundedVec,
-};
-use scale_info::TypeInfo;
-use frame_system::{self as system, ensure_signed, ensure_root};
-use sp_std::{vec, vec::Vec};
-use up_data_structs::{
- MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
- MAX_PROPERTIES_PER_ITEM, MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH,
- MAX_COLLECTION_PROPERTIES_SIZE, COLLECTION_ADMINS_LIMIT, MAX_TOKEN_PROPERTIES_SIZE,
- CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode, TokenId,
- CreateCollectionData, CreateItemExData, budget, Property, PropertyKey, PropertyKeyPermission,
-};
-use pallet_evm::account::CrossAccountId;
-use pallet_common::{
- CollectionHandle, Pallet as PalletCommon, CommonWeightInfo, dispatch::dispatch_tx,
- dispatch::CollectionDispatch, RefungibleExtensionsWeightInfo,
-};
+pub use pallet::*;
+use frame_support::pallet_prelude::*;
+use frame_system::pallet_prelude::*;
pub mod eth;
#[cfg(feature = "runtime-benchmarks")]
pub mod benchmarking;
pub mod weights;
-use weights::WeightInfo;
-/// A maximum number of levels of depth in the token nesting tree.
-pub const NESTING_BUDGET: u32 = 5;
+#[frame_support::pallet]
+pub mod pallet {
+ use super::*;
+
+ use frame_support::{dispatch::DispatchResult, ensure, fail, BoundedVec, storage::Key};
+ use scale_info::TypeInfo;
+ use frame_system::{ensure_signed, ensure_root};
+ use sp_std::{vec, vec::Vec};
+ use up_data_structs::{
+ MAX_COLLECTION_NAME_LENGTH, MAX_COLLECTION_DESCRIPTION_LENGTH, MAX_TOKEN_PREFIX_LENGTH,
+ MAX_PROPERTIES_PER_ITEM, MAX_PROPERTY_KEY_LENGTH, MAX_PROPERTY_VALUE_LENGTH,
+ MAX_COLLECTION_PROPERTIES_SIZE, COLLECTION_ADMINS_LIMIT, MAX_TOKEN_PROPERTIES_SIZE,
+ CreateItemData, CollectionLimits, CollectionPermissions, CollectionId, CollectionMode,
+ TokenId, CreateCollectionData, CreateItemExData, budget, Property, PropertyKey,
+ PropertyKeyPermission,
+ };
+ use pallet_evm::account::CrossAccountId;
+ use pallet_common::{
+ CollectionHandle, Pallet as PalletCommon, CommonWeightInfo, dispatch::dispatch_tx,
+ dispatch::CollectionDispatch, RefungibleExtensionsWeightInfo,
+ };
+ use weights::WeightInfo;
+
+ /// A maximum number of levels of depth in the token nesting tree.
+ pub const NESTING_BUDGET: u32 = 5;
-decl_error! {
/// Errors for the common Unique transactions.
- pub enum Error for Module<T: Config> {
+ #[pallet::error]
+ pub enum Error<T> {
/// Decimal_points parameter must be lower than [`up_data_structs::MAX_DECIMAL_POINTS`].
CollectionDecimalPointLimitExceeded,
/// Length of items properties must be greater than 0.
@@ -116,135 +118,219 @@
/// Repertition is only supported by refungible collection.
RepartitionCalledOnNonRefungibleCollection,
}
-}
-/// Configuration trait of this pallet.
-pub trait Config: system::Config + pallet_common::Config + Sized + TypeInfo {
- /// Weight information for extrinsics in this pallet.
- type WeightInfo: WeightInfo;
+ /// Configuration trait of this pallet.
+ #[pallet::config]
+ pub trait Config: frame_system::Config + pallet_common::Config + Sized + TypeInfo {
+ /// Weight information for extrinsics in this pallet.
+ type WeightInfo: WeightInfo;
- /// Weight information for common pallet operations.
- type CommonWeightInfo: CommonWeightInfo<Self::CrossAccountId>;
+ /// Weight information for common pallet operations.
+ type CommonWeightInfo: CommonWeightInfo<Self::CrossAccountId>;
- /// Weight info information for extra refungible pallet operations.
- type RefungibleExtensionsWeightInfo: RefungibleExtensionsWeightInfo;
-}
+ /// Weight info information for extra refungible pallet operations.
+ type RefungibleExtensionsWeightInfo: RefungibleExtensionsWeightInfo;
+ }
-type SelfWeightOf<T> = <T as Config>::WeightInfo;
+ #[pallet::pallet]
+ pub struct Pallet<T>(_);
-// # Used definitions
-//
-// ## User control levels
-//
-// chain-controlled - key is uncontrolled by user
-// i.e autoincrementing index
-// can use non-cryptographic hash
-// real - key is controlled by user
-// but it is hard to generate enough colliding values, i.e owner of signed txs
-// can use non-cryptographic hash
-// controlled - key is completly controlled by users
-// i.e maps with mutable keys
-// should use cryptographic hash
-//
-// ## User control level downgrade reasons
-//
-// ?1 - chain-controlled -> controlled
-// collections/tokens can be destroyed, resulting in massive holes
-// ?2 - chain-controlled -> controlled
-// same as ?1, but can be only added, resulting in easier exploitation
-// ?3 - real -> controlled
-// no confirmation required, so addresses can be easily generated
-decl_storage! {
- trait Store for Module<T: Config> as Unique {
+ pub type SelfWeightOf<T> = <T as Config>::WeightInfo;
- //#region Private members
- /// Used for migrations
- ChainVersion: u64;
- //#endregion
+ // # Used definitions
+ //
+ // ## User control levels
+ //
+ // chain-controlled - key is uncontrolled by user
+ // i.e autoincrementing index
+ // can use non-cryptographic hash
+ // real - key is controlled by user
+ // but it is hard to generate enough colliding values, i.e owner of signed txs
+ // can use non-cryptographic hash
+ // controlled - key is completly controlled by users
+ // i.e maps with mutable keys
+ // should use cryptographic hash
+ //
+ // ## User control level downgrade reasons
+ //
+ // ?1 - chain-controlled -> controlled
+ // collections/tokens can be destroyed, resulting in massive holes
+ // ?2 - chain-controlled -> controlled
+ // same as ?1, but can be only added, resulting in easier exploitation
+ // ?3 - real -> controlled
+ // no confirmation required, so addresses can be easily generated
- //#region Tokens transfer sponosoring rate limit baskets
- /// (Collection id (controlled?2), who created (real))
- /// TODO: Off chain worker should remove from this map when collection gets removed
- pub CreateItemBasket get(fn create_item_basket): map hasher(blake2_128_concat) (CollectionId, T::AccountId) => Option<T::BlockNumber>;
- /// Collection id (controlled?2), token id (controlled?2)
- pub NftTransferBasket get(fn nft_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
- /// Collection id (controlled?2), owning user (real)
- pub FungibleTransferBasket get(fn fungible_transfer_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;
- /// Collection id (controlled?2), token id (controlled?2)
- pub ReFungibleTransferBasket get(fn refungible_transfer_basket): nmap hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;
- //#endregion
+ //#region Private members
+ /// Used for migrations
+ #[pallet::storage]
+ pub type ChainVersion<T> = StorageValue<_, u64, ValueQuery>;
+ //#endregion
- /// Variable metadata sponsoring
- /// Collection id (controlled?2), token id (controlled?2)
- #[deprecated]
- pub VariableMetaDataBasket get(fn variable_meta_data_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
- /// Last sponsoring of token property setting // todo:doc rephrase this and the following
- pub TokenPropertyBasket get(fn token_property_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
+ //#region Tokens transfer sponosoring rate limit baskets
+ /// (Collection id (controlled?2), who created (real))
+ /// TODO: Off chain worker should remove from this map when collection gets removed
+ #[pallet::storage]
+ #[pallet::getter(fn create_item_busket)]
+ pub type CreateItemBasket<T: Config> = StorageMap<
+ Hasher = Blake2_128Concat,
+ Key = (CollectionId, T::AccountId),
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ /// Collection id (controlled?2), token id (controlled?2)
+ #[pallet::storage]
+ #[pallet::getter(fn nft_transfer_basket)]
+ pub type NftTransferBasket<T: Config> = StorageDoubleMap<
+ Hasher1 = Blake2_128Concat,
+ Key1 = CollectionId,
+ Hasher2 = Blake2_128Concat,
+ Key2 = TokenId,
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ /// Collection id (controlled?2), owning user (real)
+ #[pallet::storage]
+ #[pallet::getter(fn fungible_transfer_basket)]
+ pub type FungibleTransferBasket<T: Config> = StorageDoubleMap<
+ Hasher1 = Blake2_128Concat,
+ Key1 = CollectionId,
+ Hasher2 = Twox64Concat,
+ Key2 = T::AccountId,
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ /// Collection id (controlled?2), token id (controlled?2)
+ #[pallet::storage]
+ #[pallet::getter(fn refungible_transfer_basket)]
+ pub type ReFungibleTransferBasket<T: Config> = StorageNMap<
+ Key = (
+ Key<Blake2_128Concat, CollectionId>,
+ Key<Blake2_128Concat, TokenId>,
+ Key<Twox64Concat, T::AccountId>,
+ ),
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ //#endregion
- /// Last sponsoring of NFT approval in a collection
- pub NftApproveBasket get(fn nft_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId => Option<T::BlockNumber>;
- /// Last sponsoring of fungible tokens approval in a collection
- pub FungibleApproveBasket get(fn fungible_approve_basket): double_map hasher(blake2_128_concat) CollectionId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;
- /// Last sponsoring of RFT approval in a collection
- pub RefungibleApproveBasket get(fn refungible_approve_basket): nmap hasher(blake2_128_concat) CollectionId, hasher(blake2_128_concat) TokenId, hasher(twox_64_concat) T::AccountId => Option<T::BlockNumber>;
- }
-}
+ /// Last sponsoring of token property setting // todo:doc rephrase this and the following
+ #[pallet::storage]
+ #[pallet::getter(fn token_property_basket)]
+ pub type TokenPropertyBasket<T: Config> = StorageDoubleMap<
+ Hasher1 = Blake2_128Concat,
+ Key1 = CollectionId,
+ Hasher2 = Blake2_128Concat,
+ Key2 = TokenId,
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
-decl_module! {
- /// Type alias to Pallet, to be used by construct_runtime.
- pub struct Module<T: Config> for enum Call
- where
- origin: T::RuntimeOrigin
- {
- type Error = Error<T>;
+ /// Last sponsoring of NFT approval in a collection
+ #[pallet::storage]
+ #[pallet::getter(fn nft_approve_basket)]
+ pub type NftApproveBasket<T: Config> = StorageDoubleMap<
+ Hasher1 = Blake2_128Concat,
+ Key1 = CollectionId,
+ Hasher2 = Blake2_128Concat,
+ Key2 = TokenId,
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ /// Last sponsoring of fungible tokens approval in a collection
+ #[pallet::storage]
+ #[pallet::getter(fn fungible_approve_basket)]
+ pub type FungibleApproveBasket<T: Config> = StorageDoubleMap<
+ Hasher1 = Blake2_128Concat,
+ Key1 = CollectionId,
+ Hasher2 = Twox64Concat,
+ Key2 = T::AccountId,
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
+ /// Last sponsoring of RFT approval in a collection
+ #[pallet::storage]
+ #[pallet::getter(fn refungible_approve_basket)]
+ pub type RefungibleApproveBasket<T: Config> = StorageNMap<
+ Key = (
+ Key<Blake2_128Concat, CollectionId>,
+ Key<Blake2_128Concat, TokenId>,
+ Key<Twox64Concat, T::AccountId>,
+ ),
+ Value = T::BlockNumber,
+ QueryKind = OptionQuery,
+ >;
- #[doc = "A maximum number of levels of depth in the token nesting tree."]
- const NESTING_BUDGET: u32 = NESTING_BUDGET;
+ #[pallet::extra_constants]
+ impl<T: Config> Pallet<T> {
+ /// A maximum number of levels of depth in the token nesting tree.
+ fn nesting_budget() -> u32 {
+ NESTING_BUDGET
+ }
- #[doc = "Maximal length of a collection name."]
- const MAX_COLLECTION_NAME_LENGTH: u32 = MAX_COLLECTION_NAME_LENGTH;
+ /// Maximal length of a collection name.
+ fn max_collection_name_length() -> u32 {
+ MAX_COLLECTION_NAME_LENGTH
+ }
- #[doc = "Maximal length of a collection description."]
- const MAX_COLLECTION_DESCRIPTION_LENGTH: u32 = MAX_COLLECTION_DESCRIPTION_LENGTH;
+ /// Maximal length of a collection description.
+ fn max_collection_description_length() -> u32 {
+ MAX_COLLECTION_DESCRIPTION_LENGTH
+ }
- #[doc = "Maximal length of a token prefix."]
- const MAX_TOKEN_PREFIX_LENGTH: u32 = MAX_TOKEN_PREFIX_LENGTH;
+ /// Maximal length of a token prefix.
+ fn max_token_prefix_length() -> u32 {
+ MAX_TOKEN_PREFIX_LENGTH
+ }
- #[doc = "Maximum admins per collection."]
- const COLLECTION_ADMINS_LIMIT: u32 = COLLECTION_ADMINS_LIMIT;
+ /// Maximum admins per collection.
+ fn collection_admins_limit() -> u32 {
+ COLLECTION_ADMINS_LIMIT
+ }
- #[doc = "Maximal length of a property key."]
- const MAX_PROPERTY_KEY_LENGTH: u32 = MAX_PROPERTY_KEY_LENGTH;
-
- #[doc = "Maximal length of a property value."]
- const MAX_PROPERTY_VALUE_LENGTH: u32 = MAX_PROPERTY_VALUE_LENGTH;
-
- #[doc = "A maximum number of token properties."]
- const MAX_PROPERTIES_PER_ITEM: u32 = MAX_PROPERTIES_PER_ITEM;
+ /// Maximal length of a property key.
+ fn max_property_key_length() -> u32 {
+ MAX_PROPERTY_KEY_LENGTH
+ }
- #[doc = "Maximum size for all collection properties."]
- const MAX_COLLECTION_PROPERTIES_SIZE: u32 = MAX_COLLECTION_PROPERTIES_SIZE;
+ /// Maximal length of a property value.
+ fn max_property_value_length() -> u32 {
+ MAX_PROPERTY_VALUE_LENGTH
+ }
- #[doc = "Maximum size of all token properties."]
- const MAX_TOKEN_PROPERTIES_SIZE: u32 = MAX_TOKEN_PROPERTIES_SIZE;
+ /// A maximum number of token properties.
+ fn max_properties_per_item() -> u32 {
+ MAX_PROPERTIES_PER_ITEM
+ }
- #[doc = "Default NFT collection limit."]
- const NFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::NFT);
+ /// Maximum size for all collection properties.
+ fn max_collection_properties_size() -> u32 {
+ MAX_COLLECTION_PROPERTIES_SIZE
+ }
- #[doc = "Default RFT collection limit."]
- const RFT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::ReFungible);
+ /// Maximum size of all token properties.
+ fn max_token_properties_size() -> u32 {
+ MAX_TOKEN_PROPERTIES_SIZE
+ }
- #[doc = "Default FT collection limit."]
- const FT_DEFAULT_COLLECTION_LIMITS: CollectionLimits = CollectionLimits::with_default_limits(CollectionMode::Fungible(0));
+ /// Default NFT collection limit.
+ fn nft_default_collection_limits() -> CollectionLimits {
+ CollectionLimits::with_default_limits(CollectionMode::NFT)
+ }
- fn on_initialize(_now: T::BlockNumber) -> Weight {
- Weight::zero()
+ /// Default RFT collection limit.
+ fn rft_default_collection_limits() -> CollectionLimits {
+ CollectionLimits::with_default_limits(CollectionMode::ReFungible)
}
- fn on_runtime_upgrade() -> Weight {
- Weight::zero()
+ /// Default FT collection limit.
+ fn ft_default_collection_limits() -> CollectionLimits {
+ CollectionLimits::with_default_limits(CollectionMode::Fungible(0))
}
+ }
+ /// Type alias to Pallet, to be used by construct_runtime.
+ #[pallet::call]
+ impl<T: Config> Pallet<T> {
/// Create a collection of tokens.
///
/// Each Token may have multiple properties encoded as an array of bytes
@@ -270,13 +356,14 @@
/// returns collection ID
///
/// Deprecated: `create_collection_ex` is more up-to-date and advanced, prefer it instead.
- #[weight = <SelfWeightOf<T>>::create_collection()]
- fn create_collection(
- origin,
+ #[pallet::call_index(0)]
+ #[pallet::weight(<SelfWeightOf<T>>::create_collection())]
+ pub fn create_collection(
+ origin: OriginFor<T>,
collection_name: BoundedVec<u16, ConstU32<MAX_COLLECTION_NAME_LENGTH>>,
collection_description: BoundedVec<u16, ConstU32<MAX_COLLECTION_DESCRIPTION_LENGTH>>,
token_prefix: BoundedVec<u8, ConstU32<MAX_TOKEN_PREFIX_LENGTH>>,
- mode: CollectionMode
+ mode: CollectionMode,
) -> DispatchResult {
let data: CreateCollectionData<T::AccountId> = CreateCollectionData {
name: collection_name,
@@ -299,13 +386,18 @@
/// # Arguments
///
/// * `data`: Explicit data of a collection used for its creation.
- #[weight = <SelfWeightOf<T>>::create_collection()]
- pub fn create_collection_ex(origin, data: CreateCollectionData<T::AccountId>) -> DispatchResult {
+ #[pallet::call_index(1)]
+ #[pallet::weight(<SelfWeightOf<T>>::create_collection())]
+ pub fn create_collection_ex(
+ origin: OriginFor<T>,
+ data: CreateCollectionData<T::AccountId>,
+ ) -> DispatchResult {
let sender = ensure_signed(origin)?;
// =========
let sender = T::CrossAccountId::from_sub(sender);
- let _id = T::CollectionDispatch::create(sender.clone(), sender, data, Default::default())?;
+ let _id =
+ T::CollectionDispatch::create(sender.clone(), sender, data, Default::default())?;
Ok(())
}
@@ -319,8 +411,12 @@
/// # Arguments
///
/// * `collection_id`: Collection to destroy.
- #[weight = <SelfWeightOf<T>>::destroy_collection()]
- pub fn destroy_collection(origin, collection_id: CollectionId) -> DispatchResult {
+ #[pallet::call_index(2)]
+ #[pallet::weight(<SelfWeightOf<T>>::destroy_collection())]
+ pub fn destroy_collection(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
Self::destroy_collection_internal(sender, collection_id)
@@ -337,19 +433,18 @@
///
/// * `collection_id`: ID of the modified collection.
/// * `address`: ID of the address to be added to the allowlist.
- #[weight = <SelfWeightOf<T>>::add_to_allow_list()]
- pub fn add_to_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
-
+ #[pallet::call_index(3)]
+ #[pallet::weight(<SelfWeightOf<T>>::add_to_allow_list())]
+ pub fn add_to_allow_list(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ address: T::CrossAccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
collection.check_is_internal()?;
- <PalletCommon<T>>::toggle_allowlist(
- &collection,
- &sender,
- &address,
- true,
- )?;
+ <PalletCommon<T>>::toggle_allowlist(&collection, &sender, &address, true)?;
Ok(())
}
@@ -365,19 +460,18 @@
///
/// * `collection_id`: ID of the modified collection.
/// * `address`: ID of the address to be removed from the allowlist.
- #[weight = <SelfWeightOf<T>>::remove_from_allow_list()]
- pub fn remove_from_allow_list(origin, collection_id: CollectionId, address: T::CrossAccountId) -> DispatchResult{
-
+ #[pallet::call_index(4)]
+ #[pallet::weight(<SelfWeightOf<T>>::remove_from_allow_list())]
+ pub fn remove_from_allow_list(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ address: T::CrossAccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
collection.check_is_internal()?;
- <PalletCommon<T>>::toggle_allowlist(
- &collection,
- &sender,
- &address,
- false,
- )?;
+ <PalletCommon<T>>::toggle_allowlist(&collection, &sender, &address, false)?;
Ok(())
}
@@ -392,8 +486,13 @@
///
/// * `collection_id`: ID of the modified collection.
/// * `new_owner`: ID of the account that will become the owner.
- #[weight = <SelfWeightOf<T>>::change_collection_owner()]
- pub fn change_collection_owner(origin, collection_id: CollectionId, new_owner: T::AccountId) -> DispatchResult {
+ #[pallet::call_index(5)]
+ #[pallet::weight(<SelfWeightOf<T>>::change_collection_owner())]
+ pub fn change_collection_owner(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ new_owner: T::AccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let new_owner = T::CrossAccountId::from_sub(new_owner);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
@@ -416,8 +515,13 @@
///
/// * `collection_id`: ID of the Collection to add an admin for.
/// * `new_admin`: Address of new admin to add.
- #[weight = <SelfWeightOf<T>>::add_collection_admin()]
- pub fn add_collection_admin(origin, collection_id: CollectionId, new_admin_id: T::CrossAccountId) -> DispatchResult {
+ #[pallet::call_index(6)]
+ #[pallet::weight(<SelfWeightOf<T>>::add_collection_admin())]
+ pub fn add_collection_admin(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ new_admin_id: T::CrossAccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
<PalletCommon<T>>::toggle_admin(&collection, &sender, &new_admin_id, true)
@@ -437,8 +541,13 @@
///
/// * `collection_id`: ID of the collection to remove the admin for.
/// * `account_id`: Address of the admin to remove.
- #[weight = <SelfWeightOf<T>>::remove_collection_admin()]
- pub fn remove_collection_admin(origin, collection_id: CollectionId, account_id: T::CrossAccountId) -> DispatchResult {
+ #[pallet::call_index(7)]
+ #[pallet::weight(<SelfWeightOf<T>>::remove_collection_admin())]
+ pub fn remove_collection_admin(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ account_id: T::CrossAccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let collection = <CollectionHandle<T>>::try_get(collection_id)?;
<PalletCommon<T>>::toggle_admin(&collection, &sender, &account_id, false)
@@ -457,8 +566,13 @@
///
/// * `collection_id`: ID of the modified collection.
/// * `new_sponsor`: ID of the account of the sponsor-to-be.
- #[weight = <SelfWeightOf<T>>::set_collection_sponsor()]
- pub fn set_collection_sponsor(origin, collection_id: CollectionId, new_sponsor: T::AccountId) -> DispatchResult {
+ #[pallet::call_index(8)]
+ #[pallet::weight(<SelfWeightOf<T>>::set_collection_sponsor())]
+ pub fn set_collection_sponsor(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ new_sponsor: T::AccountId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.set_sponsor(&sender, new_sponsor.clone())
@@ -477,8 +591,12 @@
/// # Arguments
///
/// * `collection_id`: ID of the collection with the pending sponsor.
- #[weight = <SelfWeightOf<T>>::confirm_sponsorship()]
- pub fn confirm_sponsorship(origin, collection_id: CollectionId) -> DispatchResult {
+ #[pallet::call_index(9)]
+ #[pallet::weight(<SelfWeightOf<T>>::confirm_sponsorship())]
+ pub fn confirm_sponsorship(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ ) -> DispatchResult {
let sender = ensure_signed(origin)?;
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.confirm_sponsorship(&sender)
@@ -493,8 +611,12 @@
/// # Arguments
///
/// * `collection_id`: ID of the collection with the sponsor to remove.
- #[weight = <SelfWeightOf<T>>::remove_collection_sponsor()]
- pub fn remove_collection_sponsor(origin, collection_id: CollectionId) -> DispatchResult {
+ #[pallet::call_index(10)]
+ #[pallet::weight(<SelfWeightOf<T>>::remove_collection_sponsor())]
+ pub fn remove_collection_sponsor(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.remove_sponsor(&sender)
@@ -518,12 +640,20 @@
/// * `collection_id`: ID of the collection to which an item would belong.
/// * `owner`: Address of the initial owner of the item.
/// * `data`: Token data describing the item to store on chain.
- #[weight = T::CommonWeightInfo::create_item(&data)]
- pub fn create_item(origin, collection_id: CollectionId, owner: T::CrossAccountId, data: CreateItemData) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(11)]
+ #[pallet::weight(T::CommonWeightInfo::create_item(&data))]
+ pub fn create_item(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ owner: T::CrossAccountId,
+ data: CreateItemData,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.create_item(sender, owner, data, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.create_item(sender, owner, data, &budget)
+ })
}
/// Create multiple items within a collection.
@@ -544,13 +674,21 @@
/// * `collection_id`: ID of the collection to which the tokens would belong.
/// * `owner`: Address of the initial owner of the tokens.
/// * `items_data`: Vector of data describing each item to be created.
- #[weight = T::CommonWeightInfo::create_multiple_items(&items_data)]
- pub fn create_multiple_items(origin, collection_id: CollectionId, owner: T::CrossAccountId, items_data: Vec<CreateItemData>) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(12)]
+ #[pallet::weight(T::CommonWeightInfo::create_multiple_items(&items_data))]
+ pub fn create_multiple_items(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ owner: T::CrossAccountId,
+ items_data: Vec<CreateItemData>,
+ ) -> DispatchResultWithPostInfo {
ensure!(!items_data.is_empty(), Error::<T>::EmptyArgument);
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items(sender, owner, items_data, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.create_multiple_items(sender, owner, items_data, &budget)
+ })
}
/// Add or change collection properties.
@@ -565,17 +703,20 @@
/// * `collection_id`: ID of the modified collection.
/// * `properties`: Vector of key-value pairs stored as the collection's metadata.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
- #[weight = T::CommonWeightInfo::set_collection_properties(properties.len() as u32)]
+ #[pallet::call_index(13)]
+ #[pallet::weight(T::CommonWeightInfo::set_collection_properties(properties.len() as u32))]
pub fn set_collection_properties(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
- properties: Vec<Property>
+ properties: Vec<Property>,
) -> DispatchResultWithPostInfo {
ensure!(!properties.is_empty(), Error::<T>::EmptyArgument);
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_tx::<T, _>(collection_id, |d| d.set_collection_properties(sender, properties))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.set_collection_properties(sender, properties)
+ })
}
/// Delete specified collection properties.
@@ -590,9 +731,10 @@
/// * `collection_id`: ID of the modified collection.
/// * `property_keys`: Vector of keys of the properties to be deleted.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
- #[weight = T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32)]
+ #[pallet::call_index(14)]
+ #[pallet::weight(T::CommonWeightInfo::delete_collection_properties(property_keys.len() as u32))]
pub fn delete_collection_properties(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
property_keys: Vec<PropertyKey>,
) -> DispatchResultWithPostInfo {
@@ -600,7 +742,9 @@
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_tx::<T, _>(collection_id, |d| d.delete_collection_properties(&sender, property_keys))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.delete_collection_properties(&sender, property_keys)
+ })
}
/// Add or change token properties according to collection's permissions.
@@ -621,19 +765,22 @@
/// * `token_id`: ID of the modified token.
/// * `properties`: Vector of key-value pairs stored as the token's metadata.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
- #[weight = T::CommonWeightInfo::set_token_properties(properties.len() as u32)]
+ #[pallet::call_index(15)]
+ #[pallet::weight(T::CommonWeightInfo::set_token_properties(properties.len() as u32))]
pub fn set_token_properties(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
token_id: TokenId,
- properties: Vec<Property>
+ properties: Vec<Property>,
) -> DispatchResultWithPostInfo {
ensure!(!properties.is_empty(), Error::<T>::EmptyArgument);
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.set_token_properties(sender, token_id, properties, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.set_token_properties(sender, token_id, properties, &budget)
+ })
}
/// Delete specified token properties. Currently properties only work with NFTs.
@@ -651,19 +798,22 @@
/// * `token_id`: ID of the modified token.
/// * `property_keys`: Vector of keys of the properties to be deleted.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
- #[weight = T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32)]
+ #[pallet::call_index(16)]
+ #[pallet::weight(T::CommonWeightInfo::delete_token_properties(property_keys.len() as u32))]
pub fn delete_token_properties(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
token_id: TokenId,
- property_keys: Vec<PropertyKey>
+ property_keys: Vec<PropertyKey>,
) -> DispatchResultWithPostInfo {
ensure!(!property_keys.is_empty(), Error::<T>::EmptyArgument);
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.delete_token_properties(sender, token_id, property_keys, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.delete_token_properties(sender, token_id, property_keys, &budget)
+ })
}
/// Add or change token property permissions of a collection.
@@ -681,9 +831,10 @@
/// * `collection_id`: ID of the modified collection.
/// * `property_permissions`: Vector of permissions for property keys.
/// Keys support Latin letters, `-`, `_`, and `.` as symbols.
- #[weight = T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32)]
+ #[pallet::call_index(17)]
+ #[pallet::weight(T::CommonWeightInfo::set_token_property_permissions(property_permissions.len() as u32))]
pub fn set_token_property_permissions(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
property_permissions: Vec<PropertyKeyPermission>,
) -> DispatchResultWithPostInfo {
@@ -691,7 +842,9 @@
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_tx::<T, _>(collection_id, |d| d.set_token_property_permissions(&sender, property_permissions))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.set_token_property_permissions(&sender, property_permissions)
+ })
}
/// Create multiple items within a collection with explicitly specified initial parameters.
@@ -709,12 +862,19 @@
///
/// * `collection_id`: ID of the collection to which the tokens would belong.
/// * `data`: Explicit item creation data.
- #[weight = T::CommonWeightInfo::create_multiple_items_ex(&data)]
- pub fn create_multiple_items_ex(origin, collection_id: CollectionId, data: CreateItemExData<T::CrossAccountId>) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(18)]
+ #[pallet::weight(T::CommonWeightInfo::create_multiple_items_ex(&data))]
+ pub fn create_multiple_items_ex(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ data: CreateItemExData<T::CrossAccountId>,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.create_multiple_items_ex(sender, data, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.create_multiple_items_ex(sender, data, &budget)
+ })
}
/// Completely allow or disallow transfers for a particular collection.
@@ -727,8 +887,13 @@
///
/// * `collection_id`: ID of the collection.
/// * `value`: New value of the flag, are transfers allowed?
- #[weight = <SelfWeightOf<T>>::set_transfers_enabled_flag()]
- pub fn set_transfers_enabled_flag(origin, collection_id: CollectionId, value: bool) -> DispatchResult {
+ #[pallet::call_index(19)]
+ #[pallet::weight(<SelfWeightOf<T>>::set_transfers_enabled_flag())]
+ pub fn set_transfers_enabled_flag(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ value: bool,
+ ) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
target_collection.check_is_internal()?;
@@ -756,11 +921,18 @@
/// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
/// * Fungible Mode: The desired number of pieces to burn.
/// * Re-Fungible Mode: The desired number of pieces to burn.
- #[weight = T::CommonWeightInfo::burn_item()]
- pub fn burn_item(origin, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(20)]
+ #[pallet::weight(T::CommonWeightInfo::burn_item())]
+ pub fn burn_item(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ item_id: TokenId,
+ value: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- let post_info = dispatch_tx::<T, _>(collection_id, |d| d.burn_item(sender, item_id, value))?;
+ let post_info =
+ dispatch_tx::<T, _>(collection_id, |d| d.burn_item(sender, item_id, value))?;
if value == 1 {
<NftTransferBasket<T>>::remove(collection_id, item_id);
<NftApproveBasket<T>>::remove(collection_id, item_id);
@@ -794,12 +966,21 @@
/// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
/// * Fungible Mode: The desired number of pieces to burn.
/// * Re-Fungible Mode: The desired number of pieces to burn.
- #[weight = T::CommonWeightInfo::burn_from()]
- pub fn burn_from(origin, collection_id: CollectionId, from: T::CrossAccountId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(21)]
+ #[pallet::weight(T::CommonWeightInfo::burn_from())]
+ pub fn burn_from(
+ origin: OriginFor<T>,
+ collection_id: CollectionId,
+ from: T::CrossAccountId,
+ item_id: TokenId,
+ value: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.burn_from(sender, from, item_id, value, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.burn_from(sender, from, item_id, value, &budget)
+ })
}
/// Change ownership of the token.
@@ -823,12 +1004,21 @@
/// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
/// * Fungible Mode: The desired number of pieces to transfer.
/// * Re-Fungible Mode: The desired number of pieces to transfer.
- #[weight = T::CommonWeightInfo::transfer()]
- pub fn transfer(origin, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(22)]
+ #[pallet::weight(T::CommonWeightInfo::transfer())]
+ pub fn transfer(
+ origin: OriginFor<T>,
+ recipient: T::CrossAccountId,
+ collection_id: CollectionId,
+ item_id: TokenId,
+ value: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.transfer(sender, recipient, item_id, value, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.transfer(sender, recipient, item_id, value, &budget)
+ })
}
/// Allow a non-permissioned address to transfer or burn an item.
@@ -846,11 +1036,20 @@
/// * `item_id`: ID of the item transactions on which are now approved.
/// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
/// Set to 0 to revoke the approval.
- #[weight = T::CommonWeightInfo::approve()]
- pub fn approve(origin, spender: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(23)]
+ #[pallet::weight(T::CommonWeightInfo::approve())]
+ pub fn approve(
+ origin: OriginFor<T>,
+ spender: T::CrossAccountId,
+ collection_id: CollectionId,
+ item_id: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_tx::<T, _>(collection_id, |d| d.approve(sender, spender, item_id, amount))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.approve(sender, spender, item_id, amount)
+ })
}
/// Allow a non-permissioned address to transfer or burn an item from owner's eth mirror.
@@ -869,11 +1068,21 @@
/// * `item_id`: ID of the item transactions on which are now approved.
/// * `amount`: Number of pieces of the item approved for a transaction (maximum of 1 for NFTs).
/// Set to 0 to revoke the approval.
- #[weight = T::CommonWeightInfo::approve_from()]
- pub fn approve_from(origin, from:T::CrossAccountId, to: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, amount: u128) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(24)]
+ #[pallet::weight(T::CommonWeightInfo::approve_from())]
+ pub fn approve_from(
+ origin: OriginFor<T>,
+ from: T::CrossAccountId,
+ to: T::CrossAccountId,
+ collection_id: CollectionId,
+ item_id: TokenId,
+ amount: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
- dispatch_tx::<T, _>(collection_id, |d| d.approve_from(sender, from, to, item_id, amount))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.approve_from(sender, from, to, item_id, amount)
+ })
}
/// Change ownership of an item on behalf of the owner as a non-owner account.
@@ -900,12 +1109,22 @@
/// * Non-Fungible Mode: An NFT is indivisible, there is always 1 corresponding to an ID.
/// * Fungible Mode: The desired number of pieces to transfer.
/// * Re-Fungible Mode: The desired number of pieces to transfer.
- #[weight = T::CommonWeightInfo::transfer_from()]
- pub fn transfer_from(origin, from: T::CrossAccountId, recipient: T::CrossAccountId, collection_id: CollectionId, item_id: TokenId, value: u128 ) -> DispatchResultWithPostInfo {
+ #[pallet::call_index(25)]
+ #[pallet::weight(T::CommonWeightInfo::transfer_from())]
+ pub fn transfer_from(
+ origin: OriginFor<T>,
+ from: T::CrossAccountId,
+ recipient: T::CrossAccountId,
+ collection_id: CollectionId,
+ item_id: TokenId,
+ value: u128,
+ ) -> DispatchResultWithPostInfo {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let budget = budget::Value::new(NESTING_BUDGET);
- dispatch_tx::<T, _>(collection_id, |d| d.transfer_from(sender, from, recipient, item_id, value, &budget))
+ dispatch_tx::<T, _>(collection_id, |d| {
+ d.transfer_from(sender, from, recipient, item_id, value, &budget)
+ })
}
/// Set specific limits of a collection. Empty, or None fields mean chain default.
@@ -920,9 +1139,10 @@
/// * `collection_id`: ID of the modified collection.
/// * `new_limit`: New limits of the collection. Fields that are not set (None)
/// will not overwrite the old ones.
- #[weight = <SelfWeightOf<T>>::set_collection_limits()]
+ #[pallet::call_index(26)]
+ #[pallet::weight(<SelfWeightOf<T>>::set_collection_limits())]
pub fn set_collection_limits(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
new_limit: CollectionLimits,
) -> DispatchResult {
@@ -943,19 +1163,16 @@
/// * `collection_id`: ID of the modified collection.
/// * `new_permission`: New permissions of the collection. Fields that are not set (None)
/// will not overwrite the old ones.
- #[weight = <SelfWeightOf<T>>::set_collection_limits()]
+ #[pallet::call_index(27)]
+ #[pallet::weight(<SelfWeightOf<T>>::set_collection_limits())]
pub fn set_collection_permissions(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
new_permission: CollectionPermissions,
) -> DispatchResult {
let sender = T::CrossAccountId::from_sub(ensure_signed(origin)?);
let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
- <PalletCommon<T>>::update_permissions(
- &sender,
- &mut target_collection,
- new_permission
- )
+ <PalletCommon<T>>::update_permissions(&sender, &mut target_collection, new_permission)
}
/// Re-partition a refungible token, while owning all of its parts/pieces.
@@ -969,9 +1186,10 @@
/// * `collection_id`: ID of the collection the RFT belongs to.
/// * `token_id`: ID of the RFT.
/// * `amount`: New number of parts/pieces into which the token shall be partitioned.
- #[weight = T::RefungibleExtensionsWeightInfo::repartition()]
+ #[pallet::call_index(28)]
+ #[pallet::weight(T::RefungibleExtensionsWeightInfo::repartition())]
pub fn repartition(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
token_id: TokenId,
amount: u128,
@@ -995,9 +1213,10 @@
/// * `owner`: Token owner
/// * `operator`: Operator
/// * `approve`: Should operator status be granted or revoked?
- #[weight = T::CommonWeightInfo::set_allowance_for_all()]
+ #[pallet::call_index(29)]
+ #[pallet::weight(T::CommonWeightInfo::set_allowance_for_all())]
pub fn set_allowance_for_all(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
operator: T::CrossAccountId,
approve: bool,
@@ -1013,9 +1232,10 @@
/// # Arguments
///
/// * `collection_id`: ID of the collection to repair.
- #[weight = <SelfWeightOf<T>>::force_repair_collection()]
+ #[pallet::call_index(30)]
+ #[pallet::weight(<SelfWeightOf<T>>::force_repair_collection())]
pub fn force_repair_collection(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
) -> DispatchResult {
ensure_root(origin)?;
@@ -1028,69 +1248,71 @@
///
/// * `collection_id`: ID of the collection the item belongs to.
/// * `item_id`: ID of the item.
- #[weight = T::CommonWeightInfo::force_repair_item()]
+ #[pallet::call_index(31)]
+ #[pallet::weight(T::CommonWeightInfo::force_repair_item())]
pub fn force_repair_item(
- origin,
+ origin: OriginFor<T>,
collection_id: CollectionId,
item_id: TokenId,
) -> DispatchResultWithPostInfo {
ensure_root(origin)?;
- dispatch_tx::<T, _>(collection_id, |d| {
- d.repair_item(item_id)
- })
+ dispatch_tx::<T, _>(collection_id, |d| d.repair_item(item_id))
}
}
-}
-impl<T: Config> Pallet<T> {
- /// Force set `sponsor` for `collection`.
- ///
- /// Differs from [`set_collection_sponsor`][`Pallet::set_collection_sponsor`] in that confirmation
- /// from the `sponsor` is not required.
- ///
- /// # Arguments
- ///
- /// * `sponsor`: ID of the account of the sponsor-to-be.
- /// * `collection_id`: ID of the modified collection.
- pub fn force_set_sponsor(sponsor: T::AccountId, collection_id: CollectionId) -> DispatchResult {
- let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
- target_collection.force_set_sponsor(sponsor.clone())
- }
+ impl<T: Config> Pallet<T> {
+ /// Force set `sponsor` for `collection`.
+ ///
+ /// Differs from [`set_collection_sponsor`][`Pallet::set_collection_sponsor`] in that confirmation
+ /// from the `sponsor` is not required.
+ ///
+ /// # Arguments
+ ///
+ /// * `sponsor`: ID of the account of the sponsor-to-be.
+ /// * `collection_id`: ID of the modified collection.
+ pub fn force_set_sponsor(
+ sponsor: T::AccountId,
+ collection_id: CollectionId,
+ ) -> DispatchResult {
+ let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
+ target_collection.force_set_sponsor(sponsor.clone())
+ }
- /// Force remove `sponsor` for `collection`.
- ///
- /// Differs from `remove_sponsor` in that
- /// it doesn't require consent from the `owner` of the collection.
- ///
- /// # Arguments
- ///
- /// * `collection_id`: ID of the modified collection.
- pub fn force_remove_collection_sponsor(collection_id: CollectionId) -> DispatchResult {
- let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
- target_collection.force_remove_sponsor()
- }
+ /// Force remove `sponsor` for `collection`.
+ ///
+ /// Differs from `remove_sponsor` in that
+ /// it doesn't require consent from the `owner` of the collection.
+ ///
+ /// # Arguments
+ ///
+ /// * `collection_id`: ID of the modified collection.
+ pub fn force_remove_collection_sponsor(collection_id: CollectionId) -> DispatchResult {
+ let mut target_collection = <CollectionHandle<T>>::try_get(collection_id)?;
+ target_collection.force_remove_sponsor()
+ }
- #[inline(always)]
- pub(crate) fn destroy_collection_internal(
- sender: T::CrossAccountId,
- collection_id: CollectionId,
- ) -> DispatchResult {
- let collection = <CollectionHandle<T>>::try_get(collection_id)?;
- collection.check_is_internal()?;
+ #[inline(always)]
+ pub(crate) fn destroy_collection_internal(
+ sender: T::CrossAccountId,
+ collection_id: CollectionId,
+ ) -> DispatchResult {
+ let collection = <CollectionHandle<T>>::try_get(collection_id)?;
+ collection.check_is_internal()?;
- T::CollectionDispatch::destroy(sender, collection)?;
+ T::CollectionDispatch::destroy(sender, collection)?;
- // TODO: basket cleanup should be moved elsewhere
- // Maybe runtime dispatch.rs should perform it?
+ // TODO: basket cleanup should be moved elsewhere
+ // Maybe runtime dispatch.rs should perform it?
- let _ = <NftTransferBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
- let _ = <FungibleTransferBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
- let _ = <ReFungibleTransferBasket<T>>::clear_prefix((collection_id,), u32::MAX, None);
+ let _ = <NftTransferBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
+ let _ = <FungibleTransferBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
+ let _ = <ReFungibleTransferBasket<T>>::clear_prefix((collection_id,), u32::MAX, None);
- let _ = <NftApproveBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
- let _ = <FungibleApproveBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
- let _ = <RefungibleApproveBasket<T>>::clear_prefix((collection_id,), u32::MAX, None);
+ let _ = <NftApproveBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
+ let _ = <FungibleApproveBasket<T>>::clear_prefix(collection_id, u32::MAX, None);
+ let _ = <RefungibleApproveBasket<T>>::clear_prefix((collection_id,), u32::MAX, None);
- Ok(())
+ Ok(())
+ }
}
}
primitives/common/src/constants.rsdiffbeforeafterboth--- a/primitives/common/src/constants.rs
+++ b/primitives/common/src/constants.rs
@@ -64,9 +64,10 @@
/// by Operational extrinsics.
pub const NORMAL_DISPATCH_RATIO: Perbill = Perbill::from_percent(75);
/// We allow for 2 seconds of compute with a 6 second average block time.
-pub const MAXIMUM_BLOCK_WEIGHT: Weight =
- Weight::from_ref_time(WEIGHT_REF_TIME_PER_SECOND.saturating_div(2))
- .set_proof_size(MAX_POV_SIZE as u64);
+pub const MAXIMUM_BLOCK_WEIGHT: Weight = Weight::from_parts(
+ WEIGHT_REF_TIME_PER_SECOND.saturating_div(2),
+ MAX_POV_SIZE as u64,
+);
parameter_types! {
pub const TransactionByteFee: Balance = 501 * MICROUNIQUE / 2;
runtime/common/config/ethereum.rsdiffbeforeafterboth--- a/runtime/common/config/ethereum.rs
+++ b/runtime/common/config/ethereum.rs
@@ -28,7 +28,7 @@
pub const GasPerSecond: u64 = WritesPerSecond::get() * 20000;
pub const WeightTimePerGas: u64 = WEIGHT_REF_TIME_PER_SECOND / GasPerSecond::get();
- pub const WeightPerGas: Weight = Weight::from_ref_time(WeightTimePerGas::get());
+ pub const WeightPerGas: Weight = Weight::from_parts(WeightTimePerGas::get(), 0);
}
/// Limiting EVM execution to 50% of block for substrate users and management tasks
@@ -56,8 +56,8 @@
impl pallet_evm::Config for Runtime {
type CrossAccountId = CrossAccountId;
- type EvmAddressMapping = pallet_evm::HashedAddressMapping<Self::Hashing>;
- type EvmBackwardsAddressMapping = fp_evm_mapping::MapBackwardsAddressTruncated;
+ type AddressMapping = HashedAddressMapping<Self::Hashing>;
+ type BackwardsAddressMapping = HashedAddressMapping<Self::Hashing>;
type BlockGasLimit = BlockGasLimit;
type FeeCalculator = pallet_configuration::FeeCalculator<Self>;
type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
@@ -65,7 +65,6 @@
type BlockHashMapping = pallet_ethereum::EthereumBlockHashMapping<Self>;
type CallOrigin = EnsureAddressTruncated<Self>;
type WithdrawOrigin = EnsureAddressTruncated<Self>;
- type AddressMapping = HashedAddressMapping<Self::Hashing>;
type PrecompilesType = UniquePrecompiles<Self>;
type PrecompilesValue = PrecompilesValue;
type Currency = Balances;
runtime/common/mod.rsdiffbeforeafterboth--- a/runtime/common/mod.rs
+++ b/runtime/common/mod.rs
@@ -27,6 +27,7 @@
pub mod scheduler;
pub mod sponsoring;
+#[allow(missing_docs)]
pub mod weights;
#[cfg(test)]
@@ -152,7 +153,7 @@
}
#[cfg(feature = "runtime-benchmarks")]
fn set_block_number(block: Self::BlockNumber) {
- cumulus_pallet_parachain_system::RelaychainBlockNumberProvider::<T>::set_block_number(block)
+ cumulus_pallet_parachain_system::RelaychainDataProvider::<T>::set_block_number(block)
}
}
runtime/common/sponsoring.rsdiffbeforeafterboth--- a/runtime/common/sponsoring.rs
+++ b/runtime/common/sponsoring.rs
@@ -18,7 +18,6 @@
use up_sponsorship::SponsorshipHandler;
use frame_support::{
traits::{IsSubType},
- storage::{StorageMap, StorageDoubleMap, StorageNMap},
};
use up_data_structs::{
CollectionId, FUNGIBLE_SPONSOR_TRANSFER_TIMEOUT, NFT_SPONSOR_TRANSFER_TIMEOUT,
runtime/opal/Cargo.tomldiffbeforeafterboth--- a/runtime/opal/Cargo.toml
+++ b/runtime/opal/Cargo.toml
@@ -76,7 +76,6 @@
"sp-consensus-aura/std",
'app-promotion-rpc/std',
'evm-coder/std',
- 'fp-evm-mapping/std',
'fp-rpc/std',
'fp-self-contained/std',
'pallet-app-promotion/std',
@@ -254,7 +253,6 @@
derivative = { workspace = true }
evm-coder = { workspace = true }
fp-evm = { workspace = true }
-fp-evm-mapping = { workspace = true }
fp-rpc = { workspace = true }
fp-self-contained = { workspace = true }
log = { workspace = true }
runtime/opal/src/lib.rsdiffbeforeafterboth--- a/runtime/opal/src/lib.rs
+++ b/runtime/opal/src/lib.rs
@@ -51,7 +51,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 939054,
+ spec_version: 941054,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
runtime/quartz/Cargo.tomldiffbeforeafterboth--- a/runtime/quartz/Cargo.toml
+++ b/runtime/quartz/Cargo.toml
@@ -77,7 +77,6 @@
"sp-consensus-aura/std",
'app-promotion-rpc/std',
'evm-coder/std',
- 'fp-evm-mapping/std',
'fp-rpc/std',
'fp-self-contained/std',
'pallet-app-promotion/std',
@@ -245,7 +244,6 @@
app-promotion-rpc = { workspace = true }
derivative = { workspace = true }
fp-evm = { workspace = true }
-fp-evm-mapping = { workspace = true }
log = { workspace = true }
pallet-app-promotion = { workspace = true }
pallet-collator-selection = { workspace = true }
runtime/quartz/src/lib.rsdiffbeforeafterboth--- a/runtime/quartz/src/lib.rs
+++ b/runtime/quartz/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: 939054,
+ spec_version: 941054,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
runtime/tests/Cargo.tomldiffbeforeafterboth--- a/runtime/tests/Cargo.toml
+++ b/runtime/tests/Cargo.toml
@@ -3,6 +3,20 @@
name = "tests"
version = "0.1.1"
+[package.metadata.deppatcher.originals.dependencies]
+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" }
+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.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" }
+up-sponsorship = { git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
+pallet-ethereum = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+pallet-evm = { git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.39" }
+
[features]
default = ['refungible']
@@ -11,23 +25,21 @@
[dependencies]
up-data-structs = { default-features = false, path = "../../primitives/data-structs" }
-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" }
+sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-io = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+sp-std = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
-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.41" }
+frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
-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.41" }
+pallet-timestamp = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
+pallet-transaction-payment = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.41" }
-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.41" }
+pallet-evm = { default-features = false, git = "https://github.com/uniquenetwork/unique-frontier", branch = "unique-polkadot-v0.9.41" }
-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"
pallet-nonfungible.path = "../../pallets/nonfungible"
@@ -41,7 +53,7 @@
scale-info = "*"
evm-coder = { workspace = true }
-up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.39" }
+up-sponsorship = { default-features = false, git = "https://github.com/uniquenetwork/pallet-sponsoring", branch = "polkadot-v0.9.41" }
xcm = { workspace = true }
pallet-xcm = { workspace = true }
pallet-configuration = { workspace = true }
runtime/tests/src/lib.rsdiffbeforeafterboth--- a/runtime/tests/src/lib.rs
+++ b/runtime/tests/src/lib.rs
@@ -31,9 +31,9 @@
use frame_system as system;
use pallet_evm::{
AddressMapping, account::CrossAccountId, EnsureAddressNever, SubstrateBlockHashMapping,
+ BackwardsAddressMapping,
};
use pallet_ethereum::PostLogContent;
-use fp_evm_mapping::EvmBackwardsAddressMapping;
use parity_scale_codec::{Encode, Decode, MaxEncodedLen};
use scale_info::TypeInfo;
@@ -162,7 +162,7 @@
}
pub struct TestEvmBackwardsAddressMapping;
-impl EvmBackwardsAddressMapping<u64> for TestEvmBackwardsAddressMapping {
+impl BackwardsAddressMapping<u64> for TestEvmBackwardsAddressMapping {
fn from_account_id(_account_id: u64) -> sp_core::H160 {
unimplemented!()
}
@@ -216,15 +216,14 @@
impl pallet_evm::Config for Test {
type CrossAccountId = TestCrossAccountId;
- type EvmAddressMapping = TestEvmAddressMapping;
- type EvmBackwardsAddressMapping = TestEvmBackwardsAddressMapping;
+ type AddressMapping = TestEvmAddressMapping;
+ type BackwardsAddressMapping = TestEvmBackwardsAddressMapping;
type RuntimeEvent = RuntimeEvent;
type FeeCalculator = ();
type GasWeightMapping = pallet_evm::FixedGasWeightMapping<Self>;
type WeightPerGas = WeightPerGas;
type CallOrigin = EnsureAddressNever<Self>;
type WithdrawOrigin = EnsureAddressNever<Self>;
- type AddressMapping = TestEvmAddressMapping;
type Currency = Balances;
type PrecompilesType = ();
type PrecompilesValue = ();
runtime/unique/Cargo.tomldiffbeforeafterboth--- a/runtime/unique/Cargo.toml
+++ b/runtime/unique/Cargo.toml
@@ -75,7 +75,6 @@
"sp-consensus-aura/std",
'app-promotion-rpc/std',
'evm-coder/std',
- 'fp-evm-mapping/std',
'fp-rpc/std',
'fp-self-contained/std',
'pallet-app-promotion/std',
@@ -263,7 +262,6 @@
# pallet-contract-helpers = { path = '../pallets/contract-helpers', default-features = false, version = '0.1.0' }
evm-coder = { workspace = true }
fp-evm = { workspace = true }
-fp-evm-mapping = { workspace = true }
fp-rpc = { workspace = true }
fp-self-contained = { workspace = true }
num_enum = { workspace = true }
runtime/unique/src/lib.rsdiffbeforeafterboth--- a/runtime/unique/src/lib.rs
+++ b/runtime/unique/src/lib.rs
@@ -51,7 +51,7 @@
spec_name: create_runtime_str!(RUNTIME_NAME),
impl_name: create_runtime_str!(RUNTIME_NAME),
authoring_version: 1,
- spec_version: 939054,
+ spec_version: 941054,
impl_version: 0,
apis: RUNTIME_API_VERSIONS,
transaction_version: 3,
test-pallets/utils/src/lib.rsdiffbeforeafterboth--- a/test-pallets/utils/src/lib.rs
+++ b/test-pallets/utils/src/lib.rs
@@ -56,7 +56,6 @@
}
#[pallet::pallet]
- #[pallet::generate_store(pub(super) trait Store)]
pub struct Pallet<T>(_);
#[pallet::storage]