From eab56e6b32979f19e0a7c2dc2a5c4a652302b7b1 Mon Sep 17 00:00:00 2001 From: Sergej Sakac <73715684+Szegoo@users.noreply.github.com> Date: Wed, 21 Sep 2022 00:53:12 +0200 Subject: [PATCH] Rename Origin (#6020) * Rename Origin * fmt * fixes * more fixes * fix * more fixing * small fixes * last touches * update lockfile for {"substrate"} Co-authored-by: Shawn Tabrizi Co-authored-by: parity-processbot <> --- Cargo.lock | 344 +++++++++--------- runtime/common/src/assigned_slots.rs | 87 +++-- runtime/common/src/auctions.rs | 138 +++---- runtime/common/src/claims.rs | 159 +++++--- runtime/common/src/crowdloan/mod.rs | 222 ++++++----- runtime/common/src/impls.rs | 2 +- runtime/common/src/integration_tests.rs | 88 +++-- runtime/common/src/paras_registrar.rs | 118 +++--- runtime/common/src/purchase.rs | 128 ++++--- runtime/common/src/slots/mod.rs | 18 +- runtime/kusama/src/governance/old.rs | 4 +- runtime/kusama/src/lib.rs | 8 +- runtime/kusama/src/xcm_config.rs | 22 +- runtime/parachains/src/configuration/tests.rs | 161 ++++---- runtime/parachains/src/hrmp.rs | 14 +- runtime/parachains/src/hrmp/benchmarking.rs | 4 +- runtime/parachains/src/initializer.rs | 2 +- runtime/parachains/src/mock.rs | 4 +- runtime/parachains/src/paras/tests.rs | 52 ++- runtime/parachains/src/session_info/tests.rs | 10 +- runtime/parachains/src/ump.rs | 2 +- runtime/parachains/src/ump/tests.rs | 12 +- runtime/polkadot/src/lib.rs | 12 +- runtime/polkadot/src/xcm_config.rs | 20 +- runtime/rococo/src/lib.rs | 12 +- runtime/rococo/src/validator_manager.rs | 2 +- runtime/rococo/src/xcm_config.rs | 22 +- runtime/test-runtime/src/lib.rs | 21 +- runtime/test-runtime/src/xcm_config.rs | 4 +- runtime/westend/src/lib.rs | 8 +- runtime/westend/src/xcm_config.rs | 20 +- .../src/fungible/mock.rs | 2 +- xcm/pallet-xcm-benchmarks/src/generic/mock.rs | 18 +- xcm/pallet-xcm-benchmarks/src/generic/mod.rs | 2 +- xcm/pallet-xcm/src/lib.rs | 25 +- xcm/pallet-xcm/src/mock.rs | 26 +- xcm/pallet-xcm/src/tests.rs | 48 +-- xcm/xcm-builder/src/mock.rs | 4 +- xcm/xcm-builder/src/origin_conversion.rs | 151 ++++---- xcm/xcm-builder/tests/mock/mod.rs | 18 +- xcm/xcm-executor/src/config.rs | 2 +- xcm/xcm-simulator/example/src/lib.rs | 2 +- xcm/xcm-simulator/example/src/parachain.rs | 16 +- xcm/xcm-simulator/example/src/relay_chain.rs | 18 +- xcm/xcm-simulator/fuzzer/src/parachain.rs | 16 +- xcm/xcm-simulator/fuzzer/src/relay_chain.rs | 18 +- 46 files changed, 1176 insertions(+), 910 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 94f9cae19b38..67c1dd5326f8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -429,7 +429,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "beefy-primitives", @@ -465,7 +465,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -485,7 +485,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "beefy-primitives", "sp-api", @@ -494,7 +494,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -1989,7 +1989,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", ] @@ -2007,7 +2007,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -2030,7 +2030,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "Inflector", "chrono", @@ -2081,7 +2081,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2092,7 +2092,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2108,7 +2108,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -2137,7 +2137,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "bitflags", "frame-metadata", @@ -2169,7 +2169,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "Inflector", "cfg-expr", @@ -2183,7 +2183,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2195,7 +2195,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro2", "quote", @@ -2205,7 +2205,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2228,7 +2228,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -2239,7 +2239,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "log", @@ -2257,7 +2257,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -2272,7 +2272,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "sp-api", @@ -2281,7 +2281,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "parity-scale-codec", @@ -2464,7 +2464,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "chrono", "frame-election-provider-support", @@ -4822,7 +4822,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -4836,7 +4836,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -4852,7 +4852,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -4867,7 +4867,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -4891,7 +4891,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4911,7 +4911,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4930,7 +4930,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -4945,7 +4945,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "beefy-primitives", "frame-support", @@ -4961,7 +4961,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4984,7 +4984,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5002,7 +5002,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5021,7 +5021,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5038,7 +5038,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5054,7 +5054,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5078,7 +5078,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5091,7 +5091,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5109,7 +5109,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5124,7 +5124,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5147,7 +5147,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5163,7 +5163,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5183,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5200,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5217,7 +5217,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5235,7 +5235,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5250,7 +5250,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5265,7 +5265,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5282,7 +5282,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5302,7 +5302,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "sp-api", @@ -5312,7 +5312,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5329,7 +5329,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5352,7 +5352,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5368,7 +5368,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5383,7 +5383,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5398,7 +5398,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5414,7 +5414,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5435,7 +5435,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5451,7 +5451,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5465,7 +5465,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5488,7 +5488,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5499,7 +5499,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "sp-arithmetic", @@ -5508,7 +5508,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5522,7 +5522,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5540,7 +5540,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5559,7 +5559,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-support", "frame-system", @@ -5575,7 +5575,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5590,7 +5590,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5601,7 +5601,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5618,7 +5618,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -5634,7 +5634,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-benchmarking", "frame-support", @@ -8165,7 +8165,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8513,7 +8513,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "sp-core", @@ -8524,7 +8524,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -8551,7 +8551,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "futures-timer", @@ -8574,7 +8574,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8590,7 +8590,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8607,7 +8607,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8618,7 +8618,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "chrono", "clap", @@ -8657,7 +8657,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "fnv", "futures", @@ -8685,7 +8685,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "hash-db", "kvdb", @@ -8710,7 +8710,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -8734,7 +8734,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "fork-tree", @@ -8776,7 +8776,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "jsonrpsee", @@ -8798,7 +8798,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8811,7 +8811,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -8836,7 +8836,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "lazy_static", "lru 0.7.8", @@ -8863,7 +8863,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "environmental", "parity-scale-codec", @@ -8879,7 +8879,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "parity-scale-codec", @@ -8894,7 +8894,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "cfg-if 1.0.0", "libc", @@ -8914,7 +8914,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ahash", "async-trait", @@ -8955,7 +8955,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "finality-grandpa", "futures", @@ -8976,7 +8976,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ansi_term", "futures", @@ -8993,7 +8993,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "hex", @@ -9008,7 +9008,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "asynchronous-codec", @@ -9055,7 +9055,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "cid", "futures", @@ -9075,7 +9075,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "bitflags", @@ -9098,7 +9098,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ahash", "futures", @@ -9116,7 +9116,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "hex", @@ -9137,7 +9137,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "fork-tree", "futures", @@ -9165,7 +9165,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "bytes", "fnv", @@ -9195,7 +9195,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "libp2p", @@ -9208,7 +9208,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9217,7 +9217,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "hash-db", @@ -9247,7 +9247,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "jsonrpsee", @@ -9270,7 +9270,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "jsonrpsee", @@ -9283,7 +9283,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "directories", @@ -9352,7 +9352,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "parity-scale-codec", @@ -9366,7 +9366,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9385,7 +9385,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "libc", @@ -9404,7 +9404,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "chrono", "futures", @@ -9422,7 +9422,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ansi_term", "atty", @@ -9453,7 +9453,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9464,7 +9464,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "futures-timer", @@ -9490,7 +9490,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "log", @@ -9503,7 +9503,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "futures-timer", @@ -9989,7 +9989,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "hash-db", "log", @@ -10007,7 +10007,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "blake2", "proc-macro-crate", @@ -10019,7 +10019,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10032,7 +10032,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "integer-sqrt", "num-traits", @@ -10047,7 +10047,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10060,7 +10060,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "parity-scale-codec", @@ -10072,7 +10072,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "sp-api", @@ -10084,7 +10084,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "log", @@ -10102,7 +10102,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -10121,7 +10121,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "merlin", @@ -10144,7 +10144,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10158,7 +10158,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10171,7 +10171,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "base58", "bitflags", @@ -10217,7 +10217,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "blake2", "byteorder", @@ -10231,7 +10231,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro2", "quote", @@ -10242,7 +10242,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10251,7 +10251,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro2", "quote", @@ -10261,7 +10261,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "environmental", "parity-scale-codec", @@ -10272,7 +10272,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "finality-grandpa", "log", @@ -10290,7 +10290,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10304,7 +10304,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "bytes", "futures", @@ -10330,7 +10330,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "lazy_static", "sp-core", @@ -10341,7 +10341,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -10358,7 +10358,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "thiserror", "zstd", @@ -10367,7 +10367,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "parity-scale-codec", @@ -10382,7 +10382,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10396,7 +10396,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "sp-api", "sp-core", @@ -10406,7 +10406,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "backtrace", "lazy_static", @@ -10416,7 +10416,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "rustc-hash", "serde", @@ -10426,7 +10426,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "either", "hash256-std-hasher", @@ -10449,7 +10449,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10467,7 +10467,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "Inflector", "proc-macro-crate", @@ -10479,7 +10479,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "parity-scale-codec", @@ -10493,7 +10493,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10507,7 +10507,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "scale-info", @@ -10518,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "hash-db", "log", @@ -10540,12 +10540,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10558,7 +10558,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "log", "sp-core", @@ -10571,7 +10571,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures-timer", @@ -10587,7 +10587,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "sp-std", @@ -10599,7 +10599,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "sp-api", "sp-runtime", @@ -10608,7 +10608,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "log", @@ -10624,7 +10624,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ahash", "hash-db", @@ -10647,7 +10647,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10664,7 +10664,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10675,7 +10675,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "impl-trait-for-tuples", "log", @@ -10688,7 +10688,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -10903,7 +10903,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "platforms", ] @@ -10911,7 +10911,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10932,7 +10932,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures-util", "hyper", @@ -10945,7 +10945,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "jsonrpsee", "log", @@ -10966,7 +10966,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "async-trait", "futures", @@ -10992,7 +10992,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "futures", "substrate-test-utils-derive", @@ -11002,7 +11002,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11013,7 +11013,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "ansi_term", "build-helper", @@ -11727,7 +11727,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#91b97b016618fcc515f55a15b1f008b68e13f5a2" +source = "git+https://github.com/paritytech/substrate?branch=master#a47f200eebeb88a5bde6f1ed2be9728b82536dde" dependencies = [ "clap", "frame-try-runtime", diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index d704dfb0d158..9be227a37352 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -88,7 +88,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Origin for assigning slots. - type AssignSlotOrigin: EnsureOrigin<::Origin>; + type AssignSlotOrigin: EnsureOrigin<::RuntimeOrigin>; /// The type representing the leasing system. type Leaser: Leaser< @@ -592,7 +592,7 @@ mod tests { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); type BlockLength = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -738,7 +738,10 @@ mod tests { run_to_block(1); assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::root(), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + ), Error::::ParaDoesntExist ); }); @@ -750,7 +753,10 @@ mod tests { run_to_block(1); assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::signed(1), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::signed(1), + ParaId::from(1_u32), + ), BadOrigin ); }); @@ -770,7 +776,10 @@ mod tests { assert_ok!(TestRegistrar::::make_parachain(ParaId::from(1_u32))); assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::root(), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + ), Error::::NotParathread ); }); @@ -792,18 +801,24 @@ mod tests { assert_ok!(Slots::lease_out(ParaId::from(1_u32), &1, 1, 1, 1)); // Try to assign a perm slot in current period fails assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::root(), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + ), Error::::OngoingLeaseExists ); // Cleanup - assert_ok!(Slots::clear_all_leases(Origin::root(), 1.into())); + assert_ok!(Slots::clear_all_leases(RuntimeOrigin::root(), 1.into())); // Register lease for next lease period assert_ok!(Slots::lease_out(ParaId::from(1_u32), &1, 1, 2, 1)); // Should be detected and also fail assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::root(), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + ), Error::::OngoingLeaseExists ); }); @@ -836,17 +851,20 @@ mod tests { )); assert_ok!(AssignedSlots::assign_perm_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), )); assert_ok!(AssignedSlots::assign_perm_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(2_u32), )); assert_eq!(AssignedSlots::permanent_slot_count(), 2); assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::root(), ParaId::from(3_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(3_u32), + ), Error::::MaxPermanentSlotsExceeded ); }); @@ -868,7 +886,7 @@ mod tests { assert_eq!(AssignedSlots::permanent_slots(ParaId::from(1_u32)), None); assert_ok!(AssignedSlots::assign_perm_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), )); @@ -901,7 +919,7 @@ mod tests { assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current ), @@ -917,7 +935,7 @@ mod tests { assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::signed(1), + RuntimeOrigin::signed(1), ParaId::from(1_u32), SlotLeasePeriodStart::Current ), @@ -941,7 +959,7 @@ mod tests { assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current ), @@ -967,7 +985,7 @@ mod tests { // Try to assign a perm slot in current period fails assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current ), @@ -975,14 +993,14 @@ mod tests { ); // Cleanup - assert_ok!(Slots::clear_all_leases(Origin::root(), 1.into())); + assert_ok!(Slots::clear_all_leases(RuntimeOrigin::root(), 1.into())); // Register lease for next lease period assert_ok!(Slots::lease_out(ParaId::from(1_u32), &1, 1, 2, 1)); // Should be detected and also fail assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current ), @@ -1006,7 +1024,7 @@ mod tests { )); assert_ok!(AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(n as u32), SlotLeasePeriodStart::Current )); @@ -1023,7 +1041,7 @@ mod tests { )); assert_noop!( AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(7_u32), SlotLeasePeriodStart::Current ), @@ -1047,7 +1065,7 @@ mod tests { assert_eq!(AssignedSlots::temporary_slots(ParaId::from(1_u32)), None); assert_ok!(AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current )); @@ -1122,7 +1140,7 @@ mod tests { )); assert_ok!(AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(n as u32), if (n % 2).is_zero() { SlotLeasePeriodStart::Current @@ -1214,7 +1232,7 @@ mod tests { run_to_block(1); assert_noop!( - AssignedSlots::unassign_parachain_slot(Origin::root(), ParaId::from(1_u32),), + AssignedSlots::unassign_parachain_slot(RuntimeOrigin::root(), ParaId::from(1_u32),), Error::::SlotNotAssigned ); }); @@ -1226,7 +1244,10 @@ mod tests { run_to_block(1); assert_noop!( - AssignedSlots::assign_perm_parachain_slot(Origin::signed(1), ParaId::from(1_u32),), + AssignedSlots::assign_perm_parachain_slot( + RuntimeOrigin::signed(1), + ParaId::from(1_u32), + ), BadOrigin ); }); @@ -1245,15 +1266,16 @@ mod tests { )); assert_ok!(AssignedSlots::assign_perm_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), )); assert_eq!(TestRegistrar::::is_parachain(ParaId::from(1_u32)), true); - assert_ok!( - AssignedSlots::unassign_parachain_slot(Origin::root(), ParaId::from(1_u32),) - ); + assert_ok!(AssignedSlots::unassign_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + )); assert_eq!(AssignedSlots::permanent_slot_count(), 0); assert_eq!(AssignedSlots::has_permanent_slot(ParaId::from(1_u32)), false); @@ -1276,16 +1298,17 @@ mod tests { )); assert_ok!(AssignedSlots::assign_temp_parachain_slot( - Origin::root(), + RuntimeOrigin::root(), ParaId::from(1_u32), SlotLeasePeriodStart::Current )); assert_eq!(TestRegistrar::::is_parachain(ParaId::from(1_u32)), true); - assert_ok!( - AssignedSlots::unassign_parachain_slot(Origin::root(), ParaId::from(1_u32),) - ); + assert_ok!(AssignedSlots::unassign_parachain_slot( + RuntimeOrigin::root(), + ParaId::from(1_u32), + )); assert_eq!(AssignedSlots::temporary_slot_count(), 0); assert_eq!(AssignedSlots::active_temporary_slot_count(), 0); diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index b71f0ea3874a..f9181a7eac7b 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -117,7 +117,7 @@ pub mod pallet { type Randomness: Randomness; /// The origin which may initiate auctions. - type InitiateOrigin: EnsureOrigin; + type InitiateOrigin: EnsureOrigin; /// Weight Information for the Extrinsics in the Pallet type WeightInfo: WeightInfo; @@ -709,7 +709,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -955,8 +955,8 @@ mod tests { new_test_ext().execute_with(|| { run_to_block(1); - assert_noop!(Auctions::new_auction(Origin::signed(1), 5, 1), BadOrigin); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_noop!(Auctions::new_auction(RuntimeOrigin::signed(1), 5, 1), BadOrigin); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); assert_eq!(AuctionCounter::::get(), 1); assert_eq!( @@ -970,8 +970,8 @@ mod tests { fn bidding_works() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 5)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 5)); assert_eq!(Balances::reserved_balance(1), 5); assert_eq!(Balances::free_balance(1), 5); @@ -986,12 +986,12 @@ mod tests { fn under_bidding_works() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 5)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 5)); assert_storage_noop!({ - assert_ok!(Auctions::bid(Origin::signed(2), 0.into(), 1, 1, 4, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), 0.into(), 1, 1, 4, 1)); }); }); } @@ -1000,9 +1000,9 @@ mod tests { fn over_bidding_works() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 5)); - assert_ok!(Auctions::bid(Origin::signed(2), 0.into(), 1, 1, 4, 6)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 5)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), 0.into(), 1, 1, 4, 6)); assert_eq!(Balances::reserved_balance(1), 0); assert_eq!(Balances::free_balance(1), 10); @@ -1020,7 +1020,7 @@ mod tests { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); assert_eq!(AuctionCounter::::get(), 1); assert_eq!( @@ -1082,8 +1082,8 @@ mod tests { fn can_win_auction() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 1)); assert_eq!(Balances::reserved_balance(1), 1); assert_eq!(Balances::free_balance(1), 9); run_to_block(9); @@ -1105,8 +1105,8 @@ mod tests { fn can_win_auction_with_late_randomness() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 1)); assert_eq!(Balances::reserved_balance(1), 1); assert_eq!(Balances::free_balance(1), 9); assert_eq!( @@ -1159,8 +1159,8 @@ mod tests { fn can_win_incomplete_auction() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 4, 4, 5)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 4, 4, 5)); run_to_block(9); assert_eq!(leases(), vec![((0.into(), 4), LeaseData { leaser: 1, amount: 5 }),]); @@ -1172,11 +1172,11 @@ mod tests { fn should_choose_best_combination() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 1, 1)); - assert_ok!(Auctions::bid(Origin::signed(2), 0.into(), 1, 2, 3, 4)); - assert_ok!(Auctions::bid(Origin::signed(3), 0.into(), 1, 4, 4, 2)); - assert_ok!(Auctions::bid(Origin::signed(1), 1.into(), 1, 1, 4, 2)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 1, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), 0.into(), 1, 2, 3, 4)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(3), 0.into(), 1, 4, 4, 2)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 1.into(), 1, 1, 4, 2)); run_to_block(9); assert_eq!( @@ -1199,15 +1199,15 @@ mod tests { fn gap_bid_works() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); // User 1 will make a bid for period 1 and 4 for the same Para 0 - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 1, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 4, 4, 4)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 1, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 4, 4, 4)); // User 2 and 3 will make a bid for para 1 on period 2 and 3 respectively - assert_ok!(Auctions::bid(Origin::signed(2), 1.into(), 1, 2, 2, 2)); - assert_ok!(Auctions::bid(Origin::signed(3), 1.into(), 1, 3, 3, 3)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), 1.into(), 1, 2, 2, 2)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(3), 1.into(), 1, 3, 3, 3)); // Total reserved should be the max of the two assert_eq!(Balances::reserved_balance(1), 4); @@ -1238,16 +1238,16 @@ mod tests { fn deposit_credit_should_work() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 1, 5)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 1, 5)); assert_eq!(Balances::reserved_balance(1), 5); run_to_block(10); assert_eq!(leases(), vec![((0.into(), 1), LeaseData { leaser: 1, amount: 5 }),]); assert_eq!(TestLeaser::deposit_held(0.into(), &1), 5); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 2)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 2, 2, 2, 6)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 2)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 2, 2, 2, 6)); // Only 1 reserved since we have a deposit credit of 5. assert_eq!(Balances::reserved_balance(1), 1); run_to_block(20); @@ -1267,16 +1267,16 @@ mod tests { fn deposit_credit_on_alt_para_should_not_count() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 1, 5)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 1, 5)); assert_eq!(Balances::reserved_balance(1), 5); run_to_block(10); assert_eq!(leases(), vec![((0.into(), 1), LeaseData { leaser: 1, amount: 5 }),]); assert_eq!(TestLeaser::deposit_held(0.into(), &1), 5); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 2)); - assert_ok!(Auctions::bid(Origin::signed(1), 1.into(), 2, 2, 2, 6)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 2)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 1.into(), 2, 2, 2, 6)); // 6 reserved since we are bidding on a new para; only works because we don't assert_eq!(Balances::reserved_balance(1), 6); run_to_block(20); @@ -1298,11 +1298,11 @@ mod tests { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); for i in 1..6u64 { run_to_block(i as _); - assert_ok!(Auctions::bid(Origin::signed(i), 0.into(), 1, 1, 4, i)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(i), 0.into(), 1, 1, 4, i)); for j in 1..6 { assert_eq!(Balances::reserved_balance(j), if j == i { j } else { 0 }); assert_eq!(Balances::free_balance(j), if j == i { j * 9 } else { j * 10 }); @@ -1327,11 +1327,11 @@ mod tests { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 0, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 0, 1)); for i in 1..6u64 { run_to_block(((i - 1) / 2 + 1) as _); - assert_ok!(Auctions::bid(Origin::signed(i), 0.into(), 1, 1, 4, i)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(i), 0.into(), 1, 1, 4, i)); for j in 1..6 { assert_eq!(Balances::reserved_balance(j), if j <= i { j } else { 0 }); assert_eq!(Balances::free_balance(j), if j <= i { j * 9 } else { j * 10 }); @@ -1405,19 +1405,19 @@ mod tests { fn lower_bids_are_correctly_refunded() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 1, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 1, 1)); let para_1 = ParaId::from(1_u32); let para_2 = ParaId::from(2_u32); // Make a bid and reserve a balance - assert_ok!(Auctions::bid(Origin::signed(1), para_1, 1, 1, 4, 10)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), para_1, 1, 1, 4, 10)); assert_eq!(Balances::reserved_balance(1), 10); assert_eq!(ReservedAmounts::::get((1, para_1)), Some(10)); assert_eq!(Balances::reserved_balance(2), 0); assert_eq!(ReservedAmounts::::get((2, para_2)), None); // Bigger bid, reserves new balance and returns funds - assert_ok!(Auctions::bid(Origin::signed(2), para_2, 1, 1, 4, 20)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), para_2, 1, 1, 4, 20)); assert_eq!(Balances::reserved_balance(1), 0); assert_eq!(ReservedAmounts::::get((1, para_1)), None); assert_eq!(Balances::reserved_balance(2), 20); @@ -1429,14 +1429,14 @@ mod tests { fn initialize_winners_in_ending_period_works() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 9, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 9, 1)); let para_1 = ParaId::from(1_u32); let para_2 = ParaId::from(2_u32); let para_3 = ParaId::from(3_u32); // Make bids - assert_ok!(Auctions::bid(Origin::signed(1), para_1, 1, 1, 4, 10)); - assert_ok!(Auctions::bid(Origin::signed(2), para_2, 1, 3, 4, 20)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), para_1, 1, 1, 4, 10)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), para_2, 1, 3, 4, 20)); assert_eq!( Auctions::auction_status(System::block_number()), @@ -1466,7 +1466,7 @@ mod tests { AuctionStatus::::EndingPeriod(1, 0) ); assert_eq!(Auctions::winning(1), Some(winning)); - assert_ok!(Auctions::bid(Origin::signed(3), para_3, 1, 3, 4, 30)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(3), para_3, 1, 3, 4, 30)); run_to_block(12); assert_eq!( @@ -1482,9 +1482,9 @@ mod tests { fn handle_bid_requires_registered_para() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); assert_noop!( - Auctions::bid(Origin::signed(1), 1337.into(), 1, 1, 4, 1), + Auctions::bid(RuntimeOrigin::signed(1), 1337.into(), 1, 1, 4, 1), Error::::ParaNotRegistered ); assert_ok!(TestRegistrar::::register( @@ -1493,7 +1493,7 @@ mod tests { dummy_head_data(), dummy_validation_code() )); - assert_ok!(Auctions::bid(Origin::signed(1), 1337.into(), 1, 1, 4, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 1337.into(), 1, 1, 4, 1)); }); } @@ -1501,8 +1501,8 @@ mod tests { fn handle_bid_checks_existing_lease_periods() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 2, 3, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 2, 3, 1)); assert_eq!(Balances::reserved_balance(1), 1); assert_eq!(Balances::free_balance(1), 9); run_to_block(9); @@ -1518,21 +1518,21 @@ mod tests { // Para 1 just won an auction above and won some lease periods. // No bids can work which overlap these periods. - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); assert_noop!( - Auctions::bid(Origin::signed(1), 0.into(), 2, 1, 4, 1), + Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 2, 1, 4, 1), Error::::AlreadyLeasedOut, ); assert_noop!( - Auctions::bid(Origin::signed(1), 0.into(), 2, 1, 2, 1), + Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 2, 1, 2, 1), Error::::AlreadyLeasedOut, ); assert_noop!( - Auctions::bid(Origin::signed(1), 0.into(), 2, 3, 4, 1), + Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 2, 3, 4, 1), Error::::AlreadyLeasedOut, ); // This is okay, not an overlapping bid. - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 2, 1, 1, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 2, 1, 1, 1)); }); } @@ -1544,14 +1544,14 @@ mod tests { SampleLength::set(10); run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 9, 11)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 9, 11)); let para_1 = ParaId::from(1_u32); let para_2 = ParaId::from(2_u32); let para_3 = ParaId::from(3_u32); // Make bids - assert_ok!(Auctions::bid(Origin::signed(1), para_1, 1, 11, 14, 10)); - assert_ok!(Auctions::bid(Origin::signed(2), para_2, 1, 13, 14, 20)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), para_1, 1, 11, 14, 10)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(2), para_2, 1, 13, 14, 20)); assert_eq!( Auctions::auction_status(System::block_number()), @@ -1576,7 +1576,7 @@ mod tests { assert_eq!(Auctions::winning(0), Some(winning)); // New bids update the current winning - assert_ok!(Auctions::bid(Origin::signed(3), para_3, 1, 14, 14, 30)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(3), para_3, 1, 14, 14, 30)); winning[SlotRange::ThreeThree as u8 as usize] = Some((3, para_3, 30)); assert_eq!(Auctions::winning(0), Some(winning)); @@ -1588,7 +1588,7 @@ mod tests { assert_eq!(Auctions::winning(1), Some(winning)); run_to_block(25); // Overbid mid sample - assert_ok!(Auctions::bid(Origin::signed(3), para_3, 1, 13, 14, 30)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(3), para_3, 1, 13, 14, 30)); winning[SlotRange::TwoThree as u8 as usize] = Some((3, para_3, 30)); assert_eq!(Auctions::winning(1), Some(winning)); @@ -1629,7 +1629,7 @@ mod tests { ); run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 9, 11)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 9, 11)); run_to_block(9); assert_eq!( @@ -1704,13 +1704,13 @@ mod tests { fn can_cancel_auction() { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Auctions::new_auction(Origin::signed(6), 5, 1)); - assert_ok!(Auctions::bid(Origin::signed(1), 0.into(), 1, 1, 4, 1)); + assert_ok!(Auctions::new_auction(RuntimeOrigin::signed(6), 5, 1)); + assert_ok!(Auctions::bid(RuntimeOrigin::signed(1), 0.into(), 1, 1, 4, 1)); assert_eq!(Balances::reserved_balance(1), 1); assert_eq!(Balances::free_balance(1), 9); - assert_noop!(Auctions::cancel_auction(Origin::signed(6)), BadOrigin); - assert_ok!(Auctions::cancel_auction(Origin::root())); + assert_noop!(Auctions::cancel_auction(RuntimeOrigin::signed(6)), BadOrigin); + assert_ok!(Auctions::cancel_auction(RuntimeOrigin::root())); assert!(AuctionInfo::::get().is_none()); assert_eq!(Balances::reserved_balance(1), 0); @@ -1784,7 +1784,7 @@ mod benchmarking { let duration = T::BlockNumber::max_value(); let lease_period_index = LeasePeriodOf::::max_value(); let origin = T::InitiateOrigin::successful_origin(); - }: _(origin, duration, lease_period_index) + }: _(origin, duration, lease_period_index) verify { assert_last_event::(Event::::AuctionStarted { auction_index: AuctionCounter::::get(), diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index 1f92f4553533..cded9b289a4f 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -176,7 +176,7 @@ pub mod pallet { type VestingSchedule: VestingSchedule; #[pallet::constant] type Prefix: Get<&'static [u8]>; - type MoveClaimOrigin: EnsureOrigin; + type MoveClaimOrigin: EnsureOrigin; type WeightInfo: WeightInfo; } @@ -750,7 +750,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -885,7 +885,7 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..]) )); @@ -900,16 +900,25 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::move_claim(Origin::signed(1), eth(&alice()), eth(&bob()), None), + Claims::move_claim(RuntimeOrigin::signed(1), eth(&alice()), eth(&bob()), None), BadOrigin ); - assert_ok!(Claims::move_claim(Origin::signed(6), eth(&alice()), eth(&bob()), None)); + assert_ok!(Claims::move_claim( + RuntimeOrigin::signed(6), + eth(&alice()), + eth(&bob()), + None + )); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&alice(), &42u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim ); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&bob(), &42u64.encode(), &[][..]) )); @@ -922,10 +931,15 @@ mod tests { #[test] fn claim_attest_moving_works() { new_test_ext().execute_with(|| { - assert_ok!(Claims::move_claim(Origin::signed(6), eth(&dave()), eth(&bob()), None)); + assert_ok!(Claims::move_claim( + RuntimeOrigin::signed(6), + eth(&dave()), + eth(&bob()), + None + )); let s = sig::(&bob(), &42u64.encode(), StatementKind::Regular.to_text()); assert_ok!(Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 42, s, StatementKind::Regular.to_text().to_vec() @@ -937,8 +951,16 @@ mod tests { #[test] fn attest_moving_works() { new_test_ext().execute_with(|| { - assert_ok!(Claims::move_claim(Origin::signed(6), eth(&eve()), eth(&bob()), Some(42))); - assert_ok!(Claims::attest(Origin::signed(42), StatementKind::Saft.to_text().to_vec())); + assert_ok!(Claims::move_claim( + RuntimeOrigin::signed(6), + eth(&eve()), + eth(&bob()), + Some(42) + )); + assert_ok!(Claims::attest( + RuntimeOrigin::signed(42), + StatementKind::Saft.to_text().to_vec() + )); assert_eq!(Balances::free_balance(&42), 300); }); } @@ -947,20 +969,28 @@ mod tests { fn claiming_does_not_bypass_signing() { new_test_ext().execute_with(|| { assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..]) )); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&dave(), &42u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&dave(), &42u64.encode(), &[][..]) + ), Error::::InvalidStatement, ); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&eve(), &42u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&eve(), &42u64.encode(), &[][..]) + ), Error::::InvalidStatement, ); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&frank(), &42u64.encode(), &[][..]) )); @@ -973,7 +1003,7 @@ mod tests { assert_eq!(Balances::free_balance(42), 0); let s = sig::(&dave(), &42u64.encode(), StatementKind::Saft.to_text()); let r = Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 42, s.clone(), StatementKind::Saft.to_text().to_vec(), @@ -981,7 +1011,7 @@ mod tests { assert_noop!(r, Error::::InvalidStatement); let r = Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 42, s, StatementKind::Regular.to_text().to_vec(), @@ -992,7 +1022,7 @@ mod tests { let s = sig::(&dave(), &42u64.encode(), StatementKind::Regular.to_text()); assert_ok!(Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 42, s, StatementKind::Regular.to_text().to_vec() @@ -1002,7 +1032,7 @@ mod tests { let s = sig::(&dave(), &42u64.encode(), StatementKind::Regular.to_text()); let r = Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 42, s, StatementKind::Regular.to_text().to_vec(), @@ -1016,14 +1046,20 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::attest(Origin::signed(69), StatementKind::Saft.to_text().to_vec()), + Claims::attest(RuntimeOrigin::signed(69), StatementKind::Saft.to_text().to_vec()), Error::::SenderHasNoClaim ); assert_noop!( - Claims::attest(Origin::signed(42), StatementKind::Regular.to_text().to_vec()), + Claims::attest( + RuntimeOrigin::signed(42), + StatementKind::Regular.to_text().to_vec() + ), Error::::InvalidStatement ); - assert_ok!(Claims::attest(Origin::signed(42), StatementKind::Saft.to_text().to_vec())); + assert_ok!(Claims::attest( + RuntimeOrigin::signed(42), + StatementKind::Saft.to_text().to_vec() + )); assert_eq!(Balances::free_balance(&42), 300); assert_eq!(Claims::total(), total_claims() - 300); }); @@ -1035,13 +1071,16 @@ mod tests { assert_eq!(Balances::free_balance(42), 0); // Alice's claim is 100 assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..]) )); assert_eq!(Balances::free_balance(&42), 100); // Eve's claim is 300 through Account 42 - assert_ok!(Claims::attest(Origin::signed(42), StatementKind::Saft.to_text().to_vec())); + assert_ok!(Claims::attest( + RuntimeOrigin::signed(42), + StatementKind::Saft.to_text().to_vec() + )); assert_eq!(Balances::free_balance(&42), 100 + 300); assert_eq!(Claims::total(), total_claims() - 400); }); @@ -1085,7 +1124,7 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); let s = sig::(&dave(), &42u64.encode(), &[]); - let r = Claims::claim(Origin::none(), 42, s.clone()); + let r = Claims::claim(RuntimeOrigin::none(), 42, s.clone()); assert_noop!(r, Error::::InvalidStatement); }); } @@ -1094,18 +1133,22 @@ mod tests { fn add_claim_works() { new_test_ext().execute_with(|| { assert_noop!( - Claims::mint_claim(Origin::signed(42), eth(&bob()), 200, None, None), + Claims::mint_claim(RuntimeOrigin::signed(42), eth(&bob()), 200, None, None), sp_runtime::traits::BadOrigin, ); assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::claim(Origin::none(), 69, sig::(&bob(), &69u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 69, + sig::(&bob(), &69u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim, ); - assert_ok!(Claims::mint_claim(Origin::root(), eth(&bob()), 200, None, None)); + assert_ok!(Claims::mint_claim(RuntimeOrigin::root(), eth(&bob()), 200, None, None)); assert_eq!(Claims::total(), total_claims() + 200); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 69, sig::(&bob(), &69u64.encode(), &[][..]) )); @@ -1119,23 +1162,33 @@ mod tests { fn add_claim_with_vesting_works() { new_test_ext().execute_with(|| { assert_noop!( - Claims::mint_claim(Origin::signed(42), eth(&bob()), 200, Some((50, 10, 1)), None), + Claims::mint_claim( + RuntimeOrigin::signed(42), + eth(&bob()), + 200, + Some((50, 10, 1)), + None + ), sp_runtime::traits::BadOrigin, ); assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::claim(Origin::none(), 69, sig::(&bob(), &69u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 69, + sig::(&bob(), &69u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim, ); assert_ok!(Claims::mint_claim( - Origin::root(), + RuntimeOrigin::root(), eth(&bob()), 200, Some((50, 10, 1)), None )); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 69, sig::(&bob(), &69u64.encode(), &[][..]) )); @@ -1160,7 +1213,7 @@ mod tests { new_test_ext().execute_with(|| { assert_noop!( Claims::mint_claim( - Origin::signed(42), + RuntimeOrigin::signed(42), eth(&bob()), 200, None, @@ -1172,7 +1225,7 @@ mod tests { let signature = sig::(&bob(), &69u64.encode(), StatementKind::Regular.to_text()); assert_noop!( Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 69, signature.clone(), StatementKind::Regular.to_text().to_vec() @@ -1180,18 +1233,18 @@ mod tests { Error::::SignerHasNoClaim ); assert_ok!(Claims::mint_claim( - Origin::root(), + RuntimeOrigin::root(), eth(&bob()), 200, None, Some(StatementKind::Regular) )); assert_noop!( - Claims::claim_attest(Origin::none(), 69, signature.clone(), vec![],), + Claims::claim_attest(RuntimeOrigin::none(), 69, signature.clone(), vec![],), Error::::SignerHasNoClaim ); assert_ok!(Claims::claim_attest( - Origin::none(), + RuntimeOrigin::none(), 69, signature.clone(), StatementKind::Regular.to_text().to_vec() @@ -1206,7 +1259,7 @@ mod tests { assert_eq!(Balances::free_balance(42), 0); assert_err!( Claims::claim( - Origin::signed(42), + RuntimeOrigin::signed(42), 42, sig::(&alice(), &42u64.encode(), &[][..]) ), @@ -1220,12 +1273,16 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_ok!(Claims::claim( - Origin::none(), + RuntimeOrigin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..]) )); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&alice(), &42u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&alice(), &42u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim ); }); @@ -1244,7 +1301,7 @@ mod tests { CurrencyOf::::make_free_balance_be(&69, total_claims()); assert_eq!(Balances::free_balance(69), total_claims()); assert_ok!(Claims::mint_claim( - Origin::root(), + RuntimeOrigin::root(), eth(&bob()), 200, Some((50, 10, 1)), @@ -1255,7 +1312,11 @@ mod tests { // They should not be able to claim assert_noop!( - Claims::claim(Origin::none(), 69, sig::(&bob(), &69u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 69, + sig::(&bob(), &69u64.encode(), &[][..]) + ), Error::::VestedBalanceExists, ); }); @@ -1266,7 +1327,11 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&alice(), &69u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&alice(), &69u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim ); }); @@ -1277,7 +1342,11 @@ mod tests { new_test_ext().execute_with(|| { assert_eq!(Balances::free_balance(42), 0); assert_noop!( - Claims::claim(Origin::none(), 42, sig::(&bob(), &69u64.encode(), &[][..])), + Claims::claim( + RuntimeOrigin::none(), + 42, + sig::(&bob(), &69u64.encode(), &[][..]) + ), Error::::SignerHasNoClaim ); }); diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index 684c6a088a3f..1f84af3f2ee9 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -892,7 +892,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -1168,7 +1168,7 @@ mod tests { new_test_ext().execute_with(|| { let para = new_para(); // Now try to create a crowdloan campaign - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 4, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 4, 9, None)); // This is what the initial `fund_info` should look like let fund_info = FundInfo { depositor: 1, @@ -1201,7 +1201,7 @@ mod tests { let para = new_para(); // Now try to create a crowdloan campaign assert_ok!(Crowdloan::create( - Origin::signed(1), + RuntimeOrigin::signed(1), para, 1000, 1, @@ -1241,12 +1241,15 @@ mod tests { let para = new_para(); let e = Error::::InvalidParaId; - assert_noop!(Crowdloan::create(Origin::signed(1), 1.into(), 1000, 1, 4, 9, None), e); + assert_noop!( + Crowdloan::create(RuntimeOrigin::signed(1), 1.into(), 1000, 1, 4, 9, None), + e + ); // Cannot create a crowdloan with bad lease periods let e = Error::::LastPeriodBeforeFirstPeriod; - assert_noop!(Crowdloan::create(Origin::signed(1), para, 1000, 4, 1, 9, None), e); + assert_noop!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 4, 1, 9, None), e); let e = Error::::LastPeriodTooFarInFuture; - assert_noop!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 9, 9, None), e); + assert_noop!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 9, 9, None), e); // Cannot create a crowdloan without some deposit funds assert_ok!(TestRegistrar::::register( @@ -1257,14 +1260,22 @@ mod tests { )); let e = BalancesError::::InsufficientBalance; assert_noop!( - Crowdloan::create(Origin::signed(1337), ParaId::from(1234), 1000, 1, 3, 9, None), + Crowdloan::create( + RuntimeOrigin::signed(1337), + ParaId::from(1234), + 1000, + 1, + 3, + 9, + None + ), e ); // Cannot create a crowdloan with nonsense end date // This crowdloan would end in lease period 2, but is bidding for some slot that starts in lease period 1. assert_noop!( - Crowdloan::create(Origin::signed(1), para, 1000, 1, 4, 41, None), + Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 4, 41, None), Error::::EndTooFarInFuture ); }); @@ -1277,13 +1288,13 @@ mod tests { let index = NextFundIndex::::get(); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 4, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 4, 9, None)); // No contributions yet assert_eq!(Crowdloan::contribution_get(u32::from(para), &1).0, 0); // User 1 contributes to their own crowdloan - assert_ok!(Crowdloan::contribute(Origin::signed(1), para, 49, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, None)); // User 1 has spent some funds to do this, transfer fees **are** taken assert_eq!(Balances::free_balance(1), 950); // Contributions are stored in the trie @@ -1309,7 +1320,7 @@ mod tests { let pubkey = crypto::create_ed25519_pubkey(b"//verifier".to_vec()); // Set up a crowdloan assert_ok!(Crowdloan::create( - Origin::signed(1), + RuntimeOrigin::signed(1), para, 1000, 1, @@ -1323,7 +1334,7 @@ mod tests { // Missing signature assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 49, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, None), Error::::InvalidSignature ); @@ -1335,23 +1346,33 @@ mod tests { // Invalid signature assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 49, Some(invalid_signature)), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, Some(invalid_signature)), Error::::InvalidSignature ); // Valid signature wrong parameter assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 50, Some(valid_signature.clone())), + Crowdloan::contribute( + RuntimeOrigin::signed(1), + para, + 50, + Some(valid_signature.clone()) + ), Error::::InvalidSignature ); assert_noop!( - Crowdloan::contribute(Origin::signed(2), para, 49, Some(valid_signature.clone())), + Crowdloan::contribute( + RuntimeOrigin::signed(2), + para, + 49, + Some(valid_signature.clone()) + ), Error::::InvalidSignature ); // Valid signature assert_ok!(Crowdloan::contribute( - Origin::signed(1), + RuntimeOrigin::signed(1), para, 49, Some(valid_signature.clone()) @@ -1359,7 +1380,7 @@ mod tests { // Reuse valid signature assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 49, Some(valid_signature)), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, Some(valid_signature)), Error::::InvalidSignature ); @@ -1367,7 +1388,12 @@ mod tests { let valid_signature_2 = crypto::create_ed25519_signature(&payload_2.encode(), pubkey); // New valid signature - assert_ok!(Crowdloan::contribute(Origin::signed(1), para, 10, Some(valid_signature_2))); + assert_ok!(Crowdloan::contribute( + RuntimeOrigin::signed(1), + para, + 10, + Some(valid_signature_2) + )); // Contributions appear in free balance of crowdloan assert_eq!(Balances::free_balance(Crowdloan::fund_account_id(index)), 59); @@ -1385,22 +1411,22 @@ mod tests { // Cannot contribute to non-existing fund assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 49, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, None), Error::::InvalidParaId ); // Cannot contribute below minimum contribution assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 9, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 9, None), Error::::ContributionTooSmall ); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 4, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(1), para, 101, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 4, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(1), para, 101, None)); // Cannot contribute past the limit assert_noop!( - Crowdloan::contribute(Origin::signed(2), para, 900, None), + Crowdloan::contribute(RuntimeOrigin::signed(2), para, 900, None), Error::::CapExceeded ); @@ -1409,31 +1435,31 @@ mod tests { // Cannot contribute to ended fund assert_noop!( - Crowdloan::contribute(Origin::signed(1), para, 49, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para, 49, None), Error::::ContributionPeriodOver ); // If a crowdloan has already won, it should not allow contributions. let para_2 = new_para(); let index = NextFundIndex::::get(); - assert_ok!(Crowdloan::create(Origin::signed(1), para_2, 1000, 1, 4, 40, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_2, 1000, 1, 4, 40, None)); // Emulate a win by leasing out and putting a deposit. Slots pallet would normally do this. let crowdloan_account = Crowdloan::fund_account_id(index); set_winner(para_2, crowdloan_account, true); assert_noop!( - Crowdloan::contribute(Origin::signed(1), para_2, 49, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para_2, 49, None), Error::::BidOrLeaseActive ); // Move past lease period 1, should not be allowed to have further contributions with a crowdloan // that has starting period 1. let para_3 = new_para(); - assert_ok!(Crowdloan::create(Origin::signed(1), para_3, 1000, 1, 4, 40, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_3, 1000, 1, 4, 40, None)); run_to_block(40); let now = System::block_number(); assert_eq!(TestAuctioneer::lease_period_index(now).unwrap().0, 2); assert_noop!( - Crowdloan::contribute(Origin::signed(1), para_3, 49, None), + Crowdloan::contribute(RuntimeOrigin::signed(1), para_3, 49, None), Error::::ContributionPeriodOver ); }); @@ -1452,7 +1478,7 @@ mod tests { // Set up a crowdloan assert_ok!(Crowdloan::create( - Origin::signed(1), + RuntimeOrigin::signed(1), para, 1000, first_period, @@ -1464,20 +1490,20 @@ mod tests { run_to_block(8); // Can def contribute when auction is running. assert!(TestAuctioneer::auction_status(System::block_number()).is_ending().is_some()); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 250, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 250, None)); run_to_block(10); // Can't contribute when auction is in the VRF delay period. assert!(TestAuctioneer::auction_status(System::block_number()).is_vrf()); assert_noop!( - Crowdloan::contribute(Origin::signed(2), para, 250, None), + Crowdloan::contribute(RuntimeOrigin::signed(2), para, 250, None), Error::::VrfDelayInProgress ); run_to_block(15); // Its fine to contribute when no auction is running. assert!(!TestAuctioneer::auction_status(System::block_number()).is_in_progress()); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 250, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 250, None)); }) } @@ -1493,7 +1519,7 @@ mod tests { // Set up a crowdloan assert_ok!(Crowdloan::create( - Origin::signed(1), + RuntimeOrigin::signed(1), para, 1000, first_period, @@ -1505,13 +1531,13 @@ mod tests { // Fund crowdloan run_to_block(1); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); run_to_block(3); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 150, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 150, None)); run_to_block(5); - assert_ok!(Crowdloan::contribute(Origin::signed(4), para, 200, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(4), para, 200, None)); run_to_block(8); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 250, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 250, None)); run_to_block(10); assert_eq!( @@ -1535,9 +1561,9 @@ mod tests { let index = NextFundIndex::::get(); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 50, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 50, None)); run_to_block(10); let account_id = Crowdloan::fund_account_id(index); @@ -1548,11 +1574,11 @@ mod tests { assert_eq!(Balances::free_balance(2), 1900); assert_eq!(Balances::free_balance(3), 2950); - assert_ok!(Crowdloan::withdraw(Origin::signed(2), 2, para)); + assert_ok!(Crowdloan::withdraw(RuntimeOrigin::signed(2), 2, para)); assert_eq!(Balances::free_balance(&account_id), 50); assert_eq!(Balances::free_balance(2), 2000); - assert_ok!(Crowdloan::withdraw(Origin::signed(2), 3, para)); + assert_ok!(Crowdloan::withdraw(RuntimeOrigin::signed(2), 3, para)); assert_eq!(Balances::free_balance(&account_id), 0); assert_eq!(Balances::free_balance(3), 3000); }); @@ -1565,26 +1591,26 @@ mod tests { let index = NextFundIndex::::get(); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); run_to_block(10); let account_id = Crowdloan::fund_account_id(index); // user sends the crowdloan funds trying to make an accounting error - assert_ok!(Balances::transfer(Origin::signed(1), account_id, 10)); + assert_ok!(Balances::transfer(RuntimeOrigin::signed(1), account_id, 10)); // overfunded now assert_eq!(Balances::free_balance(&account_id), 110); assert_eq!(Balances::free_balance(2), 1900); - assert_ok!(Crowdloan::withdraw(Origin::signed(2), 2, para)); + assert_ok!(Crowdloan::withdraw(RuntimeOrigin::signed(2), 2, para)); assert_eq!(Balances::free_balance(2), 2000); // Some funds are left over assert_eq!(Balances::free_balance(&account_id), 10); // They wil be left in the account at the end - assert_ok!(Crowdloan::dissolve(Origin::signed(1), para)); + assert_ok!(Crowdloan::dissolve(RuntimeOrigin::signed(1), para)); assert_eq!(Balances::free_balance(&account_id), 10); }); } @@ -1597,23 +1623,23 @@ mod tests { let account_id = Crowdloan::fund_account_id(index); // Set up a crowdloan ending on 9 - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); // Make some contributions - assert_ok!(Crowdloan::contribute(Origin::signed(1), para, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 200, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 300, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(1), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 200, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 300, None)); assert_eq!(Balances::free_balance(account_id), 600); // Can't refund before the crowdloan it has ended assert_noop!( - Crowdloan::refund(Origin::signed(1337), para), + Crowdloan::refund(RuntimeOrigin::signed(1337), para), Error::::FundNotEnded, ); // Move to the end of the crowdloan run_to_block(10); - assert_ok!(Crowdloan::refund(Origin::signed(1337), para)); + assert_ok!(Crowdloan::refund(RuntimeOrigin::signed(1337), para)); // Funds are returned assert_eq!(Balances::free_balance(account_id), 0); @@ -1632,12 +1658,12 @@ mod tests { let account_id = Crowdloan::fund_account_id(index); // Set up a crowdloan ending on 9 - assert_ok!(Crowdloan::create(Origin::signed(1), para, 100000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 100000, 1, 1, 9, None)); // Make more contributions than our limit for i in 1..=RemoveKeysLimit::get() * 2 { Balances::make_free_balance_be(&i.into(), (1000 * i).into()); assert_ok!(Crowdloan::contribute( - Origin::signed(i.into()), + RuntimeOrigin::signed(i.into()), para, (i * 100).into(), None @@ -1648,7 +1674,7 @@ mod tests { // Move to the end of the crowdloan run_to_block(10); - assert_ok!(Crowdloan::refund(Origin::signed(1337), para)); + assert_ok!(Crowdloan::refund(RuntimeOrigin::signed(1337), para)); assert_eq!( last_event(), super::Event::::PartiallyRefunded { para_id: para }.into() @@ -1658,7 +1684,7 @@ mod tests { assert!(!Balances::free_balance(account_id).is_zero()); // Call again - assert_ok!(Crowdloan::refund(Origin::signed(1337), para)); + assert_ok!(Crowdloan::refund(RuntimeOrigin::signed(1337), para)); assert_eq!(last_event(), super::Event::::AllRefunded { para_id: para }.into()); // Funds are returned @@ -1677,16 +1703,16 @@ mod tests { let issuance = Balances::total_issuance(); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 50, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 50, None)); run_to_block(10); // All funds are refunded - assert_ok!(Crowdloan::refund(Origin::signed(2), para)); + assert_ok!(Crowdloan::refund(RuntimeOrigin::signed(2), para)); // Now that `fund.raised` is zero, it can be dissolved. - assert_ok!(Crowdloan::dissolve(Origin::signed(1), para)); + assert_ok!(Crowdloan::dissolve(RuntimeOrigin::signed(1), para)); assert_eq!(Balances::free_balance(1), 1000); assert_eq!(Balances::free_balance(2), 2000); assert_eq!(Balances::free_balance(3), 3000); @@ -1701,13 +1727,13 @@ mod tests { let issuance = Balances::total_issuance(); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 50, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 50, None)); // Can't dissolve before it ends assert_noop!( - Crowdloan::dissolve(Origin::signed(1), para), + Crowdloan::dissolve(RuntimeOrigin::signed(1), para), Error::::NotReadyToDissolve ); @@ -1715,22 +1741,22 @@ mod tests { set_winner(para, 1, true); // Can't dissolve when it won. assert_noop!( - Crowdloan::dissolve(Origin::signed(1), para), + Crowdloan::dissolve(RuntimeOrigin::signed(1), para), Error::::NotReadyToDissolve ); set_winner(para, 1, false); // Can't dissolve while it still has user funds assert_noop!( - Crowdloan::dissolve(Origin::signed(1), para), + Crowdloan::dissolve(RuntimeOrigin::signed(1), para), Error::::NotReadyToDissolve ); // All funds are refunded - assert_ok!(Crowdloan::refund(Origin::signed(2), para)); + assert_ok!(Crowdloan::refund(RuntimeOrigin::signed(2), para)); // Now that `fund.raised` is zero, it can be dissolved. - assert_ok!(Crowdloan::dissolve(Origin::signed(1), para)); + assert_ok!(Crowdloan::dissolve(RuntimeOrigin::signed(1), para)); assert_eq!(Balances::free_balance(1), 1000); assert_eq!(Balances::free_balance(2), 2000); assert_eq!(Balances::free_balance(3), 3000); @@ -1746,17 +1772,17 @@ mod tests { let account_id = Crowdloan::fund_account_id(index); // Set up a crowdloan - assert_ok!(Crowdloan::create(Origin::signed(1), para, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para, 1000, 1, 1, 9, None)); // Fund crowdloans. - assert_ok!(Crowdloan::contribute(Origin::signed(2), para, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para, 50, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para, 50, None)); // simulate the reserving of para's funds. this actually happens in the Slots pallet. assert_ok!(Balances::reserve(&account_id, 150)); run_to_block(19); assert_noop!( - Crowdloan::withdraw(Origin::signed(2), 2, para), + Crowdloan::withdraw(RuntimeOrigin::signed(2), 2, para), Error::::BidOrLeaseActive ); @@ -1772,11 +1798,11 @@ mod tests { assert_eq!(Balances::free_balance(2), 1900); assert_eq!(Balances::free_balance(3), 2950); - assert_ok!(Crowdloan::withdraw(Origin::signed(2), 2, para)); + assert_ok!(Crowdloan::withdraw(RuntimeOrigin::signed(2), 2, para)); assert_eq!(Balances::free_balance(&account_id), 50); assert_eq!(Balances::free_balance(2), 2000); - assert_ok!(Crowdloan::withdraw(Origin::signed(2), 3, para)); + assert_ok!(Crowdloan::withdraw(RuntimeOrigin::signed(2), 3, para)); assert_eq!(Balances::free_balance(&account_id), 0); assert_eq!(Balances::free_balance(3), 3000); }); @@ -1789,11 +1815,11 @@ mod tests { let para_2 = new_para(); // Set up crowdloans - assert_ok!(Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::create(Origin::signed(1), para_2, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_2, 1000, 1, 1, 9, None)); // Different contributions - assert_ok!(Crowdloan::contribute(Origin::signed(2), para_1, 100, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(3), para_2, 50, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para_1, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(3), para_2, 50, None)); // Original state assert_eq!(Funds::::get(para_1).unwrap().raised, 100); assert_eq!(Funds::::get(para_2).unwrap().raised, 50); @@ -1810,10 +1836,10 @@ mod tests { new_test_ext().execute_with(|| { let para_1 = new_para(); - assert_ok!(Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None)); // Cannot create a fund again assert_noop!( - Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None), + Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None), Error::::FundNotEnded, ); }); @@ -1824,11 +1850,11 @@ mod tests { new_test_ext().execute_with(|| { let para_1 = new_para(); - assert_ok!(Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None)); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para_1, 100, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para_1, 100, None)); let old_crowdloan = Crowdloan::funds(para_1).unwrap(); - assert_ok!(Crowdloan::edit(Origin::root(), para_1, 1234, 2, 3, 4, None)); + assert_ok!(Crowdloan::edit(RuntimeOrigin::root(), para_1, 1234, 2, 3, 4, None)); let new_crowdloan = Crowdloan::funds(para_1).unwrap(); // Some things stay the same @@ -1848,25 +1874,29 @@ mod tests { new_test_ext().execute_with(|| { let para_1 = new_para(); - assert_ok!(Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None)); // Cant add a memo before you have contributed. assert_noop!( - Crowdloan::add_memo(Origin::signed(1), para_1, b"hello, world".to_vec()), + Crowdloan::add_memo(RuntimeOrigin::signed(1), para_1, b"hello, world".to_vec()), Error::::NoContributions, ); // Make a contribution. Initially no memo. - assert_ok!(Crowdloan::contribute(Origin::signed(1), para_1, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(1), para_1, 100, None)); assert_eq!(Crowdloan::contribution_get(0u32, &1), (100, vec![])); // Can't place a memo that is too large. assert_noop!( - Crowdloan::add_memo(Origin::signed(1), para_1, vec![123; 123]), + Crowdloan::add_memo(RuntimeOrigin::signed(1), para_1, vec![123; 123]), Error::::MemoTooLarge, ); // Adding a memo to an existing contribution works - assert_ok!(Crowdloan::add_memo(Origin::signed(1), para_1, b"hello, world".to_vec())); + assert_ok!(Crowdloan::add_memo( + RuntimeOrigin::signed(1), + para_1, + b"hello, world".to_vec() + )); assert_eq!(Crowdloan::contribution_get(0u32, &1), (100, b"hello, world".to_vec())); // Can contribute again and data persists - assert_ok!(Crowdloan::contribute(Origin::signed(1), para_1, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(1), para_1, 100, None)); assert_eq!(Crowdloan::contribution_get(0u32, &1), (200, b"hello, world".to_vec())); }); } @@ -1877,18 +1907,18 @@ mod tests { let para_1 = new_para(); assert_ok!(TestAuctioneer::new_auction(5, 0)); - assert_ok!(Crowdloan::create(Origin::signed(1), para_1, 1000, 1, 1, 9, None)); + assert_ok!(Crowdloan::create(RuntimeOrigin::signed(1), para_1, 1000, 1, 1, 9, None)); // Should fail when no contributions. assert_noop!( - Crowdloan::poke(Origin::signed(1), para_1), + Crowdloan::poke(RuntimeOrigin::signed(1), para_1), Error::::NoContributions ); - assert_ok!(Crowdloan::contribute(Origin::signed(2), para_1, 100, None)); + assert_ok!(Crowdloan::contribute(RuntimeOrigin::signed(2), para_1, 100, None)); run_to_block(6); - assert_ok!(Crowdloan::poke(Origin::signed(1), para_1)); + assert_ok!(Crowdloan::poke(RuntimeOrigin::signed(1), para_1)); assert_eq!(Crowdloan::new_raise(), vec![para_1]); assert_noop!( - Crowdloan::poke(Origin::signed(1), para_1), + Crowdloan::poke(RuntimeOrigin::signed(1), para_1), Error::::AlreadyInNewRaise ); }); diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index f8675143e2bf..4c09397e0451 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -106,7 +106,7 @@ mod tests { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = u64; type RuntimeCall = RuntimeCall; diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index c81d58c8798a..15a39ff5a2f4 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -61,9 +61,9 @@ fn account_id(i: u32) -> AccountId32 { array.into() } -fn signed(i: u32) -> Origin { +fn signed(i: u32) -> RuntimeOrigin { let account_id = account_id(i); - Origin::signed(account_id) + RuntimeOrigin::signed(account_id) } frame_support::construct_runtime!( @@ -112,7 +112,7 @@ impl frame_system::Config for Test { type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -218,7 +218,7 @@ impl paras_registrar::Config for Test { type ParaDeposit = ParaDeposit; type DataDepositPerByte = DataDepositPerByte; type Currency = Balances; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type WeightInfo = crate::paras_registrar::TestWeightInfo; } @@ -389,7 +389,11 @@ fn basic_end_to_end_works() { // Start a new auction in the future let duration = 99u32 + offset; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // 2 sessions later they are parathreads run_to_session(2); @@ -557,7 +561,11 @@ fn basic_errors_fail() { // Start an auction let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // Cannot create a crowdloan if you do not own the para assert_noop!( @@ -600,7 +608,11 @@ fn competing_slots() { // Start a new auction in the future let duration = 149u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // Paras should be onboarded run_to_block(20); // session 2 @@ -697,7 +709,11 @@ fn competing_bids() { let starting_block = System::block_number(); let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); for n in 1..=3 { // Create a crowdloan for each para @@ -799,7 +815,11 @@ fn basic_swap_works() { // Start a new auction in the future let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // 2 sessions later they are parathreads run_to_session(2); @@ -955,7 +975,11 @@ fn parachain_swap_works() { let unique_id = winner - 1999u32; let starting_block = System::block_number(); let duration = 99u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // 2 sessions later they are parathreads run_to_block(starting_block + 20); @@ -1106,7 +1130,11 @@ fn crowdloan_ending_period_bid() { // Start a new auction in the future let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // 2 sessions later they are parathreads run_to_session(2); @@ -1182,7 +1210,11 @@ fn auction_bid_requires_registered_para() { // Start a new auction in the future let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // Can't bid with non-registered paras Balances::make_free_balance_be(&account_id(1), 1_000_000_000); @@ -1244,7 +1276,11 @@ fn gap_bids_work() { // Start a new auction in the future let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); Balances::make_free_balance_be(&account_id(1), 1_000_000_000); Balances::make_free_balance_be(&account_id(2), 1_000_000_000); @@ -1432,7 +1468,11 @@ fn cant_bid_on_existing_lease_periods() { let starting_block = System::block_number(); let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // 2 sessions later they are parathreads run_to_session(2); @@ -1480,7 +1520,11 @@ fn cant_bid_on_existing_lease_periods() { let starting_block = System::block_number(); let duration = 99u32; let lease_period_index_start = 4u32; - assert_ok!(Auctions::new_auction(Origin::root(), duration, lease_period_index_start)); + assert_ok!(Auctions::new_auction( + RuntimeOrigin::root(), + duration, + lease_period_index_start + )); // Poke the crowdloan into `NewRaise` assert_ok!(Crowdloan::poke(signed(1), ParaId::from(2000))); @@ -1492,7 +1536,7 @@ fn cant_bid_on_existing_lease_periods() { // Bids cannot be made which intersect assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start + 0, @@ -1504,7 +1548,7 @@ fn cant_bid_on_existing_lease_periods() { assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start + 1, @@ -1516,7 +1560,7 @@ fn cant_bid_on_existing_lease_periods() { assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start - 1, @@ -1528,7 +1572,7 @@ fn cant_bid_on_existing_lease_periods() { assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start + 0, @@ -1540,7 +1584,7 @@ fn cant_bid_on_existing_lease_periods() { assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start + 1, @@ -1552,7 +1596,7 @@ fn cant_bid_on_existing_lease_periods() { assert_noop!( Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start - 1, @@ -1564,7 +1608,7 @@ fn cant_bid_on_existing_lease_periods() { // Will work when not overlapping assert_ok!(Auctions::bid( - Origin::signed(crowdloan_account.clone()), + RuntimeOrigin::signed(crowdloan_account.clone()), ParaId::from(2000), 2, lease_period_index_start + 2, diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 4d63a8f8fe86..90493c9077b9 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -102,8 +102,8 @@ pub mod pallet { /// infallibly convert between this origin and the system origin, but in reality, they're the /// same type, we just can't express that to the Rust type system without writing a `where` /// clause everywhere. - type Origin: From<::Origin> - + Into::Origin>>; + type RuntimeOrigin: From<::RuntimeOrigin> + + Into::RuntimeOrigin>>; /// The system's currency for parathread payment. type Currency: ReservableCurrency; @@ -456,7 +456,7 @@ impl Pallet { /// Ensure the origin is one of Root, the `para` owner, or the `para` itself. /// If the origin is the `para` owner, the `para` must be unlocked. fn ensure_root_para_or_owner( - origin: ::Origin, + origin: ::RuntimeOrigin, id: ParaId, ) -> DispatchResult { ensure_signed(origin.clone()) @@ -469,7 +469,8 @@ impl Pallet { }) .or_else(|_| -> DispatchResult { // Else check if para origin... - let caller_id = ensure_parachain(::Origin::from(origin.clone()))?; + let caller_id = + ensure_parachain(::RuntimeOrigin::from(origin.clone()))?; ensure!(caller_id == id, Error::::NotOwner); Ok(()) }) @@ -648,7 +649,7 @@ mod tests { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -715,8 +716,8 @@ mod tests { } impl Config for Test { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type OnSwap = MockSwap; type ParaDeposit = ParaDeposit; @@ -800,7 +801,7 @@ mod tests { ValidationCode(validation_code) } - fn para_origin(id: ParaId) -> Origin { + fn para_origin(id: ParaId) -> RuntimeOrigin { runtime_parachains::Origin::Parachain(id).into() } @@ -828,9 +829,9 @@ mod tests { // first para is not yet registered assert!(!Parachains::is_parathread(para_id)); // We register the Para ID - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(32), test_validation_code(32), @@ -851,7 +852,7 @@ mod tests { assert!(Parachains::is_parathread(para_id)); assert!(!Parachains::is_parachain(para_id)); // Deregister it - assert_ok!(Registrar::deregister(Origin::root(), para_id,)); + assert_ok!(Registrar::deregister(RuntimeOrigin::root(), para_id,)); run_to_session(8); // It is nothing assert!(!Parachains::is_parathread(para_id)); @@ -865,10 +866,10 @@ mod tests { run_to_block(1); let para_id = LOWEST_PUBLIC_ID; assert!(!Parachains::is_parathread(para_id)); - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_eq!(Balances::reserved_balance(&1), ::ParaDeposit::get()); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(32), test_validation_code(32), @@ -890,7 +891,7 @@ mod tests { assert_noop!( Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), @@ -899,11 +900,11 @@ mod tests { ); // Successfully register para - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_noop!( Registrar::register( - Origin::signed(2), + RuntimeOrigin::signed(2), para_id, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), @@ -912,7 +913,7 @@ mod tests { ); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), @@ -920,12 +921,12 @@ mod tests { run_to_session(2); - assert_ok!(Registrar::deregister(Origin::root(), para_id)); + assert_ok!(Registrar::deregister(RuntimeOrigin::root(), para_id)); // Can't do it again assert_noop!( Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), @@ -934,10 +935,10 @@ mod tests { ); // Head Size Check - assert_ok!(Registrar::reserve(Origin::signed(2))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(2))); assert_noop!( Registrar::register( - Origin::signed(2), + RuntimeOrigin::signed(2), para_id + 1, test_genesis_head((max_head_size() + 1) as usize), test_validation_code(max_code_size() as usize), @@ -948,7 +949,7 @@ mod tests { // Code Size Check assert_noop!( Registrar::register( - Origin::signed(2), + RuntimeOrigin::signed(2), para_id + 1, test_genesis_head(max_head_size() as usize), test_validation_code((max_code_size() + 1) as usize), @@ -958,7 +959,7 @@ mod tests { // Needs enough funds for deposit assert_noop!( - Registrar::reserve(Origin::signed(1337)), + Registrar::reserve(RuntimeOrigin::signed(1337)), BalancesError::::InsufficientBalance ); }); @@ -970,16 +971,16 @@ mod tests { run_to_block(1); let para_id = LOWEST_PUBLIC_ID; assert!(!Parachains::is_parathread(para_id)); - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(32), test_validation_code(32), )); run_to_session(2); assert!(Parachains::is_parathread(para_id)); - assert_ok!(Registrar::deregister(Origin::root(), para_id,)); + assert_ok!(Registrar::deregister(RuntimeOrigin::root(), para_id,)); run_to_session(4); assert!(paras::Pallet::::lifecycle(para_id).is_none()); assert_eq!(Balances::reserved_balance(&1), 0); @@ -992,9 +993,9 @@ mod tests { run_to_block(1); let para_id = LOWEST_PUBLIC_ID; assert!(!Parachains::is_parathread(para_id)); - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, test_genesis_head(32), test_validation_code(32), @@ -1002,12 +1003,12 @@ mod tests { run_to_session(2); assert!(Parachains::is_parathread(para_id)); // Owner check - assert_noop!(Registrar::deregister(Origin::signed(2), para_id,), BadOrigin); + assert_noop!(Registrar::deregister(RuntimeOrigin::signed(2), para_id,), BadOrigin); assert_ok!(Registrar::make_parachain(para_id)); run_to_session(4); // Cant directly deregister parachain assert_noop!( - Registrar::deregister(Origin::root(), para_id,), + Registrar::deregister(RuntimeOrigin::root(), para_id,), Error::::NotParathread ); }); @@ -1019,16 +1020,16 @@ mod tests { // Successfully register first two parachains let para_1 = LOWEST_PUBLIC_ID; let para_2 = LOWEST_PUBLIC_ID + 1; - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_1, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), )); - assert_ok!(Registrar::reserve(Origin::signed(2))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(2))); assert_ok!(Registrar::register( - Origin::signed(2), + RuntimeOrigin::signed(2), para_2, test_genesis_head(max_head_size() as usize), test_validation_code(max_code_size() as usize), @@ -1075,17 +1076,17 @@ mod tests { new_test_ext().execute_with(|| { run_to_block(1); - assert_ok!(Registrar::reserve(Origin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); let para_id = LOWEST_PUBLIC_ID; assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_id, vec![1; 3].into(), vec![1, 2, 3].into(), )); // Owner can call swap - assert_ok!(Registrar::swap(Origin::signed(1), para_id, para_id + 1)); + assert_ok!(Registrar::swap(RuntimeOrigin::signed(1), para_id, para_id + 1)); // 2 session changes to fully onboard. run_to_session(2); @@ -1095,7 +1096,10 @@ mod tests { assert_ok!(Registrar::make_parachain(para_id)); // Owner cannot call swap anymore - assert_noop!(Registrar::swap(Origin::signed(1), para_id, para_id + 2), BadOrigin); + assert_noop!( + Registrar::swap(RuntimeOrigin::signed(1), para_id, para_id + 2), + BadOrigin + ); }); } @@ -1111,30 +1115,30 @@ mod tests { // Cannot even start a swap assert_noop!( - Registrar::swap(Origin::root(), para_1, para_2), + Registrar::swap(RuntimeOrigin::root(), para_1, para_2), Error::::NotRegistered ); // We register Paras 1 and 2 - assert_ok!(Registrar::reserve(Origin::signed(1))); - assert_ok!(Registrar::reserve(Origin::signed(2))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(1))); + assert_ok!(Registrar::reserve(RuntimeOrigin::signed(2))); assert_ok!(Registrar::register( - Origin::signed(1), + RuntimeOrigin::signed(1), para_1, test_genesis_head(32), test_validation_code(32), )); assert_ok!(Registrar::register( - Origin::signed(2), + RuntimeOrigin::signed(2), para_2, test_genesis_head(32), test_validation_code(32), )); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); @@ -1145,9 +1149,9 @@ mod tests { assert!(Parachains::is_parathread(para_2)); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); @@ -1155,18 +1159,18 @@ mod tests { assert_ok!(Registrar::make_parachain(para_1)); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); run_to_session(3); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); @@ -1177,15 +1181,15 @@ mod tests { assert!(Parachains::is_parathread(para_2)); // Swap works here. - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); - assert_ok!(Registrar::swap(Origin::root(), para_2, para_1)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_2, para_1)); run_to_session(5); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); @@ -1201,9 +1205,9 @@ mod tests { run_to_session(7); // Cannot swap - assert_ok!(Registrar::swap(Origin::root(), para_1, para_2)); + assert_ok!(Registrar::swap(RuntimeOrigin::root(), para_1, para_2)); assert_noop!( - Registrar::swap(Origin::root(), para_2, para_1), + Registrar::swap(RuntimeOrigin::root(), para_2, para_1), Error::::CannotSwap ); @@ -1261,7 +1265,7 @@ mod benchmarking { } benchmarks! { - where_clause { where ParaOrigin: Into<::Origin> } + where_clause { where ParaOrigin: Into<::RuntimeOrigin> } reserve { let caller: T::AccountId = whitelisted_caller(); diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index cea93307bfb3..8c0fcebd5c12 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -111,10 +111,10 @@ pub mod pallet { >; /// The origin allowed to set account status. - type ValidityOrigin: EnsureOrigin; + type ValidityOrigin: EnsureOrigin; /// The origin allowed to make configurations to the pallet. - type ConfigurationOrigin: EnsureOrigin; + type ConfigurationOrigin: EnsureOrigin; /// The maximum statement length for the statement users to sign when creating an account. #[pallet::constant] @@ -510,7 +510,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -596,10 +596,14 @@ mod tests { fn setup() { let statement = b"Hello, World".to_vec(); let unlock_block = 100; - Purchase::set_statement(Origin::signed(configuration_origin()), statement).unwrap(); - Purchase::set_unlock_block(Origin::signed(configuration_origin()), unlock_block).unwrap(); - Purchase::set_payment_account(Origin::signed(configuration_origin()), payment_account()) + Purchase::set_statement(RuntimeOrigin::signed(configuration_origin()), statement).unwrap(); + Purchase::set_unlock_block(RuntimeOrigin::signed(configuration_origin()), unlock_block) .unwrap(); + Purchase::set_payment_account( + RuntimeOrigin::signed(configuration_origin()), + payment_account(), + ) + .unwrap(); Balances::make_free_balance_be(&payment_account(), 100_000); } @@ -665,18 +669,21 @@ mod tests { let statement = b"Test Set Statement".to_vec(); // Invalid origin assert_noop!( - Purchase::set_statement(Origin::signed(alice()), statement.clone()), + Purchase::set_statement(RuntimeOrigin::signed(alice()), statement.clone()), BadOrigin, ); // Too Long let long_statement = [0u8; 10_000].to_vec(); assert_noop!( - Purchase::set_statement(Origin::signed(configuration_origin()), long_statement), + Purchase::set_statement( + RuntimeOrigin::signed(configuration_origin()), + long_statement + ), Error::::InvalidStatement, ); // Just right... assert_ok!(Purchase::set_statement( - Origin::signed(configuration_origin()), + RuntimeOrigin::signed(configuration_origin()), statement.clone() )); assert_eq!(Statement::::get(), statement); @@ -689,7 +696,7 @@ mod tests { let unlock_block = 69; // Invalid origin assert_noop!( - Purchase::set_unlock_block(Origin::signed(alice()), unlock_block), + Purchase::set_unlock_block(RuntimeOrigin::signed(alice()), unlock_block), BadOrigin, ); // Block Number in Past @@ -697,14 +704,14 @@ mod tests { System::set_block_number(bad_unlock_block); assert_noop!( Purchase::set_unlock_block( - Origin::signed(configuration_origin()), + RuntimeOrigin::signed(configuration_origin()), bad_unlock_block ), Error::::InvalidUnlockBlock, ); // Just right... assert_ok!(Purchase::set_unlock_block( - Origin::signed(configuration_origin()), + RuntimeOrigin::signed(configuration_origin()), unlock_block )); assert_eq!(UnlockBlock::::get(), unlock_block); @@ -717,12 +724,15 @@ mod tests { let payment_account: AccountId = [69u8; 32].into(); // Invalid Origin assert_noop!( - Purchase::set_payment_account(Origin::signed(alice()), payment_account.clone()), + Purchase::set_payment_account( + RuntimeOrigin::signed(alice()), + payment_account.clone() + ), BadOrigin, ); // Just right... assert_ok!(Purchase::set_payment_account( - Origin::signed(configuration_origin()), + RuntimeOrigin::signed(configuration_origin()), payment_account.clone() )); assert_eq!(PaymentAccount::::get(), Some(payment_account)); @@ -753,7 +763,7 @@ mod tests { new_test_ext().execute_with(|| { assert!(!Accounts::::contains_key(alice())); assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec(), )); @@ -776,7 +786,7 @@ mod tests { // Wrong Origin assert_noop!( Purchase::create_account( - Origin::signed(alice()), + RuntimeOrigin::signed(alice()), alice(), alice_signature().to_vec() ), @@ -786,7 +796,7 @@ mod tests { // Wrong Account/Signature assert_noop!( Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), bob_signature().to_vec() ), @@ -802,7 +812,7 @@ mod tests { )); assert_noop!( Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec() ), @@ -811,13 +821,13 @@ mod tests { // Duplicate Purchasing Account assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), bob(), bob_signature().to_vec() )); assert_noop!( Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), bob(), bob_signature().to_vec() ), @@ -831,19 +841,19 @@ mod tests { new_test_ext().execute_with(|| { // Alice account is created. assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec(), )); // She submits KYC, and we update the status to `Pending`. assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::Pending, )); // KYC comes back negative, so we mark the account invalid. assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::Invalid, )); @@ -859,7 +869,7 @@ mod tests { ); // She fixes it, we mark her account valid. assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::ValidLow, )); @@ -882,7 +892,7 @@ mod tests { // Wrong Origin assert_noop!( Purchase::update_validity_status( - Origin::signed(alice()), + RuntimeOrigin::signed(alice()), alice(), AccountValidity::Pending, ), @@ -891,7 +901,7 @@ mod tests { // Inactive Account assert_noop!( Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::Pending, ), @@ -899,18 +909,18 @@ mod tests { ); // Already Completed assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec(), )); assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::Completed, )); assert_noop!( Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::Pending, ), @@ -924,19 +934,19 @@ mod tests { new_test_ext().execute_with(|| { // Alice account is created assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec() )); // And approved for basic contribution assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::ValidLow, )); // We set a balance on the user based on the payment they made. 50 locked, 50 free. assert_ok!(Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), 50, 50, @@ -954,7 +964,7 @@ mod tests { ); // We can update the balance based on new information. assert_ok!(Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), 25, 50, @@ -978,13 +988,19 @@ mod tests { new_test_ext().execute_with(|| { // Wrong Origin assert_noop!( - Purchase::update_balance(Origin::signed(alice()), alice(), 50, 50, Permill::zero(),), + Purchase::update_balance( + RuntimeOrigin::signed(alice()), + alice(), + 50, + 50, + Permill::zero(), + ), BadOrigin ); // Inactive Account assert_noop!( Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), 50, 50, @@ -995,7 +1011,7 @@ mod tests { // Overflow assert_noop!( Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), u64::MAX, u64::MAX, @@ -1011,45 +1027,45 @@ mod tests { new_test_ext().execute_with(|| { // Alice and Bob accounts are created assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec() )); assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), bob(), bob_signature().to_vec() )); // Alice is approved for basic contribution assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::ValidLow, )); // Bob is approved for high contribution assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), bob(), AccountValidity::ValidHigh, )); // We set a balance on the users based on the payment they made. 50 locked, 50 free. assert_ok!(Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), 50, 50, Permill::zero(), )); assert_ok!(Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), bob(), 100, 150, Permill::zero(), )); // Now we call payout for Alice and Bob. - assert_ok!(Purchase::payout(Origin::signed(payment_account()), alice(),)); - assert_ok!(Purchase::payout(Origin::signed(payment_account()), bob(),)); + assert_ok!(Purchase::payout(RuntimeOrigin::signed(payment_account()), alice(),)); + assert_ok!(Purchase::payout(RuntimeOrigin::signed(payment_account()), bob(),)); // Payment is made. assert_eq!(::Currency::free_balance(&payment_account()), 99_650); assert_eq!(::Currency::free_balance(&alice()), 100); @@ -1082,13 +1098,13 @@ mod tests { // Vesting lock is removed in whole on block 101 (100 blocks after block 1) System::set_block_number(100); let vest_call = RuntimeCall::Vesting(pallet_vesting::Call::::vest {}); - assert_ok!(vest_call.clone().dispatch(Origin::signed(alice()))); - assert_ok!(vest_call.clone().dispatch(Origin::signed(bob()))); + assert_ok!(vest_call.clone().dispatch(RuntimeOrigin::signed(alice()))); + assert_ok!(vest_call.clone().dispatch(RuntimeOrigin::signed(bob()))); assert_eq!(::VestingSchedule::vesting_balance(&alice()), Some(45)); assert_eq!(::VestingSchedule::vesting_balance(&bob()), Some(140)); System::set_block_number(101); - assert_ok!(vest_call.clone().dispatch(Origin::signed(alice()))); - assert_ok!(vest_call.clone().dispatch(Origin::signed(bob()))); + assert_ok!(vest_call.clone().dispatch(RuntimeOrigin::signed(alice()))); + assert_ok!(vest_call.clone().dispatch(RuntimeOrigin::signed(bob()))); assert_eq!(::VestingSchedule::vesting_balance(&alice()), None); assert_eq!(::VestingSchedule::vesting_balance(&bob()), None); }); @@ -1098,45 +1114,45 @@ mod tests { fn payout_handles_basic_errors() { new_test_ext().execute_with(|| { // Wrong Origin - assert_noop!(Purchase::payout(Origin::signed(alice()), alice(),), BadOrigin); + assert_noop!(Purchase::payout(RuntimeOrigin::signed(alice()), alice(),), BadOrigin); // Account with Existing Vesting Schedule assert_ok!( ::VestingSchedule::add_vesting_schedule(&bob(), 100, 1, 50,) ); assert_noop!( - Purchase::payout(Origin::signed(payment_account()), bob(),), + Purchase::payout(RuntimeOrigin::signed(payment_account()), bob(),), Error::::VestingScheduleExists ); // Invalid Account (never created) assert_noop!( - Purchase::payout(Origin::signed(payment_account()), alice(),), + Purchase::payout(RuntimeOrigin::signed(payment_account()), alice(),), Error::::InvalidAccount ); // Invalid Account (created, but not valid) assert_ok!(Purchase::create_account( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), alice_signature().to_vec() )); assert_noop!( - Purchase::payout(Origin::signed(payment_account()), alice(),), + Purchase::payout(RuntimeOrigin::signed(payment_account()), alice(),), Error::::InvalidAccount ); // Not enough funds in payment account assert_ok!(Purchase::update_validity_status( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), AccountValidity::ValidHigh, )); assert_ok!(Purchase::update_balance( - Origin::signed(validity_origin()), + RuntimeOrigin::signed(validity_origin()), alice(), 100_000, 100_000, Permill::zero(), )); assert_noop!( - Purchase::payout(Origin::signed(payment_account()), alice(),), + Purchase::payout(RuntimeOrigin::signed(payment_account()), alice(),), BalancesError::::InsufficientBalance ); }); diff --git a/runtime/common/src/slots/mod.rs b/runtime/common/src/slots/mod.rs index 982f7e5f796e..673d9f86e1bd 100644 --- a/runtime/common/src/slots/mod.rs +++ b/runtime/common/src/slots/mod.rs @@ -91,7 +91,7 @@ pub mod pallet { type LeaseOffset: Get; /// The origin which may forcibly create or clear leases. Root can always do this. - type ForceOrigin: EnsureOrigin<::Origin>; + type ForceOrigin: EnsureOrigin<::RuntimeOrigin>; /// Weight Information for the Extrinsics in the Pallet type WeightInfo: WeightInfo; @@ -529,7 +529,7 @@ mod tests { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = (); type BlockLength = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -847,7 +847,7 @@ mod tests { assert_eq!(Balances::reserved_balance(j), j * 10); } - assert_ok!(Slots::clear_all_leases(Origin::root(), 1.into())); + assert_ok!(Slots::clear_all_leases(RuntimeOrigin::root(), 1.into())); // Balances cleaned up correctly for i in 1u32..=max_num { @@ -925,21 +925,21 @@ mod tests { // Para 1 should fail cause they don't have any leases assert_noop!( - Slots::trigger_onboard(Origin::signed(1), 1.into()), + Slots::trigger_onboard(RuntimeOrigin::signed(1), 1.into()), Error::::ParaNotOnboarding ); // Para 2 should succeed - assert_ok!(Slots::trigger_onboard(Origin::signed(1), 2.into())); + assert_ok!(Slots::trigger_onboard(RuntimeOrigin::signed(1), 2.into())); // Para 3 should fail cause their lease is in the future assert_noop!( - Slots::trigger_onboard(Origin::signed(1), 3.into()), + Slots::trigger_onboard(RuntimeOrigin::signed(1), 3.into()), Error::::ParaNotOnboarding ); // Trying Para 2 again should fail cause they are not currently a parathread - assert!(Slots::trigger_onboard(Origin::signed(1), 2.into()).is_err()); + assert!(Slots::trigger_onboard(RuntimeOrigin::signed(1), 2.into()).is_err()); assert_eq!(TestRegistrar::::operations(), vec![(2.into(), 1, true),]); }); @@ -1025,7 +1025,7 @@ mod benchmarking { let period_begin = 69u32.into(); let period_count = 3u32.into(); let origin = T::ForceOrigin::successful_origin(); - }: _(origin, para, leaser.clone(), amount, period_begin, period_count) + }: _(origin, para, leaser.clone(), amount, period_begin, period_count) verify { assert_last_event::(Event::::Leased { para_id: para, @@ -1119,7 +1119,7 @@ mod benchmarking { } let origin = T::ForceOrigin::successful_origin(); - }: _(origin, para) + }: _(origin, para) verify { for i in 0 .. max_people { let leaser = account("lease_deposit", i, 0); diff --git a/runtime/kusama/src/governance/old.rs b/runtime/kusama/src/governance/old.rs index 61a2f9074282..371b88dcd443 100644 --- a/runtime/kusama/src/governance/old.rs +++ b/runtime/kusama/src/governance/old.rs @@ -92,7 +92,7 @@ parameter_types! { pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; @@ -148,7 +148,7 @@ parameter_types! { pub type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index af55eba4203a..bda010473faf 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -157,7 +157,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = BlockWeights; type BlockLength = BlockLength; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; @@ -216,8 +216,8 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type PalletsOrigin = OriginCaller; type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; @@ -1152,8 +1152,8 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1182,8 +1182,8 @@ parameter_types! { } impl paras_registrar::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 1d10205153ce..17310dd5ead1 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for the Kusama runtime. use super::{ - parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, - RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet, }; use frame_support::{match_types, parameter_types, traits::Everything}; use runtime_common::{xcm_sender, ToAuthor}; @@ -75,13 +75,13 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< /// The means that we convert an the XCM message origin location into a local dispatch origin. type LocalOriginConverter = ( // A `Signed` origin of the sovereign account that the original location controls. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // A child parachain, natively expressed, has the `Parachain` origin. - ChildParachainAsNative, + ChildParachainAsNative, // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // A system child parachain, expressed as a Superuser, converts to the `Root` origin. - ChildSystemParachainAsSuperuser, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -158,7 +158,7 @@ parameter_types! { /// Type to convert the council origin to a Plurality `MultiLocation` value. pub type CouncilToPlurality = BackingToPlurality< - Origin, + RuntimeOrigin, pallet_collective::Origin, CouncilBodyId, >; @@ -170,7 +170,7 @@ pub type LocalOriginToLocation = ( // `Unit` body. CouncilToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; @@ -178,10 +178,10 @@ impl pallet_xcm::Config for Runtime { // (safe the possibility of someone spamming the parachain if they're willing to pay the KSM to // send from the Relay-chain), but it's useless until we bring in XCM v3 which will make // `DescendOrigin` a bit more useful. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = xcm_executor::XcmExecutor; // Anyone is able to use teleportation regardless of who they are and what they want to teleport. @@ -191,7 +191,7 @@ impl pallet_xcm::Config for Runtime { type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/runtime/parachains/src/configuration/tests.rs b/runtime/parachains/src/configuration/tests.rs index 9c8af75f51d2..6f2faf6cb204 100644 --- a/runtime/parachains/src/configuration/tests.rs +++ b/runtime/parachains/src/configuration/tests.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see . use super::*; -use crate::mock::{new_test_ext, Configuration, Origin, ParasShared, Test}; +use crate::mock::{new_test_ext, Configuration, ParasShared, RuntimeOrigin, Test}; use frame_support::{assert_err, assert_ok}; fn on_new_session(session_index: SessionIndex) -> (HostConfiguration, HostConfiguration) { @@ -48,7 +48,7 @@ fn initializer_on_new_session() { new_test_ext(Default::default()).execute_with(|| { let (prev_config, new_config) = on_new_session(1); assert_eq!(prev_config, new_config); - assert_ok!(Configuration::set_validation_upgrade_delay(Origin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 100)); let (prev_config, new_config) = on_new_session(2); assert_eq!(prev_config, new_config); @@ -67,7 +67,7 @@ fn config_changes_after_2_session_boundary() { config.validation_upgrade_delay = 100; assert!(old_config != config); - assert_ok!(Configuration::set_validation_upgrade_delay(Origin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 100)); // Verify that the current configuration has not changed and that there is a scheduled // change for the SESSION_DELAY sessions in advance. @@ -96,8 +96,8 @@ fn consecutive_changes_within_one_session() { config.validation_upgrade_cooldown = 100; assert!(old_config != config); - assert_ok!(Configuration::set_validation_upgrade_delay(Origin::root(), 100)); - assert_ok!(Configuration::set_validation_upgrade_cooldown(Origin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_cooldown(RuntimeOrigin::root(), 100)); assert_eq!(Configuration::config(), old_config); assert_eq!(::PendingConfigs::get(), vec![(2, config.clone())]); @@ -125,7 +125,7 @@ fn pending_next_session_but_we_upgrade_once_more() { ..initial_config.clone() }; - assert_ok!(Configuration::set_validation_upgrade_delay(Origin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 100)); assert_eq!(Configuration::config(), initial_config); assert_eq!( ::PendingConfigs::get(), @@ -136,7 +136,7 @@ fn pending_next_session_but_we_upgrade_once_more() { // We are still waiting until the pending configuration is applied and we add another // update. - assert_ok!(Configuration::set_validation_upgrade_cooldown(Origin::root(), 99)); + assert_ok!(Configuration::set_validation_upgrade_cooldown(RuntimeOrigin::root(), 99)); // This should result in yet another configiguration change scheduled. assert_eq!(Configuration::config(), initial_config); @@ -173,7 +173,7 @@ fn scheduled_session_config_update_while_next_session_pending() { ..initial_config.clone() }; - assert_ok!(Configuration::set_validation_upgrade_delay(Origin::root(), 100)); + assert_ok!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 100)); assert_eq!(Configuration::config(), initial_config); assert_eq!( ::PendingConfigs::get(), @@ -184,8 +184,8 @@ fn scheduled_session_config_update_while_next_session_pending() { // The second call should fall into the case where we already have a pending config // update for the scheduled_session, but we want to update it once more. - assert_ok!(Configuration::set_validation_upgrade_cooldown(Origin::root(), 99)); - assert_ok!(Configuration::set_code_retention_period(Origin::root(), 98)); + assert_ok!(Configuration::set_validation_upgrade_cooldown(RuntimeOrigin::root(), 99)); + assert_ok!(Configuration::set_code_retention_period(RuntimeOrigin::root(), 98)); // This should result in yet another configiguration change scheduled. assert_eq!(Configuration::config(), initial_config); @@ -213,30 +213,30 @@ fn scheduled_session_config_update_while_next_session_pending() { fn invariants() { new_test_ext(Default::default()).execute_with(|| { assert_err!( - Configuration::set_max_code_size(Origin::root(), MAX_CODE_SIZE + 1), + Configuration::set_max_code_size(RuntimeOrigin::root(), MAX_CODE_SIZE + 1), Error::::InvalidNewValue ); assert_err!( - Configuration::set_max_pov_size(Origin::root(), MAX_POV_SIZE + 1), + Configuration::set_max_pov_size(RuntimeOrigin::root(), MAX_POV_SIZE + 1), Error::::InvalidNewValue ); assert_err!( - Configuration::set_max_head_data_size(Origin::root(), MAX_HEAD_DATA_SIZE + 1), + Configuration::set_max_head_data_size(RuntimeOrigin::root(), MAX_HEAD_DATA_SIZE + 1), Error::::InvalidNewValue ); assert_err!( - Configuration::set_chain_availability_period(Origin::root(), 0), + Configuration::set_chain_availability_period(RuntimeOrigin::root(), 0), Error::::InvalidNewValue ); assert_err!( - Configuration::set_thread_availability_period(Origin::root(), 0), + Configuration::set_thread_availability_period(RuntimeOrigin::root(), 0), Error::::InvalidNewValue ); assert_err!( - Configuration::set_no_show_slots(Origin::root(), 0), + Configuration::set_no_show_slots(RuntimeOrigin::root(), 0), Error::::InvalidNewValue ); @@ -247,20 +247,20 @@ fn invariants() { ..Default::default() }); assert_err!( - Configuration::set_chain_availability_period(Origin::root(), 12), + Configuration::set_chain_availability_period(RuntimeOrigin::root(), 12), Error::::InvalidNewValue ); assert_err!( - Configuration::set_thread_availability_period(Origin::root(), 12), + Configuration::set_thread_availability_period(RuntimeOrigin::root(), 12), Error::::InvalidNewValue ); assert_err!( - Configuration::set_minimum_validation_upgrade_delay(Origin::root(), 9), + Configuration::set_minimum_validation_upgrade_delay(RuntimeOrigin::root(), 9), Error::::InvalidNewValue ); assert_err!( - Configuration::set_validation_upgrade_delay(Origin::root(), 0), + Configuration::set_validation_upgrade_delay(RuntimeOrigin::root(), 0), Error::::InvalidNewValue ); }); @@ -270,12 +270,12 @@ fn invariants() { fn consistency_bypass_works() { new_test_ext(Default::default()).execute_with(|| { assert_err!( - Configuration::set_max_code_size(Origin::root(), MAX_CODE_SIZE + 1), + Configuration::set_max_code_size(RuntimeOrigin::root(), MAX_CODE_SIZE + 1), Error::::InvalidNewValue ); - assert_ok!(Configuration::set_bypass_consistency_check(Origin::root(), true)); - assert_ok!(Configuration::set_max_code_size(Origin::root(), MAX_CODE_SIZE + 1)); + assert_ok!(Configuration::set_bypass_consistency_check(RuntimeOrigin::root(), true)); + assert_ok!(Configuration::set_max_code_size(RuntimeOrigin::root(), MAX_CODE_SIZE + 1)); assert_eq!( Configuration::config().max_code_size, @@ -339,165 +339,186 @@ fn setting_pending_config_members() { }; Configuration::set_validation_upgrade_cooldown( - Origin::root(), + RuntimeOrigin::root(), new_config.validation_upgrade_cooldown, ) .unwrap(); Configuration::set_validation_upgrade_delay( - Origin::root(), + RuntimeOrigin::root(), new_config.validation_upgrade_delay, ) .unwrap(); - Configuration::set_code_retention_period(Origin::root(), new_config.code_retention_period) + Configuration::set_code_retention_period( + RuntimeOrigin::root(), + new_config.code_retention_period, + ) + .unwrap(); + Configuration::set_max_code_size(RuntimeOrigin::root(), new_config.max_code_size).unwrap(); + Configuration::set_max_pov_size(RuntimeOrigin::root(), new_config.max_pov_size).unwrap(); + Configuration::set_max_head_data_size(RuntimeOrigin::root(), new_config.max_head_data_size) .unwrap(); - Configuration::set_max_code_size(Origin::root(), new_config.max_code_size).unwrap(); - Configuration::set_max_pov_size(Origin::root(), new_config.max_pov_size).unwrap(); - Configuration::set_max_head_data_size(Origin::root(), new_config.max_head_data_size) + Configuration::set_parathread_cores(RuntimeOrigin::root(), new_config.parathread_cores) .unwrap(); - Configuration::set_parathread_cores(Origin::root(), new_config.parathread_cores).unwrap(); - Configuration::set_parathread_retries(Origin::root(), new_config.parathread_retries) + Configuration::set_parathread_retries(RuntimeOrigin::root(), new_config.parathread_retries) .unwrap(); Configuration::set_group_rotation_frequency( - Origin::root(), + RuntimeOrigin::root(), new_config.group_rotation_frequency, ) .unwrap(); // This comes out of order to satisfy the validity criteria for the chain and thread // availability periods. Configuration::set_minimum_validation_upgrade_delay( - Origin::root(), + RuntimeOrigin::root(), new_config.minimum_validation_upgrade_delay, ) .unwrap(); Configuration::set_chain_availability_period( - Origin::root(), + RuntimeOrigin::root(), new_config.chain_availability_period, ) .unwrap(); Configuration::set_thread_availability_period( - Origin::root(), + RuntimeOrigin::root(), new_config.thread_availability_period, ) .unwrap(); - Configuration::set_scheduling_lookahead(Origin::root(), new_config.scheduling_lookahead) - .unwrap(); + Configuration::set_scheduling_lookahead( + RuntimeOrigin::root(), + new_config.scheduling_lookahead, + ) + .unwrap(); Configuration::set_max_validators_per_core( - Origin::root(), + RuntimeOrigin::root(), new_config.max_validators_per_core, ) .unwrap(); - Configuration::set_max_validators(Origin::root(), new_config.max_validators).unwrap(); - Configuration::set_dispute_period(Origin::root(), new_config.dispute_period).unwrap(); + Configuration::set_max_validators(RuntimeOrigin::root(), new_config.max_validators) + .unwrap(); + Configuration::set_dispute_period(RuntimeOrigin::root(), new_config.dispute_period) + .unwrap(); Configuration::set_dispute_post_conclusion_acceptance_period( - Origin::root(), + RuntimeOrigin::root(), new_config.dispute_post_conclusion_acceptance_period, ) .unwrap(); Configuration::set_dispute_max_spam_slots( - Origin::root(), + RuntimeOrigin::root(), new_config.dispute_max_spam_slots, ) .unwrap(); Configuration::set_dispute_conclusion_by_time_out_period( - Origin::root(), + RuntimeOrigin::root(), new_config.dispute_conclusion_by_time_out_period, ) .unwrap(); - Configuration::set_no_show_slots(Origin::root(), new_config.no_show_slots).unwrap(); - Configuration::set_n_delay_tranches(Origin::root(), new_config.n_delay_tranches).unwrap(); + Configuration::set_no_show_slots(RuntimeOrigin::root(), new_config.no_show_slots).unwrap(); + Configuration::set_n_delay_tranches(RuntimeOrigin::root(), new_config.n_delay_tranches) + .unwrap(); Configuration::set_zeroth_delay_tranche_width( - Origin::root(), + RuntimeOrigin::root(), new_config.zeroth_delay_tranche_width, ) .unwrap(); - Configuration::set_needed_approvals(Origin::root(), new_config.needed_approvals).unwrap(); + Configuration::set_needed_approvals(RuntimeOrigin::root(), new_config.needed_approvals) + .unwrap(); Configuration::set_relay_vrf_modulo_samples( - Origin::root(), + RuntimeOrigin::root(), new_config.relay_vrf_modulo_samples, ) .unwrap(); Configuration::set_max_upward_queue_count( - Origin::root(), + RuntimeOrigin::root(), new_config.max_upward_queue_count, ) .unwrap(); - Configuration::set_max_upward_queue_size(Origin::root(), new_config.max_upward_queue_size) - .unwrap(); + Configuration::set_max_upward_queue_size( + RuntimeOrigin::root(), + new_config.max_upward_queue_size, + ) + .unwrap(); Configuration::set_max_downward_message_size( - Origin::root(), + RuntimeOrigin::root(), new_config.max_downward_message_size, ) .unwrap(); Configuration::set_ump_service_total_weight( - Origin::root(), + RuntimeOrigin::root(), new_config.ump_service_total_weight, ) .unwrap(); Configuration::set_max_upward_message_size( - Origin::root(), + RuntimeOrigin::root(), new_config.max_upward_message_size, ) .unwrap(); Configuration::set_max_upward_message_num_per_candidate( - Origin::root(), + RuntimeOrigin::root(), new_config.max_upward_message_num_per_candidate, ) .unwrap(); - Configuration::set_hrmp_sender_deposit(Origin::root(), new_config.hrmp_sender_deposit) - .unwrap(); + Configuration::set_hrmp_sender_deposit( + RuntimeOrigin::root(), + new_config.hrmp_sender_deposit, + ) + .unwrap(); Configuration::set_hrmp_recipient_deposit( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_recipient_deposit, ) .unwrap(); Configuration::set_hrmp_channel_max_capacity( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_channel_max_capacity, ) .unwrap(); Configuration::set_hrmp_channel_max_total_size( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_channel_max_total_size, ) .unwrap(); Configuration::set_hrmp_max_parachain_inbound_channels( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_max_parachain_inbound_channels, ) .unwrap(); Configuration::set_hrmp_max_parathread_inbound_channels( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_max_parathread_inbound_channels, ) .unwrap(); Configuration::set_hrmp_channel_max_message_size( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_channel_max_message_size, ) .unwrap(); Configuration::set_hrmp_max_parachain_outbound_channels( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_max_parachain_outbound_channels, ) .unwrap(); Configuration::set_hrmp_max_parathread_outbound_channels( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_max_parathread_outbound_channels, ) .unwrap(); Configuration::set_hrmp_max_message_num_per_candidate( - Origin::root(), + RuntimeOrigin::root(), new_config.hrmp_max_message_num_per_candidate, ) .unwrap(); Configuration::set_ump_max_individual_weight( - Origin::root(), + RuntimeOrigin::root(), new_config.ump_max_individual_weight, ) .unwrap(); - Configuration::set_pvf_checking_enabled(Origin::root(), new_config.pvf_checking_enabled) + Configuration::set_pvf_checking_enabled( + RuntimeOrigin::root(), + new_config.pvf_checking_enabled, + ) + .unwrap(); + Configuration::set_pvf_voting_ttl(RuntimeOrigin::root(), new_config.pvf_voting_ttl) .unwrap(); - Configuration::set_pvf_voting_ttl(Origin::root(), new_config.pvf_voting_ttl).unwrap(); assert_eq!( ::PendingConfigs::get(), @@ -509,7 +530,7 @@ fn setting_pending_config_members() { #[test] fn non_root_cannot_set_config() { new_test_ext(Default::default()).execute_with(|| { - assert!(Configuration::set_validation_upgrade_delay(Origin::signed(1), 100).is_err()); + assert!(Configuration::set_validation_upgrade_delay(RuntimeOrigin::signed(1), 100).is_err()); }); } diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index b4ab13da4c08..af0cccb22512 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -241,9 +241,9 @@ pub mod pallet { /// The outer event type. type RuntimeEvent: From> + IsType<::RuntimeEvent>; - type Origin: From - + From<::Origin> - + Into::Origin>>; + type RuntimeOrigin: From + + From<::RuntimeOrigin> + + Into::RuntimeOrigin>>; /// An interface for reserving deposits for opening channels. /// @@ -465,7 +465,7 @@ pub mod pallet { proposed_max_capacity: u32, proposed_max_message_size: u32, ) -> DispatchResult { - let origin = ensure_parachain(::Origin::from(origin))?; + let origin = ensure_parachain(::RuntimeOrigin::from(origin))?; Self::init_open_channel( origin, recipient, @@ -486,7 +486,7 @@ pub mod pallet { /// The channel will be opened only on the next session boundary. #[pallet::weight(::WeightInfo::hrmp_accept_open_channel())] pub fn hrmp_accept_open_channel(origin: OriginFor, sender: ParaId) -> DispatchResult { - let origin = ensure_parachain(::Origin::from(origin))?; + let origin = ensure_parachain(::RuntimeOrigin::from(origin))?; Self::accept_open_channel(origin, sender)?; Self::deposit_event(Event::OpenChannelAccepted(sender, origin)); Ok(()) @@ -501,7 +501,7 @@ pub mod pallet { origin: OriginFor, channel_id: HrmpChannelId, ) -> DispatchResult { - let origin = ensure_parachain(::Origin::from(origin))?; + let origin = ensure_parachain(::RuntimeOrigin::from(origin))?; Self::close_channel(origin, channel_id.clone())?; Self::deposit_event(Event::ChannelClosed(origin, channel_id)); Ok(()) @@ -567,7 +567,7 @@ pub mod pallet { channel_id: HrmpChannelId, open_requests: u32, ) -> DispatchResult { - let origin = ensure_parachain(::Origin::from(origin))?; + let origin = ensure_parachain(::RuntimeOrigin::from(origin))?; ensure!( ::HrmpOpenChannelRequestsList::decode_len().unwrap_or_default() as u32 <= open_requests, diff --git a/runtime/parachains/src/hrmp/benchmarking.rs b/runtime/parachains/src/hrmp/benchmarking.rs index 125a56279944..71ea684be179 100644 --- a/runtime/parachains/src/hrmp/benchmarking.rs +++ b/runtime/parachains/src/hrmp/benchmarking.rs @@ -66,7 +66,7 @@ fn establish_para_connection( until: ParachainSetupStep, ) -> [(ParaId, crate::Origin); 2] where - ::Origin: From, + ::RuntimeOrigin: From, { let config = Configuration::::config(); let deposit: BalanceOf = config.hrmp_sender_deposit.unique_saturated_into(); @@ -138,7 +138,7 @@ static_assertions::const_assert!(HRMP_MAX_INBOUND_CHANNELS_BOUND < PREFIX_0); static_assertions::const_assert!(HRMP_MAX_OUTBOUND_CHANNELS_BOUND < PREFIX_0); frame_benchmarking::benchmarks! { - where_clause { where ::Origin: From } + where_clause { where ::RuntimeOrigin: From } hrmp_init_open_channel { let sender_id: ParaId = 1u32.into(); diff --git a/runtime/parachains/src/initializer.rs b/runtime/parachains/src/initializer.rs index a5634bf48419..eaa4510fafcf 100644 --- a/runtime/parachains/src/initializer.rs +++ b/runtime/parachains/src/initializer.rs @@ -120,7 +120,7 @@ pub mod pallet { /// A randomness beacon. type Randomness: Randomness; /// An origin which is allowed to force updates to parachains. - type ForceOrigin: EnsureOrigin<::Origin>; + type ForceOrigin: EnsureOrigin<::RuntimeOrigin>; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; } diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index dc0eeb97e049..05c17b00150b 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -92,7 +92,7 @@ impl frame_system::Config for Test { type BlockWeights = BlockWeights; type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; @@ -234,8 +234,8 @@ impl crate::ump::Config for Test { } impl crate::hrmp::Config for Test { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = pallet_balances::Pallet; type WeightInfo = crate::hrmp::TestWeightInfo; } diff --git a/runtime/parachains/src/paras/tests.rs b/runtime/parachains/src/paras/tests.rs index 47fd15793181..7944bf34715b 100644 --- a/runtime/parachains/src/paras/tests.rs +++ b/runtime/parachains/src/paras/tests.rs @@ -26,7 +26,8 @@ use test_helpers::{dummy_head_data, dummy_validation_code}; use crate::{ configuration::HostConfiguration, mock::{ - new_test_ext, Configuration, MockGenesisConfig, Origin, Paras, ParasShared, System, Test, + new_test_ext, Configuration, MockGenesisConfig, Paras, ParasShared, RuntimeOrigin, System, + Test, }, }; @@ -1449,7 +1450,10 @@ fn add_trusted_validation_code_inserts_with_no_users() { // with the reference count equal to 0. let validation_code = ValidationCode(vec![1, 2, 3]); new_test_ext(Default::default()).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); assert_eq!(::CodeByHashRefs::get(&validation_code.hash()), 0,); }); } @@ -1460,9 +1464,15 @@ fn add_trusted_validation_code_idempotent() { // parameters is a no-op. let validation_code = ValidationCode(vec![1, 2, 3]); new_test_ext(Default::default()).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); assert_storage_noop!({ - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); }); }); } @@ -1473,8 +1483,14 @@ fn poke_unused_validation_code_removes_code_cleanly() { // in the storage but has no users will remove it cleanly from the storage. let validation_code = ValidationCode(vec![1, 2, 3]); new_test_ext(Default::default()).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); - assert_ok!(Paras::poke_unused_validation_code(Origin::root(), validation_code.hash())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); + assert_ok!(Paras::poke_unused_validation_code( + RuntimeOrigin::root(), + validation_code.hash() + )); assert_eq!(::CodeByHashRefs::get(&validation_code.hash()), 0); assert!(!::CodeByHash::contains_key(&validation_code.hash())); @@ -1487,7 +1503,10 @@ fn poke_unused_validation_code_doesnt_remove_code_with_users() { let validation_code = ValidationCode(vec![1, 2, 3]); new_test_ext(Default::default()).execute_with(|| { // First we add the code to the storage. - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); // Then we add a user to the code, say by upgrading. run_to_block(2, None); @@ -1496,7 +1515,10 @@ fn poke_unused_validation_code_doesnt_remove_code_with_users() { // Finally we poke the code, which should not remove it from the storage. assert_storage_noop!({ - assert_ok!(Paras::poke_unused_validation_code(Origin::root(), validation_code.hash())); + assert_ok!(Paras::poke_unused_validation_code( + RuntimeOrigin::root(), + validation_code.hash() + )); }); check_code_is_stored(&validation_code); }); @@ -1511,7 +1533,7 @@ fn increase_code_ref_doesnt_have_allergy_on_add_trusted_validation_code() { let code = ValidationCode(vec![1, 2, 3]); new_test_ext(Default::default()).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), code.clone())); + assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), code.clone())); Paras::increase_code_ref(&code.hash(), &code); Paras::increase_code_ref(&code.hash(), &code); assert!(::CodeByHash::contains_key(code.hash())); @@ -1519,7 +1541,7 @@ fn increase_code_ref_doesnt_have_allergy_on_add_trusted_validation_code() { }); new_test_ext(Default::default()).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), code.clone())); + assert_ok!(Paras::add_trusted_validation_code(RuntimeOrigin::root(), code.clone())); Paras::decrease_code_ref(&code.hash()); assert!(::CodeByHash::contains_key(code.hash())); assert_eq!(::CodeByHashRefs::get(code.hash()), 0); @@ -1547,7 +1569,10 @@ fn add_trusted_validation_code_insta_approval() { ..Default::default() }; new_test_ext(genesis_config).execute_with(|| { - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); // Then some parachain upgrades it's code with the relay-parent 1. run_to_block(2, None); @@ -1602,7 +1627,10 @@ fn add_trusted_validation_code_enacts_existing_pvf_vote() { assert!(::PvfActiveVoteMap::contains_key(&validation_code.hash())); // Then we add a trusted validation code. That should conclude the vote. - assert_ok!(Paras::add_trusted_validation_code(Origin::root(), validation_code.clone())); + assert_ok!(Paras::add_trusted_validation_code( + RuntimeOrigin::root(), + validation_code.clone() + )); assert!(::FutureCodeUpgrades::get(¶_id).is_some()); assert!(!::PvfActiveVoteMap::contains_key(&validation_code.hash())); }); diff --git a/runtime/parachains/src/session_info/tests.rs b/runtime/parachains/src/session_info/tests.rs index 4128463578e6..168bd3d1cc27 100644 --- a/runtime/parachains/src/session_info/tests.rs +++ b/runtime/parachains/src/session_info/tests.rs @@ -19,8 +19,8 @@ use crate::{ configuration::HostConfiguration, initializer::SessionChangeNotification, mock::{ - new_test_ext, Configuration, MockGenesisConfig, Origin, ParasShared, SessionInfo, System, - Test, + new_test_ext, Configuration, MockGenesisConfig, ParasShared, RuntimeOrigin, SessionInfo, + System, Test, }, util::take_active_subset, }; @@ -109,7 +109,7 @@ fn session_pruning_is_based_on_dispute_period() { // changing `dispute_period` works let dispute_period = 5; - Configuration::set_dispute_period(Origin::root(), dispute_period).unwrap(); + Configuration::set_dispute_period(RuntimeOrigin::root(), dispute_period).unwrap(); // Dispute period does not automatically change let config = Configuration::config(); @@ -124,7 +124,7 @@ fn session_pruning_is_based_on_dispute_period() { // Increase dispute period even more let new_dispute_period = 16; - Configuration::set_dispute_period(Origin::root(), new_dispute_period).unwrap(); + Configuration::set_dispute_period(RuntimeOrigin::root(), new_dispute_period).unwrap(); run_to_block(210, session_changes); assert_eq!(EarliestStoredSession::::get(), 21 - dispute_period); @@ -154,7 +154,7 @@ fn session_info_is_based_on_config() { assert_eq!(session.needed_approvals, 3); // change some param - Configuration::set_needed_approvals(Origin::root(), 42).unwrap(); + Configuration::set_needed_approvals(RuntimeOrigin::root(), 42).unwrap(); // 2 sessions later run_to_block(3, new_session_every_block); let session = Sessions::::get(&3).unwrap(); diff --git a/runtime/parachains/src/ump.rs b/runtime/parachains/src/ump.rs index 8d341410d831..92cce87f85a7 100644 --- a/runtime/parachains/src/ump.rs +++ b/runtime/parachains/src/ump.rs @@ -234,7 +234,7 @@ pub mod pallet { type FirstMessageFactorPercent: Get; /// Origin which is allowed to execute overweight messages. - type ExecuteOverweightOrigin: EnsureOrigin; + type ExecuteOverweightOrigin: EnsureOrigin; /// Weight information for extrinsics in this pallet. type WeightInfo: WeightInfo; diff --git a/runtime/parachains/src/ump/tests.rs b/runtime/parachains/src/ump/tests.rs index 8e6bb2968429..c0ffbdc8256c 100644 --- a/runtime/parachains/src/ump/tests.rs +++ b/runtime/parachains/src/ump/tests.rs @@ -16,8 +16,8 @@ use super::*; use crate::mock::{ - assert_last_event, new_test_ext, take_processed, Configuration, MockGenesisConfig, Origin, - System, Test, Ump, + assert_last_event, new_test_ext, take_processed, Configuration, MockGenesisConfig, + RuntimeOrigin, System, Test, Ump, }; use frame_support::{assert_noop, assert_ok, weights::Weight}; use std::collections::HashSet; @@ -296,7 +296,7 @@ fn service_overweight_unknown() { // the next test. new_test_ext(GenesisConfigBuilder::default().build()).execute_with(|| { assert_noop!( - Ump::service_overweight(Origin::root(), 0, Weight::from_ref_time(1000)), + Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(1000)), Error::::UnknownMessageIndex ); }); @@ -346,18 +346,18 @@ fn overweight_queue_works() { // Now verify that if we wanted to service this overweight message with less than enough // weight it will fail. assert_noop!( - Ump::service_overweight(Origin::root(), 0, Weight::from_ref_time(499)), + Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(499)), Error::::WeightOverLimit ); // ... and if we try to service it with just enough weight it will succeed as well. - assert_ok!(Ump::service_overweight(Origin::root(), 0, Weight::from_ref_time(500))); + assert_ok!(Ump::service_overweight(RuntimeOrigin::root(), 0, Weight::from_ref_time(500))); assert_last_event(Event::OverweightServiced(0, Weight::from_ref_time(500)).into()); // ... and if we try to service a message with index that doesn't exist it will error // out. assert_noop!( - Ump::service_overweight(Origin::root(), 1, Weight::from_ref_time(1000)), + Ump::service_overweight(RuntimeOrigin::root(), 1, Weight::from_ref_time(1000)), Error::::UnknownMessageIndex ); }); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index b906d7d6bada..020235ac55bf 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -147,7 +147,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = BlockWeights; type BlockLength = BlockLength; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; @@ -206,8 +206,8 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type PalletsOrigin = OriginCaller; type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; @@ -673,7 +673,7 @@ parameter_types! { pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; @@ -729,7 +729,7 @@ parameter_types! { pub type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; @@ -1239,8 +1239,8 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1272,8 +1272,8 @@ parameter_types! { } impl paras_registrar::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; diff --git a/runtime/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index e985fd78860a..846d98a59d99 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Polkadot. use super::{ - parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, - RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -80,13 +80,13 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< type LocalOriginConverter = ( // If the origin kind is `Sovereign`, then return a `Signed` origin with the account determined // by the `SovereignAccountOf` converter. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // If the origin kind is `Native` and the XCM origin is a child parachain, then we can express // it with the special `parachains_origin::Origin` origin variant. - ChildParachainAsNative, + ChildParachainAsNative, // If the origin kind is `Native` and the XCM origin is the `AccountId32` location, then it can // be expressed using the `Signed` origin variant. - SignedAccountId32AsNative, + SignedAccountId32AsNative, ); parameter_types! { @@ -158,7 +158,7 @@ parameter_types! { /// Type to convert a council origin to a Plurality `MultiLocation` value. pub type CouncilToPlurality = BackingToPlurality< - Origin, + RuntimeOrigin, pallet_collective::Origin, CouncilBodyId, >; @@ -170,16 +170,16 @@ pub type LocalOriginToLocation = ( // `Unit` body. CouncilToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; // Only allow the council to send messages. - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; // ...but they must match our filter, which rejects all. type XcmExecuteFilter = Nothing; // == Deny All type XcmExecutor = xcm_executor::XcmExecutor; @@ -187,7 +187,7 @@ impl pallet_xcm::Config for Runtime { type XcmReserveTransferFilter = Everything; // == Allow All type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = AdvertisedXcmVersion; diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index f861594ae61e..f27905b66e29 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -149,7 +149,7 @@ impl frame_system::Config for Runtime { type BlockWeights = BlockWeights; type BlockLength = BlockLength; type DbWeight = RocksDbWeight; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; @@ -207,8 +207,8 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type PalletsOrigin = OriginCaller; type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; @@ -459,7 +459,7 @@ parameter_types! { type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; @@ -515,7 +515,7 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Proposal = RuntimeCall; type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; @@ -1071,8 +1071,8 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -1118,8 +1118,8 @@ parameter_types! { } impl paras_registrar::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; diff --git a/runtime/rococo/src/validator_manager.rs b/runtime/rococo/src/validator_manager.rs index b6b1b8c22d24..bb13bc823ca4 100644 --- a/runtime/rococo/src/validator_manager.rs +++ b/runtime/rococo/src/validator_manager.rs @@ -40,7 +40,7 @@ pub mod pallet { type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Privileged origin that can add or remove validators. - type PrivilegedOrigin: EnsureOrigin<::Origin>; + type PrivilegedOrigin: EnsureOrigin<::RuntimeOrigin>; } #[pallet::event] diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index df594ec95715..26a380dfcd20 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Rococo. use super::{ - parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, - RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, ParaId, Runtime, RuntimeCall, + RuntimeEvent, RuntimeOrigin, WeightToFee, XcmPallet, }; use frame_support::{match_types, parameter_types, traits::Everything}; use runtime_common::{xcm_sender, ToAuthor}; @@ -76,13 +76,13 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< /// The means that we convert an the XCM message origin location into a local dispatch origin. type LocalOriginConverter = ( // A `Signed` origin of the sovereign account that the original location controls. - SovereignSignedViaLocation, + SovereignSignedViaLocation, // A child parachain, natively expressed, has the `Parachain` origin. - ChildParachainAsNative, + ChildParachainAsNative, // The AccountId32 location type can be expressed natively as a `Signed` origin. - SignedAccountId32AsNative, + SignedAccountId32AsNative, // A system child parachain, expressed as a Superuser, converts to the `Root` origin. - ChildSystemParachainAsSuperuser, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -176,7 +176,7 @@ parameter_types! { /// Type to convert the council origin to a Plurality `MultiLocation` value. pub type CouncilToPlurality = BackingToPlurality< - Origin, + RuntimeOrigin, pallet_collective::Origin, CouncilBodyId, >; @@ -188,14 +188,14 @@ pub type LocalOriginToLocation = ( // `Unit` body. CouncilToPlurality, // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = xcm_executor::XcmExecutor; // Anyone is able to use teleportation regardless of who they are and what they want to teleport. @@ -205,7 +205,7 @@ impl pallet_xcm::Config for Runtime { type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index ffaad22c5dbe..b2fcd58194f2 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -135,7 +135,7 @@ impl frame_system::Config for Runtime { type BlockWeights = BlockWeights; type BlockLength = BlockLength; type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; @@ -534,30 +534,31 @@ parameter_types! { pub const MaxInstructions: u32 = 100; } -pub type LocalOriginToLocation = xcm_builder::SignedToAccountId32; +pub type LocalOriginToLocation = + xcm_builder::SignedToAccountId32; impl pallet_xcm::Config for Runtime { // The config types here are entirely configurable, since the only one that is sorely needed // is `XcmExecutor`, which will be used in unit tests located in xcm-executor. type RuntimeEvent = RuntimeEvent; - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type LocationInverter = xcm_config::InvertNothing; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type Weigher = xcm_builder::FixedWeightBounds; type XcmRouter = xcm_config::DoNothingRouter; type XcmExecuteFilter = Everything; type XcmExecutor = xcm_executor::XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl parachains_hrmp::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type WeightInfo = parachains_hrmp::TestWeightInfo; } @@ -570,7 +571,7 @@ impl parachains_origin::Config for Runtime {} impl pallet_test_notifier::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; } @@ -589,8 +590,8 @@ pub mod pallet_test_notifier { #[pallet::config] pub trait Config: frame_system::Config + pallet_xcm::Config { type RuntimeEvent: IsType<::RuntimeEvent> + From>; - type Origin: IsType<::Origin> - + Into::Origin>>; + type RuntimeOrigin: IsType<::RuntimeOrigin> + + Into::RuntimeOrigin>>; type RuntimeCall: IsType<::RuntimeCall> + From>; } @@ -647,7 +648,7 @@ pub mod pallet_test_notifier { query_id: QueryId, response: Response, ) -> DispatchResult { - let responder = ensure_response(::Origin::from(origin))?; + let responder = ensure_response(::RuntimeOrigin::from(origin))?; Self::deposit_event(Event::::ResponseReceived(responder, query_id, response)); Ok(()) } diff --git a/runtime/test-runtime/src/xcm_config.rs b/runtime/test-runtime/src/xcm_config.rs index 7d1aa7de40b7..217995f31fe4 100644 --- a/runtime/test-runtime/src/xcm_config.rs +++ b/runtime/test-runtime/src/xcm_config.rs @@ -31,7 +31,7 @@ parameter_types! { /// of this chain. pub type LocalOriginToLocation = ( // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + SignedToAccountId32, ); pub struct DoNothingRouter; @@ -81,7 +81,7 @@ impl xcm_executor::Config for XcmConfig { type RuntimeCall = super::RuntimeCall; type XcmSender = DoNothingRouter; type AssetTransactor = DummyAssetTransactor; - type OriginConverter = pallet_xcm::XcmPassthrough; + type OriginConverter = pallet_xcm::XcmPassthrough; type IsReserve = (); type IsTeleporter = (); type LocationInverter = InvertNothing; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index 834972f1f431..9d387fb8cda7 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -141,7 +141,7 @@ impl frame_system::Config for Runtime { type BaseCallFilter = frame_support::traits::Everything; type BlockWeights = BlockWeights; type BlockLength = BlockLength; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; @@ -172,8 +172,8 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type PalletsOrigin = OriginCaller; type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; @@ -906,8 +906,8 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; } @@ -975,8 +975,8 @@ parameter_types! { } impl paras_registrar::Config for Runtime { + type RuntimeOrigin = RuntimeOrigin; type RuntimeEvent = RuntimeEvent; - type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index ddb5316e2843..a1e108eb3be0 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for Westend. use super::{ - parachains_origin, weights, AccountId, Balances, Origin, ParaId, Runtime, RuntimeCall, - RuntimeEvent, WeightToFee, XcmPallet, + parachains_origin, weights, AccountId, Balances, ParaId, Runtime, RuntimeCall, RuntimeEvent, + RuntimeOrigin, WeightToFee, XcmPallet, }; use frame_support::{ parameter_types, @@ -60,10 +60,10 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter< >; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); /// The XCM router. When we want to send an XCM message, we use this type. It amalgamates all of our @@ -122,15 +122,15 @@ impl xcm_executor::Config for XcmConfig { /// of this chain. pub type LocalOriginToLocation = ( // And a usual Signed origin to be used in XCM as a corresponding AccountId32 - SignedToAccountId32, + SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; // ...but they must match our filter, which rejects everything. type XcmExecuteFilter = Nothing; type XcmExecutor = xcm_executor::XcmExecutor; @@ -139,7 +139,7 @@ impl pallet_xcm::Config for Runtime { type Weigher = WeightInfoBounds, RuntimeCall, MaxInstructions>; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 5accdb946e90..3cc67971e667 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -54,7 +54,7 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = u64; type Hash = H256; diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 6c628ce5df54..ea7899afceb9 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -60,7 +60,7 @@ impl frame_system::Config for Test { type BlockWeights = (); type BlockLength = (); type DbWeight = (); - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -103,7 +103,7 @@ impl xcm_executor::Config for XcmConfig { type RuntimeCall = RuntimeCall; type XcmSender = DevNull; type AssetTransactor = NoAssetTransactor; - type OriginConverter = AlwaysSignedByDefault; + type OriginConverter = AlwaysSignedByDefault; type IsReserve = AllAssetLocationsPass; type IsTeleporter = (); type LocationInverter = xcm_builder::LocationInverter; @@ -159,18 +159,18 @@ pub fn new_test_ext() -> sp_io::TestExternalities { t.into() } -pub struct AlwaysSignedByDefault(core::marker::PhantomData); -impl ConvertOrigin for AlwaysSignedByDefault +pub struct AlwaysSignedByDefault(core::marker::PhantomData); +impl ConvertOrigin for AlwaysSignedByDefault where - Origin: OriginTrait, - ::AccountId: Decode, + RuntimeOrigin: OriginTrait, + ::AccountId: Decode, { fn convert_origin( _origin: impl Into, _kind: OriginKind, - ) -> Result { - Ok(Origin::signed( - ::AccountId::decode(&mut TrailingZeroInput::zeroes()) + ) -> Result { + Ok(RuntimeOrigin::signed( + ::AccountId::decode(&mut TrailingZeroInput::zeroes()) .expect("infinite length input; no invalid inputs for type; qed"), )) } diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/xcm/pallet-xcm-benchmarks/src/generic/mod.rs index 3d836b21e63d..adf31fb207f2 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mod.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mod.rs @@ -15,7 +15,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + crate::Config { - type RuntimeCall: Dispatchable + type RuntimeCall: Dispatchable + GetDispatchInfo + From> + Encode; diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index 5d297e144df1..f5e5d0f8c004 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -75,7 +75,10 @@ pub mod pallet { /// Required origin for sending XCM messages. If successful, it resolves to `MultiLocation` /// which exists as an interior location within this chain's XCM context. - type SendXcmOrigin: EnsureOrigin<::Origin, Success = MultiLocation>; + type SendXcmOrigin: EnsureOrigin< + ::RuntimeOrigin, + Success = MultiLocation, + >; /// The type used to actually dispatch an XCM to its destination. type XcmRouter: SendXcm; @@ -83,7 +86,10 @@ pub mod pallet { /// Required origin for executing XCM messages, including the teleport functionality. If successful, /// then it resolves to `MultiLocation` which exists as an interior location within this chain's XCM /// context. - type ExecuteXcmOrigin: EnsureOrigin<::Origin, Success = MultiLocation>; + type ExecuteXcmOrigin: EnsureOrigin< + ::RuntimeOrigin, + Success = MultiLocation, + >; /// Our XCM filter which messages to be executed using `XcmExecutor` must pass. type XcmExecuteFilter: Contains<(MultiLocation, Xcm<::RuntimeCall>)>; @@ -104,13 +110,16 @@ pub mod pallet { type LocationInverter: InvertLocation; /// The outer `Origin` type. - type Origin: From + From<::Origin>; + type RuntimeOrigin: From + From<::RuntimeOrigin>; /// The outer `Call` type. type RuntimeCall: Parameter + GetDispatchInfo + IsType<::RuntimeCall> - + Dispatchable::Origin, PostInfo = PostDispatchInfo>; + + Dispatchable< + RuntimeOrigin = ::RuntimeOrigin, + PostInfo = PostDispatchInfo, + >; const VERSION_DISCOVERY_QUEUE_SIZE: u32; @@ -1555,12 +1564,14 @@ where /// A simple passthrough where we reuse the `MultiLocation`-typed XCM origin as the inner value of /// this crate's `Origin::Xcm` value. -pub struct XcmPassthrough(PhantomData); -impl> ConvertOrigin for XcmPassthrough { +pub struct XcmPassthrough(PhantomData); +impl> ConvertOrigin + for XcmPassthrough +{ fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); match kind { OriginKind::Xcm => Ok(crate::Origin::Xcm(origin).into()), diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index a42d7f109136..7652a395b47b 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -52,8 +52,8 @@ pub mod pallet_test_notifier { #[pallet::config] pub trait Config: frame_system::Config + crate::Config { type RuntimeEvent: IsType<::RuntimeEvent> + From>; - type Origin: IsType<::Origin> - + Into::Origin>>; + type RuntimeOrigin: IsType<::RuntimeOrigin> + + Into::RuntimeOrigin>>; type RuntimeCall: IsType<::RuntimeCall> + From>; } @@ -110,7 +110,7 @@ pub mod pallet_test_notifier { query_id: QueryId, response: Response, ) -> DispatchResult { - let responder = ensure_response(::Origin::from(origin))?; + let responder = ensure_response(::RuntimeOrigin::from(origin))?; Self::deposit_event(Event::::ResponseReceived(responder, query_id, response)); Ok(()) } @@ -171,7 +171,7 @@ parameter_types! { } impl frame_system::Config for Test { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -229,10 +229,10 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter, SovereignAccountOf, AccountId, ()>; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -267,7 +267,7 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; parameter_types! { pub static AdvertisedXcmVersion: pallet_xcm::XcmVersion = 2; @@ -275,16 +275,16 @@ parameter_types! { impl pallet_xcm::Config for Test { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = (TestSendXcmErrX8, TestSendXcm); - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = AdvertisedXcmVersion; @@ -294,7 +294,7 @@ impl origin::Config for Test {} impl pallet_test_notifier::Config for Test { type RuntimeEvent = RuntimeEvent; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; } diff --git a/xcm/pallet-xcm/src/tests.rs b/xcm/pallet-xcm/src/tests.rs index 2e7703a062b4..ddac7518e510 100644 --- a/xcm/pallet-xcm/src/tests.rs +++ b/xcm/pallet-xcm/src/tests.rs @@ -171,7 +171,11 @@ fn send_works() { ]); let versioned_dest = Box::new(RelayLocation::get().into()); let versioned_message = Box::new(VersionedXcm::from(message.clone())); - assert_ok!(XcmPallet::send(Origin::signed(ALICE), versioned_dest, versioned_message)); + assert_ok!(XcmPallet::send( + RuntimeOrigin::signed(ALICE), + versioned_dest, + versioned_message + )); assert_eq!( sent_xcm(), vec![( @@ -209,7 +213,7 @@ fn send_fails_when_xcm_router_blocks() { ]); assert_noop!( XcmPallet::send( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(MultiLocation::ancestor(8).into()), Box::new(VersionedXcm::from(message.clone())), ), @@ -233,7 +237,7 @@ fn teleport_assets_works() { assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); let dest: MultiLocation = AccountId32 { network: Any, id: BOB.into() }.into(); assert_ok!(XcmPallet::teleport_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(RelayLocation::get().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -276,7 +280,7 @@ fn limmited_teleport_assets_works() { assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); let dest: MultiLocation = AccountId32 { network: Any, id: BOB.into() }.into(); assert_ok!(XcmPallet::limited_teleport_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(RelayLocation::get().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -320,7 +324,7 @@ fn unlimmited_teleport_assets_works() { assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); let dest: MultiLocation = AccountId32 { network: Any, id: BOB.into() }.into(); assert_ok!(XcmPallet::limited_teleport_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(RelayLocation::get().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -363,7 +367,7 @@ fn reserve_transfer_assets_works() { Junction::AccountId32 { network: NetworkId::Any, id: ALICE.into() }.into(); assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); assert_ok!(XcmPallet::reserve_transfer_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_ID).into().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -411,7 +415,7 @@ fn limited_reserve_transfer_assets_works() { Junction::AccountId32 { network: NetworkId::Any, id: ALICE.into() }.into(); assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); assert_ok!(XcmPallet::limited_reserve_transfer_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_ID).into().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -460,7 +464,7 @@ fn unlimited_reserve_transfer_assets_works() { Junction::AccountId32 { network: NetworkId::Any, id: ALICE.into() }.into(); assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); assert_ok!(XcmPallet::limited_reserve_transfer_assets( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(Parachain(PARA_ID).into().into()), Box::new(dest.clone().into()), Box::new((Here, SEND_AMOUNT).into()), @@ -507,7 +511,7 @@ fn execute_withdraw_to_deposit_works() { Junction::AccountId32 { network: NetworkId::Any, id: BOB.into() }.into(); assert_eq!(Balances::total_balance(&ALICE), INITIAL_BALANCE); assert_ok!(XcmPallet::execute( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(VersionedXcm::from(Xcm(vec![ WithdrawAsset((Here, SEND_AMOUNT).into()), buy_execution((Here, SEND_AMOUNT)), @@ -534,7 +538,7 @@ fn trapped_assets_can_be_claimed() { Junction::AccountId32 { network: NetworkId::Any, id: BOB.into() }.into(); assert_ok!(XcmPallet::execute( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(VersionedXcm::from(Xcm(vec![ WithdrawAsset((Here, SEND_AMOUNT).into()), buy_execution((Here, SEND_AMOUNT)), @@ -569,7 +573,7 @@ fn trapped_assets_can_be_claimed() { let weight = 3 * BaseXcmWeight::get(); assert_ok!(XcmPallet::execute( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(VersionedXcm::from(Xcm(vec![ ClaimAsset { assets: (Here, SEND_AMOUNT).into(), ticket: Here.into() }, buy_execution((Here, SEND_AMOUNT)), @@ -584,7 +588,7 @@ fn trapped_assets_can_be_claimed() { let weight = 3 * BaseXcmWeight::get(); assert_ok!(XcmPallet::execute( - Origin::signed(ALICE), + RuntimeOrigin::signed(ALICE), Box::new(VersionedXcm::from(Xcm(vec![ ClaimAsset { assets: (Here, SEND_AMOUNT).into(), ticket: Here.into() }, buy_execution((Here, SEND_AMOUNT)), @@ -615,7 +619,7 @@ fn basic_subscription_works() { new_test_ext_with_balances(vec![]).execute_with(|| { let remote = Parachain(1000).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()), )); @@ -658,13 +662,13 @@ fn subscriptions_increment_id() { new_test_ext_with_balances(vec![]).execute_with(|| { let remote = Parachain(1000).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()), )); let remote2 = Parachain(1001).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote2.clone().into()), )); @@ -689,12 +693,12 @@ fn double_subscription_fails() { new_test_ext_with_balances(vec![]).execute_with(|| { let remote = Parachain(1000).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()), )); assert_noop!( XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()) ), Error::::AlreadySubscribed, @@ -707,16 +711,16 @@ fn unsubscribe_works() { new_test_ext_with_balances(vec![]).execute_with(|| { let remote = Parachain(1000).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()), )); assert_ok!(XcmPallet::force_unsubscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()) )); assert_noop!( XcmPallet::force_unsubscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()) ), Error::::NoSubscription, @@ -851,7 +855,7 @@ fn subscriber_side_subscription_works() { new_test_ext_with_balances(vec![]).execute_with(|| { let remote = Parachain(1000).into(); assert_ok!(XcmPallet::force_subscribe_version_notify( - Origin::root(), + RuntimeOrigin::root(), Box::new(remote.clone().into()), )); take_sent_xcm(); @@ -893,7 +897,7 @@ fn auto_subscription_works() { let remote0 = Parachain(1000).into(); let remote1 = Parachain(1001).into(); - assert_ok!(XcmPallet::force_default_xcm_version(Origin::root(), Some(1))); + assert_ok!(XcmPallet::force_default_xcm_version(RuntimeOrigin::root(), Some(1))); // Wrapping a version for a destination we don't know elicits a subscription. let v1_msg = xcm::v1::Xcm::<()>::QueryResponse { diff --git a/xcm/xcm-builder/src/mock.rs b/xcm/xcm-builder/src/mock.rs index 96ef04bead3b..e085f22f4127 100644 --- a/xcm/xcm-builder/src/mock.rs +++ b/xcm/xcm-builder/src/mock.rs @@ -60,11 +60,11 @@ pub enum TestCall { Any(Weight, Option), } impl Dispatchable for TestCall { - type Origin = TestOrigin; + type RuntimeOrigin = TestOrigin; type Config = (); type Info = (); type PostInfo = PostDispatchInfo; - fn dispatch(self, origin: Self::Origin) -> DispatchResultWithPostInfo { + fn dispatch(self, origin: Self::RuntimeOrigin) -> DispatchResultWithPostInfo { let mut post_info = PostDispatchInfo::default(); let maybe_actual = match self { TestCall::OnlyRoot(_, maybe_actual) | diff --git a/xcm/xcm-builder/src/origin_conversion.rs b/xcm/xcm-builder/src/origin_conversion.rs index 5df56f1ed5de..9fe50eaf9c3f 100644 --- a/xcm/xcm-builder/src/origin_conversion.rs +++ b/xcm/xcm-builder/src/origin_conversion.rs @@ -24,18 +24,20 @@ use xcm::latest::{BodyId, BodyPart, Junction, Junctions::*, MultiLocation, Netwo use xcm_executor::traits::{Convert, ConvertOrigin}; /// Sovereign accounts use the system's `Signed` origin with an account ID derived from the `LocationConverter`. -pub struct SovereignSignedViaLocation( - PhantomData<(LocationConverter, Origin)>, +pub struct SovereignSignedViaLocation( + PhantomData<(LocationConverter, RuntimeOrigin)>, ); -impl, Origin: OriginTrait> - ConvertOrigin for SovereignSignedViaLocation +impl< + LocationConverter: Convert, + RuntimeOrigin: OriginTrait, + > ConvertOrigin for SovereignSignedViaLocation where - Origin::AccountId: Clone, + RuntimeOrigin::AccountId: Clone, { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!( target: "xcm::origin_conversion", @@ -44,57 +46,61 @@ where ); if let OriginKind::SovereignAccount = kind { let location = LocationConverter::convert(origin)?; - Ok(Origin::signed(location).into()) + Ok(RuntimeOrigin::signed(location).into()) } else { Err(origin) } } } -pub struct ParentAsSuperuser(PhantomData); -impl ConvertOrigin for ParentAsSuperuser { +pub struct ParentAsSuperuser(PhantomData); +impl ConvertOrigin for ParentAsSuperuser { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!(target: "xcm::origin_conversion", "ParentAsSuperuser origin: {:?}, kind: {:?}", origin, kind); if kind == OriginKind::Superuser && origin.contains_parents_only(1) { - Ok(Origin::root()) + Ok(RuntimeOrigin::root()) } else { Err(origin) } } } -pub struct ChildSystemParachainAsSuperuser(PhantomData<(ParaId, Origin)>); -impl, Origin: OriginTrait> ConvertOrigin - for ChildSystemParachainAsSuperuser +pub struct ChildSystemParachainAsSuperuser( + PhantomData<(ParaId, RuntimeOrigin)>, +); +impl, RuntimeOrigin: OriginTrait> ConvertOrigin + for ChildSystemParachainAsSuperuser { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!(target: "xcm::origin_conversion", "ChildSystemParachainAsSuperuser origin: {:?}, kind: {:?}", origin, kind); match (kind, origin) { ( OriginKind::Superuser, MultiLocation { parents: 0, interior: X1(Junction::Parachain(id)) }, - ) if ParaId::from(id).is_system() => Ok(Origin::root()), + ) if ParaId::from(id).is_system() => Ok(RuntimeOrigin::root()), (_, origin) => Err(origin), } } } -pub struct SiblingSystemParachainAsSuperuser(PhantomData<(ParaId, Origin)>); -impl, Origin: OriginTrait> ConvertOrigin - for SiblingSystemParachainAsSuperuser +pub struct SiblingSystemParachainAsSuperuser( + PhantomData<(ParaId, RuntimeOrigin)>, +); +impl, RuntimeOrigin: OriginTrait> ConvertOrigin + for SiblingSystemParachainAsSuperuser { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!( target: "xcm::origin_conversion", @@ -105,42 +111,44 @@ impl, Origin: OriginTrait> ConvertOrigin ( OriginKind::Superuser, MultiLocation { parents: 1, interior: X1(Junction::Parachain(id)) }, - ) if ParaId::from(id).is_system() => Ok(Origin::root()), + ) if ParaId::from(id).is_system() => Ok(RuntimeOrigin::root()), (_, origin) => Err(origin), } } } -pub struct ChildParachainAsNative(PhantomData<(ParachainOrigin, Origin)>); -impl, Origin: From> ConvertOrigin - for ChildParachainAsNative +pub struct ChildParachainAsNative( + PhantomData<(ParachainOrigin, RuntimeOrigin)>, +); +impl, RuntimeOrigin: From> ConvertOrigin + for ChildParachainAsNative { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!(target: "xcm::origin_conversion", "ChildParachainAsNative origin: {:?}, kind: {:?}", origin, kind); match (kind, origin) { ( OriginKind::Native, MultiLocation { parents: 0, interior: X1(Junction::Parachain(id)) }, - ) => Ok(Origin::from(ParachainOrigin::from(id))), + ) => Ok(RuntimeOrigin::from(ParachainOrigin::from(id))), (_, origin) => Err(origin), } } } -pub struct SiblingParachainAsNative( - PhantomData<(ParachainOrigin, Origin)>, +pub struct SiblingParachainAsNative( + PhantomData<(ParachainOrigin, RuntimeOrigin)>, ); -impl, Origin: From> ConvertOrigin - for SiblingParachainAsNative +impl, RuntimeOrigin: From> ConvertOrigin + for SiblingParachainAsNative { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!( target: "xcm::origin_conversion", @@ -151,21 +159,23 @@ impl, Origin: From> ConvertOrigin Ok(Origin::from(ParachainOrigin::from(id))), + ) => Ok(RuntimeOrigin::from(ParachainOrigin::from(id))), (_, origin) => Err(origin), } } } // Our Relay-chain has a native origin given by the `Get`ter. -pub struct RelayChainAsNative(PhantomData<(RelayOrigin, Origin)>); -impl, Origin> ConvertOrigin - for RelayChainAsNative +pub struct RelayChainAsNative( + PhantomData<(RelayOrigin, RuntimeOrigin)>, +); +impl, RuntimeOrigin> ConvertOrigin + for RelayChainAsNative { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!(target: "xcm::origin_conversion", "RelayChainAsNative origin: {:?}, kind: {:?}", origin, kind); if kind == OriginKind::Native && origin.contains_parents_only(1) { @@ -176,16 +186,16 @@ impl, Origin> ConvertOrigin } } -pub struct SignedAccountId32AsNative(PhantomData<(Network, Origin)>); -impl, Origin: OriginTrait> ConvertOrigin - for SignedAccountId32AsNative +pub struct SignedAccountId32AsNative(PhantomData<(Network, RuntimeOrigin)>); +impl, RuntimeOrigin: OriginTrait> ConvertOrigin + for SignedAccountId32AsNative where - Origin::AccountId: From<[u8; 32]>, + RuntimeOrigin::AccountId: From<[u8; 32]>, { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!( target: "xcm::origin_conversion", @@ -197,22 +207,24 @@ where OriginKind::Native, MultiLocation { parents: 0, interior: X1(Junction::AccountId32 { id, network }) }, ) if matches!(network, NetworkId::Any) || network == Network::get() => - Ok(Origin::signed(id.into())), + Ok(RuntimeOrigin::signed(id.into())), (_, origin) => Err(origin), } } } -pub struct SignedAccountKey20AsNative(PhantomData<(Network, Origin)>); -impl, Origin: OriginTrait> ConvertOrigin - for SignedAccountKey20AsNative +pub struct SignedAccountKey20AsNative( + PhantomData<(Network, RuntimeOrigin)>, +); +impl, RuntimeOrigin: OriginTrait> ConvertOrigin + for SignedAccountKey20AsNative where - Origin::AccountId: From<[u8; 20]>, + RuntimeOrigin::AccountId: From<[u8; 20]>, { fn convert_origin( origin: impl Into, kind: OriginKind, - ) -> Result { + ) -> Result { let origin = origin.into(); log::trace!( target: "xcm::origin_conversion", @@ -224,28 +236,28 @@ where OriginKind::Native, MultiLocation { parents: 0, interior: X1(Junction::AccountKey20 { key, network }) }, ) if (matches!(network, NetworkId::Any) || network == Network::get()) => - Ok(Origin::signed(key.into())), + Ok(RuntimeOrigin::signed(key.into())), (_, origin) => Err(origin), } } } /// `EnsureOrigin` barrier to convert from dispatch origin to XCM origin, if one exists. -pub struct EnsureXcmOrigin(PhantomData<(Origin, Conversion)>); -impl> EnsureOrigin - for EnsureXcmOrigin +pub struct EnsureXcmOrigin(PhantomData<(RuntimeOrigin, Conversion)>); +impl> + EnsureOrigin for EnsureXcmOrigin where - Origin::PalletsOrigin: PartialEq, + RuntimeOrigin::PalletsOrigin: PartialEq, { type Success = MultiLocation; - fn try_origin(o: Origin) -> Result { + fn try_origin(o: RuntimeOrigin) -> Result { let o = match Conversion::convert(o) { Ok(location) => return Ok(location), Err(o) => o, }; // We institute a root fallback so root can always represent the context. This // guarantees that `successful_origin` will work. - if o.caller() == Origin::root().caller() { + if o.caller() == RuntimeOrigin::root().caller() { Ok(Here.into()) } else { Err(o) @@ -253,8 +265,8 @@ where } #[cfg(feature = "runtime-benchmarks")] - fn try_successful_origin() -> Result { - Ok(Origin::root()) + fn try_successful_origin() -> Result { + Ok(RuntimeOrigin::root()) } } @@ -262,16 +274,16 @@ where /// /// Typically used when configuring `pallet-xcm` for allowing normal accounts to dispatch an XCM from an `AccountId32` /// origin. -pub struct SignedToAccountId32( - PhantomData<(Origin, AccountId, Network)>, +pub struct SignedToAccountId32( + PhantomData<(RuntimeOrigin, AccountId, Network)>, ); -impl, Network: Get> - Convert for SignedToAccountId32 +impl, Network: Get> + Convert for SignedToAccountId32 where - Origin::PalletsOrigin: From> - + TryInto, Error = Origin::PalletsOrigin>, + RuntimeOrigin::PalletsOrigin: From> + + TryInto, Error = RuntimeOrigin::PalletsOrigin>, { - fn convert(o: Origin) -> Result { + fn convert(o: RuntimeOrigin) -> Result { o.try_with_caller(|caller| match caller.try_into() { Ok(SystemRawOrigin::Signed(who)) => Ok(Junction::AccountId32 { network: Network::get(), id: who.into() }.into()), @@ -286,13 +298,16 @@ where /// /// Typically used when configuring `pallet-xcm` for allowing a collective's Origin to dispatch an XCM from a /// `Plurality` origin. -pub struct BackingToPlurality(PhantomData<(Origin, COrigin, Body)>); -impl> - Convert for BackingToPlurality +pub struct BackingToPlurality( + PhantomData<(RuntimeOrigin, COrigin, Body)>, +); +impl> + Convert for BackingToPlurality where - Origin::PalletsOrigin: From + TryInto, + RuntimeOrigin::PalletsOrigin: + From + TryInto, { - fn convert(o: Origin) -> Result { + fn convert(o: RuntimeOrigin) -> Result { o.try_with_caller(|caller| match caller.try_into() { Ok(co) => match co.get_backing() { Some(backing) => Ok(Junction::Plurality { diff --git a/xcm/xcm-builder/tests/mock/mod.rs b/xcm/xcm-builder/tests/mock/mod.rs index f5f7cf6a1959..30e12a12e073 100644 --- a/xcm/xcm-builder/tests/mock/mod.rs +++ b/xcm/xcm-builder/tests/mock/mod.rs @@ -61,7 +61,7 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -133,10 +133,10 @@ pub type LocalCurrencyAdapter = XcmCurrencyAdapter< pub type LocalAssetTransactor = (LocalCurrencyAdapter,); type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -176,22 +176,22 @@ impl xcm_executor::Config for XcmConfig { type SubscriptionService = XcmPallet; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; type LocationInverter = LocationInverter; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = TestSendXcm; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type RuntimeCall = RuntimeCall; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/xcm/xcm-executor/src/config.rs b/xcm/xcm-executor/src/config.rs index 99585762d96c..8b15ac3b754f 100644 --- a/xcm/xcm-executor/src/config.rs +++ b/xcm/xcm-executor/src/config.rs @@ -33,7 +33,7 @@ pub trait Config { type AssetTransactor: TransactAsset; /// How to get a call origin from a `OriginKind` value. - type OriginConverter: ConvertOrigin<::Origin>; + type OriginConverter: ConvertOrigin<::RuntimeOrigin>; /// Combinations of (Location, Asset) pairs which we trust as reserves. type IsReserve: FilterAssetLocation; diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index 1782a69e8de6..1e4f96cb2282 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -206,7 +206,7 @@ mod tests { Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::reserve_transfer_assets( - relay_chain::Origin::signed(ALICE), + relay_chain::RuntimeOrigin::signed(ALICE), Box::new(X1(Parachain(1)).into().into()), Box::new(X1(AccountId32 { network: Any, id: ALICE.into() }).into().into()), Box::new((Here, withdraw_amount).into()), diff --git a/xcm/xcm-simulator/example/src/parachain.rs b/xcm/xcm-simulator/example/src/parachain.rs index 77322054a258..ff435a9238fd 100644 --- a/xcm/xcm-simulator/example/src/parachain.rs +++ b/xcm/xcm-simulator/example/src/parachain.rs @@ -52,7 +52,7 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -114,9 +114,9 @@ pub type LocationToAccountId = ( ); pub type XcmOriginToCallOrigin = ( - SovereignSignedViaLocation, - SignedAccountId32AsNative, - XcmPassthrough, + SovereignSignedViaLocation, + SignedAccountId32AsNative, + XcmPassthrough, ); parameter_types! { @@ -298,20 +298,20 @@ impl mock_msg_queue::Config for Runtime { type XcmExecutor = XcmExecutor; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index f664947487f6..3a5d9e229621 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -42,7 +42,7 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -107,10 +107,10 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter, SovereignAccountOf, AccountId, ()>; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -140,21 +140,21 @@ impl Config for XcmConfig { type SubscriptionService = (); } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/xcm/xcm-simulator/fuzzer/src/parachain.rs b/xcm/xcm-simulator/fuzzer/src/parachain.rs index 25a20e97fc37..b8b51e57e853 100644 --- a/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -52,7 +52,7 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -114,9 +114,9 @@ pub type LocationToAccountId = ( ); pub type XcmOriginToCallOrigin = ( - SovereignSignedViaLocation, - SignedAccountId32AsNative, - XcmPassthrough, + SovereignSignedViaLocation, + SignedAccountId32AsNative, + XcmPassthrough, ); parameter_types! { @@ -298,20 +298,20 @@ impl mock_msg_queue::Config for Runtime { type XcmExecutor = XcmExecutor; } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; + type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; - type ExecuteXcmOrigin = EnsureXcmOrigin; + type ExecuteXcmOrigin = EnsureXcmOrigin; type XcmExecuteFilter = Everything; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index f664947487f6..3a5d9e229621 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -42,7 +42,7 @@ parameter_types! { } impl frame_system::Config for Runtime { - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; @@ -107,10 +107,10 @@ pub type LocalAssetTransactor = XcmCurrencyAdapter, SovereignAccountOf, AccountId, ()>; type LocalOriginConverter = ( - SovereignSignedViaLocation, - ChildParachainAsNative, - SignedAccountId32AsNative, - ChildSystemParachainAsSuperuser, + SovereignSignedViaLocation, + ChildParachainAsNative, + SignedAccountId32AsNative, + ChildSystemParachainAsSuperuser, ); parameter_types! { @@ -140,21 +140,21 @@ impl Config for XcmConfig { type SubscriptionService = (); } -pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; + type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... - type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; + type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmExecuteFilter = Nothing; type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; - type Origin = Origin; + type RuntimeOrigin = RuntimeOrigin; type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion;