From a8d1072fd5f9da83ce5f37737c25ccd77023b228 Mon Sep 17 00:00:00 2001 From: Didier Mis Date: Thu, 21 Sep 2023 16:31:56 -0600 Subject: [PATCH 1/3] =?UTF-8?q?-=20Updated=20the=20Fund=20Admin=20Records'?= =?UTF-8?q?=20list=20of=20dependencies=20in=20Cargo.toml,=E2=80=A6=20(#10)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * - Updated the Fund Admin Records' list of dependencies in Cargo.toml, bumping versions of 'frame support', 'frame system', 'frame benchmarking', 'sp runtime', 'pallet timestamp', 'sp core' and 'sp io' to be compatible with 'polkadot-v0.9.40' from 'polkadot-v0.9.38', aligning with the latest Substrate version. This ensures our pallets stay up-to-date with the latest turnkey infrastructure enabling efficient blockchain development. - Amended the weight ranges for three different calls - 'set_signer_account', 'add_record', and 'kill_storage' - within the Fund Admin Records pallet. We've changed the implementation to 'from_parts', explicitly setting the 'compute' part of the weight to 10,000 and 'io' part to 0. This provides a more specific weight range, optimizing on-chain resource use when these calls are processed. * DEVELOPMENT AND TROUBLESHOOTING - Updated the `pallet` macro for the Fund Admin Records pallet, specifying `STORAGE_VERSION` for better versioning control of the storage data. This ensures proper migration handling in future updates. - Commented out certain test function bodies in the Fund Admin Records pallet. This indicates an ongoing refactoring process and tests will be revisited to ensure they align with the new implementation specifics. - Updated the `pallet_rbac` configuration in the mock file of the Fund Admin pallet, adding `RemoveOrigin` set to `EnsureRoot` to ensure that function calls, specific to the RBAC functionality, are executed by verified roots. - Carried out codebase clean-up in the Gated Marketplace pallet, removing unneeded imports and fixing an incorrect closing tag on the `Config` implementation block. - Updated the test suite for the Gated Marketplace pallet. Ensured that the `mint` function placing assets in the marketplace is correctly unwrapped using `assert_ok`. Commented out certain test cases, indicating a significant refactoring process which the tests will be revisited to align with. - Adjusted the properties order in the pallet-rbac dependency within the Mapped Assets pallet's Cargo.toml for consistency and readability. - Set up RBAC pallet in the test environment for the Mapped Assets pallet, implementing specific parameter types and configuring RBAC pallet for the test setup. - Updated the test suite for the RBAC pallet. Several test cases were commented out indicating an ongoing refactoring process which the tests will be revisited to align with. --- Cargo.lock | 1319 ++++------------------- pallets/fund-admin-records/Cargo.toml | 14 +- pallets/fund-admin-records/src/lib.rs | 9 +- pallets/fund-admin-records/src/tests.rs | 42 +- pallets/fund-admin/src/mock.rs | 1 + pallets/gated-marketplace/src/mock.rs | 4 +- pallets/gated-marketplace/src/tests.rs | 136 +-- pallets/mapped-assets/Cargo.toml | 2 +- pallets/mapped-assets/src/mock.rs | 24 + pallets/rbac/src/tests.rs | 115 -- 10 files changed, 348 insertions(+), 1318 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 67b01db2..077f81b1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -390,15 +390,6 @@ dependencies = [ "libc", ] -[[package]] -name = "cranelift-entity" -version = "0.88.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" -dependencies = [ - "serde", -] - [[package]] name = "cranelift-entity" version = "0.93.2" @@ -663,17 +654,6 @@ version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e48c92028aaa870e83d51c64e5d4e0b6981b360c522198c23959f219a4e1b15b" -[[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" @@ -751,53 +731,28 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "frame-benchmarking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "linregress 0.4.4", - "log", - "parity-scale-codec", - "paste 1.0.12", - "scale-info", - "serde", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-application-crypto 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "static_assertions", -] - [[package]] name = "frame-benchmarking" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "linregress 0.5.1", + "frame-support", + "frame-support-procedural", + "frame-system", + "linregress", "log", "parity-scale-codec", "paste 1.0.12", "scale-info", "serde", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-application-crypto 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-api", + "sp-application-crypto", + "sp-core", + "sp-io", + "sp-runtime", + "sp-runtime-interface", + "sp-std", + "sp-storage", "static_assertions", ] @@ -813,38 +768,6 @@ dependencies = [ "serde", ] -[[package]] -name = "frame-support" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "bitflags", - "frame-metadata", - "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "impl-trait-for-tuples", - "k256", - "log", - "once_cell", - "parity-scale-codec", - "paste 1.0.12", - "scale-info", - "serde", - "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core-hashing-proc-macro 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-staking 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "tt-call", -] - [[package]] name = "frame-support" version = "4.0.0-dev" @@ -853,7 +776,7 @@ dependencies = [ "bitflags", "environmental", "frame-metadata", - "frame-support-procedural 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-support-procedural", "impl-trait-for-tuples", "k256", "log", @@ -863,36 +786,21 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-api 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core-hashing-proc-macro 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-staking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-api", + "sp-arithmetic", + "sp-core", + "sp-core-hashing-proc-macro", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-staking", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-weights", "tt-call", ] -[[package]] -name = "frame-support-procedural" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "Inflector", - "cfg-expr", - "derive-syn-parse", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "itertools", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-support-procedural" version = "4.0.0-dev" @@ -901,47 +809,25 @@ dependencies = [ "Inflector", "cfg-expr", "derive-syn-parse", - "frame-support-procedural-tools 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-support-procedural-tools", "itertools", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "frame-support-procedural-tools" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-support-procedural-tools-derive 3.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-support-procedural-tools-derive", "proc-macro-crate", "proc-macro2", "quote", "syn 1.0.109", ] -[[package]] -name = "frame-support-procedural-tools-derive" -version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" @@ -952,40 +838,22 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "frame-system" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "log", - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-version 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "frame-system" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-support", "log", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-version 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", + "sp-version", + "sp-weights", ] [[package]] @@ -1164,12 +1032,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "hash-db" -version = "0.15.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23bd4e7b5eda0d0f3a307e8b381fdc8ba9000f26fbe912250c0a4cc3956364a" - [[package]] name = "hash-db" version = "0.16.0" @@ -1346,12 +1208,6 @@ dependencies = [ "num-traits", ] -[[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.11" @@ -1474,31 +1330,15 @@ dependencies = [ "libsecp256k1-core", ] -[[package]] -name = "linregress" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6c601a85f5ecd1aba625247bca0031585fb1c446461b142878a16f8245ddeb8" -dependencies = [ - "nalgebra 0.27.1", - "statrs", -] - [[package]] name = "linregress" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "475015a7f8f017edb28d2e69813be23500ad4b32cfe3421c4148efc97324ee52" dependencies = [ - "nalgebra 0.32.2", + "nalgebra", ] -[[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" @@ -1597,23 +1437,13 @@ dependencies = [ "autocfg", ] -[[package]] -name = "memory-db" -version = "0.31.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" -dependencies = [ - "hash-db 0.15.2", - "hashbrown 0.12.3", -] - [[package]] name = "memory-db" version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808b50db46293432a45e63bc15ea51e0ab4c0a1647b8eb114e31a3e698dd6fbe" dependencies = [ - "hash-db 0.16.0", + "hash-db", ] [[package]] @@ -1643,24 +1473,6 @@ dependencies = [ "adler", ] -[[package]] -name = "nalgebra" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "462fffe4002f4f2e1f6a9dcf12cc1a6fc0e15989014efc02a941d3e0f5dc2120" -dependencies = [ - "approx", - "matrixmultiply", - "nalgebra-macros 0.1.0", - "num-complex", - "num-rational", - "num-traits", - "rand 0.8.5", - "rand_distr", - "simba 0.5.1", - "typenum", -] - [[package]] name = "nalgebra" version = "0.32.2" @@ -1669,25 +1481,14 @@ checksum = "d68d47bba83f9e2006d117a9a33af1524e655516b8919caac694427a6fb1e511" dependencies = [ "approx", "matrixmultiply", - "nalgebra-macros 0.2.0", + "nalgebra-macros", "num-complex", "num-rational", "num-traits", - "simba 0.8.1", + "simba", "typenum", ] -[[package]] -name = "nalgebra-macros" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01fcc0b8149b4632adc89ac3b7b31a12fb6099a0317a4eb2ebff574ef7de7218" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "nalgebra-macros" version = "0.2.0" @@ -1764,7 +1565,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -1820,24 +1620,24 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" name = "pallet-afloat" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-balances", "pallet-fruniques", "pallet-gated-marketplace", "pallet-mapped-assets", "pallet-rbac", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "pallet-timestamp", "pallet-uniques", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] @@ -1845,172 +1645,154 @@ name = "pallet-balances" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-bitcoin-vaults" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "lite-json", "log", "pallet-balances", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-keystore 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-confidential-docs" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-fruniques" version = "0.1.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-balances", "pallet-rbac", "pallet-uniques", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-fund-admin" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-balances", "pallet-rbac", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-fund-admin-records" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "pallet-timestamp", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-gated-marketplace" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "pallet-balances", "pallet-fruniques", "pallet-mapped-assets", "pallet-rbac", - "pallet-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "pallet-timestamp", "pallet-uniques", "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] name = "pallet-mapped-assets" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "pallet-balances", "pallet-rbac", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", ] [[package]] name = "pallet-rbac" version = "4.0.0-dev" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "log", - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "pallet-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "sp-core", + "sp-io", + "sp-runtime", ] [[package]] @@ -2018,17 +1800,17 @@ name = "pallet-timestamp" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-timestamp 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-timestamp", ] [[package]] @@ -2036,14 +1818,14 @@ name = "pallet-uniques" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "frame-benchmarking 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-support 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "frame-system 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "frame-benchmarking", + "frame-support", + "frame-system", "log", "parity-scale-codec", "scale-info", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-runtime", + "sp-std", ] [[package]] @@ -2303,16 +2085,6 @@ dependencies = [ "getrandom 0.2.9", ] -[[package]] -name = "rand_distr" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32cb0b9bc82b0a0876c2dd994a7e7a2683d3e7390ca40e6886785ef0c7e3ee31" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -2418,20 +2190,6 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" -[[package]] -name = "rustix" -version = "0.35.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6380889b07a03b5ecf1d44dc9ede6fd2145d84b502a2a9ca0b03c48e0cc3220f" -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.14" @@ -2439,8 +2197,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ "bitflags", - "errno 0.3.1", - "io-lifetimes 1.0.11", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.1.4", "windows-sys 0.45.0", @@ -2453,8 +2211,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" dependencies = [ "bitflags", - "errno 0.3.1", - "io-lifetimes 1.0.11", + "errno", + "io-lifetimes", "libc", "linux-raw-sys 0.3.8", "windows-sys 0.48.0", @@ -2673,18 +2431,6 @@ dependencies = [ "rand_core 0.6.4", ] -[[package]] -name = "simba" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e82063457853d00243beda9952e910b82593e4b07ae9f721b9278a99a0d3d5c" -dependencies = [ - "approx", - "num-complex", - "num-traits", - "paste 1.0.12", -] - [[package]] name = "simba" version = "0.8.1" @@ -2713,54 +2459,24 @@ version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" -[[package]] -name = "sp-api" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "hash-db 0.15.2", - "log", - "parity-scale-codec", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-version 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", -] - [[package]] name = "sp-api" version = "4.0.0-dev" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", - "sp-api-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-version 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-api-proc-macro", + "sp-core", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-trie", + "sp-version", "thiserror", ] -[[package]] -name = "sp-api-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "blake2", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" @@ -2775,19 +2491,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sp-application-crypto" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "sp-application-crypto" version = "7.0.0" @@ -2796,23 +2499,9 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "sp-arithmetic" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "integer-sqrt", - "num-traits", - "parity-scale-codec", - "scale-info", - "serde", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "static_assertions", + "sp-core", + "sp-io", + "sp-std", ] [[package]] @@ -2825,52 +2514,10 @@ dependencies = [ "parity-scale-codec", "scale-info", "serde", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-std", "static_assertions", ] -[[package]] -name = "sp-core" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "array-bytes", - "base58", - "bitflags", - "blake2", - "dyn-clonable", - "ed25519-zebra", - "futures", - "hash-db 0.15.2", - "hash256-std-hasher", - "impl-serde", - "lazy_static", - "libsecp256k1", - "log", - "merlin", - "parity-scale-codec", - "parking_lot", - "primitive-types", - "rand 0.8.5", - "regex", - "scale-info", - "schnorrkel", - "secp256k1", - "secrecy", - "serde", - "sp-core-hashing 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "ss58-registry", - "substrate-bip39", - "thiserror", - "tiny-bip39", - "zeroize", -] - [[package]] name = "sp-core" version = "7.0.0" @@ -2884,7 +2531,7 @@ dependencies = [ "dyn-clonable", "ed25519-zebra", "futures", - "hash-db 0.16.0", + "hash-db", "hash256-std-hasher", "impl-serde", "lazy_static", @@ -2901,12 +2548,12 @@ dependencies = [ "secp256k1", "secrecy", "serde", - "sp-core-hashing 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core-hashing", + "sp-debug-derive", + "sp-externalities", + "sp-runtime-interface", + "sp-std", + "sp-storage", "ss58-registry", "substrate-bip39", "thiserror", @@ -2917,42 +2564,17 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "blake2", + "blake2b_simd", "byteorder", "digest 0.10.7", "sha2 0.10.6", "sha3", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.6", - "sha3", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-std", "twox-hash", ] -[[package]] -name = "sp-core-hashing-proc-macro" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "proc-macro2", - "quote", - "sp-core-hashing 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "syn 1.0.109", -] - [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" @@ -2960,17 +2582,7 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "proc-macro2", "quote", - "sp-core-hashing 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "syn 1.0.109", -] - -[[package]] -name = "sp-debug-derive" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "proc-macro2", - "quote", + "sp-core-hashing", "syn 1.0.109", ] @@ -2984,17 +2596,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sp-externalities" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "environmental", - "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "sp-externalities" version = "0.13.0" @@ -3002,22 +2603,8 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "environmental", "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "sp-inherents" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "async-trait", - "impl-trait-for-tuples", - "parity-scale-codec", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", + "sp-std", + "sp-storage", ] [[package]] @@ -3029,37 +2616,12 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-io" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "bytes", - "ed25519", - "ed25519-dalek", - "futures", - "libsecp256k1", - "log", - "parity-scale-codec", - "secp256k1", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-keystore 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "tracing", - "tracing-core", -] - [[package]] name = "sp-io" version = "7.0.0" @@ -3073,34 +2635,18 @@ dependencies = [ "log", "parity-scale-codec", "secp256k1", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-keystore 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime-interface 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-state-machine 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-externalities", + "sp-keystore", + "sp-runtime-interface", + "sp-state-machine", + "sp-std", + "sp-tracing", + "sp-trie", "tracing", "tracing-core", ] -[[package]] -name = "sp-keystore" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "async-trait", - "futures", - "merlin", - "parity-scale-codec", - "parking_lot", - "schnorrkel", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", -] - [[package]] name = "sp-keystore" version = "0.13.0" @@ -3113,21 +2659,11 @@ dependencies = [ "parking_lot", "schnorrkel", "serde", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-externalities", "thiserror", ] -[[package]] -name = "sp-panic-handler" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "backtrace", - "lazy_static", - "regex", -] - [[package]] name = "sp-panic-handler" version = "5.0.0" @@ -3138,28 +2674,6 @@ dependencies = [ "regex", ] -[[package]] -name = "sp-runtime" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "either", - "hash256-std-hasher", - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "paste 1.0.12", - "rand 0.8.5", - "scale-info", - "serde", - "sp-application-crypto 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "sp-runtime" version = "7.0.0" @@ -3174,30 +2688,12 @@ dependencies = [ "rand 0.8.5", "scale-info", "serde", - "sp-application-crypto 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-io 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-weights 4.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "sp-runtime-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "bytes", - "impl-trait-for-tuples", - "parity-scale-codec", - "primitive-types", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime-interface-proc-macro 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-wasm-interface 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "static_assertions", + "sp-application-crypto", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-std", + "sp-weights", ] [[package]] @@ -3209,27 +2705,15 @@ dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", "primitive-types", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime-interface-proc-macro 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-storage 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-tracing 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-wasm-interface 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-externalities", + "sp-runtime-interface-proc-macro", + "sp-std", + "sp-storage", + "sp-tracing", + "sp-wasm-interface", "static_assertions", ] -[[package]] -name = "sp-runtime-interface-proc-macro" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "Inflector", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" @@ -3242,18 +2726,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sp-staking" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "sp-staking" version = "4.0.0-dev" @@ -3261,29 +2733,9 @@ source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98 dependencies = [ "parity-scale-codec", "scale-info", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "sp-state-machine" -version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "hash-db 0.15.2", - "log", - "parity-scale-codec", - "parking_lot", - "rand 0.8.5", - "smallvec", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-panic-handler 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", - "tracing", + "sp-core", + "sp-runtime", + "sp-std", ] [[package]] @@ -3291,44 +2743,26 @@ name = "sp-state-machine" version = "0.13.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ - "hash-db 0.16.0", + "hash-db", "log", "parity-scale-codec", "parking_lot", "rand 0.8.5", "smallvec", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-externalities 0.13.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-panic-handler 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-trie 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-externalities", + "sp-panic-handler", + "sp-std", + "sp-trie", "thiserror", "tracing", ] -[[package]] -name = "sp-std" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" - [[package]] name = "sp-std" version = "5.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" -[[package]] -name = "sp-storage" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "ref-cast", - "serde", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", -] - [[package]] name = "sp-storage" version = "7.0.0" @@ -3338,23 +2772,8 @@ dependencies = [ "parity-scale-codec", "ref-cast", "serde", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", -] - -[[package]] -name = "sp-timestamp" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "async-trait", - "futures-timer", - "log", - "parity-scale-codec", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -3366,97 +2785,45 @@ dependencies = [ "futures-timer", "log", "parity-scale-codec", - "sp-inherents 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-inherents", + "sp-runtime", + "sp-std", "thiserror", ] -[[package]] -name = "sp-tracing" -version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "tracing", - "tracing-core", - "tracing-subscriber", -] - [[package]] name = "sp-tracing" version = "6.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-std", "tracing", "tracing-core", "tracing-subscriber", ] -[[package]] -name = "sp-trie" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "ahash 0.8.3", - "hash-db 0.15.2", - "hashbrown 0.12.3", - "lazy_static", - "memory-db 0.31.0", - "nohash-hasher", - "parity-scale-codec", - "parking_lot", - "scale-info", - "schnellru", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", - "tracing", - "trie-db 0.24.0", - "trie-root 0.17.0", -] - [[package]] name = "sp-trie" version = "7.0.0" source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40#98f2e3451c9143278ec53c6718940aeabcd3b68a" dependencies = [ "ahash 0.8.3", - "hash-db 0.16.0", + "hash-db", "hashbrown 0.12.3", "lazy_static", - "memory-db 0.32.0", + "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot", "scale-info", "schnellru", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core", + "sp-std", "thiserror", "tracing", - "trie-db 0.27.1", - "trie-root 0.18.0", -] - -[[package]] -name = "sp-version" -version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "impl-serde", - "parity-scale-codec", - "parity-wasm", - "scale-info", - "serde", - "sp-core-hashing-proc-macro 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "thiserror", + "trie-db", + "trie-root", ] [[package]] @@ -3469,24 +2836,13 @@ dependencies = [ "parity-wasm", "scale-info", "serde", - "sp-core-hashing-proc-macro 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-runtime 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-version-proc-macro 4.0.0-dev (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-core-hashing-proc-macro", + "sp-runtime", + "sp-std", + "sp-version-proc-macro", "thiserror", ] -[[package]] -name = "sp-version-proc-macro" -version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" @@ -3498,19 +2854,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "sp-wasm-interface" -version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "impl-trait-for-tuples", - "log", - "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "wasmi", - "wasmtime 1.0.2", -] - [[package]] name = "sp-wasm-interface" version = "7.0.0" @@ -3520,24 +2863,9 @@ dependencies = [ "impl-trait-for-tuples", "log", "parity-scale-codec", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-std", "wasmi", - "wasmtime 6.0.2", -] - -[[package]] -name = "sp-weights" -version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38#bcff60a227d455d95b4712b6cb356ce56b1ff672" -dependencies = [ - "parity-scale-codec", - "scale-info", - "serde", - "smallvec", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.38)", + "wasmtime", ] [[package]] @@ -3549,10 +2877,10 @@ dependencies = [ "scale-info", "serde", "smallvec", - "sp-arithmetic 6.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-core 7.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-debug-derive 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", - "sp-std 5.0.0 (git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.40)", + "sp-arithmetic", + "sp-core", + "sp-debug-derive", + "sp-std", ] [[package]] @@ -3592,19 +2920,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "statrs" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05bdbb8e4e78216a85785a85d3ec3183144f98d0097b9281802c019bb07a6f05" -dependencies = [ - "approx", - "lazy_static", - "nalgebra 0.27.1", - "num-traits", - "rand 0.8.5", -] - [[package]] name = "substrate-bip39" version = "0.4.4" @@ -3815,48 +3130,26 @@ dependencies = [ "tracing-serde", ] -[[package]] -name = "trie-db" -version = "0.24.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" -dependencies = [ - "hash-db 0.15.2", - "hashbrown 0.12.3", - "log", - "rustc-hex", - "smallvec", -] - [[package]] name = "trie-db" version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "767abe6ffed88a1889671a102c2861ae742726f52e0a5a425b92c9fbfa7e9c85" dependencies = [ - "hash-db 0.16.0", + "hash-db", "hashbrown 0.13.2", "log", "rustc-hex", "smallvec", ] -[[package]] -name = "trie-root" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a36c5ca3911ed3c9a5416ee6c679042064b93fc637ded67e25f92e68d783891" -dependencies = [ - "hash-db 0.15.2", -] - [[package]] name = "trie-root" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4ed310ef5ab98f5fa467900ed906cb9232dd5376597e00fd4cba2a449d06c0b" dependencies = [ - "hash-db 0.16.0", + "hash-db", ] [[package]] @@ -4044,15 +3337,6 @@ dependencies = [ "num-traits", ] -[[package]] -name = "wasmparser" -version = "0.89.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" -dependencies = [ - "indexmap", -] - [[package]] name = "wasmparser" version = "0.100.0" @@ -4063,31 +3347,6 @@ dependencies = [ "url", ] -[[package]] -name = "wasmtime" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" -dependencies = [ - "anyhow", - "bincode", - "cfg-if", - "indexmap", - "libc", - "log", - "object 0.29.0", - "once_cell", - "paste 1.0.12", - "psm", - "serde", - "target-lexicon", - "wasmparser 0.89.1", - "wasmtime-environ 1.0.2", - "wasmtime-jit 1.0.2", - "wasmtime-runtime 1.0.2", - "windows-sys 0.36.1", -] - [[package]] name = "wasmtime" version = "6.0.2" @@ -4106,22 +3365,13 @@ dependencies = [ "psm", "serde", "target-lexicon", - "wasmparser 0.100.0", - "wasmtime-environ 6.0.2", - "wasmtime-jit 6.0.2", - "wasmtime-runtime 6.0.2", + "wasmparser", + "wasmtime-environ", + "wasmtime-jit", + "wasmtime-runtime", "windows-sys 0.42.0", ] -[[package]] -name = "wasmtime-asm-macros" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" -dependencies = [ - "cfg-if", -] - [[package]] name = "wasmtime-asm-macros" version = "6.0.2" @@ -4131,25 +3381,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "wasmtime-environ" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" -dependencies = [ - "anyhow", - "cranelift-entity 0.88.2", - "gimli 0.26.2", - "indexmap", - "log", - "object 0.29.0", - "serde", - "target-lexicon", - "thiserror", - "wasmparser 0.89.1", - "wasmtime-types 1.0.2", -] - [[package]] name = "wasmtime-environ" version = "6.0.2" @@ -4157,7 +3388,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "47b8b50962eae38ee319f7b24900b7cf371f03eebdc17400c1dc8575fc10c9a7" dependencies = [ "anyhow", - "cranelift-entity 0.93.2", + "cranelift-entity", "gimli 0.26.2", "indexmap", "log", @@ -4165,32 +3396,8 @@ dependencies = [ "serde", "target-lexicon", "thiserror", - "wasmparser 0.100.0", - "wasmtime-types 6.0.2", -] - -[[package]] -name = "wasmtime-jit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" -dependencies = [ - "addr2line 0.17.0", - "anyhow", - "bincode", - "cfg-if", - "cpp_demangle", - "gimli 0.26.2", - "log", - "object 0.29.0", - "rustc-demangle", - "rustix 0.35.14", - "serde", - "target-lexicon", - "thiserror", - "wasmtime-environ 1.0.2", - "wasmtime-runtime 1.0.2", - "windows-sys 0.36.1", + "wasmparser", + "wasmtime-types", ] [[package]] @@ -4210,21 +3417,12 @@ dependencies = [ "rustc-demangle", "serde", "target-lexicon", - "wasmtime-environ 6.0.2", + "wasmtime-environ", "wasmtime-jit-icache-coherence", - "wasmtime-runtime 6.0.2", + "wasmtime-runtime", "windows-sys 0.42.0", ] -[[package]] -name = "wasmtime-jit-debug" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" -dependencies = [ - "once_cell", -] - [[package]] name = "wasmtime-jit-debug" version = "6.0.2" @@ -4245,30 +3443,6 @@ dependencies = [ "windows-sys 0.42.0", ] -[[package]] -name = "wasmtime-runtime" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "indexmap", - "libc", - "log", - "mach", - "memoffset", - "paste 1.0.12", - "rand 0.8.5", - "rustix 0.35.14", - "thiserror", - "wasmtime-asm-macros 1.0.2", - "wasmtime-environ 1.0.2", - "wasmtime-jit-debug 1.0.2", - "windows-sys 0.36.1", -] - [[package]] name = "wasmtime-runtime" version = "6.0.2" @@ -4287,34 +3461,22 @@ dependencies = [ "paste 1.0.12", "rand 0.8.5", "rustix 0.36.14", - "wasmtime-asm-macros 6.0.2", - "wasmtime-environ 6.0.2", - "wasmtime-jit-debug 6.0.2", + "wasmtime-asm-macros", + "wasmtime-environ", + "wasmtime-jit-debug", "windows-sys 0.42.0", ] -[[package]] -name = "wasmtime-types" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" -dependencies = [ - "cranelift-entity 0.88.2", - "serde", - "thiserror", - "wasmparser 0.89.1", -] - [[package]] name = "wasmtime-types" version = "6.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83e5572c5727c1ee7e8f28717aaa8400e4d22dcbd714ea5457d85b5005206568" dependencies = [ - "cranelift-entity 0.93.2", + "cranelift-entity", "serde", "thiserror", - "wasmparser 0.100.0", + "wasmparser", ] [[package]] @@ -4358,19 +3520,6 @@ dependencies = [ "windows-targets 0.48.0", ] -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -4446,12 +3595,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -4464,12 +3607,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -4482,12 +3619,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -4500,12 +3631,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -4530,12 +3655,6 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.2" diff --git a/pallets/fund-admin-records/Cargo.toml b/pallets/fund-admin-records/Cargo.toml index c6187753..5a11dbc6 100644 --- a/pallets/fund-admin-records/Cargo.toml +++ b/pallets/fund-admin-records/Cargo.toml @@ -20,15 +20,15 @@ codec = { package = "parity-scale-codec", version = "3.0.0", default-features = scale-info = { version = "2.0.1", default-features = false, features = [ "derive" ] } -frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38", optional = true } -sp-runtime = { default-features = false, version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -pallet-timestamp = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +frame-support = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +frame-system = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +frame-benchmarking = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40", optional = true } +sp-runtime = { default-features = false, version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +pallet-timestamp = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } [dev-dependencies] -sp-core = { default-features = false, version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } -sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.38" } +sp-core = { default-features = false, version = "7.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } +sp-io = { default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.40" } [features] default = ["std"] diff --git a/pallets/fund-admin-records/src/lib.rs b/pallets/fund-admin-records/src/lib.rs index 937974b6..c6acedcd 100644 --- a/pallets/fund-admin-records/src/lib.rs +++ b/pallets/fund-admin-records/src/lib.rs @@ -22,6 +22,7 @@ pub mod pallet { use frame_support::traits::Time; use crate::types::*; + const STORAGE_VERSION: StorageVersion = StorageVersion::new(1); #[pallet::config] pub trait Config: frame_system::Config { @@ -45,7 +46,7 @@ pub mod pallet { } #[pallet::pallet] - #[pallet::generate_store(pub(super) trait Store)] + #[pallet::storage_version(STORAGE_VERSION)] pub struct Pallet(_); /*--- Onchain storage section ---*/ @@ -113,7 +114,7 @@ pub mod pallet { /// * `signer_account` - The account id of the signer /// Returns `Ok` if the operation is successful, `Err` otherwise. #[pallet::call_index(1)] - #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(10))] + #[pallet::weight(Weight::from_parts(10_000,0) + T::DbWeight::get().writes(10))] pub fn set_signer_account( origin: OriginFor, account: T::AccountId, @@ -136,7 +137,7 @@ pub mod pallet { /// If the function executes successfully without any error, it will return `Ok(())`. /// If there is an error, it will return `Err(error)`, where `error` is an instance of the `DispatchError` class. #[pallet::call_index(2)] - #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(10))] + #[pallet::weight(Weight::from_parts(10_000,0) + T::DbWeight::get().writes(10))] pub fn add_record( origin: OriginFor, records: RecordCollection, @@ -163,7 +164,7 @@ pub mod pallet { /// ### Considerations: /// - This function is only available to the `admin` with sudo access. #[pallet::call_index(3)] - #[pallet::weight(Weight::from_ref_time(10_000) + T::DbWeight::get().writes(10))] + #[pallet::weight(Weight::from_parts(10_000,0) + T::DbWeight::get().writes(10))] pub fn kill_storage( origin: OriginFor, ) -> DispatchResult{ diff --git a/pallets/fund-admin-records/src/tests.rs b/pallets/fund-admin-records/src/tests.rs index b54509d8..e1cf0a18 100644 --- a/pallets/fund-admin-records/src/tests.rs +++ b/pallets/fund-admin-records/src/tests.rs @@ -1,5 +1,5 @@ use crate::{mock::*, types::*, Records, Error}; -use frame_support::{assert_ok, assert_noop, bounded_vec, BoundedVec, traits::ConstU32}; +use frame_support::{assert_ok, assert_noop, bounded_vec}; fn make_project_id(v: &str) -> ProjectId { @@ -28,27 +28,27 @@ fn make_record_collection( record_collection } -fn make_default_record_collection() -> RecordCollection { - make_record_collection( - make_project_id("project_id"), - make_hashed_info("hashed_info"), - TableType::Drawdown, - RecordType::Creation, - ) -} +// fn make_default_record_collection() -> RecordCollection { +// make_record_collection( +// make_project_id("project_id"), +// make_hashed_info("hashed_info"), +// TableType::Drawdown, +// RecordType::Creation, +// ) +// } -fn make_array_record_collection(num: u16) -> RecordCollection { - let mut record_collection: RecordCollection = bounded_vec![]; - for i in 0..num { - record_collection.try_push(( - make_project_id(&format!("project_id_{}", i)), - make_hashed_info(&format!("hashed_info_{}", i)), - TableType::Drawdown, - RecordType::Creation, - )).unwrap_or_default(); - } - record_collection -} +// fn make_array_record_collection(num: u16) -> RecordCollection { +// let mut record_collection: RecordCollection = bounded_vec![]; +// for i in 0..num { +// record_collection.try_push(( +// make_project_id(&format!("project_id_{}", i)), +// make_hashed_info(&format!("hashed_info_{}", i)), +// TableType::Drawdown, +// RecordType::Creation, +// )).unwrap_or_default(); +// } +// record_collection +// } #[test] fn set_signer_account_works() { diff --git a/pallets/fund-admin/src/mock.rs b/pallets/fund-admin/src/mock.rs index c0f87115..d9ec11ae 100644 --- a/pallets/fund-admin/src/mock.rs +++ b/pallets/fund-admin/src/mock.rs @@ -148,6 +148,7 @@ parameter_types! { } impl pallet_rbac::Config for Test { type RuntimeEvent = RuntimeEvent; + type RemoveOrigin = EnsureRoot; type MaxScopesPerPallet = MaxScopesPerPallet; type MaxRolesPerPallet = MaxRolesPerPallet; type RoleMaxLen = RoleMaxLen; diff --git a/pallets/gated-marketplace/src/mock.rs b/pallets/gated-marketplace/src/mock.rs index 4a927080..89fc581a 100644 --- a/pallets/gated-marketplace/src/mock.rs +++ b/pallets/gated-marketplace/src/mock.rs @@ -1,6 +1,6 @@ use crate as pallet_gated_marketplace; use frame_support::{ - construct_runtime, parameter_types, + parameter_types, traits::{AsEnsureOriginWithArg, ConstU32, ConstU64, GenesisBuild}, }; use frame_system as system; @@ -253,4 +253,4 @@ impl pallet_mapped_assets::Config for Test { type RemoveItemsLimit = ConstU32<5>; type MaxReserves = MaxReserves; type ReserveIdentifier = u32; -} +C} diff --git a/pallets/gated-marketplace/src/tests.rs b/pallets/gated-marketplace/src/tests.rs index 4ad774c6..3f114bde 100644 --- a/pallets/gated-marketplace/src/tests.rs +++ b/pallets/gated-marketplace/src/tests.rs @@ -756,7 +756,7 @@ fn add_authority_admin_works() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(GatedMarketplace::add_authority( RuntimeOrigin::signed(1), @@ -1924,8 +1924,8 @@ fn enlist_sell_offer_not_owner_tries_to_enlist_shouldnt_work() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 100); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 100)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); @@ -1953,7 +1953,7 @@ fn enlist_sell_offer_price_must_greater_than_zero_shouldnt_work() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); @@ -1981,7 +1981,7 @@ fn enlist_sell_offer_price_must_greater_than_minimun_amount_works() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); @@ -2016,7 +2016,7 @@ fn enlist_sell_offer_is_properly_stored_works() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); @@ -2067,8 +2067,8 @@ fn enlist_sell_offer_two_marketplaces() { )); let m_id2 = get_marketplace_id2("my marketplace2", 500, 600, 1, 2); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 2, 1, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 2, 1, 10000)); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); assert_ok!(Fruniques::spawn(RuntimeOrigin::signed(1), 0, dummy_description(), None, None)); @@ -2114,8 +2114,8 @@ fn enlist_buy_offer_works() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2261,9 +2261,9 @@ fn enlist_buy_offer_an_item_can_receive_multiple_buy_offers() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 3, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 3, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2324,8 +2324,8 @@ fn take_sell_offer_works() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2453,8 +2453,8 @@ fn take_buy_offer_works() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2492,8 +2492,8 @@ fn take_buy_offer_only_owner_can_accept_buy_offers_shouldnt_work() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2531,8 +2531,8 @@ fn take_buy_offer_id_does_not_exist_shouldnt_work() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2571,8 +2571,8 @@ fn take_buy_offer_user_does_not_have_enough_balance_shouldnt_work() { 600, 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 1200); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 100)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 1200)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); assert_ok!(Fruniques::create_collection(RuntimeOrigin::signed(1), dummy_description())); @@ -2587,7 +2587,7 @@ fn take_buy_offer_user_does_not_have_enough_balance_shouldnt_work() { let offer_id2 = GatedMarketplace::offers_by_account(2).iter().next().unwrap().clone(); assert_eq!(GatedMarketplace::offers_info(offer_id2).unwrap().offer_type, OfferType::BuyOrder); - Assets::transfer(RuntimeOrigin::signed(2), 1, 1, 1000); + assert_ok!(Assets::transfer(RuntimeOrigin::signed(2), 1, 1, 1000)); assert_noop!( GatedMarketplace::take_buy_offer(RuntimeOrigin::signed(1), offer_id2), Error::::NotEnoughBalance @@ -2642,8 +2642,8 @@ fn remove_buy_offer_works() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -2746,8 +2746,8 @@ fn remove_offer_status_is_closed_shouldnt_work() { 1, )); - Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000); - Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 1, 10000)); + assert_ok!(Assets::mint(RuntimeOrigin::signed(1), 1, 2, 10000)); let m_id = get_marketplace_id("my marketplace", 500, 600, 1); @@ -3130,43 +3130,43 @@ fn self_enroll_while_already_participant_should_fail() { }); } -#[test] -fn self_enroll_should_work() { - new_test_ext().execute_with(|| { - assert_ok!(GatedMarketplace::create_marketplace( - RuntimeOrigin::signed(1), - 1, - create_label("my marketplace"), - 500, - 600 - )); - let m_id = get_marketplace_id("my marketplace", 500, 600, 1); - - assert_ok!(GatedMarketplace::self_enroll(2, m_id,)); - }); -} - -#[test] -fn self_enroll_while_marketplace_doesnt_exist_should_fail() { - new_test_ext().execute_with(|| { - let m_id = get_marketplace_id("my marketplace", 500, 600, 1); - assert_noop!(GatedMarketplace::self_enroll(2, m_id,), Error::::MarketplaceNotFound); - }); -} - -#[test] -fn self_enroll_while_already_participant_should_fail() { - new_test_ext().execute_with(|| { - assert_ok!(GatedMarketplace::create_marketplace( - RuntimeOrigin::signed(1), - 1, - create_label("my marketplace"), - 500, - 600 - )); - let m_id = get_marketplace_id("my marketplace", 500, 600, 1); - - assert_ok!(GatedMarketplace::self_enroll(2, m_id,)); - assert_noop!(GatedMarketplace::self_enroll(2, m_id,), Error::::UserAlreadyParticipant); - }); -} +// #[test] +// fn self_enroll_should_work() { +// new_test_ext().execute_with(|| { +// assert_ok!(GatedMarketplace::create_marketplace( +// RuntimeOrigin::signed(1), +// 1, +// create_label("my marketplace"), +// 500, +// 600 +// )); +// let m_id = get_marketplace_id("my marketplace", 500, 600, 1); + +// assert_ok!(GatedMarketplace::self_enroll(2, m_id,)); +// }); +// } + +// #[test] +// fn self_enroll_while_marketplace_doesnt_exist_should_fail() { +// new_test_ext().execute_with(|| { +// let m_id = get_marketplace_id("my marketplace", 500, 600, 1); +// assert_noop!(GatedMarketplace::self_enroll(2, m_id,), Error::::MarketplaceNotFound); +// }); +// } + +// #[test] +// fn self_enroll_while_already_participant_should_fail() { +// new_test_ext().execute_with(|| { +// assert_ok!(GatedMarketplace::create_marketplace( +// RuntimeOrigin::signed(1), +// 1, +// create_label("my marketplace"), +// 500, +// 600 +// )); +// let m_id = get_marketplace_id("my marketplace", 500, 600, 1); + +// assert_ok!(GatedMarketplace::self_enroll(2, m_id,)); +// assert_noop!(GatedMarketplace::self_enroll(2, m_id,), Error::::UserAlreadyParticipant); +// }); +// } diff --git a/pallets/mapped-assets/Cargo.toml b/pallets/mapped-assets/Cargo.toml index f2d2cb1f..7f06d8a2 100644 --- a/pallets/mapped-assets/Cargo.toml +++ b/pallets/mapped-assets/Cargo.toml @@ -25,7 +25,7 @@ frame-support = { git = "https://github.com/paritytech/substrate", branch = "pol # `system` module provides us with all sorts of useful stuff and macros depend on it being around. frame-system = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } frame-benchmarking = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false, optional = true } -pallet-rbac = { path = "../rbac/", default-features = false, version = "4.0.0-dev" } +pallet-rbac = { default-features = false, version = "4.0.0-dev", path = "../rbac/" } [dev-dependencies] sp-core = { git = "https://github.com/paritytech/substrate", branch = "polkadot-v0.9.40", default-features = false } diff --git a/pallets/mapped-assets/src/mock.rs b/pallets/mapped-assets/src/mock.rs index 62d02a0b..0168a3f3 100644 --- a/pallets/mapped-assets/src/mock.rs +++ b/pallets/mapped-assets/src/mock.rs @@ -31,6 +31,7 @@ use sp_runtime::{ testing::Header, traits::{BlakeTwo256, IdentityLookup}, }; +use frame_system::EnsureRoot; type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic; type Block = frame_system::mocking::MockBlock; @@ -44,6 +45,7 @@ construct_runtime!( System: frame_system::{Pallet, Call, Config, Storage, Event}, Balances: pallet_balances::{Pallet, Call, Storage, Config, Event}, Assets: pallet_assets::{Pallet, Call, Storage, Event}, + RBAC: pallet_rbac::{Pallet, Call, Storage, Event}, } ); @@ -77,6 +79,27 @@ impl frame_system::Config for Test { type MaxConsumers = ConstU32<2>; } +parameter_types! { + pub const MaxScopesPerPallet: u32 = 2; + pub const MaxRolesPerPallet: u32 = 6; + pub const RoleMaxLen: u32 = 25; + pub const PermissionMaxLen: u32 = 25; + pub const MaxPermissionsPerRole: u32 = 30; + pub const MaxRolesPerUser: u32 = 2; + pub const MaxUsersPerRole: u32 = 2; +} +impl pallet_rbac::Config for Test { + type RuntimeEvent = RuntimeEvent; + type RemoveOrigin = EnsureRoot; + type MaxScopesPerPallet = MaxScopesPerPallet; + type MaxRolesPerPallet = MaxRolesPerPallet; + type RoleMaxLen = RoleMaxLen; + type PermissionMaxLen = PermissionMaxLen; + type MaxPermissionsPerRole = MaxPermissionsPerRole; + type MaxRolesPerUser = MaxRolesPerUser; + type MaxUsersPerRole = MaxUsersPerRole; +} + impl pallet_balances::Config for Test { type Balance = u64; type DustRemoval = (); @@ -108,6 +131,7 @@ impl Config for Test { type RuntimeEvent = RuntimeEvent; type Balance = u64; type AssetId = u32; + type Rbac = RBAC; type AssetIdParameter = u32; type Currency = Balances; type CreateOrigin = AsEnsureOriginWithArg>; diff --git a/pallets/rbac/src/tests.rs b/pallets/rbac/src/tests.rs index 9745a366..a73e8c7d 100644 --- a/pallets/rbac/src/tests.rs +++ b/pallets/rbac/src/tests.rs @@ -838,16 +838,6 @@ fn tx_create_and_set_roles_should_work() { }); } -#[test] -fn tx_create_and_set_roles_while_not_root_should_fail() { - new_test_ext().execute_with(|| { - assert_noop!( - RBAC::tx_create_and_set_roles(RuntimeOrigin::signed(0), pallet_name(), gen_roles(2),), - Error::::NotAuthorized - ); - }); -} - #[test] fn tx_remove_role_from_user_should_work() { new_test_ext().execute_with(|| { @@ -916,23 +906,6 @@ fn tx_create_and_set_permissions_while_not_root_should_fail() { }); } -#[test] -fn tx_assing_role_to_user_should_work() { - new_test_ext().execute_with(|| { - let scope_id = create_scope(0); - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - set_role_to_pallet(role_id); - assert_ok!(RBAC::tx_assign_role_to_user( - RuntimeOrigin::root(), - 0, - pallet_id, - scope_id, - role_id, - )); - }); -} - #[test] fn tx_assing_role_to_user_while_not_root_should_fail() { new_test_ext().execute_with(|| { @@ -947,12 +920,6 @@ fn tx_assing_role_to_user_while_not_root_should_fail() { }); } -#[test] -fn tx_create_and_set_roles_should_work() { - new_test_ext().execute_with(|| { - assert_ok!(RBAC::tx_create_and_set_roles(RuntimeOrigin::root(), pallet_name(), gen_roles(2),)); - }); -} #[test] fn tx_create_and_set_roles_while_not_root_should_fail() { @@ -964,74 +931,6 @@ fn tx_create_and_set_roles_while_not_root_should_fail() { }); } -#[test] -fn tx_remove_role_from_user_should_work() { - new_test_ext().execute_with(|| { - let scope_id = create_scope(0); - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - set_role_to_pallet(role_id); - assign_role_to_user(0, &scope_id, role_id); - assert_ok!(RBAC::tx_remove_role_from_user( - RuntimeOrigin::root(), - 0, - pallet_id, - scope_id, - role_id, - )); - }); -} - -#[test] -fn tx_remove_role_from_user_while_not_root_should_fail() { - new_test_ext().execute_with(|| { - let scope_id = create_scope(0); - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - set_role_to_pallet(role_id); - assign_role_to_user(0, &scope_id, role_id); - assert_noop!( - RBAC::tx_remove_role_from_user(RuntimeOrigin::signed(0), 0, pallet_id, scope_id, role_id,), - Error::::NotAuthorized - ); - }); -} - -#[test] -fn tx_create_and_set_permissions_should_work() { - new_test_ext().execute_with(|| { - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - let permissions = gen_permissions(2); - set_role_to_pallet(role_id); - assert_ok!(RBAC::tx_create_and_set_permissions( - RuntimeOrigin::root(), - pallet_id, - role_id, - permissions, - )); - }); -} - -#[test] -fn tx_create_and_set_permissions_while_not_root_should_fail() { - new_test_ext().execute_with(|| { - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - let permissions = gen_permissions(2); - set_role_to_pallet(role_id); - assert_noop!( - RBAC::tx_create_and_set_permissions( - RuntimeOrigin::signed(0), - pallet_id, - role_id, - permissions, - ), - Error::::NotAuthorized - ); - }); -} - #[test] fn tx_assing_role_to_user_should_work() { new_test_ext().execute_with(|| { @@ -1049,20 +948,6 @@ fn tx_assing_role_to_user_should_work() { }); } -#[test] -fn tx_assing_role_to_user_while_not_root_should_fail() { - new_test_ext().execute_with(|| { - let scope_id = create_scope(0); - let role_id = create_role("owner".as_bytes().to_vec()); - let pallet_id = pallet_name(); - set_role_to_pallet(role_id); - assert_noop!( - RBAC::tx_assign_role_to_user(RuntimeOrigin::signed(0), 0, pallet_id, scope_id, role_id,), - Error::::NotAuthorized - ); - }); -} - #[test] fn does_user_have_any_role_in_scope_should_work() { new_test_ext().execute_with(|| { From 2a16ce28bf145663422bb762eab4ebd0b39f3b8d Mon Sep 17 00:00:00 2001 From: Tlalocman Date: Fri, 22 Sep 2023 13:29:46 -0600 Subject: [PATCH 2/3] update kill storage and bug fixes (#11) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(afloat): modify `kill_storage` function to accept `args` parameter for more granular control over storage deletion ✨ feat(afloat): add `KillStorageArgs` enum to specify different types of storage to be deleted in `kill_storage` function * 🐛 fix(functions.rs): add authorization check in do_cancel_offer function to ensure only admin or offer creator can cancel the offer 🐛 fix(lib.rs): remove redundant authorization check in cancel_offer function --- pallets/afloat/src/functions.rs | 5 ++++- pallets/afloat/src/lib.rs | 39 ++++++++++++++++++++++++++++----- pallets/afloat/src/types.rs | 11 ++++++++++ 3 files changed, 48 insertions(+), 7 deletions(-) diff --git a/pallets/afloat/src/functions.rs b/pallets/afloat/src/functions.rs index c00078b8..10b75e2a 100644 --- a/pallets/afloat/src/functions.rs +++ b/pallets/afloat/src/functions.rs @@ -859,11 +859,14 @@ impl Pallet { Ok(()) } - pub fn do_cancel_offer(order_id: StorageId) -> DispatchResult { + pub fn do_cancel_offer(who: T::AccountId, order_id: StorageId) -> DispatchResult { // ensure offer exists ensure!(>::contains_key(order_id), Error::::OfferNotFound); //get offer details let offer = >::get(order_id).unwrap(); + let is_admin_or_owner = Self::is_admin_or_owner(who.clone())?; + ensure!(is_admin_or_owner || offer.creator_id == who, Error::::Unauthorized); + match offer.status { OfferStatus::CREATED => { >::try_mutate(order_id, |offer| -> DispatchResult { diff --git a/pallets/afloat/src/lib.rs b/pallets/afloat/src/lib.rs index ea5b0427..d1cb4cf7 100644 --- a/pallets/afloat/src/lib.rs +++ b/pallets/afloat/src/lib.rs @@ -255,11 +255,40 @@ pub mod pallet { #[pallet::call_index(1)] #[pallet::weight(Weight::from_parts(10_000,0) + T::DbWeight::get().reads_writes(1,1))] - pub fn kill_storage(origin: OriginFor) -> DispatchResult { + pub fn kill_storage(origin: OriginFor, args: KillStorageArgs) -> DispatchResult { // ensure sudo origin T::RemoveOrigin::ensure_origin(origin.clone())?; - Self::do_delete_all_users()?; - Ok(()) + match args { + KillStorageArgs::All => { + Self::do_delete_all_users()?; + >::kill(); + >::kill(); + >::kill(); + let _ = >::clear(1000, None); + let _ = >::clear(1000, None); + }, + KillStorageArgs::UserInfo => { + Self::do_delete_all_users()?; + } + KillStorageArgs::AfloatMarketPlaceId => { + >::kill(); + }, + KillStorageArgs::AfloatCollectionId => { + >::kill(); + }, + KillStorageArgs::AfloatAssetId => { + >::kill(); + }, + KillStorageArgs::AfloatOffers => { + let _ = >::clear(1000, None); + }, + KillStorageArgs::AfloatTransactions => { + let _ = >::clear(1000, None); + }, + + } + + Ok(()) } #[pallet::call_index(2)] @@ -404,9 +433,7 @@ pub mod pallet { #[pallet::weight(Weight::from_parts(10_000,0) + T::DbWeight::get().reads_writes(1,1))] pub fn cancel_offer(origin: OriginFor, order_id: StorageId) -> DispatchResult { let who = ensure_signed(origin.clone())?; - let is_admin_or_owner = Self::is_admin_or_owner(who.clone())?; - ensure!(is_admin_or_owner, Error::::Unauthorized); - Self::do_cancel_offer(order_id) + Self::do_cancel_offer(who, order_id) } } } diff --git a/pallets/afloat/src/types.rs b/pallets/afloat/src/types.rs index bafac000..a77fb3ab 100644 --- a/pallets/afloat/src/types.rs +++ b/pallets/afloat/src/types.rs @@ -161,6 +161,17 @@ pub enum CreateOfferArgs { }, } +#[derive(Encode, Decode, Clone, Eq, PartialEq, RuntimeDebugNoBound, TypeInfo)] +pub enum KillStorageArgs { + All, + UserInfo, + AfloatMarketPlaceId, + AfloatCollectionId, + AfloatAssetId, + AfloatOffers, + AfloatTransactions, +} + // ! Transaction structures #[derive(CloneNoBound, Encode, Decode, RuntimeDebugNoBound, TypeInfo, MaxEncodedLen, PartialEq)] From aa5f5abc4c2fe864330b5124a2ff1e551695cc62 Mon Sep 17 00:00:00 2001 From: Tlalocman Date: Fri, 22 Sep 2023 16:09:01 -0600 Subject: [PATCH 3/3] update kill storage (#13) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛 fix(afloat): modify `kill_storage` function to accept `args` parameter for more granular control over storage deletion ✨ feat(afloat): add `KillStorageArgs` enum to specify different types of storage to be deleted in `kill_storage` function * 🐛 fix(functions.rs): add authorization check in do_cancel_offer function to ensure only admin or offer creator can cancel the offer 🐛 fix(lib.rs): remove redundant authorization check in cancel_offer function