From 1b43363a83565222432d73602164e50f56561669 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Tue, 26 Mar 2024 01:54:57 +0000 Subject: [PATCH 01/21] removed unused imports --- Cargo.lock | 203 +++++++++++++++-------------- modules/bridge/src/lib.rs | 6 +- node/src/chain_spec/metaverse.rs | 2 +- node/src/chain_spec/mod.rs | 3 +- node/src/command.rs | 4 +- node/src/rpc/rpc_metaverse.rs | 9 +- node/src/service.rs | 2 +- node/src/service/metaverse.rs | 6 +- pallets/auction/src/lib.rs | 10 +- pallets/auction/src/mock.rs | 2 +- pallets/auction/src/tests.rs | 84 ++++++------ pallets/continuum/src/lib.rs | 3 +- pallets/continuum/src/mock.rs | 4 +- pallets/economy/src/lib.rs | 16 +-- pallets/economy/src/mock.rs | 3 +- pallets/economy/src/tests.rs | 3 +- pallets/evm-mapping/src/mock.rs | 18 ++- pallets/evm-mapping/src/tests.rs | 6 +- pallets/governance/src/mock.rs | 1 - pallets/mining/src/lib.rs | 1 - pallets/mining/src/mock.rs | 3 +- pallets/reward/src/lib.rs | 18 +-- pallets/reward/src/mock.rs | 2 +- runtime/common/src/currencies.rs | 2 +- runtime/common/src/nft.rs | 2 +- runtime/continuum/src/constants.rs | 6 +- runtime/continuum/src/lib.rs | 34 +++-- runtime/metaverse/src/lib.rs | 21 ++- runtime/pioneer/src/constants.rs | 6 +- runtime/pioneer/src/lib.rs | 34 +++-- 30 files changed, 251 insertions(+), 263 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 86a294346..ce02c694f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -536,7 +536,7 @@ dependencies = [ "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-lite 2.3.0", "slab", ] @@ -585,7 +585,7 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.5.0", + "polling 3.6.0", "rustix 0.38.32", "slab", "tracing", @@ -648,7 +648,7 @@ checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -677,13 +677,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -745,20 +745,20 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "backtrace" -version = "0.3.70" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d8e92cac0961e91dbd517496b00f7e9b92363dbe6d42c3198268323798860c" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line 0.21.0", "cc", @@ -860,13 +860,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.16", + "prettyplease 0.2.17", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -1037,7 +1037,7 @@ dependencies = [ "async-channel 2.2.0", "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", @@ -1142,9 +1142,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2-sys" @@ -1313,9 +1313,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -1335,14 +1335,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2117,7 +2117,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2455,7 +2455,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2473,9 +2473,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" +checksum = "ff4dc7287237dd438b926a81a1a5605dad33d286870e5eee2db17bf2bcd9e92a" dependencies = [ "cc", "cxxbridge-flags", @@ -2485,9 +2485,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" +checksum = "f47c6c8ad7c1a10d3ef0fe3ff6733f4db0d78f08ef0b13121543163ef327058b" dependencies = [ "cc", "codespan-reporting", @@ -2495,24 +2495,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] name = "cxxbridge-flags" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" +checksum = "701a1ac7a697e249cdd8dc026d7a7dafbfd0dbcd8bd24ec55889f2bc13dd6287" [[package]] name = "cxxbridge-macro" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" +checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2694,7 +2694,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2735,7 +2735,7 @@ dependencies = [ "proc-macro2", "quote", "regex", - "syn 2.0.53", + "syn 2.0.55", "termcolor", "toml 0.8.2", "walkdir", @@ -2914,7 +2914,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -2925,7 +2925,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -3196,7 +3196,7 @@ dependencies = [ "prettier-please", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -3222,9 +3222,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fatality" @@ -3738,7 +3738,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -3865,7 +3865,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -3877,7 +3877,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -3887,7 +3887,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -4062,7 +4062,7 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-core", "futures-io", "parking", @@ -4077,7 +4077,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -4269,7 +4269,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -4678,9 +4678,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -5746,7 +5746,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -5760,7 +5760,7 @@ dependencies = [ "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -5771,7 +5771,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -5782,7 +5782,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -6694,7 +6694,7 @@ dependencies = [ "proc-macro-crate 2.0.2", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -7357,7 +7357,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -8368,7 +8368,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -8879,7 +8879,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -8900,7 +8900,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] @@ -8920,7 +8920,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -9046,7 +9046,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", ] @@ -10278,12 +10278,13 @@ dependencies = [ [[package]] name = "polling" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" dependencies = [ "cfg-if", "concurrent-queue", + "hermit-abi 0.3.9", "pin-project-lite 0.2.13", "rustix 0.38.32", "tracing", @@ -10403,7 +10404,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "22020dfcf177fcc7bf5deaf7440af371400c67c0de14c399938d8ed4fb4645d3" dependencies = [ "proc-macro2", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -10418,12 +10419,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -10508,7 +10509,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -10554,7 +10555,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -10780,9 +10781,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -10869,7 +10870,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -10886,9 +10887,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", @@ -11478,7 +11479,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -12438,7 +12439,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -12500,9 +12501,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef2175c2907e7c8bc0a9c3f86aeb5ec1f3b275300ad58a44d0c3ae379a5e52e" +checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" dependencies = [ "bitvec", "cfg-if", @@ -12514,9 +12515,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b8eb8fd61c5cdd3390d9b2132300a7e7618955b98b8416f118c1b4e144f" +checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -12731,7 +12732,7 @@ checksum = "a3385e45322e8f9931410f01b3031ec534c3947d0e94c18049af4d9f9907d4e0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -13152,7 +13153,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -13391,7 +13392,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -13410,7 +13411,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -13627,7 +13628,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -13819,7 +13820,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14147,7 +14148,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14306,9 +14307,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "002a1b3dbf967edfafc32655d0f377ab0bb7b994aa1d32c8cc7e9b8bf3ebb8f0" dependencies = [ "proc-macro2", "quote", @@ -14367,7 +14368,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand 2.0.2", "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -14413,7 +14414,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14424,7 +14425,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14597,7 +14598,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14696,7 +14697,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -14709,7 +14710,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -14777,7 +14778,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -14821,7 +14822,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -15210,7 +15211,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", "wasm-bindgen-shared", ] @@ -15244,7 +15245,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -16083,7 +16084,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -16135,7 +16136,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] @@ -16155,7 +16156,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.55", ] [[package]] diff --git a/modules/bridge/src/lib.rs b/modules/bridge/src/lib.rs index 7be8894ec..185c7846d 100644 --- a/modules/bridge/src/lib.rs +++ b/modules/bridge/src/lib.rs @@ -29,7 +29,7 @@ pub mod pallet { use frame_support::traits::{Currency, ExistenceRequirement, LockableCurrency, ReservableCurrency}; use frame_support::PalletId; use orml_traits::MultiCurrency; - use sp_arithmetic::traits::{Saturating, Zero}; + use sp_arithmetic::traits::{Saturating}; use sp_runtime::traits::AccountIdConversion; use sp_runtime::ModuleError; @@ -192,7 +192,7 @@ pub mod pallet { let bridge_id = T::PalletId::get().into_account_truncating(); ensure!(BridgeFee::::contains_key(&chain_id), Error::::FeeOptionsMissing); - let (min_fee, fee_scale) = Self::bridge_fee(chain_id); + let (min_fee, _fee_scale) = Self::bridge_fee(chain_id); let fee_estimated = currency_id.1 * amount; let fee = if fee_estimated > min_fee { @@ -201,7 +201,7 @@ pub mod pallet { min_fee }; - let mut actual_fee = fee; + let actual_fee = fee; if currency_id.0 == FungibleTokenId::NativeToken(0) { T::Currency::transfer( &source, diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index 79aa40152..52277dbb0 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -11,7 +11,7 @@ use sp_runtime::traits::{IdentifyAccount, Verify}; use metaverse_runtime::{ constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AuraConfig, BalancesConfig, - BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EthereumConfig, EvmChainIdConfig, + BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, SudoConfig, SystemConfig, }; diff --git a/node/src/chain_spec/mod.rs b/node/src/chain_spec/mod.rs index 331840ae4..c22c97669 100644 --- a/node/src/chain_spec/mod.rs +++ b/node/src/chain_spec/mod.rs @@ -1,8 +1,7 @@ use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use serde::{Deserialize, Serialize}; -#[cfg(feature = "with-metaverse-runtime")] -pub use metaverse::*; + #[cfg(feature = "with-pioneer-runtime")] pub use pioneer::*; diff --git a/node/src/command.rs b/node/src/command.rs index 801ee225a..27a57e5a0 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -19,7 +19,7 @@ use std::{io::Write, net::SocketAddr}; use codec::Encode; use cumulus_client_cli::generate_genesis_block; -use cumulus_primitives_core::ParaId; + use frame_benchmarking_cli::{BenchmarkCmd, SUBSTRATE_REFERENCE_HARDWARE}; use log::info; use sc_cli::{ @@ -29,7 +29,7 @@ use sc_cli::{ use sc_service::config::{BasePath, PrometheusConfig}; use sc_service::PartialComponents; use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::AccountIdConversion; + use sp_runtime::traits::Block as BlockT; use frame_benchmarking::benchmarking::HostFunctions; diff --git a/node/src/rpc/rpc_metaverse.rs b/node/src/rpc/rpc_metaverse.rs index cc813be23..b68e3392d 100644 --- a/node/src/rpc/rpc_metaverse.rs +++ b/node/src/rpc/rpc_metaverse.rs @@ -1,15 +1,14 @@ //! RPCs implementation. use cumulus_primitives_parachain_inherent::ParachainInherentData; use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; -use std::collections::BTreeMap; + use std::sync::Arc; use fc_rpc::{ - pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle, RuntimeApiStorageOverride, SchemaV1Override, - SchemaV2Override, SchemaV3Override, StorageOverride, + pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle, }; use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; -use fp_storage::EthereumStorageSchema; + use jsonrpsee::RpcModule; use pallet_transaction_payment_rpc; @@ -145,7 +144,7 @@ where fee_history_limit, overrides, block_data_cache, - enable_evm_rpc, + enable_evm_rpc: _, } = deps; io.merge(System::new(Arc::clone(&client), Arc::clone(&pool), deny_unsafe).into_rpc())?; diff --git a/node/src/service.rs b/node/src/service.rs index 3ab7752ec..6f1875046 100644 --- a/node/src/service.rs +++ b/node/src/service.rs @@ -10,7 +10,7 @@ pub use continuum::{ ParachainRuntimeExecutor as ContinuumParachainRuntimeExecutor, }; #[cfg(feature = "with-metaverse-runtime")] -pub use metaverse::{new_full, new_partial, ExecutorDispatch}; +pub use metaverse::{new_full, new_partial}; #[cfg(feature = "with-pioneer-runtime")] pub use pioneer::{ // new_full as pioneer_full, new_light as pioneer_light, diff --git a/node/src/service/metaverse.rs b/node/src/service/metaverse.rs index 1e8bfb6ec..7fb26adde 100644 --- a/node/src/service/metaverse.rs +++ b/node/src/service/metaverse.rs @@ -176,13 +176,13 @@ fn remote_keystore(_url: &String) -> Result, &'static str> { } /// Builds a new service for a full client. -pub fn new_full(mut config: Configuration, cli: &Cli) -> Result { +pub fn new_full(config: Configuration, cli: &Cli) -> Result { let sc_service::PartialComponents { client, backend, mut task_manager, import_queue, - mut keystore_container, + keystore_container, select_chain, transaction_pool, other: (block_import, grandpa_link, mut telemetry, frontier_backend), @@ -193,7 +193,7 @@ pub fn new_full(mut config: Configuration, cli: &Cli) -> Result>::try_mutate_exists(id, |auction| -> DispatchResult { - let mut auction = auction.as_mut().ok_or(Error::::AuctionDoesNotExist)?; + let auction = auction.as_mut().ok_or(Error::::AuctionDoesNotExist)?; let block_number = >::block_number(); @@ -1276,7 +1276,7 @@ pub mod pallet { ensure!(!new_bid_price.is_zero(), Error::::InvalidBidPrice); >::try_mutate_exists(id, |auction_item| -> DispatchResult { - let mut auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; + let auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; let last_bid_price = last_bid.clone().map_or(Zero::zero(), |(_, price)| price); // get last bid price let last_bidder = last_bid.as_ref().map(|(who, _)| who); @@ -1885,7 +1885,7 @@ pub mod pallet { ensure!(!new_bid_price.is_zero(), Error::::InvalidBidPrice); >::try_mutate_exists(id, |auction_item| -> DispatchResult { - let mut auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; + let auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; let last_bid_price = last_bid.clone().map_or(Zero::zero(), |(_, price)| price); // get last bid price let last_bidder = last_bid.as_ref().map(|(who, _)| who); @@ -1939,7 +1939,7 @@ pub mod pallet { fn extend_auction_end_time(id: AuctionId, new_end_block: BlockNumberFor) -> DispatchResult { >::try_mutate_exists(id, |auction_item| -> DispatchResult { - let mut auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; + let auction_item = auction_item.as_mut().ok_or(Error::::AuctionDoesNotExist)?; auction_item.end_time = new_end_block; Ok(()) }) diff --git a/pallets/auction/src/mock.rs b/pallets/auction/src/mock.rs index c9a1cca19..1964d3da3 100644 --- a/pallets/auction/src/mock.rs +++ b/pallets/auction/src/mock.rs @@ -8,7 +8,7 @@ use orml_traits::parameter_type_with_key; use sp_core::crypto::AccountId32; use sp_core::{ConstU128, H256}; use sp_runtime::traits::{AccountIdConversion, BlakeTwo256, IdentifyAccount, Verify}; -use sp_runtime::{testing::Header, traits::IdentityLookup, MultiSignature, Perbill}; +use sp_runtime::{traits::IdentityLookup, MultiSignature, Perbill}; use auction_manager::{CheckAuctionItemHandler, ListingLevel}; use core_primitives::{MetaverseInfo, MetaverseMetadata, MetaverseTrait, NftAssetData, NftClassData}; diff --git a/pallets/auction/src/tests.rs b/pallets/auction/src/tests.rs index 9a0616e6d..77717581a 100644 --- a/pallets/auction/src/tests.rs +++ b/pallets/auction/src/tests.rs @@ -19,13 +19,13 @@ pub const GENERAL_METAVERSE_FUND: AccountId = AccountId32::new([102; 32]); fn init_test_nft(owner: RuntimeOrigin) { //Create group collection before class - assert_ok!(NFTModule::::create_group( + assert_ok!(NFTModule::create_group( RuntimeOrigin::root(), vec![1], vec![1] )); - assert_ok!(NFTModule::::create_class( + assert_ok!(NFTModule::create_class( owner.clone(), vec![1], test_attributes(1), @@ -36,7 +36,7 @@ fn init_test_nft(owner: RuntimeOrigin) { None )); - assert_ok!(NFTModule::::mint( + assert_ok!(NFTModule::mint( owner.clone(), CLASS_ID, vec![1], @@ -47,13 +47,13 @@ fn init_test_nft(owner: RuntimeOrigin) { fn init_test_stackable_nft(owner: RuntimeOrigin) { //Create group collection before class - assert_ok!(NFTModule::::create_group( + assert_ok!(NFTModule::create_group( RuntimeOrigin::root(), vec![1], vec![1] )); - assert_ok!(NFTModule::::create_class( + assert_ok!(NFTModule::create_class( owner.clone(), vec![1], test_attributes(1), @@ -64,7 +64,7 @@ fn init_test_stackable_nft(owner: RuntimeOrigin) { None )); - assert_ok!(NFTModule::::mint_stackable_nft( + assert_ok!(NFTModule::mint_stackable_nft( owner.clone(), CLASS_ID, vec![1], @@ -230,7 +230,7 @@ fn create_new_stackable_nft_auction_work() { init_test_stackable_nft(origin.clone()); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&ALICE, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 100u128 ); @@ -260,10 +260,10 @@ fn create_new_stackable_nft_auction_work() { ); assert_eq!(Balances::free_balance(ALICE), 99995); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&ALICE, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 50u128 ); - let is_transferable = NFTModule::::is_transferable(&(0, 0)); + let is_transferable = NFTModule::is_transferable(&(0, 0)); assert_eq!(is_transferable, Ok(false)); }); } @@ -401,7 +401,7 @@ fn create_new_stackable_nft_buy_now_work() { init_test_stackable_nft(origin.clone()); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&ALICE, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 100u128 ); @@ -432,10 +432,10 @@ fn create_new_stackable_nft_buy_now_work() { ); assert_eq!(Balances::free_balance(ALICE), 99995); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&ALICE, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 70u128 ); - let is_transferable = NFTModule::::is_transferable(&(0, 0)); + let is_transferable = NFTModule::is_transferable(&(0, 0)); assert_eq!(is_transferable, Ok(false)); }); } @@ -446,13 +446,13 @@ fn create_auction_fail() { ExtBuilder::default().build().execute_with(|| { let owner = RuntimeOrigin::signed(ALICE); - assert_ok!(NFTModule::::create_group( + assert_ok!(NFTModule::create_group( RuntimeOrigin::root(), vec![1], vec![1] )); - assert_ok!(NFTModule::::create_class( + assert_ok!(NFTModule::create_class( owner.clone(), vec![1], Default::default(), @@ -463,7 +463,7 @@ fn create_auction_fail() { None )); - assert_ok!(NFTModule::::mint( + assert_ok!(NFTModule::mint( owner.clone(), CLASS_ID, vec![1], @@ -486,7 +486,7 @@ fn create_auction_fail() { Error::::NoPermissionToCreateAuction ); - assert_ok!(NFTModule::::create_class( + assert_ok!(NFTModule::create_class( owner.clone(), vec![1], Default::default(), @@ -497,7 +497,7 @@ fn create_auction_fail() { None )); - assert_ok!(NFTModule::::mint( + assert_ok!(NFTModule::mint( owner.clone(), 1, vec![1], @@ -1025,7 +1025,7 @@ fn asset_transfers_after_auction() { // Setup NFT and verify that BOB has ownership init_test_nft(owner.clone()); - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(true)); assert_ok!(AuctionModule::create_auction( AuctionType::Auction, @@ -1062,8 +1062,8 @@ fn asset_transfers_after_auction() { assert_eq!(Balances::free_balance(ALICE), 99799); // Verify Alice has the NFT and Bob doesn't - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(false)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(false)); }); } @@ -1079,7 +1079,7 @@ fn asset_transfers_after_multicurrency_auction() { // Setup NFT and verify that BOB has ownership init_test_nft(owner.clone()); - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(true)); assert_ok!(AuctionModule::create_auction( AuctionType::Auction, @@ -1114,8 +1114,8 @@ fn asset_transfers_after_multicurrency_auction() { assert_eq!(Tokens::accounts(ALICE, FungibleTokenId::MiningResource(0)).free, 9800); // Verify Alice has the NFT and Bob doesn't - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(false)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(false)); }); } @@ -1173,7 +1173,7 @@ fn buy_now_work() { // buy now successful assert_ok!(AuctionModule::buy_now(buyer.clone(), 0, 200)); - assert_ok!(NFTModule::::mint( + assert_ok!(NFTModule::mint( owner.clone(), CLASS_ID, vec![1], @@ -1197,8 +1197,8 @@ fn buy_now_work() { assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 1)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 1)), Ok(true)); // check balances were transferred assert_eq!(Balances::free_balance(ALICE), 99600); @@ -1247,7 +1247,7 @@ fn multicurrency_buy_now_work() { assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); // check balances were transferred assert_eq!(Tokens::accounts(BOB, FungibleTokenId::MiningResource(0)).free, 5196); @@ -1300,9 +1300,9 @@ fn buy_now_with_bundle_should_work() { assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 1)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 2)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 1)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 2)), Ok(true)); // check balances were transferred assert_eq!(Balances::free_balance(ALICE), 99800); @@ -1358,9 +1358,9 @@ fn multicurrency_buy_now_with_bundle_should_work() { assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 1)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 2)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 1)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 2)), Ok(true)); // check balances were transferred assert_eq!(Tokens::accounts(BOB, FungibleTokenId::MiningResource(0)).free, 5195); @@ -1388,7 +1388,7 @@ fn buy_now_stackable_nft_work() { init_test_stackable_nft(owner.clone()); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&BOB, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 100u128 ); @@ -1405,7 +1405,7 @@ fn buy_now_stackable_nft_work() { FungibleTokenId::NativeToken(0) )); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&BOB, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 70u128 ); assert_ok!(AuctionModule::buy_now(buyer.clone(), 0, 200)); @@ -1413,11 +1413,11 @@ fn buy_now_stackable_nft_work() { //assert_eq!(AuctionModule::auctions(0), None); // check account received asset assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&ALICE, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 30u128 ); assert_eq!( - NFTModule::::get_free_stackable_nft_balance(&BOB, &(0, 0)), + NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 70u128 ); @@ -1440,7 +1440,7 @@ fn buy_now_stackable_nft_work() { AuctionModule::buy_now(buyer.clone(), 1, 150), Error::::AuctionDoesNotExist ); - let is_transferable = NFTModule::::is_transferable(&(0, 0)); + let is_transferable = NFTModule::is_transferable(&(0, 0)); assert_eq!(is_transferable, Ok(false)); }); } @@ -1599,7 +1599,7 @@ fn on_finalize_should_work() { run_to_block(102); assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&ALICE, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&ALICE, &(0, 0)), Ok(true)); // check balances were transferred assert_eq!(Balances::free_balance(ALICE), 99899); // BOB's initial balance is 500 @@ -1643,7 +1643,7 @@ fn on_finalize_with_listing_fee_should_work() { run_to_block(102); assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(true)); // check balances were transferred // Bob bid 100 for item, his new balance will be 500 - 100 - 1 assert_eq!(Balances::free_balance(BOB), 399); @@ -1742,8 +1742,8 @@ fn on_finalize_with_bundle_with_listing_fee_should_work() { run_to_block(102); assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 0)), Ok(true)); - assert_eq!(NFTModule::::check_ownership(&BOB, &(0, 1)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 0)), Ok(true)); + assert_eq!(NFTModule::check_ownership(&BOB, &(0, 1)), Ok(true)); // check balances were transferred // Bob bid 400 for item, his new balance will be 500 - 400 assert_eq!(Balances::free_balance(BOB), 99); diff --git a/pallets/continuum/src/lib.rs b/pallets/continuum/src/lib.rs index 7f73bbdcb..023aa5e17 100644 --- a/pallets/continuum/src/lib.rs +++ b/pallets/continuum/src/lib.rs @@ -46,7 +46,6 @@ use codec::{Decode, Encode}; use frame_support::{ - dispatch::DispatchResult, ensure, traits::ExistenceRequirement, traits::{Currency, Get, LockableCurrency, ReservableCurrency}, @@ -528,7 +527,7 @@ impl MapTrait for Pallet { let treasury = Self::account_id(); ensure!(from == treasury, Error::::NoPermission); - let mut spot = maybe_spot.as_mut().ok_or(Error::::MapSpotNotFound)?; + let spot = maybe_spot.as_mut().ok_or(Error::::MapSpotNotFound)?; spot.owner = to.clone().0; spot.metaverse_id = Some(to.1); diff --git a/pallets/continuum/src/mock.rs b/pallets/continuum/src/mock.rs index 6d3b42883..57992d75b 100644 --- a/pallets/continuum/src/mock.rs +++ b/pallets/continuum/src/mock.rs @@ -17,11 +17,11 @@ #![cfg(test)] -use frame_support::pallet_prelude::{BuildGenesisConfig, Hooks}; +use frame_support::pallet_prelude::{Hooks, DispatchResult}; use frame_support::{construct_runtime, ord_parameter_types, parameter_types, PalletId}; use frame_system::EnsureSignedBy; use sp_core::H256; -use sp_runtime::{testing::Header, traits::IdentityLookup, Perbill}; +use sp_runtime::{traits::IdentityLookup, Perbill}; use auction_manager::{Auction, AuctionInfo, AuctionItem, CheckAuctionItemHandler, ListingLevel}; use core_primitives::{MetaverseInfo, MetaverseMetadata, MetaverseTrait}; diff --git a/pallets/economy/src/lib.rs b/pallets/economy/src/lib.rs index 626e7389e..00f4e18e1 100644 --- a/pallets/economy/src/lib.rs +++ b/pallets/economy/src/lib.rs @@ -18,7 +18,7 @@ #![cfg_attr(not(feature = "std"), no_std)] use codec::{Encode, HasCompact}; -use frame_support::traits::ExistenceRequirement; + use frame_support::{ ensure, pallet_prelude::*, @@ -33,16 +33,16 @@ use sp_runtime::traits::{ }; use sp_runtime::{ traits::{AccountIdConversion, One, Zero}, - ArithmeticError, DispatchError, FixedPointNumber, Perbill, SaturatedConversion, + ArithmeticError, DispatchError, Perbill, SaturatedConversion, }; use sp_std::{collections::btree_map::BTreeMap, prelude::*, vec::Vec}; use core_primitives::NFTTrait; use core_primitives::*; pub use pallet::*; -use primitives::bounded::Rate; -use primitives::{estate::Estate, EraIndex, EstateId, PoolId, StakingRound}; -use primitives::{Balance, ClassId, DomainId, FungibleTokenId, PowerAmount, RoundIndex}; + +use primitives::{estate::Estate, EraIndex, EstateId}; +use primitives::{Balance, DomainId, FungibleTokenId, PowerAmount, RoundIndex}; pub use weights::WeightInfo; /// The Reward Pool Info. @@ -81,8 +81,8 @@ pub mod pallet { use sp_runtime::traits::{CheckedAdd, CheckedSub, Saturating}; use sp_runtime::ArithmeticError; - use primitives::bounded::{FractionalRate, Rate}; - use primitives::{staking::Bond, ClassId, CurrencyId, NftId, PoolId}; + + use primitives::{staking::Bond, ClassId, NftId}; use super::*; @@ -1073,7 +1073,7 @@ impl Pallet { ) } - fn do_burn(who: &T::AccountId, amount: Balance) -> DispatchResult { + fn do_burn(_who: &T::AccountId, amount: Balance) -> DispatchResult { if amount.is_zero() { return Ok(()); } diff --git a/pallets/economy/src/mock.rs b/pallets/economy/src/mock.rs index ad25c1fa8..d85b5ec97 100644 --- a/pallets/economy/src/mock.rs +++ b/pallets/economy/src/mock.rs @@ -8,7 +8,7 @@ use orml_traits::parameter_type_with_key; use sp_core::crypto::AccountId32; use sp_core::{ConstU128, H256}; use sp_runtime::traits::{BlakeTwo256, IdentifyAccount, Verify}; -use sp_runtime::{testing::Header, traits::IdentityLookup, MultiSignature, Perbill}; +use sp_runtime::{traits::IdentityLookup, MultiSignature, Perbill}; use auction_manager::*; use core_primitives::NftAssetData; @@ -16,6 +16,7 @@ use primitives::estate::Estate; use primitives::staking::MetaverseStakingTrait; use primitives::{Amount, AuctionId, EstateId, FungibleTokenId, ItemId, UndeployedLandBlockId}; use sp_runtime::BuildStorage; +use primitives::ClassId; use crate as economy; diff --git a/pallets/economy/src/tests.rs b/pallets/economy/src/tests.rs index 9100d852f..66a162ae3 100644 --- a/pallets/economy/src/tests.rs +++ b/pallets/economy/src/tests.rs @@ -19,13 +19,14 @@ use frame_support::{assert_noop, assert_ok}; -use sp_runtime::traits::{AccountIdConversion, BadOrigin}; +use sp_runtime::traits::{AccountIdConversion}; use sp_std::default::Default; use core_primitives::{Attributes, CollectionType, TokenType}; use mock::{RuntimeEvent, *}; use primitives::staking::Bond; use primitives::GroupCollectionId; +use primitives::ClassId; use super::*; diff --git a/pallets/evm-mapping/src/mock.rs b/pallets/evm-mapping/src/mock.rs index dbc84cfd7..467968340 100644 --- a/pallets/evm-mapping/src/mock.rs +++ b/pallets/evm-mapping/src/mock.rs @@ -19,23 +19,21 @@ #![cfg(test)] -use codec::Encode; -use frame_support::traits::{ConstU32, EqualPrivilegeOnly, Everything, Nothing}; -use frame_support::{construct_runtime, ord_parameter_types, parameter_types}; -use frame_support::{pallet_prelude::Hooks, weights::Weight, PalletId}; -use frame_system::{EnsureRoot, EnsureSignedBy}; + +use frame_support::traits::{Nothing}; +use frame_support::{construct_runtime, parameter_types}; +use frame_support::{PalletId}; + use orml_traits::parameter_type_with_key; -use scale_info::TypeInfo; + use sp_core::H256; use sp_runtime::{ - testing::Header, - traits::{AccountIdConversion, BlakeTwo256, Hash, IdentityLookup}, - DispatchError, + traits::{AccountIdConversion, IdentityLookup}, }; use primitives::{Amount, Balance, FungibleTokenId}; -use crate as evm_account; + use crate::mock::secp_utils::eth; use sp_runtime::BuildStorage; diff --git a/pallets/evm-mapping/src/tests.rs b/pallets/evm-mapping/src/tests.rs index 8f2e06a18..caba8dfef 100644 --- a/pallets/evm-mapping/src/tests.rs +++ b/pallets/evm-mapping/src/tests.rs @@ -19,12 +19,12 @@ #![cfg(test)] -use std::str::FromStr; -use frame_support::{assert_noop, assert_ok}; + +use frame_support::{assert_ok}; use mock::{ - alice, bob, secp_utils::*, EVMMapping, ExtBuilder, Runtime, RuntimeEvent, RuntimeOrigin, System, ALICE, BOB, + alice, secp_utils::*, EVMMapping, ExtBuilder, Runtime, RuntimeEvent, RuntimeOrigin, System, ALICE, }; use super::*; diff --git a/pallets/governance/src/mock.rs b/pallets/governance/src/mock.rs index c291c3c84..0aa998f7d 100644 --- a/pallets/governance/src/mock.rs +++ b/pallets/governance/src/mock.rs @@ -9,7 +9,6 @@ use orml_traits::parameter_type_with_key; use scale_info::TypeInfo; use sp_core::H256; use sp_runtime::{ - testing::Header, traits::{AccountIdConversion, BlakeTwo256, Hash, IdentityLookup}, DispatchError, Perbill, }; diff --git a/pallets/mining/src/lib.rs b/pallets/mining/src/lib.rs index 428927a99..9f1ef4acd 100644 --- a/pallets/mining/src/lib.rs +++ b/pallets/mining/src/lib.rs @@ -33,7 +33,6 @@ use orml_traits::{BasicCurrency, LockIdentifier, MultiCurrency, MultiCurrencyExt use scale_info::TypeInfo; use sp_runtime::{ traits::{AccountIdConversion, Zero}, - DispatchError, }; use sp_std::vec::Vec; diff --git a/pallets/mining/src/mock.rs b/pallets/mining/src/mock.rs index 576ff876f..cf71e7afb 100644 --- a/pallets/mining/src/mock.rs +++ b/pallets/mining/src/mock.rs @@ -1,4 +1,4 @@ -use frame_support::pallet_prelude::BuildGenesisConfig; + use frame_support::traits::Nothing; use frame_support::{construct_runtime, ord_parameter_types, parameter_types}; @@ -7,7 +7,6 @@ use orml_traits::parameter_type_with_key; use sp_core::H256; use sp_runtime::BuildStorage; use sp_runtime::{ - testing::Header, traits::{AccountIdConversion, IdentityLookup}, Perbill, }; diff --git a/pallets/reward/src/lib.rs b/pallets/reward/src/lib.rs index c53828004..95694729d 100644 --- a/pallets/reward/src/lib.rs +++ b/pallets/reward/src/lib.rs @@ -30,7 +30,7 @@ use frame_system::{ensure_signed, pallet_prelude::*}; use orml_traits::{DataProvider, MultiCurrency, MultiReservableCurrency}; use sp_core::Encode as SPEncode; use sp_io::hashing::keccak_256; -use sp_runtime::traits::{Hash as Hasher, Saturating}; +use sp_runtime::traits::{Hash as Hasher}; use sp_runtime::{ traits::{AccountIdConversion, Zero}, DispatchError, Perbill, SaturatedConversion, @@ -476,7 +476,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!(campaign.end < now, Error::::CampaignStillActive); @@ -527,7 +527,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!(campaign.end < now, Error::::CampaignStillActive); @@ -586,7 +586,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!(campaign.end < now, Error::::CampaignStillActive); @@ -650,7 +650,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!(campaign.end < now, Error::::CampaignStillActive); @@ -724,7 +724,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!( campaign.end.saturating_add(campaign.cooling_off_duration) >= now, @@ -778,7 +778,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!( campaign.end.saturating_add(campaign.cooling_off_duration) >= now, @@ -840,7 +840,7 @@ pub mod pallet { let now = frame_system::Pallet::::block_number(); >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!( campaign.end.saturating_add(campaign.cooling_off_duration) >= now, @@ -905,7 +905,7 @@ pub mod pallet { )?; >::try_mutate_exists(id, |campaign| -> DispatchResult { - let mut campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; + let campaign = campaign.as_mut().ok_or(Error::::CampaignIsNotFound)?; ensure!( campaign.end.saturating_add(campaign.cooling_off_duration) >= now, diff --git a/pallets/reward/src/mock.rs b/pallets/reward/src/mock.rs index d78caa524..d0fed1ddf 100644 --- a/pallets/reward/src/mock.rs +++ b/pallets/reward/src/mock.rs @@ -8,7 +8,7 @@ use orml_traits::parameter_type_with_key; use sp_core::crypto::AccountId32; use sp_core::{ConstU128, H256}; use sp_runtime::traits::{BlakeTwo256, IdentifyAccount, Verify}; -use sp_runtime::{testing::Header, traits::IdentityLookup, MultiSignature, Perbill}; +use sp_runtime::{traits::IdentityLookup, MultiSignature, Perbill}; use auction_manager::*; use core_primitives::NftAssetData; diff --git a/runtime/common/src/currencies.rs b/runtime/common/src/currencies.rs index 3db4b6dc0..35a345c70 100644 --- a/runtime/common/src/currencies.rs +++ b/runtime/common/src/currencies.rs @@ -113,7 +113,7 @@ where })) } - fn is_precompile(&self, _address: H160, remaining_gas: u64) -> IsPrecompileResult { + fn is_precompile(&self, _address: H160, _remaining_gas: u64) -> IsPrecompileResult { todo!() } } diff --git a/runtime/common/src/nft.rs b/runtime/common/src/nft.rs index 191b03c7e..bd00c16b4 100644 --- a/runtime/common/src/nft.rs +++ b/runtime/common/src/nft.rs @@ -118,7 +118,7 @@ where Some(result) } - fn is_precompile(&self, _address: H160, remaining_gas: u64) -> IsPrecompileResult { + fn is_precompile(&self, _address: H160, _remaining_gas: u64) -> IsPrecompileResult { todo!() } } diff --git a/runtime/continuum/src/constants.rs b/runtime/continuum/src/constants.rs index 7a903b84f..cb68995f2 100644 --- a/runtime/continuum/src/constants.rs +++ b/runtime/continuum/src/constants.rs @@ -19,11 +19,11 @@ pub mod currency { /// Time. pub mod time { - use frame_support::weights::constants::{ExtrinsicBaseWeight, WEIGHT_REF_TIME_PER_SECOND}; + use frame_support::weights::constants::{WEIGHT_REF_TIME_PER_SECOND}; use sp_weights::Weight; use polkadot_primitives::MAX_POV_SIZE; - use primitives::{BlockNumber, Moment}; + use primitives::{BlockNumber}; use crate::{Balance, Perbill, CENTS}; @@ -68,7 +68,7 @@ pub mod xcm_fees { use primitives::{Balance, FungibleTokenId}; - use crate::{CENTS, MILLICENTS}; + use crate::{CENTS}; pub fn base_tx(currency: FungibleTokenId) -> Balance { cent(currency) / 10 diff --git a/runtime/continuum/src/lib.rs b/runtime/continuum/src/lib.rs index 898cdeed4..f9d226f71 100644 --- a/runtime/continuum/src/lib.rs +++ b/runtime/continuum/src/lib.rs @@ -20,7 +20,7 @@ #![recursion_limit = "256"] use codec::{Decode, Encode, MaxEncodedLen}; -use cumulus_primitives_core::ParaId; + use frame_support::traits::{ Contains, Currency, EitherOfDiverse, EnsureOneOf, EnsureOrigin, EqualPrivilegeOnly, Get, InstanceFilter, Nothing, OnUnbalanced, @@ -31,18 +31,18 @@ use frame_support::{ parameter_types, traits::{Everything, Imbalance, WithdrawReasons}, weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, - ConstantMultiplier, IdentityFee, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, + ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, }, - BoundedVec, PalletId, WeakBoundedVec, + BoundedVec, PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; -use orml_traits::location::{AbsoluteReserveProvider, RelativeReserveProvider, Reserve}; -use orml_traits::{arithmetic::Zero, parameter_type_with_key, MultiCurrency}; +use orml_traits::location::{AbsoluteReserveProvider}; +use orml_traits::{parameter_type_with_key, MultiCurrency}; pub use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; // XCM Imports use orml_xcm_support::DepositToAlternative; @@ -50,7 +50,7 @@ use orml_xcm_support::DepositToAlternative; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use scale_info::prelude::vec; + use scale_info::TypeInfo; use smallvec::smallvec; use sp_api::impl_runtime_apis; @@ -72,13 +72,11 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, IsConcrete, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeRevenue, TakeWeightCredit, UsingComponents, + TakeRevenue, TakeWeightCredit, }; -use xcm_executor::{traits::WithOriginFilter, Config, XcmExecutor}; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; use asset_manager::{BuyWeightRateOfForeignAsset, ForeignAssetMapping}; pub use constants::{currency::*, time::*}; @@ -86,7 +84,7 @@ use core_primitives::{NftAssetData, NftClassData}; // External imports use currencies::BasicCurrencyAdapter; use metaverse_runtime_common::{CurrencyHooks, FixedRateOfAsset}; -use primitives::{Amount, ClassId, ForeignAssetIdMapping, FungibleTokenId, Moment, NftId, RoundIndex, TokenSymbol}; +use primitives::{Amount, ClassId, ForeignAssetIdMapping, FungibleTokenId, Moment, NftId, RoundIndex}; // XCM Imports use crate::constants::parachains; @@ -737,7 +735,7 @@ impl Convert for AccountIdToMultiLocation { pub struct MultiLocationsFilter; impl Contains for MultiLocationsFilter { - fn contains(m: &MultiLocation) -> bool { + fn contains(_m: &MultiLocation) -> bool { true } } @@ -1014,7 +1012,7 @@ pub struct FungibleTokenIdConvert; impl Convert> for FungibleTokenIdConvert { fn convert(id: FungibleTokenId) -> Option { - use FungibleTokenId::{FungibleToken, MiningResource, NativeToken, Stable}; + use FungibleTokenId::{FungibleToken, NativeToken, Stable}; match id { // KSM NativeToken(1) => Some(MultiLocation::parent()), @@ -1041,7 +1039,7 @@ impl Convert> for FungibleTokenIdConvert impl Convert> for FungibleTokenIdConvert { fn convert(location: MultiLocation) -> Option { - use FungibleTokenId::{FungibleToken, MiningResource, NativeToken, Stable}; + use FungibleTokenId::{MiningResource, NativeToken}; // NativeToken // 0 => NUUM @@ -1065,7 +1063,7 @@ impl Convert> for FungibleTokenIdConvert match location.clone() { MultiLocation { parents: 1, - interior: X2(Parachain(para_id), GeneralKey { length, data }), + interior: X2(Parachain(para_id), GeneralKey { length: _, data }), } => match para_id { // Local testing para chain id 3446 | 4446 => match FungibleTokenId::decode(&mut &data[..]) { @@ -1077,7 +1075,7 @@ impl Convert> for FungibleTokenIdConvert _ => None, }, MultiLocation { parents, interior } if parents == 0 => match interior { - X1(GeneralKey { length, data }) => { + X1(GeneralKey { length: _, data }) => { // decode the general key if let Ok(currency_id) = FungibleTokenId::decode(&mut &data[..]) { match currency_id { diff --git a/runtime/metaverse/src/lib.rs b/runtime/metaverse/src/lib.rs index 3f23746ee..6ca879d15 100644 --- a/runtime/metaverse/src/lib.rs +++ b/runtime/metaverse/src/lib.rs @@ -24,7 +24,7 @@ extern crate orml_benchmarking; use codec::{Decode, Encode, MaxEncodedLen}; -use cumulus_pallet_parachain_system::RelaychainBlockNumberProvider; + // pub use this so we can import it in the chain spec. #[cfg(feature = "std")] pub use fp_evm::GenesisAccount; @@ -47,11 +47,10 @@ pub use frame_support::{ use frame_support::{BoundedVec, ConsensusEngineId}; // A few exports that help ease life for downstream crates. use frame_support::traits::{ - Contains, EitherOfDiverse, EnsureOneOf, EqualPrivilegeOnly, Everything, FindAuthor, InstanceFilter, Nothing, + Contains, EitherOfDiverse, EqualPrivilegeOnly, FindAuthor, InstanceFilter, Nothing, }; use frame_system::{ - limits::{BlockLength, BlockWeights}, - Config, EnsureRoot, EnsureSigned, RawOrigin, + limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; use orml_traits::parameter_type_with_key; pub use pallet_balances::Call as BalancesCall; @@ -60,8 +59,7 @@ use pallet_ethereum::PostLogContent; use pallet_ethereum::{Call::transact, EthereumBlockHashMapping, Transaction as EthereumTransaction}; use pallet_evm::GasWeightMapping; use pallet_evm::{ - Account as EVMAccount, EnsureAddressNever, EnsureAddressRoot, FeeCalculator, HashedAddressMapping, Runner, - SubstrateBlockHashMapping, + EnsureAddressNever, EnsureAddressRoot, FeeCalculator, HashedAddressMapping, Runner, }; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment}; @@ -72,7 +70,7 @@ use sp_consensus_aura::sr25519::AuthorityId as AuraId; #[cfg(not(feature = "runtime-benchmarks"))] use sp_core::Get; use sp_core::{ - crypto::{KeyTypeId, Public}, + crypto::{KeyTypeId}, sp_std::marker::PhantomData, ConstBool, OpaqueMetadata, H160, H256, U256, }; @@ -85,8 +83,8 @@ use sp_runtime::{ AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Bounded, ConvertInto, Dispatchable, IdentifyAccount, NumberFor, OpaqueKeys, PostDispatchInfoOf, UniqueSaturatedInto, Verify, Zero, }, - transaction_validity::{InvalidTransaction, TransactionSource, TransactionValidity, TransactionValidityError}, - ApplyExtrinsicResult, FixedPointNumber, MultiSignature, Perbill, Percent, Permill, Perquintill, RuntimeDebug, + transaction_validity::{TransactionSource, TransactionValidity, TransactionValidityError}, + ApplyExtrinsicResult, FixedPointNumber, MultiSignature, Perbill, Permill, Perquintill, RuntimeDebug, }; use sp_std::prelude::*; #[cfg(feature = "std")] @@ -103,8 +101,7 @@ pub use estate::{MintingRateInfo, Range as MintingRange}; use evm_mapping::EvmAddressMapping; use metaverse_runtime_common::{precompiles::MetaverseNetworkPrecompiles, CurrencyHooks}; use primitives::evm::{ - CurrencyIdType, Erc20Mapping, EvmAddress, H160_POSITION_CURRENCY_ID_TYPE, H160_POSITION_FUNGIBLE_TOKEN, - H160_POSITION_MINING_RESOURCE, H160_POSITION_TOKEN, H160_POSITION_TOKEN_NFT, H160_POSITION_TOKEN_NFT_CLASS_ID_END, + CurrencyIdType, Erc20Mapping, EvmAddress, H160_POSITION_CURRENCY_ID_TYPE, H160_POSITION_TOKEN, H160_POSITION_TOKEN_NFT, H160_POSITION_TOKEN_NFT_CLASS_ID_END, }; use primitives::{Amount, Balance, BlockNumber, ClassId, FungibleTokenId, Moment, NftId, PoolId, RoundIndex, TokenId}; @@ -871,7 +868,7 @@ impl pallet_preimage::Config for Runtime { pub struct FindAuthorTruncated(PhantomData); impl> FindAuthor for FindAuthorTruncated { - fn find_author<'a, I>(digests: I) -> Option + fn find_author<'a, I>(_digests: I) -> Option where I: 'a + IntoIterator, { diff --git a/runtime/pioneer/src/constants.rs b/runtime/pioneer/src/constants.rs index 7a903b84f..cb68995f2 100644 --- a/runtime/pioneer/src/constants.rs +++ b/runtime/pioneer/src/constants.rs @@ -19,11 +19,11 @@ pub mod currency { /// Time. pub mod time { - use frame_support::weights::constants::{ExtrinsicBaseWeight, WEIGHT_REF_TIME_PER_SECOND}; + use frame_support::weights::constants::{WEIGHT_REF_TIME_PER_SECOND}; use sp_weights::Weight; use polkadot_primitives::MAX_POV_SIZE; - use primitives::{BlockNumber, Moment}; + use primitives::{BlockNumber}; use crate::{Balance, Perbill, CENTS}; @@ -68,7 +68,7 @@ pub mod xcm_fees { use primitives::{Balance, FungibleTokenId}; - use crate::{CENTS, MILLICENTS}; + use crate::{CENTS}; pub fn base_tx(currency: FungibleTokenId) -> Balance { cent(currency) / 10 diff --git a/runtime/pioneer/src/lib.rs b/runtime/pioneer/src/lib.rs index 5b0c53788..98650b833 100644 --- a/runtime/pioneer/src/lib.rs +++ b/runtime/pioneer/src/lib.rs @@ -20,7 +20,7 @@ #![recursion_limit = "256"] use codec::{Decode, Encode, MaxEncodedLen}; -use cumulus_primitives_core::ParaId; + use frame_support::traits::{ Contains, Currency, EitherOfDiverse, EnsureOneOf, EnsureOrigin, EqualPrivilegeOnly, Get, InstanceFilter, Nothing, OnUnbalanced, @@ -31,18 +31,18 @@ use frame_support::{ parameter_types, traits::{Everything, Imbalance, WithdrawReasons}, weights::{ - constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight, WEIGHT_REF_TIME_PER_SECOND}, - ConstantMultiplier, IdentityFee, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, + constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, + ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, }, - BoundedVec, PalletId, WeakBoundedVec, + BoundedVec, PalletId, }; use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; -use orml_traits::location::{AbsoluteReserveProvider, RelativeReserveProvider, Reserve}; -use orml_traits::{arithmetic::Zero, parameter_type_with_key, MultiCurrency}; +use orml_traits::location::{AbsoluteReserveProvider}; +use orml_traits::{parameter_type_with_key, MultiCurrency}; pub use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; // XCM Imports use orml_xcm_support::DepositToAlternative; @@ -50,7 +50,7 @@ use orml_xcm_support::DepositToAlternative; use pallet_xcm::{EnsureXcm, IsMajorityOfBody, XcmPassthrough}; use polkadot_parachain::primitives::Sibling; use polkadot_runtime_common::{BlockHashCount, SlowAdjustingFeeUpdate}; -use scale_info::prelude::vec; + use scale_info::TypeInfo; use smallvec::smallvec; use sp_api::impl_runtime_apis; @@ -72,13 +72,11 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowKnownQueryResponses, AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, - AllowUnpaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, IsConcrete, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, + AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeRevenue, TakeWeightCredit, UsingComponents, + TakeRevenue, TakeWeightCredit, }; -use xcm_executor::{traits::WithOriginFilter, Config, XcmExecutor}; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; use asset_manager::{BuyWeightRateOfForeignAsset, ForeignAssetMapping}; pub use constants::{currency::*, time::*}; @@ -86,7 +84,7 @@ use core_primitives::{NftAssetData, NftClassData}; // External imports use currencies::BasicCurrencyAdapter; use metaverse_runtime_common::{CurrencyHooks, FixedRateOfAsset}; -use primitives::{Amount, ClassId, ForeignAssetIdMapping, FungibleTokenId, Moment, NftId, RoundIndex, TokenSymbol}; +use primitives::{Amount, ClassId, ForeignAssetIdMapping, FungibleTokenId, Moment, NftId, RoundIndex}; // XCM Imports use crate::constants::parachains; @@ -737,7 +735,7 @@ impl Convert for AccountIdToMultiLocation { pub struct MultiLocationsFilter; impl Contains for MultiLocationsFilter { - fn contains(m: &MultiLocation) -> bool { + fn contains(_m: &MultiLocation) -> bool { true } } @@ -1014,7 +1012,7 @@ pub struct FungibleTokenIdConvert; impl Convert> for FungibleTokenIdConvert { fn convert(id: FungibleTokenId) -> Option { - use FungibleTokenId::{FungibleToken, MiningResource, NativeToken, Stable}; + use FungibleTokenId::{FungibleToken, NativeToken, Stable}; match id { // KSM NativeToken(1) => Some(MultiLocation::parent()), @@ -1041,7 +1039,7 @@ impl Convert> for FungibleTokenIdConvert impl Convert> for FungibleTokenIdConvert { fn convert(location: MultiLocation) -> Option { - use FungibleTokenId::{FungibleToken, MiningResource, NativeToken, Stable}; + use FungibleTokenId::{MiningResource, NativeToken}; // NativeToken // 0 => NEER @@ -1066,7 +1064,7 @@ impl Convert> for FungibleTokenIdConvert match location.clone() { MultiLocation { parents: 1, - interior: X2(Parachain(para_id), GeneralKey { length, data }), + interior: X2(Parachain(para_id), GeneralKey { length: _, data }), } => match para_id { // Local testing para chain id 2096 | 3096 => match FungibleTokenId::decode(&mut &data[..]) { @@ -1084,7 +1082,7 @@ impl Convert> for FungibleTokenIdConvert _ => None, }, MultiLocation { parents, interior } if parents == 0 => match interior { - X1(GeneralKey { length, data }) => { + X1(GeneralKey { length: _, data }) => { // decode the general key if let Ok(currency_id) = FungibleTokenId::decode(&mut &data[..]) { match currency_id { From 78dabc74ef4b3d0972f1b9f40ed5cdb6ba63068e Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Tue, 26 Mar 2024 02:01:18 +0000 Subject: [PATCH 02/21] fixed formatting --- modules/bridge/src/lib.rs | 2 +- node/src/chain_spec/metaverse.rs | 6 +- node/src/chain_spec/mod.rs | 1 - node/src/command.rs | 4 +- node/src/rpc/rpc_metaverse.rs | 5 +- pallets/auction/src/tests.rs | 90 +++++------------------------- pallets/continuum/src/mock.rs | 2 +- pallets/economy/src/lib.rs | 1 - pallets/economy/src/mock.rs | 2 +- pallets/economy/src/tests.rs | 4 +- pallets/evm-mapping/src/mock.rs | 10 +--- pallets/evm-mapping/src/tests.rs | 8 +-- pallets/mining/src/lib.rs | 4 +- pallets/mining/src/mock.rs | 2 - pallets/reward/src/lib.rs | 2 +- runtime/continuum/src/constants.rs | 6 +- runtime/continuum/src/lib.rs | 11 ++-- runtime/metaverse/src/lib.rs | 20 +++---- runtime/pioneer/src/constants.rs | 6 +- runtime/pioneer/src/lib.rs | 11 ++-- 20 files changed, 57 insertions(+), 140 deletions(-) diff --git a/modules/bridge/src/lib.rs b/modules/bridge/src/lib.rs index 185c7846d..e5fb94de2 100644 --- a/modules/bridge/src/lib.rs +++ b/modules/bridge/src/lib.rs @@ -29,7 +29,7 @@ pub mod pallet { use frame_support::traits::{Currency, ExistenceRequirement, LockableCurrency, ReservableCurrency}; use frame_support::PalletId; use orml_traits::MultiCurrency; - use sp_arithmetic::traits::{Saturating}; + use sp_arithmetic::traits::Saturating; use sp_runtime::traits::AccountIdConversion; use sp_runtime::ModuleError; diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index 52277dbb0..f6214a0d5 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -11,9 +11,9 @@ use sp_runtime::traits::{IdentifyAccount, Verify}; use metaverse_runtime::{ constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AuraConfig, BalancesConfig, - BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, - GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, - SudoConfig, SystemConfig, + BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, GenesisAccount, + GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, SudoConfig, + SystemConfig, }; use primitives::Balance; diff --git a/node/src/chain_spec/mod.rs b/node/src/chain_spec/mod.rs index c22c97669..d9ca84ac9 100644 --- a/node/src/chain_spec/mod.rs +++ b/node/src/chain_spec/mod.rs @@ -1,7 +1,6 @@ use sc_chain_spec::{ChainSpecExtension, ChainSpecGroup}; use serde::{Deserialize, Serialize}; - #[cfg(feature = "with-pioneer-runtime")] pub use pioneer::*; diff --git a/node/src/command.rs b/node/src/command.rs index 27a57e5a0..69564368c 100644 --- a/node/src/command.rs +++ b/node/src/command.rs @@ -30,7 +30,9 @@ use sc_service::config::{BasePath, PrometheusConfig}; use sc_service::PartialComponents; use sp_core::hexdisplay::HexDisplay; -use sp_runtime::traits::Block as BlockT; +use sp_runtime::traits::{AccountIdConversion, Block as BlockT}; + +use cumulus_primitives_core::ParaId; use frame_benchmarking::benchmarking::HostFunctions; diff --git a/node/src/rpc/rpc_metaverse.rs b/node/src/rpc/rpc_metaverse.rs index b68e3392d..7f90f7181 100644 --- a/node/src/rpc/rpc_metaverse.rs +++ b/node/src/rpc/rpc_metaverse.rs @@ -4,12 +4,9 @@ use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder; use std::sync::Arc; -use fc_rpc::{ - pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle, -}; +use fc_rpc::{pending::ConsensusDataProvider, EthBlockDataCacheTask, OverrideHandle}; use fc_rpc_core::types::{FeeHistoryCache, FilterPool}; - use jsonrpsee::RpcModule; use pallet_transaction_payment_rpc; diff --git a/pallets/auction/src/tests.rs b/pallets/auction/src/tests.rs index 77717581a..774e3c6eb 100644 --- a/pallets/auction/src/tests.rs +++ b/pallets/auction/src/tests.rs @@ -19,11 +19,7 @@ pub const GENERAL_METAVERSE_FUND: AccountId = AccountId32::new([102; 32]); fn init_test_nft(owner: RuntimeOrigin) { //Create group collection before class - assert_ok!(NFTModule::create_group( - RuntimeOrigin::root(), - vec![1], - vec![1] - )); + assert_ok!(NFTModule::create_group(RuntimeOrigin::root(), vec![1], vec![1])); assert_ok!(NFTModule::create_class( owner.clone(), @@ -36,22 +32,12 @@ fn init_test_nft(owner: RuntimeOrigin) { None )); - assert_ok!(NFTModule::mint( - owner.clone(), - CLASS_ID, - vec![1], - test_attributes(1), - 1 - )); + assert_ok!(NFTModule::mint(owner.clone(), CLASS_ID, vec![1], test_attributes(1), 1)); } fn init_test_stackable_nft(owner: RuntimeOrigin) { //Create group collection before class - assert_ok!(NFTModule::create_group( - RuntimeOrigin::root(), - vec![1], - vec![1] - )); + assert_ok!(NFTModule::create_group(RuntimeOrigin::root(), vec![1], vec![1])); assert_ok!(NFTModule::create_class( owner.clone(), @@ -229,10 +215,7 @@ fn create_new_stackable_nft_auction_work() { let origin = RuntimeOrigin::signed(ALICE); init_test_stackable_nft(origin.clone()); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), - 100u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 100u128); assert_ok!(AuctionModule::create_auction( AuctionType::Auction, @@ -259,10 +242,7 @@ fn create_new_stackable_nft_auction_work() { Some(true) ); assert_eq!(Balances::free_balance(ALICE), 99995); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), - 50u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 50u128); let is_transferable = NFTModule::is_transferable(&(0, 0)); assert_eq!(is_transferable, Ok(false)); }); @@ -400,10 +380,7 @@ fn create_new_stackable_nft_buy_now_work() { let origin = RuntimeOrigin::signed(ALICE); init_test_stackable_nft(origin.clone()); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), - 100u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 100u128); assert_ok!(AuctionModule::create_auction( AuctionType::BuyNow, @@ -431,10 +408,7 @@ fn create_new_stackable_nft_buy_now_work() { Some(true) ); assert_eq!(Balances::free_balance(ALICE), 99995); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), - 70u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 70u128); let is_transferable = NFTModule::is_transferable(&(0, 0)); assert_eq!(is_transferable, Ok(false)); }); @@ -446,11 +420,7 @@ fn create_auction_fail() { ExtBuilder::default().build().execute_with(|| { let owner = RuntimeOrigin::signed(ALICE); - assert_ok!(NFTModule::create_group( - RuntimeOrigin::root(), - vec![1], - vec![1] - )); + assert_ok!(NFTModule::create_group(RuntimeOrigin::root(), vec![1], vec![1])); assert_ok!(NFTModule::create_class( owner.clone(), @@ -463,13 +433,7 @@ fn create_auction_fail() { None )); - assert_ok!(NFTModule::mint( - owner.clone(), - CLASS_ID, - vec![1], - Default::default(), - 1 - )); + assert_ok!(NFTModule::mint(owner.clone(), CLASS_ID, vec![1], Default::default(), 1)); //account does not have permission to create auction assert_noop!( AuctionModule::create_auction( @@ -497,13 +461,7 @@ fn create_auction_fail() { None )); - assert_ok!(NFTModule::mint( - owner.clone(), - 1, - vec![1], - Default::default(), - 1 - )); + assert_ok!(NFTModule::mint(owner.clone(), 1, vec![1], Default::default(), 1)); //Class is BoundToAddress assert_noop!( @@ -1173,13 +1131,7 @@ fn buy_now_work() { // buy now successful assert_ok!(AuctionModule::buy_now(buyer.clone(), 0, 200)); - assert_ok!(NFTModule::mint( - owner.clone(), - CLASS_ID, - vec![1], - Default::default(), - 1 - )); + assert_ok!(NFTModule::mint(owner.clone(), CLASS_ID, vec![1], Default::default(), 1)); assert_ok!(AuctionModule::create_auction( AuctionType::BuyNow, @@ -1387,10 +1339,7 @@ fn buy_now_stackable_nft_work() { init_test_stackable_nft(owner.clone()); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), - 100u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 100u128); // call create_auction assert_ok!(AuctionModule::create_auction( @@ -1404,22 +1353,13 @@ fn buy_now_stackable_nft_work() { Perbill::from_percent(0u32), FungibleTokenId::NativeToken(0) )); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), - 70u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 70u128); assert_ok!(AuctionModule::buy_now(buyer.clone(), 0, 200)); //assert_eq!(AuctionModule::auctions(0), None); // check account received asset - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), - 30u128 - ); - assert_eq!( - NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), - 70u128 - ); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&ALICE, &(0, 0)), 30u128); + assert_eq!(NFTModule::get_free_stackable_nft_balance(&BOB, &(0, 0)), 70u128); // check balances were transferred assert_eq!(Balances::free_balance(ALICE), 99800); diff --git a/pallets/continuum/src/mock.rs b/pallets/continuum/src/mock.rs index 57992d75b..e211281e0 100644 --- a/pallets/continuum/src/mock.rs +++ b/pallets/continuum/src/mock.rs @@ -17,7 +17,7 @@ #![cfg(test)] -use frame_support::pallet_prelude::{Hooks, DispatchResult}; +use frame_support::pallet_prelude::{DispatchResult, Hooks}; use frame_support::{construct_runtime, ord_parameter_types, parameter_types, PalletId}; use frame_system::EnsureSignedBy; use sp_core::H256; diff --git a/pallets/economy/src/lib.rs b/pallets/economy/src/lib.rs index 00f4e18e1..d16226a90 100644 --- a/pallets/economy/src/lib.rs +++ b/pallets/economy/src/lib.rs @@ -81,7 +81,6 @@ pub mod pallet { use sp_runtime::traits::{CheckedAdd, CheckedSub, Saturating}; use sp_runtime::ArithmeticError; - use primitives::{staking::Bond, ClassId, NftId}; use super::*; diff --git a/pallets/economy/src/mock.rs b/pallets/economy/src/mock.rs index d85b5ec97..7205c4872 100644 --- a/pallets/economy/src/mock.rs +++ b/pallets/economy/src/mock.rs @@ -14,9 +14,9 @@ use auction_manager::*; use core_primitives::NftAssetData; use primitives::estate::Estate; use primitives::staking::MetaverseStakingTrait; +use primitives::ClassId; use primitives::{Amount, AuctionId, EstateId, FungibleTokenId, ItemId, UndeployedLandBlockId}; use sp_runtime::BuildStorage; -use primitives::ClassId; use crate as economy; diff --git a/pallets/economy/src/tests.rs b/pallets/economy/src/tests.rs index 66a162ae3..28a7ea712 100644 --- a/pallets/economy/src/tests.rs +++ b/pallets/economy/src/tests.rs @@ -19,14 +19,14 @@ use frame_support::{assert_noop, assert_ok}; -use sp_runtime::traits::{AccountIdConversion}; +use sp_runtime::traits::AccountIdConversion; use sp_std::default::Default; use core_primitives::{Attributes, CollectionType, TokenType}; use mock::{RuntimeEvent, *}; use primitives::staking::Bond; -use primitives::GroupCollectionId; use primitives::ClassId; +use primitives::GroupCollectionId; use super::*; diff --git a/pallets/evm-mapping/src/mock.rs b/pallets/evm-mapping/src/mock.rs index 467968340..48bb2d067 100644 --- a/pallets/evm-mapping/src/mock.rs +++ b/pallets/evm-mapping/src/mock.rs @@ -19,21 +19,17 @@ #![cfg(test)] - -use frame_support::traits::{Nothing}; +use frame_support::traits::Nothing; +use frame_support::PalletId; use frame_support::{construct_runtime, parameter_types}; -use frame_support::{PalletId}; use orml_traits::parameter_type_with_key; use sp_core::H256; -use sp_runtime::{ - traits::{AccountIdConversion, IdentityLookup}, -}; +use sp_runtime::traits::{AccountIdConversion, IdentityLookup}; use primitives::{Amount, Balance, FungibleTokenId}; - use crate::mock::secp_utils::eth; use sp_runtime::BuildStorage; diff --git a/pallets/evm-mapping/src/tests.rs b/pallets/evm-mapping/src/tests.rs index caba8dfef..816d34cf4 100644 --- a/pallets/evm-mapping/src/tests.rs +++ b/pallets/evm-mapping/src/tests.rs @@ -19,13 +19,9 @@ #![cfg(test)] +use frame_support::assert_ok; - -use frame_support::{assert_ok}; - -use mock::{ - alice, secp_utils::*, EVMMapping, ExtBuilder, Runtime, RuntimeEvent, RuntimeOrigin, System, ALICE, -}; +use mock::{alice, secp_utils::*, EVMMapping, ExtBuilder, Runtime, RuntimeEvent, RuntimeOrigin, System, ALICE}; use super::*; diff --git a/pallets/mining/src/lib.rs b/pallets/mining/src/lib.rs index 9f1ef4acd..73fb70348 100644 --- a/pallets/mining/src/lib.rs +++ b/pallets/mining/src/lib.rs @@ -31,9 +31,7 @@ use frame_system::pallet_prelude::*; use frame_system::{self as system, ensure_signed}; use orml_traits::{BasicCurrency, LockIdentifier, MultiCurrency, MultiCurrencyExtended}; use scale_info::TypeInfo; -use sp_runtime::{ - traits::{AccountIdConversion, Zero}, -}; +use sp_runtime::traits::{AccountIdConversion, Zero}; use sp_std::vec::Vec; use core_primitives::*; diff --git a/pallets/mining/src/mock.rs b/pallets/mining/src/mock.rs index cf71e7afb..a27be8876 100644 --- a/pallets/mining/src/mock.rs +++ b/pallets/mining/src/mock.rs @@ -1,5 +1,3 @@ - - use frame_support::traits::Nothing; use frame_support::{construct_runtime, ord_parameter_types, parameter_types}; use frame_system::EnsureSignedBy; diff --git a/pallets/reward/src/lib.rs b/pallets/reward/src/lib.rs index 95694729d..dcf9aa669 100644 --- a/pallets/reward/src/lib.rs +++ b/pallets/reward/src/lib.rs @@ -30,7 +30,7 @@ use frame_system::{ensure_signed, pallet_prelude::*}; use orml_traits::{DataProvider, MultiCurrency, MultiReservableCurrency}; use sp_core::Encode as SPEncode; use sp_io::hashing::keccak_256; -use sp_runtime::traits::{Hash as Hasher}; +use sp_runtime::traits::Hash as Hasher; use sp_runtime::{ traits::{AccountIdConversion, Zero}, DispatchError, Perbill, SaturatedConversion, diff --git a/runtime/continuum/src/constants.rs b/runtime/continuum/src/constants.rs index cb68995f2..0cb4e296d 100644 --- a/runtime/continuum/src/constants.rs +++ b/runtime/continuum/src/constants.rs @@ -19,11 +19,11 @@ pub mod currency { /// Time. pub mod time { - use frame_support::weights::constants::{WEIGHT_REF_TIME_PER_SECOND}; + use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND; use sp_weights::Weight; use polkadot_primitives::MAX_POV_SIZE; - use primitives::{BlockNumber}; + use primitives::BlockNumber; use crate::{Balance, Perbill, CENTS}; @@ -68,7 +68,7 @@ pub mod xcm_fees { use primitives::{Balance, FungibleTokenId}; - use crate::{CENTS}; + use crate::CENTS; pub fn base_tx(currency: FungibleTokenId) -> Balance { cent(currency) / 10 diff --git a/runtime/continuum/src/lib.rs b/runtime/continuum/src/lib.rs index f9d226f71..6dfec9448 100644 --- a/runtime/continuum/src/lib.rs +++ b/runtime/continuum/src/lib.rs @@ -32,8 +32,7 @@ use frame_support::{ traits::{Everything, Imbalance, WithdrawReasons}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, - ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, - WeightToFeePolynomial, + ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, }, BoundedVec, PalletId, }; @@ -41,7 +40,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; -use orml_traits::location::{AbsoluteReserveProvider}; +use orml_traits::location::AbsoluteReserveProvider; use orml_traits::{parameter_type_with_key, MultiCurrency}; pub use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; // XCM Imports @@ -72,9 +71,9 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeRevenue, TakeWeightCredit, + AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; diff --git a/runtime/metaverse/src/lib.rs b/runtime/metaverse/src/lib.rs index 6ca879d15..9441bc3a2 100644 --- a/runtime/metaverse/src/lib.rs +++ b/runtime/metaverse/src/lib.rs @@ -46,11 +46,10 @@ pub use frame_support::{ }; use frame_support::{BoundedVec, ConsensusEngineId}; // A few exports that help ease life for downstream crates. -use frame_support::traits::{ - Contains, EitherOfDiverse, EqualPrivilegeOnly, FindAuthor, InstanceFilter, Nothing, -}; +use frame_support::traits::{Contains, EitherOfDiverse, EqualPrivilegeOnly, FindAuthor, InstanceFilter, Nothing}; use frame_system::{ - limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, + limits::{BlockLength, BlockWeights}, + EnsureRoot, EnsureSigned, RawOrigin, }; use orml_traits::parameter_type_with_key; pub use pallet_balances::Call as BalancesCall; @@ -58,9 +57,7 @@ use pallet_contracts::weights::WeightInfo; use pallet_ethereum::PostLogContent; use pallet_ethereum::{Call::transact, EthereumBlockHashMapping, Transaction as EthereumTransaction}; use pallet_evm::GasWeightMapping; -use pallet_evm::{ - EnsureAddressNever, EnsureAddressRoot, FeeCalculator, HashedAddressMapping, Runner, -}; +use pallet_evm::{EnsureAddressNever, EnsureAddressRoot, FeeCalculator, HashedAddressMapping, Runner}; use pallet_grandpa::{fg_primitives, AuthorityId as GrandpaId, AuthorityList as GrandpaAuthorityList}; pub use pallet_transaction_payment::{CurrencyAdapter, Multiplier, TargetedFeeAdjustment}; use polkadot_primitives::MAX_POV_SIZE; @@ -69,11 +66,7 @@ use sp_api::impl_runtime_apis; use sp_consensus_aura::sr25519::AuthorityId as AuraId; #[cfg(not(feature = "runtime-benchmarks"))] use sp_core::Get; -use sp_core::{ - crypto::{KeyTypeId}, - sp_std::marker::PhantomData, - ConstBool, OpaqueMetadata, H160, H256, U256, -}; +use sp_core::{crypto::KeyTypeId, sp_std::marker::PhantomData, ConstBool, OpaqueMetadata, H160, H256, U256}; use sp_runtime::traits::{BlockNumberProvider, DispatchInfoOf}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -101,7 +94,8 @@ pub use estate::{MintingRateInfo, Range as MintingRange}; use evm_mapping::EvmAddressMapping; use metaverse_runtime_common::{precompiles::MetaverseNetworkPrecompiles, CurrencyHooks}; use primitives::evm::{ - CurrencyIdType, Erc20Mapping, EvmAddress, H160_POSITION_CURRENCY_ID_TYPE, H160_POSITION_TOKEN, H160_POSITION_TOKEN_NFT, H160_POSITION_TOKEN_NFT_CLASS_ID_END, + CurrencyIdType, Erc20Mapping, EvmAddress, H160_POSITION_CURRENCY_ID_TYPE, H160_POSITION_TOKEN, + H160_POSITION_TOKEN_NFT, H160_POSITION_TOKEN_NFT_CLASS_ID_END, }; use primitives::{Amount, Balance, BlockNumber, ClassId, FungibleTokenId, Moment, NftId, PoolId, RoundIndex, TokenId}; diff --git a/runtime/pioneer/src/constants.rs b/runtime/pioneer/src/constants.rs index cb68995f2..0cb4e296d 100644 --- a/runtime/pioneer/src/constants.rs +++ b/runtime/pioneer/src/constants.rs @@ -19,11 +19,11 @@ pub mod currency { /// Time. pub mod time { - use frame_support::weights::constants::{WEIGHT_REF_TIME_PER_SECOND}; + use frame_support::weights::constants::WEIGHT_REF_TIME_PER_SECOND; use sp_weights::Weight; use polkadot_primitives::MAX_POV_SIZE; - use primitives::{BlockNumber}; + use primitives::BlockNumber; use crate::{Balance, Perbill, CENTS}; @@ -68,7 +68,7 @@ pub mod xcm_fees { use primitives::{Balance, FungibleTokenId}; - use crate::{CENTS}; + use crate::CENTS; pub fn base_tx(currency: FungibleTokenId) -> Balance { cent(currency) / 10 diff --git a/runtime/pioneer/src/lib.rs b/runtime/pioneer/src/lib.rs index 98650b833..5b9e2190e 100644 --- a/runtime/pioneer/src/lib.rs +++ b/runtime/pioneer/src/lib.rs @@ -32,8 +32,7 @@ use frame_support::{ traits::{Everything, Imbalance, WithdrawReasons}, weights::{ constants::{BlockExecutionWeight, ExtrinsicBaseWeight, RocksDbWeight}, - ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, - WeightToFeePolynomial, + ConstantMultiplier, Weight, WeightToFeeCoefficient, WeightToFeeCoefficients, WeightToFeePolynomial, }, BoundedVec, PalletId, }; @@ -41,7 +40,7 @@ use frame_system::{ limits::{BlockLength, BlockWeights}, EnsureRoot, EnsureSigned, RawOrigin, }; -use orml_traits::location::{AbsoluteReserveProvider}; +use orml_traits::location::AbsoluteReserveProvider; use orml_traits::{parameter_type_with_key, MultiCurrency}; pub use orml_xcm_support::{IsNativeConcrete, MultiCurrencyAdapter, MultiNativeAsset}; // XCM Imports @@ -72,9 +71,9 @@ use sp_version::NativeVersion; use sp_version::RuntimeVersion; use xcm::latest::prelude::*; use xcm_builder::{ - AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, - TakeRevenue, TakeWeightCredit, + AccountId32Aliases, AllowTopLevelPaidExecutionFrom, EnsureXcmOrigin, FixedRateOfFungible, FixedWeightBounds, + ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeRevenue, TakeWeightCredit, }; use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; From 15c27db91106026352b09f45645e20a2a99e4d5b Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 28 Mar 2024 00:53:51 +0000 Subject: [PATCH 03/21] added IsTeleporter config that enables transfering NEER/NUUM to AssetHub --- runtime/continuum/src/lib.rs | 8 +++++++- runtime/pioneer/src/lib.rs | 9 ++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/runtime/continuum/src/lib.rs b/runtime/continuum/src/lib.rs index 6dfec9448..39d97b5c1 100644 --- a/runtime/continuum/src/lib.rs +++ b/runtime/continuum/src/lib.rs @@ -982,6 +982,11 @@ pub type XcmOriginToTransactDispatchOrigin = ( ); parameter_types! { + pub AssetHubLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000))); + pub const NuumNative: MultiAssetFilter = + Wild(AllOf { fun: WildFungible, id: Concrete(MultiLocation::here()) }); + pub AssetHubTrustedTeleporter: (MultiAssetFilter, MultiLocation) + = (NuumNative::get(), AssetHubLocation::get()); // One XCM operation is 100_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = Weight::from_parts(100_000_000, 0); pub const MaxInstructions: u32 = 100; @@ -1150,6 +1155,7 @@ impl Contains for SafeCallFilter { Self::allow_base_call(call) } } +pub type TrustedTeleporters = (xcm_builder::Case,); pub struct XcmConfig; @@ -1163,7 +1169,7 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = MultiNativeAsset; - type IsTeleporter = (); + type IsTeleporter = TrustedTeleporters; // Should be enough to allow teleportation of ROC type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; diff --git a/runtime/pioneer/src/lib.rs b/runtime/pioneer/src/lib.rs index 5b9e2190e..28348d6f8 100644 --- a/runtime/pioneer/src/lib.rs +++ b/runtime/pioneer/src/lib.rs @@ -982,6 +982,11 @@ pub type XcmOriginToTransactDispatchOrigin = ( ); parameter_types! { + pub AssetHubLocation: MultiLocation = MultiLocation::new(1, X1(Parachain(1000))); + pub const NeerNative: MultiAssetFilter = + Wild(AllOf { fun: WildFungible, id: Concrete(MultiLocation::here()) }); + pub AssetHubTrustedTeleporter: (MultiAssetFilter, MultiLocation) + = (NeerNative::get(), AssetHubLocation::get()); // One XCM operation is 100_000_000 weight - almost certainly a conservative estimate. pub UnitWeightCost: Weight = Weight::from_parts(100_000_000, 0); pub const MaxInstructions: u32 = 100; @@ -1157,6 +1162,8 @@ impl Contains for SafeCallFilter { Self::allow_base_call(call) } } +//pub type Reserves = (NativeAsset, ReserveAssetsFrom); +pub type TrustedTeleporters = (xcm_builder::Case,); pub struct XcmConfig; @@ -1170,7 +1177,7 @@ impl xcm_executor::Config for XcmConfig { type XcmSender = XcmRouter; type OriginConverter = XcmOriginToTransactDispatchOrigin; type IsReserve = MultiNativeAsset; - type IsTeleporter = (); + type IsTeleporter = TrustedTeleporters; // Should be enough to allow teleportation of ROC type UniversalLocation = UniversalLocation; type Weigher = FixedWeightBounds; From a2ded9e7428597c9d3236bac6e0017f07333d31b Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 28 Mar 2024 01:36:27 +0000 Subject: [PATCH 04/21] added initial XCM testing setup --- scripts/zombienet/tests/xcm-pioneer.zndsl | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 scripts/zombienet/tests/xcm-pioneer.zndsl diff --git a/scripts/zombienet/tests/xcm-pioneer.zndsl b/scripts/zombienet/tests/xcm-pioneer.zndsl new file mode 100644 index 000000000..7a24218c5 --- /dev/null +++ b/scripts/zombienet/tests/xcm-pioneer.zndsl @@ -0,0 +1,18 @@ +Description: Pioneer XCM Tests +Network: ../mnet-pioneer.toml +Creds: config + +alice: is up +bob: is up +asset-hub-collator: is up +pioneer-node: is up + +# AssetHub +alice: parachain 1000 is registered within 225 seconds +alice: parachain 1000 block height is at least 10 within 250 seconds +# MNET - Pioneer +alice: parachain 2096 is registered within 225 seconds +alice: parachain 2096 block height is at least 10 within 250 seconds + +# pioneer-node: ts-script ./transfer_ROC_from_AssetHub_to_Pioneer.ts return is greater than 0 within 500 seconds +# pioneer-node: ts-script ./transfer_NEER_from_Pioneer_to_AssetHub.ts return is greater than 0 within 500 seconds \ No newline at end of file From 8e31d0a2ec74ffa34e5227814f815932af4720ea Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 28 Mar 2024 01:42:47 +0000 Subject: [PATCH 05/21] updated gitignore --- .gitignore | 1 + scripts/zombienet/zombienet.sh | 0 2 files changed, 1 insertion(+) mode change 100644 => 100755 scripts/zombienet/zombienet.sh diff --git a/.gitignore b/.gitignore index a01169559..6a8634b68 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ **/*.rs.bk # Zombienet binaries **/scripts/zombienet/bin/* +**/bin/* .DS_Store # The cache for docker container dependency diff --git a/scripts/zombienet/zombienet.sh b/scripts/zombienet/zombienet.sh old mode 100644 new mode 100755 From dca216d942ac2ab2a038ef12f53e60f33c1d0aec Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Wed, 3 Apr 2024 00:55:31 +0100 Subject: [PATCH 06/21] fixed zombienet pioneer spawning make command --- Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 898fbe916..202edd73e 100644 --- a/Makefile +++ b/Makefile @@ -79,8 +79,8 @@ spawn-zombienet-basic: spawn-zombienet-metaverse: ./scripts/zombienet/zombienet.sh spawn_metaverse -.PHONY: spawn-zombienet-pioneeer -spawn-zombienet-meatverse: +.PHONY: spawn-zombienet-pioneer +spawn-zombienet-pioneer: ./scripts/zombienet/zombienet.sh spawn_pioneer .PHONY: install-chopsticks From 6844d6f64ef8632a514578dbe5982bbe9f081017 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 4 Apr 2024 02:58:51 +0100 Subject: [PATCH 07/21] added GenesisConfig for asset_manager --- node/src/chain_spec/continuum.rs | 2 ++ node/src/chain_spec/metaverse.rs | 1 + node/src/chain_spec/pioneer.rs | 2 ++ pallets/asset-manager/src/lib.rs | 16 ++++++++++++++++ primitives/metaverse/src/lib.rs | 3 +-- runtime/continuum/src/lib.rs | 2 +- runtime/metaverse/src/lib.rs | 2 +- runtime/pioneer/src/lib.rs | 2 +- 8 files changed, 25 insertions(+), 5 deletions(-) diff --git a/node/src/chain_spec/continuum.rs b/node/src/chain_spec/continuum.rs index 525077ff1..f898a7fb3 100644 --- a/node/src/chain_spec/continuum.rs +++ b/node/src/chain_spec/continuum.rs @@ -246,6 +246,7 @@ fn continuum_genesis( phantom: Default::default(), }, treasury: Default::default(), + asset_manager: Default::default(), } } @@ -306,6 +307,7 @@ fn testnet_genesis( phantom: Default::default(), }, treasury: Default::default(), + asset_manager: Default::default(), } } diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index f6214a0d5..f24b32529 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -317,6 +317,7 @@ fn testnet_genesis( _marker: Default::default(), chain_id: 0x7fa, }, + asset_manager: Default::default(), } } diff --git a/node/src/chain_spec/pioneer.rs b/node/src/chain_spec/pioneer.rs index a512beae4..3d47264e1 100644 --- a/node/src/chain_spec/pioneer.rs +++ b/node/src/chain_spec/pioneer.rs @@ -248,6 +248,7 @@ fn pioneer_genesis( phantom: Default::default(), }, treasury: Default::default(), + asset_manager: Default::default(), } } @@ -307,6 +308,7 @@ fn testnet_genesis( phantom: Default::default(), }, treasury: Default::default(), + asset_manager: Default::default(), } } diff --git a/pallets/asset-manager/src/lib.rs b/pallets/asset-manager/src/lib.rs index 7a793cb42..c7f2a0eb5 100644 --- a/pallets/asset-manager/src/lib.rs +++ b/pallets/asset-manager/src/lib.rs @@ -48,6 +48,7 @@ pub type BalanceOf = <::Currency as Currency< = StorageMap<_, Twox64Concat, AssetIds, AssetMetadata>, OptionQuery>; + #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { + pub assets_info: Vec<(MultiLocation, AssetMetadata>)>, + pub _config: PhantomData, + } + + #[pallet::genesis_build] + impl BuildGenesisConfig for GenesisConfig { + fn build(&self) { + for asset_info in self.assets_info.iter() { + Pallet::::do_register_foreign_asset(&asset_info.0, &asset_info.1); + } + } + } #[pallet::pallet] #[pallet::without_storage_info] pub struct Pallet(_); diff --git a/primitives/metaverse/src/lib.rs b/primitives/metaverse/src/lib.rs index 9df7a248c..f07cc639b 100644 --- a/primitives/metaverse/src/lib.rs +++ b/primitives/metaverse/src/lib.rs @@ -19,7 +19,6 @@ use codec::{Decode, Encode, HasCompact, MaxEncodedLen}; use scale_info::TypeInfo; -//#[cfg(feature = "std")] use serde::{Deserialize, Serialize}; use sp_runtime::traits::AtLeast32Bit; use sp_runtime::RuntimeDebug; @@ -393,7 +392,7 @@ impl Default for TokenSymbol { } } -#[derive(Clone, Eq, PartialEq, RuntimeDebug, Encode, Decode, TypeInfo)] +#[derive(Clone, Eq, PartialEq, RuntimeDebug, Encode, Decode, TypeInfo, Serialize, Deserialize)] pub struct AssetMetadata { pub name: Vec, pub symbol: Vec, diff --git a/runtime/continuum/src/lib.rs b/runtime/continuum/src/lib.rs index 39d97b5c1..a2d49e06e 100644 --- a/runtime/continuum/src/lib.rs +++ b/runtime/continuum/src/lib.rs @@ -1866,7 +1866,7 @@ construct_runtime!( Continuum: continuum::{Call, Pallet, Storage, Event} = 63, Estate: estate::{Call, Pallet, Storage, Event, Config} = 64, Economy: economy::{Pallet, Call, Storage, Event} = 65, - AssetManager: asset_manager::{Pallet, Call, Storage, Event} = 66, + AssetManager: asset_manager::{Pallet, Call, Storage, Event, Config} = 66, // Proxy Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 67, // Reward mechanism diff --git a/runtime/metaverse/src/lib.rs b/runtime/metaverse/src/lib.rs index 9441bc3a2..91c2757c9 100644 --- a/runtime/metaverse/src/lib.rs +++ b/runtime/metaverse/src/lib.rs @@ -1576,7 +1576,7 @@ construct_runtime!( Treasury: pallet_treasury::{Pallet, Storage, Config, Event, Call}, // Asset manager - AssetManager: asset_manager::{Pallet, Call, Storage, Event}, + AssetManager: asset_manager::{Pallet, Call, Storage, Event, Config}, // Proxy Proxy: pallet_proxy::{Pallet, Call, Storage, Event}, diff --git a/runtime/pioneer/src/lib.rs b/runtime/pioneer/src/lib.rs index 28348d6f8..73c810274 100644 --- a/runtime/pioneer/src/lib.rs +++ b/runtime/pioneer/src/lib.rs @@ -1874,7 +1874,7 @@ construct_runtime!( Continuum: continuum::{Call, Pallet, Storage, Event} = 63, Estate: estate::{Call, Pallet, Storage, Event, Config} = 64, Economy: economy::{Pallet, Call, Storage, Event} = 65, - AssetManager: asset_manager::{Pallet, Call, Storage, Event} = 66, + AssetManager: asset_manager::{Pallet, Call, Storage, Event, Config} = 66, // Proxy Proxy: pallet_proxy::{Pallet, Call, Storage, Event} = 67, // Reward mechanism From cce4d7bf718f8bfff3d9fb2c8ff6b9463237d8ea Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 4 Apr 2024 03:59:06 +0100 Subject: [PATCH 08/21] added prepopulated PINK and DED value to AssetManager GenesisState --- node/src/chain_spec/metaverse.rs | 46 +++++++++++++++++++++++++++++--- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index f24b32529..f205e9eda 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -1,4 +1,5 @@ use std::str::FromStr; +use cumulus_client_consensus_common::LevelLimit::Default; use hex_literal::hex; use log::info; @@ -8,14 +9,16 @@ use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::crypto::UncheckedInto; use sp_core::{sr25519, Pair, Public, H160, U256}; use sp_runtime::traits::{IdentifyAccount, Verify}; +use xcm::latest::Junctions; +use xcm::v3::{Junction, MultiLocation}; use metaverse_runtime::{ constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AuraConfig, BalancesConfig, BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, SudoConfig, - SystemConfig, + SystemConfig, AssetManagerConfig, }; -use primitives::Balance; +use primitives::{AssetMetadata, Balance}; // The URL for the telemetry server. // const STAGING_TELEMETRY_URL: &str = "wss://telemetry.polkadot.io/submit/"; @@ -317,7 +320,43 @@ fn testnet_genesis( _marker: Default::default(), chain_id: 0x7fa, }, - asset_manager: Default::default(), + asset_manager: AssetManagerConfig { + _config: Default::default(), + assets_info: vec![ + ( + MultiLocation { + parents: 1u8, + interior: Junctions::X3( + Junction::Parachain(1000), + Junction::PalletInstance(58), + Junction::GeneralIndex(30), + ), + }, + AssetMetadata { + name: "DED".as_bytes().to_vec(), + symbol: "DED".as_bytes().to_vec(), + decimals: 10, + minimal_balance: Default::default(), + } + ), + ( + MultiLocation{ + parents: 1u8, + interior: Junctions::X3( + Junction::Parachain(1000), + Junction::PalletInstance(58), + Junction::GeneralIndex(23), + ), + }, + AssetMetadata { + name: "PINK".as_bytes().to_vec(), + symbol: "PINK".as_bytes().to_vec(), + decimals: 10, + minimal_balance: Default::default(), + } + ), + ], + }, } } @@ -330,3 +369,4 @@ pub fn metaverse_properties() -> Properties { properties } + From 5ccf0a05c8a3ab947ac380d8e3fc52e8a5438da2 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 4 Apr 2024 04:08:27 +0100 Subject: [PATCH 09/21] fixed ChainState build errors --- node/src/chain_spec/metaverse.rs | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index f205e9eda..cc1fe36e3 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -1,5 +1,6 @@ +use cumulus_client_consensus_common::LevelLimit::Default as LevelLimitDefault; +use std::default; use std::str::FromStr; -use cumulus_client_consensus_common::LevelLimit::Default; use hex_literal::hex; use log::info; @@ -7,16 +8,17 @@ use sc_consensus_grandpa::AuthorityId as GrandpaId; use sc_service::{ChainType, Properties}; use sp_consensus_aura::sr25519::AuthorityId as AuraId; use sp_core::crypto::UncheckedInto; -use sp_core::{sr25519, Pair, Public, H160, U256}; +use sp_core::{sp_std, sr25519, Pair, Public, H160, U256}; use sp_runtime::traits::{IdentifyAccount, Verify}; +use sp_std::default::Default; use xcm::latest::Junctions; use xcm::v3::{Junction, MultiLocation}; use metaverse_runtime::{ - constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AuraConfig, BalancesConfig, - BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, GenesisAccount, - GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, SudoConfig, - SystemConfig, AssetManagerConfig, + constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AssetManagerConfig, AuraConfig, + BalancesConfig, BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, + GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, + SudoConfig, SystemConfig, }; use primitives::{AssetMetadata, Balance}; @@ -337,10 +339,10 @@ fn testnet_genesis( symbol: "DED".as_bytes().to_vec(), decimals: 10, minimal_balance: Default::default(), - } + }, ), ( - MultiLocation{ + MultiLocation { parents: 1u8, interior: Junctions::X3( Junction::Parachain(1000), @@ -353,7 +355,7 @@ fn testnet_genesis( symbol: "PINK".as_bytes().to_vec(), decimals: 10, minimal_balance: Default::default(), - } + }, ), ], }, @@ -369,4 +371,3 @@ pub fn metaverse_properties() -> Properties { properties } - From ce4b2f43d3574ddb94ae89036e818bcf8e292a8a Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Fri, 5 Apr 2024 00:02:03 +0100 Subject: [PATCH 10/21] fixed Zombienet setup --- scripts/zombienet/basic-config.toml | 12 ++++++++++-- scripts/zombienet/mnet-metaverse.toml | 8 ++++++-- scripts/zombienet/mnet-pioneer.toml | 7 +++++-- scripts/zombienet/zombienet.sh | 22 +++++++++++----------- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/scripts/zombienet/basic-config.toml b/scripts/zombienet/basic-config.toml index 980867db5..707526973 100644 --- a/scripts/zombienet/basic-config.toml +++ b/scripts/zombienet/basic-config.toml @@ -1,3 +1,6 @@ +[settings] +timeout = 1000 + [relaychain] default_command = "./bin/polkadot" chain = "kusama-local" @@ -16,13 +19,18 @@ chain = "kusama-local" id = 1000 add_to_genesis = true cumulus_based = true -chain = "statemine-local" +chain = "asset-hub-kusama-local" [[parachains.collators]] - name = "statemine-collator" + name = "asset-hub-collator-1" command = "./bin/asset-hub" ws_port = 9946 + [[parachains.collators]] + name = "asset-hub-collator-2" + command = "./bin/asset-hub" + ws_port = 9947 + [types.Header] number = "u64" weight = "u64" diff --git a/scripts/zombienet/mnet-metaverse.toml b/scripts/zombienet/mnet-metaverse.toml index 70c03d621..cec1a6a57 100644 --- a/scripts/zombienet/mnet-metaverse.toml +++ b/scripts/zombienet/mnet-metaverse.toml @@ -1,3 +1,6 @@ +[settings] +timeout = 1000 + [relaychain] default_command = "./bin/polkadot" chain = "kusama-local" @@ -42,14 +45,15 @@ cumulus_based = true id = 1000 add_to_genesis = true cumulus_based = true -chain = "statemine-local" +chain = "asset-hub-kusama-local" [[parachains.collators]] - name = "statemine-collator" + name = "asset-hub-collator-1" command = "./bin/asset-hub" ws_port = 9910 args = ["-lparachain=debug"] + [[hrmp_channels]] sender = 1000 recipient = 2096 diff --git a/scripts/zombienet/mnet-pioneer.toml b/scripts/zombienet/mnet-pioneer.toml index 58e15d565..486ab8101 100644 --- a/scripts/zombienet/mnet-pioneer.toml +++ b/scripts/zombienet/mnet-pioneer.toml @@ -1,3 +1,6 @@ +[settings] +timeout = 1000 + [relaychain] default_command = "./bin/polkadot" chain = "kusama-local" @@ -43,10 +46,10 @@ cumulus_based = true id = 1000 add_to_genesis = true cumulus_based = true -chain = "statemine-local" +chain = "asset-hub-kusama-local" [[parachains.collators]] - name = "statemine-collator" + name = "asset-hub-collator-1" command = "./bin/asset-hub" ws_port = 9910 args = ["-lparachain=debug"] diff --git a/scripts/zombienet/zombienet.sh b/scripts/zombienet/zombienet.sh index 258e77da7..d607ede8e 100755 --- a/scripts/zombienet/zombienet.sh +++ b/scripts/zombienet/zombienet.sh @@ -7,9 +7,9 @@ bin_dir="$root_dir/bin" working_dir="$(pwd)" provider=native -zombienet_version=v1.3.91 -pdot_branch=release-polkadot-v1.1.0 -asset_hub_branch=release-polkadot-v1.1.0 +zombienet_version=v1.3.99 +pdot_branch=mergebase-polkadot-v1.0.0 +asset_hub_branch=mergebase-cumulus-v1.0.0 polkadot_tmp_dir=/tmp/polkadot asset_hub_tmp_dir=/tmp/asset_hub @@ -60,18 +60,18 @@ build_polkadot() { return fi - if [ ! -f "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" ]; then + if [ ! -f "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" ]; then echo "::group::Install polkadot." echo "Cloning polkadot into $polkadot_tmp_dir" mkdir -p "$polkadot_tmp_dir" git clone --branch "$pdot_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$polkadot_tmp_dir/$pdot_branch" || true echo "Building polkadot..." - cargo build --manifest-path "$polkadot_tmp_dir/$pdot_branch/Cargo.toml" --features fast-runtime --release --locked - cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" "$bin_dir/polkadot" + cargo build --manifest-path "$polkadot_tmp_dir/$pdot_branch/polkadot/Cargo.toml" --features fast-runtime --release --locked + cp "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" "$bin_dir/polkadot" echo "::endgroup::" echo "✅ polkadot-$pdot_branch" else - cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" "$bin_dir/polkadot" + cp "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" "$bin_dir/polkadot" echo "✅ polkadot-$pdot_branch" fi } @@ -82,18 +82,18 @@ build_asset_hub() { return fi - if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" ]; then + if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" ]; then echo "::group::Install AssetHub." echo "Cloning AssetHub into $asset_hub_tmp_dir" mkdir -p "$asset_hub_tmp_dir" git clone --branch "$asset_hub_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$asset_hub_tmp_dir/$asset_hub_branch" || true echo "Building AssetHub..." - cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/Cargo.toml" --release --locked --bin polkadot-parachain - cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/Cargo.toml" --release --locked --bin polkadot-parachain + cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "::endgroup::" echo "✅ asset-hub-$asset_hub_branch" else - cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "✅ asset-hub-$asset_hub_branch" fi } From 6580581d26f0108dc1e13b084a12a9651501de64 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Wed, 10 Apr 2024 22:55:49 +0100 Subject: [PATCH 11/21] added pallet_evm genesis state for local testing --- Cargo.lock | 1 + node/src/chain_spec/metaverse.rs | 8 +++++-- pallets/evm-mapping/Cargo.toml | 1 + pallets/evm-mapping/src/lib.rs | 40 ++++++++++++++++++++++++++++++++ runtime/metaverse/src/lib.rs | 2 +- 5 files changed, 49 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ce02c694f..b76639898 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7636,6 +7636,7 @@ dependencies = [ "frame-benchmarking", "frame-support", "frame-system", + "hex-literal", "libsecp256k1", "orml-currencies", "orml-tokens", diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index cc1fe36e3..5ee320ce6 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -17,8 +17,8 @@ use xcm::v3::{Junction, MultiLocation}; use metaverse_runtime::{ constants::currency::*, opaque::SessionKeys, wasm_binary_unwrap, AccountId, AssetManagerConfig, AuraConfig, BalancesConfig, BaseFeeConfig, CollatorSelectionConfig, DemocracyConfig, EVMConfig, EstateConfig, EvmChainIdConfig, - GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, SessionConfig, Signature, - SudoConfig, SystemConfig, + EvmMappingConfig, GenesisAccount, GenesisConfig, GrandpaConfig, MintingRateInfo, OracleMembershipConfig, + SessionConfig, Signature, SudoConfig, SystemConfig, }; use primitives::{AssetMetadata, Balance}; @@ -322,6 +322,10 @@ fn testnet_genesis( _marker: Default::default(), chain_id: 0x7fa, }, + evm_mapping: EvmMappingConfig { + _marker: Default::default(), + is_testnet_genesis: true, + }, asset_manager: AssetManagerConfig { _config: Default::default(), assets_info: vec![ diff --git a/pallets/evm-mapping/Cargo.toml b/pallets/evm-mapping/Cargo.toml index cf2d0cbd1..538396449 100644 --- a/pallets/evm-mapping/Cargo.toml +++ b/pallets/evm-mapping/Cargo.toml @@ -9,6 +9,7 @@ serde = { workspace = true, optional = true } codec = { workspace = true, package = "parity-scale-codec" } libsecp256k1 = { workspace = true, optional = true } scale-info = { workspace = true } +hex-literal = { workspace = true } sp-core = { workspace = true } sp-io = { workspace = true } diff --git a/pallets/evm-mapping/src/lib.rs b/pallets/evm-mapping/src/lib.rs index 673206e16..a9810c000 100644 --- a/pallets/evm-mapping/src/lib.rs +++ b/pallets/evm-mapping/src/lib.rs @@ -35,6 +35,7 @@ use frame_support::{ transactional, }; use frame_system::{ensure_signed, pallet_prelude::*}; +use hex_literal::hex; use orml_traits::currency::TransferAll; pub use pallet::*; use primitives::{AccountIndex, EvmAddress}; @@ -107,6 +108,7 @@ pub trait AddressMapping { #[frame_support::pallet] pub mod pallet { use super::*; + use sp_core::H160; pub(crate) type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; @@ -180,6 +182,44 @@ pub mod pallet { #[pallet::getter(fn evm_addresses)] pub type EvmAddresses = StorageMap<_, Twox64Concat, T::AccountId, EvmAddress, OptionQuery>; + #[pallet::genesis_config] + #[derive(frame_support::DefaultNoBound)] + pub struct GenesisConfig { + pub is_testnet_genesis: bool, + pub _marker: PhantomData, + } + + #[pallet::genesis_build] + impl BuildGenesisConfig for GenesisConfig { + fn build(&self) { + if (self.is_testnet_genesis) { + // Add EVM address mapping for 5EMjsd14hMBsWVvC7bBaSC7FZQYxw1jQcZHA3Vho3pwtcbfM + let alice_evm = H160::from_slice(&hex_literal::hex!("d43593c715fdd31c61141abd04a99fd6822c8558")); + let alice_substrate = T::AddressMapping::get_account_id(&alice_evm); + + >::insert(alice_evm, &alice_substrate); + >::insert(&alice_substrate, alice_evm); + + >::deposit_event(Event::ClaimAccount { + account_id: alice_substrate, + evm_address: alice_evm, + }); + + // Add EVM address for metamask test account 5EMjsczhnpcwi7AcfreSB9vdvHzbcF4EBHNYjFNwooaQ9U2W + let test_account_evm = H160::from_slice(&hex_literal::hex!("6Be02d1d3665660d22FF9624b7BE0551ee1Ac91b")); + let test_account_substrate = T::AddressMapping::get_account_id(&test_account_evm); + + >::insert(test_account_evm, &test_account_substrate); + >::insert(&test_account_substrate, test_account_evm); + + >::deposit_event(Event::ClaimAccount { + account_id: test_account_substrate, + evm_address: test_account_evm, + }); + } + } + } + #[pallet::pallet] pub struct Pallet(_); diff --git a/runtime/metaverse/src/lib.rs b/runtime/metaverse/src/lib.rs index 91c2757c9..452e06018 100644 --- a/runtime/metaverse/src/lib.rs +++ b/runtime/metaverse/src/lib.rs @@ -1565,7 +1565,7 @@ construct_runtime!( EVM: pallet_evm::{Pallet, Call, Storage, Config, Event}, Ethereum: pallet_ethereum::{Pallet, Call, Storage, Event, Config, Origin}, BaseFee: pallet_base_fee::{Pallet, Call, Storage, Config, Event}, - EvmMapping: evm_mapping::{Pallet, Call, Storage, Event}, + EvmMapping: evm_mapping::{Pallet, Call, Storage, Config, Event}, EvmChainId: pallet_evm_chain_id::{Pallet, Storage, Config}, // ink! Smart Contracts. From 421e99ecd64d18688891d195310391ecffe11459 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Wed, 10 Apr 2024 23:18:35 +0100 Subject: [PATCH 12/21] added script and make command for finding default Substrate address for an EVM account --- .gitignore | 8 ++++++-- Makefile | 4 ++++ scripts/evm-tools/get_default_substrate_address.js | 11 +++++++++++ scripts/evm-tools/package.json | 6 ++++++ 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 scripts/evm-tools/get_default_substrate_address.js create mode 100644 scripts/evm-tools/package.json diff --git a/.gitignore b/.gitignore index 6a8634b68..d235f8b5f 100644 --- a/.gitignore +++ b/.gitignore @@ -14,8 +14,12 @@ # The cache for chain data in container .local -# chopsticks DB -db.sqlite +# These are copies chopsticks db files +**/scripts/chopsticks/db/ + +# Node modules for EVM tools scripts +**/scripts/evm-tools/node_modules/ +**/scripts/evm-tools/package-lock.jso # subalfred subalfred diff --git a/Makefile b/Makefile index 202edd73e..68144f7d4 100644 --- a/Makefile +++ b/Makefile @@ -95,6 +95,10 @@ run-chopsticks-pioneer: run-chopsticks-pioneer-xcm: npx @acala-network/chopsticks xcm -r kusama -p statemine -p scripts/chopsticks/chopsticks_pioneer.yml +.PHONY: get-default-substrate-address +get-default-substrate-address: + cd ./scripts/evm-tools && npm i && node get_default_substrate_address.js $(EVM_ADDRESS) $(PREFIX) + .PHONY: check-missing-std-dependencies check-missing-std-dependencies: cargo install subalfred && ./scripts/subalfred-check.sh "benchmarking|frame-try-runtime|frame-std" diff --git a/scripts/evm-tools/get_default_substrate_address.js b/scripts/evm-tools/get_default_substrate_address.js new file mode 100644 index 000000000..7f297b473 --- /dev/null +++ b/scripts/evm-tools/get_default_substrate_address.js @@ -0,0 +1,11 @@ +import { encodeAddress, blake2AsHex } from '@polkadot/util-crypto'; + +function getDefaultSubstrateAddress(evmAddress, prefix) { + const addressBytes = Buffer.from(evmAddress.slice(2), 'hex'); + const prefixBytes = Buffer.from('evm:'); + const convertBytes = Uint8Array.from(Buffer.concat([ prefixBytes, addressBytes ])); + const finalAddressHex = blake2AsHex(convertBytes, 256); + return encodeAddress(finalAddressHex, prefix) +} + +console.log("The default Substrate address for " + process.argv[2] + " is: " + getDefaultSubstrateAddress(process.argv[2], process.argv[3])); \ No newline at end of file diff --git a/scripts/evm-tools/package.json b/scripts/evm-tools/package.json new file mode 100644 index 000000000..2e1199ad5 --- /dev/null +++ b/scripts/evm-tools/package.json @@ -0,0 +1,6 @@ +{ + "type": "module", + "dependencies": { + "@polkadot/util-crypto": "^10.4.2" + } +} \ No newline at end of file From 3f4e04f79b1ae9f9e30632a2321a1e19b076a4db Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Fri, 12 Apr 2024 20:03:14 +0100 Subject: [PATCH 13/21] added relaychain native token to metaverse and pioneer testnet configs --- node/src/chain_spec/metaverse.rs | 12 ++++++ node/src/chain_spec/pioneer.rs | 55 +++++++++++++++++++++++++-- scripts/zombienet/mnet-metaverse.toml | 2 +- 3 files changed, 65 insertions(+), 4 deletions(-) diff --git a/node/src/chain_spec/metaverse.rs b/node/src/chain_spec/metaverse.rs index 5ee320ce6..af1f50019 100644 --- a/node/src/chain_spec/metaverse.rs +++ b/node/src/chain_spec/metaverse.rs @@ -329,6 +329,18 @@ fn testnet_genesis( asset_manager: AssetManagerConfig { _config: Default::default(), assets_info: vec![ + ( + MultiLocation { + parents: 1u8, + interior: Junctions::Here, + }, + AssetMetadata { + name: "ROC".as_bytes().to_vec(), + symbol: "ROC".as_bytes().to_vec(), + decimals: 12, + minimal_balance: Default::default(), + }, + ), ( MultiLocation { parents: 1u8, diff --git a/node/src/chain_spec/pioneer.rs b/node/src/chain_spec/pioneer.rs index 3d47264e1..d162d3179 100644 --- a/node/src/chain_spec/pioneer.rs +++ b/node/src/chain_spec/pioneer.rs @@ -13,13 +13,14 @@ use sp_runtime::{ traits::{IdentifyAccount, Verify}, Perbill, }; +use xcm::latest::{Junction, Junctions, MultiLocation}; use metaverse_runtime::MintingRateInfo; use pioneer_runtime::{ constants::currency::*, AccountId, AuraConfig, BalancesConfig, EstateConfig, GenesisConfig, OracleMembershipConfig, - SessionKeys, Signature, SudoConfig, SystemConfig, EXISTENTIAL_DEPOSIT, WASM_BINARY, + SessionKeys, Signature, SudoConfig, SystemConfig, EXISTENTIAL_DEPOSIT, WASM_BINARY, AssetManagerConfig }; -use primitives::Balance; +use primitives::{AssetMetadata, Balance}; use crate::chain_spec::Extensions; @@ -308,7 +309,55 @@ fn testnet_genesis( phantom: Default::default(), }, treasury: Default::default(), - asset_manager: Default::default(), + asset_manager: AssetManagerConfig { + _config: Default::default(), + assets_info: vec![ + ( + MultiLocation { + parents: 1u8, + interior: Junctions::Here, + }, + AssetMetadata { + name: "KSM".as_bytes().to_vec(), + symbol: "KSM".as_bytes().to_vec(), + decimals: 12, + minimal_balance: Default::default(), + }, + ), + ( + MultiLocation { + parents: 1u8, + interior: Junctions::X3( + Junction::Parachain(1000), + Junction::PalletInstance(58), + Junction::GeneralIndex(30), + ), + }, + AssetMetadata { + name: "DED".as_bytes().to_vec(), + symbol: "DED".as_bytes().to_vec(), + decimals: 10, + minimal_balance: Default::default(), + }, + ), + ( + MultiLocation { + parents: 1u8, + interior: Junctions::X3( + Junction::Parachain(1000), + Junction::PalletInstance(58), + Junction::GeneralIndex(23), + ), + }, + AssetMetadata { + name: "PINK".as_bytes().to_vec(), + symbol: "PINK".as_bytes().to_vec(), + decimals: 10, + minimal_balance: Default::default(), + }, + ), + ], + }, } } diff --git a/scripts/zombienet/mnet-metaverse.toml b/scripts/zombienet/mnet-metaverse.toml index cec1a6a57..bb1472bbb 100644 --- a/scripts/zombienet/mnet-metaverse.toml +++ b/scripts/zombienet/mnet-metaverse.toml @@ -3,7 +3,7 @@ timeout = 1000 [relaychain] default_command = "./bin/polkadot" -chain = "kusama-local" +chain = "rococo-local" [[relaychain.nodes]] name = "alice" From fd7887783f518e714c6e4a56ff9e79cd0d1344a9 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Fri, 12 Apr 2024 20:03:39 +0100 Subject: [PATCH 14/21] fixed formatting --- node/src/chain_spec/pioneer.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/src/chain_spec/pioneer.rs b/node/src/chain_spec/pioneer.rs index d162d3179..995c5268c 100644 --- a/node/src/chain_spec/pioneer.rs +++ b/node/src/chain_spec/pioneer.rs @@ -17,8 +17,8 @@ use xcm::latest::{Junction, Junctions, MultiLocation}; use metaverse_runtime::MintingRateInfo; use pioneer_runtime::{ - constants::currency::*, AccountId, AuraConfig, BalancesConfig, EstateConfig, GenesisConfig, OracleMembershipConfig, - SessionKeys, Signature, SudoConfig, SystemConfig, EXISTENTIAL_DEPOSIT, WASM_BINARY, AssetManagerConfig + constants::currency::*, AccountId, AssetManagerConfig, AuraConfig, BalancesConfig, EstateConfig, GenesisConfig, + OracleMembershipConfig, SessionKeys, Signature, SudoConfig, SystemConfig, EXISTENTIAL_DEPOSIT, WASM_BINARY, }; use primitives::{AssetMetadata, Balance}; From 80722950e4633167c9efc59f1a63ebf164c67c8d Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Tue, 16 Apr 2024 00:31:53 +0100 Subject: [PATCH 15/21] updated gitignore --- .gitignore | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index d235f8b5f..03a62d1ae 100644 --- a/.gitignore +++ b/.gitignore @@ -15,11 +15,12 @@ .local # These are copies chopsticks db files -**/scripts/chopsticks/db/ +**/scripts/chopsticks/db/* +**db* # Node modules for EVM tools scripts **/scripts/evm-tools/node_modules/ -**/scripts/evm-tools/package-lock.jso +**/scripts/evm-tools/package-lock.json # subalfred subalfred From 6bc2b57afd14900172a97ae0e6a0e28d1d836274 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Tue, 16 Apr 2024 01:19:05 +0100 Subject: [PATCH 16/21] zombienet setup works with local polkadot node versions above 1.0.0 --- scripts/zombienet/basic-config.toml | 4 ++-- scripts/zombienet/mnet-metaverse.toml | 2 +- scripts/zombienet/zombienet.sh | 24 +++++++++++++++--------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/scripts/zombienet/basic-config.toml b/scripts/zombienet/basic-config.toml index 707526973..83cf6eb20 100644 --- a/scripts/zombienet/basic-config.toml +++ b/scripts/zombienet/basic-config.toml @@ -3,7 +3,7 @@ timeout = 1000 [relaychain] default_command = "./bin/polkadot" -chain = "kusama-local" +chain = "rococo-local" [[relaychain.nodes]] name = "alice" @@ -19,7 +19,7 @@ chain = "kusama-local" id = 1000 add_to_genesis = true cumulus_based = true -chain = "asset-hub-kusama-local" +chain = "asset-hub-westend-local" [[parachains.collators]] name = "asset-hub-collator-1" diff --git a/scripts/zombienet/mnet-metaverse.toml b/scripts/zombienet/mnet-metaverse.toml index bb1472bbb..1dd562733 100644 --- a/scripts/zombienet/mnet-metaverse.toml +++ b/scripts/zombienet/mnet-metaverse.toml @@ -45,7 +45,7 @@ cumulus_based = true id = 1000 add_to_genesis = true cumulus_based = true -chain = "asset-hub-kusama-local" +chain = "asset-hub-westend-local" [[parachains.collators]] name = "asset-hub-collator-1" diff --git a/scripts/zombienet/zombienet.sh b/scripts/zombienet/zombienet.sh index d607ede8e..7a65bd626 100755 --- a/scripts/zombienet/zombienet.sh +++ b/scripts/zombienet/zombienet.sh @@ -7,8 +7,8 @@ bin_dir="$root_dir/bin" working_dir="$(pwd)" provider=native -zombienet_version=v1.3.99 -pdot_branch=mergebase-polkadot-v1.0.0 +zombienet_version=v1.3.100 +pdot_branch=release-polkadot-v1.5.0 asset_hub_branch=mergebase-cumulus-v1.0.0 polkadot_tmp_dir=/tmp/polkadot asset_hub_tmp_dir=/tmp/asset_hub @@ -60,18 +60,24 @@ build_polkadot() { return fi - if [ ! -f "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" ]; then + if [ ! -f "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" ] || [ ! -f "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-prepare-worker" ] || [ ! -f "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-execute-worker" ]; then echo "::group::Install polkadot." - echo "Cloning polkadot into $polkadot_tmp_dir" - mkdir -p "$polkadot_tmp_dir" - git clone --branch "$pdot_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$polkadot_tmp_dir/$pdot_branch" || true + if [ ! -f "$polkadot_tmp_dir/$pdot_branch" ]; then + echo "Cloning polkadot into $polkadot_tmp_dir" + mkdir -p "$polkadot_tmp_dir" + git clone --branch "$pdot_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$polkadot_tmp_dir/$pdot_branch" || true + fi echo "Building polkadot..." - cargo build --manifest-path "$polkadot_tmp_dir/$pdot_branch/polkadot/Cargo.toml" --features fast-runtime --release --locked - cp "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" "$bin_dir/polkadot" + cargo build --manifest-path "$polkadot_tmp_dir/$pdot_branch/Cargo.toml" --locked --release --features fast-runtime --bin polkadot --bin polkadot-prepare-worker --bin polkadot-execute-worker + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" "$bin_dir/polkadot" + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-prepare-worker" "$bin_dir/polkadot-prepare-worker" + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-execute-worker" "$bin_dir/polkadot-execute-worker" echo "::endgroup::" echo "✅ polkadot-$pdot_branch" else - cp "$polkadot_tmp_dir/$pdot_branch/polkadot/target/release/polkadot" "$bin_dir/polkadot" + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot" "$bin_dir/polkadot" + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-prepare-worker" "$bin_dir/polkadot-prepare-worker" + cp "$polkadot_tmp_dir/$pdot_branch/target/release/polkadot-execute-worker" "$bin_dir/polkadot-execute-worker" echo "✅ polkadot-$pdot_branch" fi } From d7fa139267d7c3317f24521c712c05f9d88fa97e Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Wed, 17 Apr 2024 17:47:45 +0100 Subject: [PATCH 17/21] zombienet setup works with local AssetHub node versions above 1.0.0 --- scripts/zombienet/mnet-pioneer.toml | 2 +- scripts/zombienet/zombienet.sh | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/scripts/zombienet/mnet-pioneer.toml b/scripts/zombienet/mnet-pioneer.toml index 486ab8101..e9b403395 100644 --- a/scripts/zombienet/mnet-pioneer.toml +++ b/scripts/zombienet/mnet-pioneer.toml @@ -3,7 +3,7 @@ timeout = 1000 [relaychain] default_command = "./bin/polkadot" -chain = "kusama-local" +chain = "rococo-local" [[relaychain.nodes]] name = "alice" diff --git a/scripts/zombienet/zombienet.sh b/scripts/zombienet/zombienet.sh index 7a65bd626..7bd8e0fdf 100755 --- a/scripts/zombienet/zombienet.sh +++ b/scripts/zombienet/zombienet.sh @@ -8,8 +8,8 @@ working_dir="$(pwd)" provider=native zombienet_version=v1.3.100 -pdot_branch=release-polkadot-v1.5.0 -asset_hub_branch=mergebase-cumulus-v1.0.0 +pdot_branch=release-polkadot-v1.6.0 +asset_hub_branch=release-polkadot-v1.1.0 polkadot_tmp_dir=/tmp/polkadot asset_hub_tmp_dir=/tmp/asset_hub @@ -88,18 +88,18 @@ build_asset_hub() { return fi - if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" ]; then + if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" ]; then echo "::group::Install AssetHub." echo "Cloning AssetHub into $asset_hub_tmp_dir" mkdir -p "$asset_hub_tmp_dir" git clone --branch "$asset_hub_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$asset_hub_tmp_dir/$asset_hub_branch" || true echo "Building AssetHub..." - cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/Cargo.toml" --release --locked --bin polkadot-parachain - cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/Cargo.toml" --release --locked --bin polkadot-parachain + cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "::endgroup::" echo "✅ asset-hub-$asset_hub_branch" else - cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "✅ asset-hub-$asset_hub_branch" fi } From 7b7c21ee91bf3f937b7f8377efa56fad67807913 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Wed, 17 Apr 2024 23:56:15 +0100 Subject: [PATCH 18/21] revert changes of zombienet asset_hub --- scripts/zombienet/zombienet.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/zombienet/zombienet.sh b/scripts/zombienet/zombienet.sh index 7bd8e0fdf..28fc990cf 100755 --- a/scripts/zombienet/zombienet.sh +++ b/scripts/zombienet/zombienet.sh @@ -9,7 +9,7 @@ working_dir="$(pwd)" provider=native zombienet_version=v1.3.100 pdot_branch=release-polkadot-v1.6.0 -asset_hub_branch=release-polkadot-v1.1.0 +asset_hub_branch=mergebase-cumulus-v1.0.0 polkadot_tmp_dir=/tmp/polkadot asset_hub_tmp_dir=/tmp/asset_hub @@ -88,18 +88,18 @@ build_asset_hub() { return fi - if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" ]; then + if [ ! -f "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" ]; then echo "::group::Install AssetHub." echo "Cloning AssetHub into $asset_hub_tmp_dir" mkdir -p "$asset_hub_tmp_dir" git clone --branch "$asset_hub_branch" --depth 1 https://github.com/paritytech/polkadot-sdk "$asset_hub_tmp_dir/$asset_hub_branch" || true echo "Building AssetHub..." - cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/Cargo.toml" --release --locked --bin polkadot-parachain - cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cargo build --manifest-path "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/Cargo.toml" --release --locked --bin polkadot-parachain + cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "::endgroup::" echo "✅ asset-hub-$asset_hub_branch" else - cp "$asset_hub_tmp_dir/$asset_hub_branch/target/release/polkadot-parachain" "$bin_dir/asset-hub" + cp "$asset_hub_tmp_dir/$asset_hub_branch/cumulus/target/release/polkadot-parachain" "$bin_dir/asset-hub" echo "✅ asset-hub-$asset_hub_branch" fi } From 41bbd4d2ad1cb781bc1ddd56008d65ab591524d3 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Mon, 22 Apr 2024 20:11:11 +0100 Subject: [PATCH 19/21] updated metaverse and pioneer commands --- scripts/zombienet/mnet-metaverse.toml | 1 + scripts/zombienet/mnet-pioneer.toml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/zombienet/mnet-metaverse.toml b/scripts/zombienet/mnet-metaverse.toml index 1dd562733..da0bd92b1 100644 --- a/scripts/zombienet/mnet-metaverse.toml +++ b/scripts/zombienet/mnet-metaverse.toml @@ -32,6 +32,7 @@ chain = "rococo-local" [[parachains]] id = 2096 +chain = "metaverse-testnet" add_to_genesis = true cumulus_based = true diff --git a/scripts/zombienet/mnet-pioneer.toml b/scripts/zombienet/mnet-pioneer.toml index e9b403395..b7c3c09d4 100644 --- a/scripts/zombienet/mnet-pioneer.toml +++ b/scripts/zombienet/mnet-pioneer.toml @@ -32,7 +32,7 @@ chain = "rococo-local" [[parachains]] id = 2096 -chain = "local" +chain = "pioneer-roc" add_to_genesis = true cumulus_based = true From e9a7856121c184bc26a8fd6f9c041b7a4bc7f024 Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 2 May 2024 23:21:29 +0100 Subject: [PATCH 20/21] updated ORML repo --- Cargo.toml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e8644a615..db431f4a8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -200,17 +200,17 @@ polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", kusama-runtime = { git = "https://github.com/paritytech/polkadot-sdk", branch = "release-polkadot-v1.1.0", default-features = false } # ORML -orml-currencies = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-rewards = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-traits = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-nft = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-unknown-tokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-xtokens = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-xcm = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-xcm-support = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-oracle = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } -orml-benchmarking = { git = "https://github.com/chexware/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-currencies = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-rewards = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-tokens = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-traits = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-nft = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-unknown-tokens = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-xtokens = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-xcm = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-xcm-support = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-oracle = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } +orml-benchmarking = { git = "https://github.com/bit-country/open-runtime-module-library", branch = "v-1.1.0", default-features = false } # EVM pallet-dynamic-fee = { git = "https://github.com/justinphamnz/frontier", branch = "polkadot-v1.1.0" } From f4097d2b9b0134dc266b4cb9ba163bdd4573813a Mon Sep 17 00:00:00 2001 From: Aleksandar Brayanov Date: Thu, 2 May 2024 23:22:04 +0100 Subject: [PATCH 21/21] updated lock file --- Cargo.lock | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b76639898..1a9cab52b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -6801,7 +6801,7 @@ dependencies = [ [[package]] name = "orml-benchmarking" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-benchmarking", "frame-support", @@ -6821,7 +6821,7 @@ dependencies = [ [[package]] name = "orml-currencies" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6838,7 +6838,7 @@ dependencies = [ [[package]] name = "orml-nft" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6852,7 +6852,7 @@ dependencies = [ [[package]] name = "orml-oracle" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6870,7 +6870,7 @@ dependencies = [ [[package]] name = "orml-rewards" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6887,7 +6887,7 @@ dependencies = [ [[package]] name = "orml-tokens" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6904,7 +6904,7 @@ dependencies = [ [[package]] name = "orml-traits" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -6924,7 +6924,7 @@ dependencies = [ [[package]] name = "orml-unknown-tokens" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6939,7 +6939,7 @@ dependencies = [ [[package]] name = "orml-utilities" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "parity-scale-codec", @@ -6954,7 +6954,7 @@ dependencies = [ [[package]] name = "orml-xcm" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "frame-system", @@ -6968,7 +6968,7 @@ dependencies = [ [[package]] name = "orml-xcm-support" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "frame-support", "orml-traits", @@ -6982,7 +6982,7 @@ dependencies = [ [[package]] name = "orml-xtokens" version = "0.4.1-dev" -source = "git+https://github.com/chexware/open-runtime-module-library?branch=v-1.1.0#502c3272d0387f4b42ab6268b86f793c908af79f" +source = "git+https://github.com/bit-country/open-runtime-module-library?branch=v-1.1.0#77353e05d9c4f7012b9a89040e8c2253977c5e5a" dependencies = [ "cumulus-primitives-core", "frame-support",