From b0dc21089db32540179465a8c7a19907f39308ab Mon Sep 17 00:00:00 2001 From: Francisco Aguirre Date: Tue, 6 Jun 2023 17:50:55 -0300 Subject: [PATCH] Add PayOverXcm and salary pallet integration test --- Cargo.lock | 387 +++++++++++++----------- xcm/xcm-builder/Cargo.toml | 3 + xcm/xcm-builder/src/tests/mock.rs | 2 - xcm/xcm-builder/src/tests/pay.rs | 128 -------- xcm/xcm-builder/src/tests/pay/mock.rs | 265 ++++++++++++++++ xcm/xcm-builder/src/tests/pay/mod.rs | 26 +- xcm/xcm-builder/src/tests/pay/pay.rs | 31 +- xcm/xcm-builder/src/tests/pay/salary.rs | 221 ++++++-------- 8 files changed, 598 insertions(+), 465 deletions(-) delete mode 100644 xcm/xcm-builder/src/tests/pay.rs create mode 100644 xcm/xcm-builder/src/tests/pay/mock.rs diff --git a/Cargo.lock b/Cargo.lock index 162bd76a76c0..1ae9e8a77329 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -523,7 +523,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "hash-db", "log", @@ -2531,7 +2531,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", ] @@ -2554,7 +2554,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-support-procedural", @@ -2579,7 +2579,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "Inflector", "array-bytes", @@ -2626,7 +2626,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2637,7 +2637,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2654,7 +2654,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -2683,7 +2683,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-recursion", "futures", @@ -2704,7 +2704,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "bitflags", "environmental", @@ -2739,7 +2739,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "Inflector", "cfg-expr", @@ -2756,7 +2756,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2768,7 +2768,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro2", "quote", @@ -2778,7 +2778,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-executive", @@ -2805,7 +2805,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -2817,7 +2817,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "cfg-if", "frame-support", @@ -2836,7 +2836,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -2851,7 +2851,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "sp-api", @@ -2860,7 +2860,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "parity-scale-codec", @@ -3042,7 +3042,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "chrono", "frame-election-provider-support", @@ -4988,7 +4988,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "log", @@ -5007,7 +5007,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "anyhow", "jsonrpsee", @@ -5590,7 +5590,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5605,7 +5605,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -5621,7 +5621,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -5635,7 +5635,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5659,7 +5659,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5679,7 +5679,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-election-provider-support", "frame-remote-externalities", @@ -5698,7 +5698,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5713,7 +5713,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -5732,7 +5732,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "binary-merkle-tree", @@ -5756,7 +5756,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5774,7 +5774,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5793,7 +5793,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5810,7 +5810,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "assert_matches", "frame-benchmarking", @@ -5827,7 +5827,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5845,7 +5845,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5868,7 +5868,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5881,7 +5881,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5899,7 +5899,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "docify", "frame-benchmarking", @@ -5918,7 +5918,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5941,7 +5941,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5957,7 +5957,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5977,7 +5977,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -5994,7 +5994,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6011,7 +6011,7 @@ dependencies = [ [[package]] name = "pallet-message-queue" version = "7.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6030,7 +6030,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6047,7 +6047,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6063,7 +6063,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6079,7 +6079,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -6096,7 +6096,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6116,7 +6116,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6127,7 +6127,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -6144,7 +6144,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6168,7 +6168,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6185,7 +6185,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6200,7 +6200,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6218,7 +6218,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6233,7 +6233,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6249,10 +6249,28 @@ dependencies = [ "sp-std", ] +[[package]] +name = "pallet-salary" +version = "4.0.0-dev" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" +dependencies = [ + "frame-benchmarking", + "frame-support", + "frame-system", + "log", + "parity-scale-codec", + "scale-info", + "sp-arithmetic", + "sp-core", + "sp-io", + "sp-runtime", + "sp-std", +] + [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6269,7 +6287,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -6290,7 +6308,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6306,7 +6324,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -6320,7 +6338,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6343,7 +6361,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6354,7 +6372,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "log", "sp-arithmetic", @@ -6363,7 +6381,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "sp-api", @@ -6372,7 +6390,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6389,7 +6407,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6404,7 +6422,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6422,7 +6440,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6441,7 +6459,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-support", "frame-system", @@ -6457,7 +6475,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6473,7 +6491,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6485,7 +6503,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6502,7 +6520,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6517,7 +6535,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6533,7 +6551,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -6548,7 +6566,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-benchmarking", "frame-support", @@ -9675,7 +9693,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "log", "sp-core", @@ -9686,7 +9704,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -9715,7 +9733,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "futures-timer", @@ -9738,7 +9756,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -9753,7 +9771,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -9772,7 +9790,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9783,7 +9801,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "chrono", @@ -9823,7 +9841,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "fnv", "futures", @@ -9850,7 +9868,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "hash-db", "kvdb", @@ -9876,7 +9894,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -9901,7 +9919,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "fork-tree", @@ -9937,7 +9955,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "jsonrpsee", @@ -9959,7 +9977,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-channel", @@ -9995,7 +10013,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "jsonrpsee", @@ -10014,7 +10032,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10027,7 +10045,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ahash 0.8.2", "array-bytes", @@ -10067,7 +10085,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "finality-grandpa", "futures", @@ -10087,7 +10105,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -10110,7 +10128,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "lru 0.10.0", "parity-scale-codec", @@ -10132,7 +10150,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10144,7 +10162,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "anyhow", "cfg-if", @@ -10162,7 +10180,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ansi_term", "futures", @@ -10178,7 +10196,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "parking_lot 0.12.1", @@ -10192,7 +10210,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-channel", @@ -10238,7 +10256,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-channel", "cid", @@ -10259,7 +10277,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-trait", @@ -10286,7 +10304,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ahash 0.8.2", "futures", @@ -10304,7 +10322,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-channel", @@ -10326,7 +10344,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-channel", @@ -10360,7 +10378,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "futures", @@ -10378,7 +10396,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "bytes", @@ -10408,7 +10426,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10417,7 +10435,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "jsonrpsee", @@ -10448,7 +10466,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10467,7 +10485,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "http", "jsonrpsee", @@ -10482,7 +10500,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "futures", @@ -10508,7 +10526,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "directories", @@ -10574,7 +10592,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "log", "parity-scale-codec", @@ -10585,7 +10603,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "clap 4.2.5", "fs4", @@ -10601,7 +10619,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10620,7 +10638,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "libc", @@ -10639,7 +10657,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "chrono", "futures", @@ -10658,7 +10676,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ansi_term", "atty", @@ -10689,7 +10707,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10700,7 +10718,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -10726,7 +10744,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -10742,7 +10760,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-channel", "futures", @@ -11290,7 +11308,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "hash-db", "log", @@ -11310,7 +11328,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "Inflector", "blake2", @@ -11324,7 +11342,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11337,7 +11355,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "16.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "integer-sqrt", "num-traits", @@ -11351,7 +11369,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11364,7 +11382,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "sp-api", @@ -11376,7 +11394,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "log", @@ -11394,7 +11412,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures", @@ -11409,7 +11427,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "parity-scale-codec", @@ -11427,7 +11445,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "parity-scale-codec", @@ -11448,7 +11466,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11467,7 +11485,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "finality-grandpa", "log", @@ -11485,7 +11503,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11497,7 +11515,7 @@ dependencies = [ [[package]] name = "sp-core" version = "21.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "bitflags", @@ -11541,7 +11559,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "blake2b_simd", "byteorder", @@ -11555,7 +11573,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "9.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro2", "quote", @@ -11566,7 +11584,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11575,7 +11593,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro2", "quote", @@ -11585,7 +11603,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.19.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "environmental", "parity-scale-codec", @@ -11596,7 +11614,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11611,7 +11629,7 @@ dependencies = [ [[package]] name = "sp-io" version = "23.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "bytes", "ed25519", @@ -11637,7 +11655,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "lazy_static", "sp-core", @@ -11648,7 +11666,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.27.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "parity-scale-codec", @@ -11662,7 +11680,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "thiserror", "zstd 0.12.3+zstd.1.5.2", @@ -11671,7 +11689,7 @@ dependencies = [ [[package]] name = "sp-metadata-ir" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -11682,7 +11700,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -11700,7 +11718,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11714,7 +11732,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "sp-api", "sp-core", @@ -11724,7 +11742,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "backtrace", "lazy_static", @@ -11734,7 +11752,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "rustc-hash", "serde", @@ -11744,7 +11762,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "24.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "either", "hash256-std-hasher", @@ -11766,7 +11784,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "17.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -11784,7 +11802,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "11.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "Inflector", "proc-macro-crate", @@ -11796,7 +11814,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11810,7 +11828,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -11823,7 +11841,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.28.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "hash-db", "log", @@ -11843,7 +11861,7 @@ dependencies = [ [[package]] name = "sp-statement-store" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "log", "parity-scale-codec", @@ -11861,12 +11879,12 @@ dependencies = [ [[package]] name = "sp-std" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" [[package]] name = "sp-storage" version = "13.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11879,7 +11897,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "futures-timer", @@ -11894,7 +11912,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "10.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "sp-std", @@ -11906,7 +11924,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "sp-api", "sp-runtime", @@ -11915,7 +11933,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "log", @@ -11931,7 +11949,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ahash 0.8.2", "hash-db", @@ -11954,7 +11972,7 @@ dependencies = [ [[package]] name = "sp-version" version = "22.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "impl-serde", "parity-scale-codec", @@ -11971,7 +11989,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "8.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -11982,7 +12000,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "14.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -11995,7 +12013,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "20.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "parity-scale-codec", "scale-info", @@ -12236,7 +12254,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "platforms", ] @@ -12244,7 +12262,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12263,7 +12281,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "hyper", "log", @@ -12275,7 +12293,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "jsonrpsee", @@ -12288,7 +12306,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "jsonrpsee", "log", @@ -12307,7 +12325,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "array-bytes", "async-trait", @@ -12333,7 +12351,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12343,7 +12361,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12354,7 +12372,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "ansi_term", "build-helper", @@ -13199,7 +13217,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#715b24690dd4c16d45b0b593392e8913dde96146" +source = "git+https://github.com/paritytech/substrate?branch=master#31b57a1884b00ed979ba85343e308ed73756cb41" dependencies = [ "async-trait", "clap 4.2.5", @@ -14644,11 +14662,14 @@ dependencies = [ "frame-system", "impl-trait-for-tuples", "log", + "pallet-assets", "pallet-balances", + "pallet-salary", "pallet-transaction-payment", "pallet-xcm", "parity-scale-codec", "polkadot-parachain", + "polkadot-primitives", "polkadot-runtime-parachains", "polkadot-test-runtime", "primitive-types", diff --git a/xcm/xcm-builder/Cargo.toml b/xcm/xcm-builder/Cargo.toml index 465d338fd0a7..44d4131e0cc4 100644 --- a/xcm/xcm-builder/Cargo.toml +++ b/xcm/xcm-builder/Cargo.toml @@ -28,6 +28,9 @@ polkadot-parachain = { path = "../../parachain", default-features = false } primitive-types = "0.12.1" pallet-balances = { git = "https://github.com/paritytech/substrate", branch = "master" } pallet-xcm = { path = "../pallet-xcm" } +pallet-salary = { git = "https://github.com/paritytech/substrate", branch = "master" } +pallet-assets = { git = "https://github.com/paritytech/substrate", branch = "master" } +primitives = { package = "polkadot-primitives", path = "../../primitives" } polkadot-runtime-parachains = { path = "../../runtime/parachains" } assert_matches = "1.5.0" polkadot-test-runtime = { path = "../../runtime/test-runtime" } diff --git a/xcm/xcm-builder/src/tests/mock.rs b/xcm/xcm-builder/src/tests/mock.rs index 1970341157de..c97987a60250 100644 --- a/xcm/xcm-builder/src/tests/mock.rs +++ b/xcm/xcm-builder/src/tests/mock.rs @@ -410,8 +410,6 @@ pub fn response(query_id: u64) -> Option { }) } -// TODO: Add counter for query ids -// TODO: Add more information in QUERIES pub struct TestQueryHandler(core::marker::PhantomData<(T, BlockNumber)>); impl QueryHandler for TestQueryHandler diff --git a/xcm/xcm-builder/src/tests/pay.rs b/xcm/xcm-builder/src/tests/pay.rs deleted file mode 100644 index a77983ad43dc..000000000000 --- a/xcm/xcm-builder/src/tests/pay.rs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (C) Parity Technologies (UK) Ltd. -// This file is part of Polkadot. - -// Polkadot is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. - -// Polkadot is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. - -// You should have received a copy of the GNU General Public License -// along with Polkadot. If not, see . - -use super::*; -use frame_support::{assert_ok, traits::tokens::Pay}; - -type BlockNumber = u64; -type AccountId = u64; - -parameter_types! { - pub InteriorAccount: InteriorMultiLocation = AccountIndex64 { index: 3u64, network: None }.into(); - pub InteriorBody: InteriorMultiLocation = Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into(); - pub Timeout: BlockNumber = 5; // 5 blocks - pub Beneficiary: AccountId = 5; -} - -/// Type representing both a location and an asset that is held at that location. -/// The id of the held asset is relative to the location where it is being held. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq)] -pub struct AssetKind { - destination: MultiLocation, - asset_id: AssetId, -} - -pub struct LocatableAssetKindConverter; -impl sp_runtime::traits::Convert for LocatableAssetKindConverter { - fn convert(value: AssetKind) -> LocatableAssetId { - LocatableAssetId { asset_id: value.asset_id, location: value.destination } - } -} - -/// Simple converter to turn a u64 into a MultiLocation using the AccountIndex64 junction and no parents -pub struct AliasesIntoAccountIndex64; -impl<'a> sp_runtime::traits::Convert<&'a AccountId, MultiLocation> for AliasesIntoAccountIndex64 { - fn convert(who: &AccountId) -> MultiLocation { - AccountIndex64 { network: None, index: who.clone().into() }.into() - } -} - -/// Scenario: -/// Account #3 on the local chain, Parachain(42), controls an amount of funds on Parachain(2). -/// PayOverXcm::pay creates the correct message for account #3 to pay another account, account #5, on Parachain(2), remotely, in its native token. -#[test] -fn pay_over_xcm_works() { - let who = 5u64; - let asset_kind = - AssetKind { destination: (Parent, Parachain(2)).into(), asset_id: Here.into() }; - let amount = 1000u128; - - assert_ok!(PayOverXcm::< - InteriorAccount, - TestMessageSender, - TestQueryHandler, - Timeout, - AccountId, - AssetKind, - LocatableAssetKindConverter, - AliasesIntoAccountIndex64, - >::pay(&who, asset_kind, amount)); - - let expected_message = Xcm(vec![ - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - SetAppendix(Xcm(vec![ReportError(QueryResponseInfo { - destination: (Parent, Parachain(42)).into(), - query_id: 1, - max_weight: Weight::zero(), - })])), - DescendOrigin(AccountIndex64 { index: 3, network: None }.into()), - TransferAsset { - assets: (Here, 1000u128).into(), - beneficiary: AccountIndex64 { index: 5, network: None }.into(), - }, - ]); - - let expected_hash = fake_message_hash(&expected_message); - assert_eq!(sent_xcm(), vec![((Parent, Parachain(2)).into(), expected_message, expected_hash)]); -} - -/// Scenario: -/// A pluralistic body, a Treasury, on the local chain, Parachain(42), controls an amount of funds on Parachain(2). -/// PayOverXcm::pay creates the correct message for the treasury to pay another account, account #7, on Parachain(2), remotely, in the relay's token. -#[test] -fn pay_over_xcm_governance_body() { - let who = 7u64; - let asset_kind = - AssetKind { destination: (Parent, Parachain(2)).into(), asset_id: Parent.into() }; - let amount = 500u128; - - assert_ok!(PayOverXcm::< - InteriorBody, - TestMessageSender, - TestQueryHandler, - Timeout, - AccountId, - AssetKind, - LocatableAssetKindConverter, - AliasesIntoAccountIndex64, - >::pay(&who, asset_kind, amount)); - - let expected_message = Xcm(vec![ - UnpaidExecution { weight_limit: Unlimited, check_origin: None }, - SetAppendix(Xcm(vec![ReportError(QueryResponseInfo { - destination: (Parent, Parachain(42)).into(), - query_id: 1, - max_weight: Weight::zero(), - })])), - DescendOrigin(Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into()), - TransferAsset { - assets: (Parent, 500u128).into(), - beneficiary: AccountIndex64 { index: 7, network: None }.into(), - }, - ]); - let expected_hash = fake_message_hash(&expected_message); - assert_eq!(sent_xcm(), vec![((Parent, Parachain(2)).into(), expected_message, expected_hash)]); -} diff --git a/xcm/xcm-builder/src/tests/pay/mock.rs b/xcm/xcm-builder/src/tests/pay/mock.rs new file mode 100644 index 000000000000..e02599de0731 --- /dev/null +++ b/xcm/xcm-builder/src/tests/pay/mock.rs @@ -0,0 +1,265 @@ +use super::*; + +use frame_support::{ + macro_magic::use_attr, + traits::{AsEnsureOriginWithArg, Nothing}, +}; + +#[use_attr] +use frame_support::derive_impl; + +use frame_support::{ + assert_ok, construct_runtime, parameter_types, + traits::{tokens::ConvertRank, ConstU32, Everything, RankedMembers}, +}; +use frame_system::{EnsureRoot, EnsureSigned}; +use polkadot_test_runtime::SignedExtra; +use primitives::{AccountIndex, BlakeTwo256, Signature}; +use sp_runtime::{ + generic, + traits::{Convert, ConvertToValue, MaybeEquivalence}, + AccountId32, DispatchResult, +}; +use xcm_executor::{traits::ConvertLocation, XcmExecutor}; + +pub type Address = sp_runtime::MultiAddress; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; +pub type Header = generic::Header; +pub type Block = generic::Block; + +pub type BlockNumber = u32; +pub type AccountId = AccountId32; + +construct_runtime!( + pub enum Test where + Block = Block, + NodeBlock = primitives::Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: frame_system, + Balances: pallet_balances, + Assets: pallet_assets, + Salary: pallet_salary, + XcmPallet: pallet_xcm, + } +); + +#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] +impl frame_system::Config for Test { + type BaseCallFilter = frame_support::traits::Everything; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + type RuntimeEvent = RuntimeEvent; + type PalletInfo = PalletInfo; + type OnSetCode = (); + type AccountData = pallet_balances::AccountData; + type BlockNumber = BlockNumber; + type AccountId = AccountId; + type Lookup = sp_runtime::traits::IdentityLookup; +} + +pub type Balance = u128; + +parameter_types! { + pub const ExistentialDeposit: Balance = 1; +} + +impl pallet_balances::Config for Test { + type MaxLocks = ConstU32<0>; + type Balance = Balance; + type RuntimeEvent = RuntimeEvent; + type DustRemoval = (); + type ExistentialDeposit = ExistentialDeposit; + type AccountStore = System; + type WeightInfo = (); + type MaxReserves = (); + type ReserveIdentifier = [u8; 8]; + type RuntimeHoldReason = RuntimeHoldReason; + type FreezeIdentifier = (); + type MaxHolds = ConstU32<0>; + type MaxFreezes = ConstU32<0>; +} + +parameter_types! { + pub const AssetDeposit: u128 = 1_000_000; + pub const MetadataDepositBase: u128 = 1_000_000; + pub const MetadataDepositPerByte: u128 = 100_000; + pub const AssetAccountDeposit: u128 = 1_000_000; + pub const ApprovalDeposit: u128 = 1_000_000; + pub const AssetsStringLimit: u32 = 50; + pub const RemoveItemsLimit: u32 = 50; +} + +impl pallet_assets::Config for Test { + type RuntimeEvent = RuntimeEvent; + type Balance = Balance; + type AssetId = AssetIdForAssets; + type Currency = Balances; + type CreateOrigin = AsEnsureOriginWithArg>; + type ForceOrigin = EnsureRoot; + type AssetDeposit = AssetDeposit; + type MetadataDepositBase = MetadataDepositBase; + type MetadataDepositPerByte = MetadataDepositPerByte; + type AssetAccountDeposit = AssetAccountDeposit; + type ApprovalDeposit = ApprovalDeposit; + type StringLimit = AssetsStringLimit; + type Freezer = (); + type Extra = (); + type WeightInfo = (); + type RemoveItemsLimit = RemoveItemsLimit; + type AssetIdParameter = AssetIdForAssets; + type CallbackHandle = (); +} + +parameter_types! { + pub const RelayLocation: MultiLocation = Here.into_location(); + pub const AnyNetwork: Option = None; + pub UniversalLocation: InteriorMultiLocation = (ByGenesis([0; 32]), Parachain(42)).into(); + pub UnitWeightCost: u64 = 1_000; + pub static AdvertisedXcmVersion: u32 = 3; + pub const BaseXcmWeight: Weight = Weight::from_parts(1_000, 1_000); + pub CurrencyPerSecondPerByte: (AssetId, u128, u128) = (Concrete(RelayLocation::get()), 1, 1); + pub TrustedAssets: (MultiAssetFilter, MultiLocation) = (All.into(), Here.into()); + pub const MaxInstructions: u32 = 100; + pub const MaxAssetsIntoHolding: u32 = 64; + pub CheckingAccount: AccountId = XcmPallet::check_account(); +} + +type AssetIdForAssets = u128; + +pub struct FromMultiLocationToAsset( + core::marker::PhantomData<(MultiLocation, AssetId)>, +); +impl MaybeEquivalence + for FromMultiLocationToAsset +{ + fn convert(value: &MultiLocation) -> Option { + match value { + MultiLocation { parents: 0, interior: Here } => Some(0 as AssetIdForAssets), + MultiLocation { parents: 0, interior: X2(PalletInstance(1), GeneralIndex(index)) } => + Some(*index as AssetIdForAssets), + _ => None, + } + } + + fn convert_back(value: &AssetIdForAssets) -> Option { + match value { + 0u128 => Some(MultiLocation { parents: 1, interior: Here }), + para_id @ 1..=1000 => + Some(MultiLocation { parents: 1, interior: X1(Parachain(*para_id as u32)) }), + _ => None, + } + } +} + +pub type LocalOriginToLocation = SignedToAccountId32; +pub type LocalAssetsTransactor = FungiblesAdapter< + Assets, + ConvertedConcreteId< + AssetIdForAssets, + Balance, + FromMultiLocationToAsset, + JustTry, + >, + SovereignAccountOf, + AccountId, + NoChecking, + CheckingAccount, +>; +type OriginConverter = ( + pallet_xcm::XcmPassthrough, + SignedAccountId32AsNative, +); +type Barrier = AllowUnpaidExecutionFrom; + +pub struct DummyWeightTrader; +impl WeightTrader for DummyWeightTrader { + fn new() -> Self { + DummyWeightTrader + } + + fn buy_weight( + &mut self, + _weight: Weight, + _payment: xcm_executor::Assets, + ) -> Result { + Ok(xcm_executor::Assets::default()) + } +} + +pub struct XcmConfig; +impl xcm_executor::Config for XcmConfig { + type RuntimeCall = RuntimeCall; + type XcmSender = TestMessageSender; + type AssetTransactor = LocalAssetsTransactor; + type OriginConverter = OriginConverter; + type IsReserve = (); + type IsTeleporter = (); + type UniversalLocation = UniversalLocation; + type Barrier = Barrier; + type Weigher = FixedWeightBounds; + type Trader = DummyWeightTrader; + type ResponseHandler = XcmPallet; + type AssetTrap = XcmPallet; + type AssetLocker = (); + type AssetExchanger = (); + type AssetClaims = XcmPallet; + type SubscriptionService = XcmPallet; + type PalletInstancesInfo = (); + type MaxAssetsIntoHolding = MaxAssetsIntoHolding; + type FeeManager = (); + type MessageExporter = (); + type UniversalAliases = Nothing; + type CallDispatcher = RuntimeCall; + type SafeCallFilter = Everything; + type Aliasers = Nothing; +} + +parameter_types! { + pub TreasuryAccountId: AccountId = AccountId::new([42u8; 32]); +} + +pub struct TreasuryToAccount; +impl ConvertLocation for TreasuryToAccount { + fn convert_location(location: &MultiLocation) -> Option { + match location { + MultiLocation { + parents: 1, + interior: + X2(Parachain(42), Plurality { id: BodyId::Treasury, part: BodyPart::Voice }), + } => Some(TreasuryAccountId::get()), // Hardcoded test treasury account id + _ => None, + } + } +} + +type SovereignAccountOf = (AccountId32Aliases<(), AccountId>, TreasuryToAccount); + +impl pallet_xcm::Config for Test { + type RuntimeEvent = RuntimeEvent; + type SendXcmOrigin = EnsureXcmOrigin; + type XcmRouter = TestMessageSender; + type ExecuteXcmOrigin = EnsureXcmOrigin; + type XcmExecuteFilter = Everything; + type XcmExecutor = XcmExecutor; + type XcmTeleportFilter = Everything; + type XcmReserveTransferFilter = Everything; + type Weigher = FixedWeightBounds; + type UniversalLocation = UniversalLocation; + type RuntimeOrigin = RuntimeOrigin; + type RuntimeCall = RuntimeCall; + const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; + type AdvertisedXcmVersion = AdvertisedXcmVersion; + type TrustedLockers = (); + type SovereignAccountOf = SovereignAccountOf; + type Currency = Balances; + type CurrencyMatcher = IsConcrete; + type MaxLockers = frame_support::traits::ConstU32<8>; + type MaxRemoteLockConsumers = frame_support::traits::ConstU32<0>; + type RemoteLockConsumerIdentifier = (); + type WeightInfo = pallet_xcm::TestWeightInfo; + #[cfg(feature = "runtime-benchmarks")] + type ReachableDest = ReachableDest; + type AdminOrigin = EnsureRoot; +} diff --git a/xcm/xcm-builder/src/tests/pay/mod.rs b/xcm/xcm-builder/src/tests/pay/mod.rs index 3595b69218ea..59b078bda763 100644 --- a/xcm/xcm-builder/src/tests/pay/mod.rs +++ b/xcm/xcm-builder/src/tests/pay/mod.rs @@ -1,25 +1,5 @@ +use super::*; + +mod mock; mod pay; mod salary; - -/// Type representing both a location and an asset that is held at that location. -/// The id of the held asset is relative to the location where it is being held. -#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq)] -pub struct AssetKind { - destination: MultiLocation, - asset_id: AssetId, -} - -pub struct LocatableAssetKindConverter; -impl sp_runtime::traits::Convert for LocatableAssetKindConverter { - fn convert(value: AssetKind) -> LocatableAssetId { - LocatableAssetId { asset_id: value.asset_id, location: value.destination } - } -} - -/// Simple converter to turn a u64 into a MultiLocation using the AccountIndex64 junction and no parents -pub struct AliasesIntoAccountIndex64; -impl<'a> sp_runtime::traits::Convert<&'a AccountId, MultiLocation> for AliasesIntoAccountIndex64 { - fn convert(who: &AccountId) -> MultiLocation { - AccountIndex64 { network: None, index: who.clone().into() }.into() - } -} diff --git a/xcm/xcm-builder/src/tests/pay/pay.rs b/xcm/xcm-builder/src/tests/pay/pay.rs index 99c846b4526c..8fba5cec6fd8 100644 --- a/xcm/xcm-builder/src/tests/pay/pay.rs +++ b/xcm/xcm-builder/src/tests/pay/pay.rs @@ -16,11 +16,34 @@ //! Tests for making sure `PayOverXcm::pay` generates the correct message and sends it to the correct destination -use super::{super::*, *}; +use super::*; use frame_support::{assert_ok, traits::tokens::Pay}; -type BlockNumber = u64; type AccountId = u64; +type BlockNumber = u64; + +/// Type representing both a location and an asset that is held at that location. +/// The id of the held asset is relative to the location where it is being held. +#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq)] +pub struct AssetKind { + destination: MultiLocation, + asset_id: AssetId, +} + +pub struct LocatableAssetKindConverter; +impl sp_runtime::traits::Convert for LocatableAssetKindConverter { + fn convert(value: AssetKind) -> LocatableAssetId { + LocatableAssetId { asset_id: value.asset_id, location: value.destination } + } +} + +/// Simple converter to turn a u64 into a MultiLocation using the AccountIndex64 junction and no parents +pub struct AliasesIntoAccountIndex64; +impl<'a> sp_runtime::traits::Convert<&'a AccountId, MultiLocation> for AliasesIntoAccountIndex64 { + fn convert(who: &AccountId) -> MultiLocation { + AccountIndex64 { network: None, index: who.clone().into() }.into() + } +} parameter_types! { pub InteriorAccount: InteriorMultiLocation = AccountIndex64 { index: 3u64, network: None }.into(); @@ -51,13 +74,13 @@ fn pay_over_xcm_works() { >::pay(&who, asset_kind, amount)); let expected_message = Xcm(vec![ + DescendOrigin(AccountIndex64 { index: 3, network: None }.into()), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, SetAppendix(Xcm(vec![ReportError(QueryResponseInfo { destination: (Parent, Parachain(42)).into(), query_id: 1, max_weight: Weight::zero(), })])), - DescendOrigin(AccountIndex64 { index: 3, network: None }.into()), TransferAsset { assets: (Here, 1000u128).into(), beneficiary: AccountIndex64 { index: 5, network: None }.into(), @@ -90,13 +113,13 @@ fn pay_over_xcm_governance_body() { >::pay(&who, asset_kind, amount)); let expected_message = Xcm(vec![ + DescendOrigin(Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into()), UnpaidExecution { weight_limit: Unlimited, check_origin: None }, SetAppendix(Xcm(vec![ReportError(QueryResponseInfo { destination: (Parent, Parachain(42)).into(), query_id: 1, max_weight: Weight::zero(), })])), - DescendOrigin(Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into()), TransferAsset { assets: (Parent, 500u128).into(), beneficiary: AccountIndex64 { index: 7, network: None }.into(), diff --git a/xcm/xcm-builder/src/tests/pay/salary.rs b/xcm/xcm-builder/src/tests/pay/salary.rs index 31b356eba9d2..3732ced0f4be 100644 --- a/xcm/xcm-builder/src/tests/pay/salary.rs +++ b/xcm/xcm-builder/src/tests/pay/salary.rs @@ -16,119 +16,25 @@ //! Tests for the integration between `PayOverXcm` and the salary pallet -use super::{super::*, *}; - -use frame_support::{assert_ok, macro_magic::use_attr}; - -#[use_attr] -use frame_support::derive_impl; +use super::{mock::*, *}; use frame_support::{ - construct_runtime, parameter_types, - traits::{ConstU32, Everything}, + assert_ok, + traits::{ + fungibles::{Create, Mutate}, + tokens::{ConvertRank, GetSalary}, + RankedMembers, + }, }; -use polkadot_test_runtime::xcm_config::{LocalOriginToLocation, XcmConfig}; -use sp_runtime::AccountId32; -use xcm_executor::XcmExecutor; - -pub type Address = sp_runtime::MultiAddress; -pub type UncheckedExtrinsic = - generic::UncheckedExtrinsic; -pub type Header = generic::Header; -pub type Block = generic::Block; - -type BlockNumber = u64; -type AccountId = u64; - -construct_runtime!( - pub enum Test where - Block = Block, - NodeBlock = primitives::Block, - UncheckedExtrinsic = UncheckedExtrinsic - { - System: frame_system, - Balances: pallet_balances, - Salary: pallet_salary, - XcmPallet: pallet_xcm, - } -); - -#[derive_impl(frame_system::config_preludes::TestDefaultConfig as frame_system::DefaultConfig)] -impl frame_system::Config for Test { - type BaseCallFilter = frame_support::traits::Everything; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - type RuntimeEvent = RuntimeEvent; - type PalletInfo = PalletInfo; - type OnSetCode = (); -} - -pub type Balance = u128; - -parameter_types! { - pub const ExistentialDeposit: Balance = 1; -} - -impl pallet_balances::Config for Test { - type MaxLocks = ConstU32<0>; - type Balance = Balance; - type RuntimeEvent = RuntimeEvent; - type DustRemoval = (); - type ExistentialDeposit = ExistentialDeposit; - type AccountStore = System; - type WeightInfo = (); - type MaxReserves = (); - type ReserveIdentifier = [u8; 8]; - type RuntimeHoldReason = RuntimeHoldReason; - type FreezeIdentifier = (); - type MaxHolds = ConstU32<0>; - type MaxFreezes = ConstU32<0>; -} - -parameter_types! { - pub const RelayLocation: MultiLocation = Here.into_location(); - pub const AnyNetwork: Option = None; - pub UniversalLocation: InteriorMultiLocation = Here; - pub UnitWeightCost: u64 = 1_000; - pub static AdvertisedXcmVersion: u32 = 3; - pub const BaseXcmWeight: Weight = Weight::from_parts(1_000, 1_000); - pub CurrencyPerSecondPerByte: (AssetId, u128, u128) = (Concrete(RelayLocation::get()), 1, 1); - pub TrustedAssets: (MultiAssetFilter, MultiLocation) = (All.into(), Here.into()); - pub const MaxInstructions: u32 = 100; - pub const MaxAssetsIntoHolding: u32 = 64; -} - -impl pallet_xcm::Config for Test { - type RuntimeEvent = RuntimeEvent; - type SendXcmOrigin = EnsureXcmOrigin; - type XcmRouter = TestMessageSender; - type ExecuteXcmOrigin = EnsureXcmOrigin; - type XcmExecuteFilter = Everything; - type XcmExecutor = XcmExecutor; - type XcmTeleportFilter = Everything; - type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; - type UniversalLocation = UniversalLocation; - type RuntimeOrigin = RuntimeOrigin; - type RuntimeCall = RuntimeCall; - const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; - type AdvertisedXcmVersion = AdvertisedXcmVersion; - type TrustedLockers = (); - type SovereignAccountOf = AccountId32Aliases<(), AccountId32>; - type Currency = Balances; - type CurrencyMatcher = IsConcrete; - type MaxLockers = frame_support::traits::ConstU32<8>; - type MaxRemoteLockConsumers = frame_support::traits::ConstU32<0>; - type RemoteLockConsumerIdentifier = (); - type WeightInfo = pallet_xcm::TestWeightInfo; - #[cfg(feature = "runtime-benchmarks")] - type ReachableDest = ReachableDest; - type AdminOrigin = EnsureRoot; -} +use sp_runtime::{traits::ConvertToValue, DispatchResult}; parameter_types! { pub Interior: InteriorMultiLocation = Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into(); pub Timeout: BlockNumber = 5; + pub AssetHub: MultiLocation = (Parent, Parachain(1)).into(); + pub AssetIdGeneralIndex: u128 = 100; + pub AssetHubAssetId: AssetId = (PalletInstance(1), GeneralIndex(AssetIdGeneralIndex::get())).into(); + pub LocatableAsset: LocatableAssetId = LocatableAssetId { asset_id: AssetHubAssetId::get(), location: AssetHub::get() }; } type SalaryPayOverXcm = PayOverXcm< @@ -137,12 +43,12 @@ type SalaryPayOverXcm = PayOverXcm< TestQueryHandler, Timeout, AccountId, - AssetKind, - LocatableAssetKindConverter, - AliasesIntoAccountIndex64, + (), + ConvertToValue, + AliasesIntoAccountId32, >; -type Rank = u64; +type Rank = u128; thread_local! { pub static CLUB: RefCell> = RefCell::new(BTreeMap::new()); @@ -160,11 +66,13 @@ impl RankedMembers for TestClub { CLUB.with(|club| club.borrow().get(who).cloned()) } fn induct(who: &Self::AccountId) -> DispatchResult { - CLUB.with(|club| club.borrow_mut().insert(*who, 0)); + CLUB.with(|club| club.borrow_mut().insert(who.clone(), 0)); Ok(()) } fn promote(who: &Self::AccountId) -> DispatchResult { - CLUB.with(|club| club.borrow_mut().entry(*who).and_modify(|rank| *rank += 1)); + CLUB.with(|club| { + club.borrow_mut().entry(who.clone()).and_modify(|rank| *rank += 1); + }); Ok(()) } fn demote(who: &Self::AccountId) -> DispatchResult { @@ -175,17 +83,29 @@ impl RankedMembers for TestClub { Ok(()) }, Some(_) => { - club.borrow_mut().entry(*who).and_modify(|rank| *rank += 1); + club.borrow_mut().entry(who.clone()).and_modify(|rank| *rank += 1); Ok(()) }, }) } } +fn set_rank(who: AccountId, rank: u128) { + CLUB.with(|club| club.borrow_mut().insert(who, rank)); +} + parameter_types! { - pub const RegistrationPeriod: u64 = 2; - pub const PayoutPeriod: u64 = 2; - pub static Budget: u64 = 10; + pub const RegistrationPeriod: BlockNumber = 2; + pub const PayoutPeriod: BlockNumber = 2; + pub const FixedSalaryAmount: Balance = 10_000; + pub static Budget: Balance = FixedSalaryAmount::get(); +} + +pub struct FixedSalary; +impl GetSalary for FixedSalary { + fn get_salary(rank: Rank, who: &AccountId) -> Balance { + FixedSalaryAmount::get() + } } impl pallet_salary::Config for Test { @@ -193,7 +113,7 @@ impl pallet_salary::Config for Test { type RuntimeEvent = RuntimeEvent; type Paymaster = SalaryPayOverXcm; type Members = TestClub; - type Salary = ConvertRank; + type Salary = FixedSalary; type RegistrationPeriod = RegistrationPeriod; type PayoutPeriod = PayoutPeriod; type Budget = Budget; @@ -210,7 +130,7 @@ fn next_block() { System::set_block_number(System::block_number() + 1); } -fn run_to(block_number: u64) { +fn run_to(block_number: BlockNumber) { while System::block_number() < block_number { next_block(); } @@ -218,13 +138,64 @@ fn run_to(block_number: u64) { #[test] fn salary_pay_over_xcm_works() { + let admin_account_id = AccountId::new([0u8; 32]); + let account_id = AccountId::new([1u8; 32]); + let asset_id: u128 = 100; + new_test_ext().execute_with(|| { - assert_ok!(Salary::init(RuntimeOrigin::signed(1))); - assert_ok!(Salary::induct(RuntimeOrigin::signed(1))); - assert_ok!(Salary::register(RuntimeOrigin::signed(1))); - run_to(3); - assert_ok!(Salary::payout(RuntimeOrigin::signed(1))); - }); + // Create the asset and give enought to the sender + assert_ok!(>::create( + asset_id, + admin_account_id.clone(), + true, + FixedSalaryAmount::get() / 2, + )); + assert_ok!(>::mint_into( + asset_id, + &TreasuryAccountId::get(), + FixedSalaryAmount::get() * 2 + )); + + // Set the recipient as a member of a ranked collective + set_rank(account_id.clone(), 1); + + // Check starting balance + assert_eq!(mock::Assets::balance(AssetIdGeneralIndex::get(), &account_id), 0); + + // Use salary pallet to call `PayOverXcm::pay` + assert_ok!(Salary::init(RuntimeOrigin::signed(account_id.clone()))); + run_to(5); + assert_ok!(Salary::induct(RuntimeOrigin::signed(account_id.clone()))); + assert_ok!(Salary::bump(RuntimeOrigin::signed(account_id.clone()))); + assert_ok!(Salary::register(RuntimeOrigin::signed(account_id.clone()))); + run_to(7); + assert_ok!(Salary::payout(RuntimeOrigin::signed(account_id.clone()))); + + // TODO: Should take the message sent by the salary pallet. + // But `sent_xcm` returns `Xcm<()>` and I need `Xcm` + // let (_, message, hash) = sent_xcm().first().unwrap(); + let message: Xcm = Xcm::(vec![ + DescendOrigin(Plurality { id: BodyId::Treasury, part: BodyPart::Voice }.into()), + UnpaidExecution { weight_limit: Unlimited, check_origin: None }, + SetAppendix(Xcm(vec![ReportError(QueryResponseInfo { + destination: (Parent, Parachain(42)).into(), + query_id: 1, + max_weight: Weight::zero(), + })])), + TransferAsset { + assets: (AssetHubAssetId::get(), FixedSalaryAmount::get()).into(), + beneficiary: AccountId32 { id: account_id.clone().into(), network: None }.into(), + }, + ]); + let hash = fake_message_hash(&message); + + // Execute message as the asset hub + XcmExecutor::::execute_xcm((Parent, Parachain(42)), message, hash, Weight::MAX); - dbg!(&sent_xcm()); + // Recipient receives the payment + assert_eq!( + mock::Assets::balance(AssetIdGeneralIndex::get(), &account_id), + FixedSalaryAmount::get() + ); + }); }