diff --git a/Cargo.lock b/Cargo.lock index 2332e67b6f55..0a8faa0fc414 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -423,7 +423,7 @@ dependencies = [ [[package]] name = "beefy-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "beefy-primitives", @@ -459,7 +459,7 @@ dependencies = [ [[package]] name = "beefy-gadget-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "beefy-gadget", "beefy-primitives", @@ -479,7 +479,7 @@ dependencies = [ [[package]] name = "beefy-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "beefy-primitives", "sp-api", @@ -488,7 +488,7 @@ dependencies = [ [[package]] name = "beefy-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -1983,7 +1983,7 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", ] @@ -2001,7 +2001,7 @@ dependencies = [ [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -2024,7 +2024,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "Inflector", "chrono", @@ -2075,7 +2075,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2086,7 +2086,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2102,7 +2102,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -2131,7 +2131,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "bitflags", "frame-metadata", @@ -2162,7 +2162,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "Inflector", "cfg-expr", @@ -2176,7 +2176,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2188,7 +2188,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro2", "quote", @@ -2198,7 +2198,7 @@ dependencies = [ [[package]] name = "frame-support-test" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-support-test-pallet", @@ -2221,7 +2221,7 @@ dependencies = [ [[package]] name = "frame-support-test-pallet" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -2232,7 +2232,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "log", @@ -2249,7 +2249,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -2264,7 +2264,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "sp-api", @@ -2273,7 +2273,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "parity-scale-codec", @@ -2456,7 +2456,7 @@ dependencies = [ [[package]] name = "generate-bags" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "chrono", "frame-election-provider-support", @@ -4231,9 +4231,9 @@ dependencies = [ [[package]] name = "memory_units" -version = "0.3.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d96e3f3c0b6325d8ccd83c33b28acb183edcb6c67938ba104ec546854b0882" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" [[package]] name = "merlin" @@ -4591,6 +4591,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-bigint" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-complex" version = "0.4.0" @@ -4627,7 +4638,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" dependencies = [ "autocfg", - "num-bigint", + "num-bigint 0.2.6", "num-integer", "num-traits", ] @@ -4639,6 +4650,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d41702bd167c2df5520b384281bc111a4b5efcf7fbc4c9c222c815b07e0a6a6a" dependencies = [ "autocfg", + "num-bigint 0.4.3", "num-integer", "num-traits", ] @@ -4811,7 +4823,7 @@ checksum = "20448fd678ec04e6ea15bbe0476874af65e98a01515d667aa49f1434dc44ebf4" [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -4825,7 +4837,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -4841,7 +4853,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -4856,7 +4868,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -4880,7 +4892,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4900,7 +4912,7 @@ dependencies = [ [[package]] name = "pallet-bags-list-remote-tests" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-election-provider-support", "frame-support", @@ -4919,7 +4931,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -4934,7 +4946,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "beefy-primitives", "frame-support", @@ -4950,7 +4962,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "beefy-merkle-tree", "beefy-primitives", @@ -4973,7 +4985,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -4991,7 +5003,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5010,7 +5022,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5027,7 +5039,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5043,7 +5055,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5066,7 +5078,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5079,7 +5091,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5097,7 +5109,7 @@ dependencies = [ [[package]] name = "pallet-gilt" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5112,7 +5124,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5135,7 +5147,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "enumflags2", "frame-benchmarking", @@ -5151,7 +5163,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5171,7 +5183,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5188,7 +5200,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5205,7 +5217,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ckb-merkle-mountain-range", "frame-benchmarking", @@ -5223,7 +5235,7 @@ dependencies = [ [[package]] name = "pallet-mmr-rpc" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -5238,7 +5250,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5253,7 +5265,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5270,7 +5282,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5289,7 +5301,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "sp-api", @@ -5299,7 +5311,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5316,7 +5328,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5339,7 +5351,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5355,7 +5367,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5370,7 +5382,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5385,7 +5397,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5401,7 +5413,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5422,7 +5434,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5438,7 +5450,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5452,7 +5464,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5475,7 +5487,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5486,7 +5498,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "sp-arithmetic", @@ -5495,7 +5507,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5509,7 +5521,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5527,7 +5539,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5546,7 +5558,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-support", "frame-system", @@ -5562,7 +5574,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5577,7 +5589,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5588,7 +5600,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5605,7 +5617,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5621,7 +5633,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-benchmarking", "frame-support", @@ -5772,9 +5784,9 @@ dependencies = [ [[package]] name = "parity-wasm" -version = "0.42.2" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be5e13c266502aadf83426d87d81a0f5d1ef45b8027f5a471c360abfe4bfae92" +checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" @@ -8085,7 +8097,7 @@ dependencies = [ [[package]] name = "remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "env_logger 0.9.0", "jsonrpsee", @@ -8433,7 +8445,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "sp-core", @@ -8444,7 +8456,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -8471,7 +8483,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "futures-timer", @@ -8494,7 +8506,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -8510,7 +8522,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "impl-trait-for-tuples", "memmap2 0.5.0", @@ -8527,7 +8539,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8538,7 +8550,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "chrono", "clap", @@ -8577,7 +8589,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "fnv", "futures", @@ -8605,7 +8617,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "hash-db", "kvdb", @@ -8630,7 +8642,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -8654,14 +8666,14 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "fork-tree", "futures", "log", "merlin", - "num-bigint", + "num-bigint 0.2.6", "num-rational 0.2.4", "num-traits", "parity-scale-codec", @@ -8696,7 +8708,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "jsonrpsee", @@ -8718,7 +8730,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "fork-tree", "parity-scale-codec", @@ -8731,7 +8743,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -8756,7 +8768,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "lazy_static", "lru 0.7.8", @@ -8783,7 +8795,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "environmental", "parity-scale-codec", @@ -8799,7 +8811,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "parity-scale-codec", @@ -8814,14 +8826,14 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "cfg-if 1.0.0", "libc", "log", "once_cell", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "rustix", "sc-allocator", "sc-executor-common", @@ -8834,7 +8846,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ahash", "async-trait", @@ -8875,7 +8887,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "finality-grandpa", "futures", @@ -8896,7 +8908,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ansi_term", "futures", @@ -8913,7 +8925,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "hex", @@ -8928,7 +8940,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "asynchronous-codec", @@ -8977,7 +8989,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "bitflags", @@ -9000,7 +9012,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ahash", "futures", @@ -9018,7 +9030,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "hex", @@ -9039,7 +9051,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "fork-tree", "futures", @@ -9067,7 +9079,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "bytes", "fnv", @@ -9097,7 +9109,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "libp2p", @@ -9110,7 +9122,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -9119,7 +9131,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "hash-db", @@ -9149,7 +9161,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "jsonrpsee", @@ -9172,7 +9184,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "jsonrpsee", @@ -9185,7 +9197,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "directories", @@ -9252,7 +9264,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "parity-scale-codec", @@ -9266,7 +9278,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -9285,7 +9297,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "libc", @@ -9304,7 +9316,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "chrono", "futures", @@ -9322,7 +9334,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ansi_term", "atty", @@ -9353,7 +9365,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -9364,7 +9376,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "futures-timer", @@ -9390,7 +9402,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "log", @@ -9403,7 +9415,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "futures-timer", @@ -9888,7 +9900,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "hash-db", "log", @@ -9906,7 +9918,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "blake2", "proc-macro-crate", @@ -9918,7 +9930,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -9931,7 +9943,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "integer-sqrt", "num-traits", @@ -9946,7 +9958,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -9959,7 +9971,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "parity-scale-codec", @@ -9971,7 +9983,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "sp-api", @@ -9983,7 +9995,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "log", @@ -10001,7 +10013,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -10020,7 +10032,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "merlin", @@ -10043,7 +10055,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -10057,7 +10069,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -10070,7 +10082,7 @@ dependencies = [ [[package]] name = "sp-core" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "base58", "bitflags", @@ -10116,7 +10128,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "blake2", "byteorder", @@ -10130,7 +10142,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro2", "quote", @@ -10141,7 +10153,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -10150,7 +10162,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro2", "quote", @@ -10160,7 +10172,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "environmental", "parity-scale-codec", @@ -10171,7 +10183,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "finality-grandpa", "log", @@ -10189,7 +10201,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -10203,7 +10215,7 @@ dependencies = [ [[package]] name = "sp-io" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "bytes", "futures", @@ -10229,7 +10241,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "lazy_static", "sp-core", @@ -10240,7 +10252,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -10257,7 +10269,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "thiserror", "zstd", @@ -10266,7 +10278,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "parity-scale-codec", @@ -10281,7 +10293,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -10295,7 +10307,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "sp-api", "sp-core", @@ -10305,7 +10317,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "backtrace", "lazy_static", @@ -10315,7 +10327,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "rustc-hash", "serde", @@ -10325,7 +10337,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "either", "hash256-std-hasher", @@ -10347,7 +10359,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -10365,7 +10377,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "Inflector", "proc-macro-crate", @@ -10377,7 +10389,7 @@ dependencies = [ [[package]] name = "sp-sandbox" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "parity-scale-codec", @@ -10391,7 +10403,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -10405,7 +10417,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "scale-info", @@ -10416,7 +10428,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.12.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "hash-db", "log", @@ -10438,12 +10450,12 @@ dependencies = [ [[package]] name = "sp-std" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" [[package]] name = "sp-storage" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "impl-serde", "parity-scale-codec", @@ -10456,7 +10468,7 @@ dependencies = [ [[package]] name = "sp-tasks" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "log", "sp-core", @@ -10469,7 +10481,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures-timer", @@ -10485,7 +10497,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "sp-std", @@ -10497,7 +10509,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "sp-api", "sp-runtime", @@ -10506,7 +10518,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "log", @@ -10522,7 +10534,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ahash", "hash-db", @@ -10545,11 +10557,11 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "impl-serde", "parity-scale-codec", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "scale-info", "serde", "sp-core-hashing-proc-macro", @@ -10562,7 +10574,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -10573,7 +10585,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "impl-trait-for-tuples", "log", @@ -10591,9 +10603,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.18.0" +version = "1.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb8b72a924ccfe7882d0e26144c114503760a4d1248bb5cd06c8ab2d55404cc" +checksum = "b0837b5d62f42082c9d56cd946495ae273a3c68083b637b9153341d5e465146d" dependencies = [ "Inflector", "num-format", @@ -10747,7 +10759,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "platforms", ] @@ -10755,7 +10767,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -10776,7 +10788,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures-util", "hyper", @@ -10789,7 +10801,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "jsonrpsee", "log", @@ -10810,7 +10822,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "async-trait", "futures", @@ -10836,7 +10848,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "futures", "substrate-test-utils-derive", @@ -10846,7 +10858,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10857,7 +10869,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "ansi_term", "build-helper", @@ -11571,7 +11583,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#e20209240e7a5e7b32b91e9fcbe0e78a7397c8d5" +source = "git+https://github.com/paritytech/substrate?branch=master#5527263978a763bafc78d60955c662c20f465d18" dependencies = [ "clap", "frame-try-runtime", @@ -11938,11 +11950,11 @@ dependencies = [ [[package]] name = "wasm-instrument" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "962e5b0401bbb6c887f54e69b8c496ea36f704df65db73e81fd5ff8dc3e63a9f" +checksum = "8bca81f5279342b38b17d9acbf007a46ddeb73144e2bd5f0a21bfa9fc5d4ab3e" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", ] [[package]] @@ -11962,27 +11974,35 @@ dependencies = [ [[package]] name = "wasmi" -version = "0.9.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca00c5147c319a8ec91ec1a0edbec31e566ce2c9cc93b3f9bb86a9efd0eb795d" +checksum = "fc13b3c219ca9aafeec59150d80d89851df02e0061bc357b4d66fc55a8d38787" dependencies = [ - "downcast-rs", - "libc", - "libm", - "memory_units", - "num-rational 0.2.4", - "num-traits", - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", "wasmi-validation", + "wasmi_core", ] [[package]] name = "wasmi-validation" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "165343ecd6c018fc09ebcae280752702c9a2ef3e6f8d02f1cfcbdb53ef6d7937" +checksum = "91ff416ad1ff0c42e5a926ed5d5fab74c0f098749aa0ad8b2a34b982ce0e867b" dependencies = [ - "parity-wasm 0.42.2", + "parity-wasm 0.45.0", +] + +[[package]] +name = "wasmi_core" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0a088e8c4c59c6f2b9eae169bf86328adccc477c00b56d3661e3e9fb397b184" +dependencies = [ + "downcast-rs", + "libm", + "memory_units", + "num-rational 0.4.0", + "num-traits", ] [[package]] diff --git a/node/client/src/benchmarking.rs b/node/client/src/benchmarking.rs index 02c0d316c0ad..7990bc88d218 100644 --- a/node/client/src/benchmarking.rs +++ b/node/client/src/benchmarking.rs @@ -49,9 +49,9 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for RemarkBuilder { fn build(&self, nonce: u32) -> std::result::Result { with_client! { self.client.as_ref(), client, { - use runtime::{Call, SystemCall}; + use runtime::{RuntimeCall, SystemCall}; - let call = Call::System(SystemCall::remark { remark: vec![] }); + let call = RuntimeCall::System(SystemCall::remark { remark: vec![] }); let signer = Sr25519Keyring::Bob.pair(); let period = polkadot_runtime_common::BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; @@ -92,9 +92,9 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder { fn build(&self, nonce: u32) -> std::result::Result { with_client! { self.client.as_ref(), client, { - use runtime::{Call, BalancesCall}; + use runtime::{RuntimeCall, BalancesCall}; - let call = Call::Balances(BalancesCall::transfer_keep_alive { + let call = RuntimeCall::Balances(BalancesCall::transfer_keep_alive { dest: self.dest.clone().into(), value: self.value.into(), }); @@ -113,14 +113,14 @@ impl frame_benchmarking_cli::ExtrinsicBuilder for TransferKeepAliveBuilder { /// /// Should only be used for benchmarking since it makes strong assumptions /// about the chain state that these calls will be valid for. -trait BenchmarkCallSigner { +trait BenchmarkCallSigner { /// Signs a call together with the signed extensions of the specific runtime. /// /// Only works if the current block is the genesis block since the /// `CheckMortality` check is mocked by using the genesis block. fn sign_call( &self, - call: Call, + call: RuntimeCall, nonce: u32, current_block: u64, period: u64, @@ -130,12 +130,12 @@ trait BenchmarkCallSigner { } #[cfg(feature = "polkadot")] -impl BenchmarkCallSigner +impl BenchmarkCallSigner for FullClient { fn sign_call( &self, - call: polkadot_runtime::Call, + call: polkadot_runtime::RuntimeCall, nonce: u32, current_block: u64, period: u64, @@ -186,12 +186,12 @@ impl BenchmarkCallSigner } #[cfg(feature = "westend")] -impl BenchmarkCallSigner +impl BenchmarkCallSigner for FullClient { fn sign_call( &self, - call: westend_runtime::Call, + call: westend_runtime::RuntimeCall, nonce: u32, current_block: u64, period: u64, @@ -240,12 +240,12 @@ impl BenchmarkCallSigner } #[cfg(feature = "kusama")] -impl BenchmarkCallSigner +impl BenchmarkCallSigner for FullClient { fn sign_call( &self, - call: kusama_runtime::Call, + call: kusama_runtime::RuntimeCall, nonce: u32, current_block: u64, period: u64, @@ -294,12 +294,12 @@ impl BenchmarkCallSigner } #[cfg(feature = "rococo")] -impl BenchmarkCallSigner +impl BenchmarkCallSigner for FullClient { fn sign_call( &self, - call: rococo_runtime::Call, + call: rococo_runtime::RuntimeCall, nonce: u32, current_block: u64, period: u64, diff --git a/node/test/service/src/lib.rs b/node/test/service/src/lib.rs index 9b5e55289832..4a9db5618371 100644 --- a/node/test/service/src/lib.rs +++ b/node/test/service/src/lib.rs @@ -288,7 +288,7 @@ impl PolkadotTestNode { /// Send an extrinsic to this node. pub async fn send_extrinsic( &self, - function: impl Into, + function: impl Into, caller: Sr25519Keyring, ) -> Result { let extrinsic = construct_extrinsic(&*self.client, function, caller, 0); @@ -345,7 +345,7 @@ impl PolkadotTestNode { /// Construct an extrinsic that can be applied to the test runtime. pub fn construct_extrinsic( client: &Client, - function: impl Into, + function: impl Into, caller: Sr25519Keyring, nonce: u32, ) -> UncheckedExtrinsic { @@ -396,7 +396,7 @@ pub fn construct_transfer_extrinsic( dest: sp_keyring::AccountKeyring, value: Balance, ) -> UncheckedExtrinsic { - let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer { + let function = polkadot_test_runtime::RuntimeCall::Balances(pallet_balances::Call::transfer { dest: MultiSigner::from(dest.public()).into_account().into(), value, }); diff --git a/node/test/service/tests/call-function.rs b/node/test/service/tests/call-function.rs index 5c149766c6fb..8678a0a08a2b 100644 --- a/node/test/service/tests/call-function.rs +++ b/node/test/service/tests/call-function.rs @@ -24,7 +24,7 @@ async fn call_function_actually_work() { let alice = run_validator_node(alice_config, None); - let function = polkadot_test_runtime::Call::Balances(pallet_balances::Call::transfer { + let function = polkadot_test_runtime::RuntimeCall::Balances(pallet_balances::Call::transfer { dest: Charlie.to_account_id().into(), value: 1, }); diff --git a/runtime/common/src/assigned_slots.rs b/runtime/common/src/assigned_slots.rs index 24f07eb774b0..d704dfb0d158 100644 --- a/runtime/common/src/assigned_slots.rs +++ b/runtime/common/src/assigned_slots.rs @@ -85,7 +85,7 @@ pub mod pallet { #[pallet::disable_frame_system_supertrait_check] pub trait Config: configuration::Config + paras::Config + slots::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Origin for assigning slots. type AssignSlotOrigin: EnsureOrigin<::Origin>; @@ -579,10 +579,10 @@ mod tests { impl frame_system::offchain::SendTransactionTypes for Test where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } parameter_types! { @@ -593,7 +593,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -601,7 +601,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); @@ -621,7 +621,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -640,7 +640,7 @@ mod tests { } impl parachains_paras::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = crate::mock::TestNextSessionRotation; @@ -655,7 +655,7 @@ mod tests { } impl slots::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = TestRegistrar; type LeasePeriod = LeasePeriod; @@ -673,7 +673,7 @@ mod tests { } impl assigned_slots::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssignSlotOrigin = EnsureRoot; type Leaser = Slots; type PermanentSlotLeasePeriodLength = PermanentSlotLeasePeriodLength; diff --git a/runtime/common/src/auctions.rs b/runtime/common/src/auctions.rs index 30984d690263..cd8dc3535249 100644 --- a/runtime/common/src/auctions.rs +++ b/runtime/common/src/auctions.rs @@ -91,7 +91,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The type representing the leasing system. type Leaser: Leaser< @@ -710,7 +710,7 @@ mod tests { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -718,7 +718,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -739,7 +739,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); @@ -867,7 +867,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = TestLeaser; type Registrar = TestRegistrar; type EndingPeriod = EndingPeriod; @@ -1729,9 +1729,9 @@ mod benchmarking { use frame_benchmarking::{account, benchmarks, whitelisted_caller}; - fn assert_last_event(generic_event: ::Event) { + fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/common/src/claims.rs b/runtime/common/src/claims.rs index 09d8a3cc6f55..8c8ff4b35f87 100644 --- a/runtime/common/src/claims.rs +++ b/runtime/common/src/claims.rs @@ -172,7 +172,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; type VestingSchedule: VestingSchedule; #[pallet::constant] type Prefix: Get<&'static [u8]>; @@ -597,11 +597,11 @@ impl Pallet { #[scale_info(skip_type_params(T))] pub struct PrevalidateAttests(sp_std::marker::PhantomData) where - ::Call: IsSubType>; + ::RuntimeCall: IsSubType>; impl Debug for PrevalidateAttests where - ::Call: IsSubType>, + ::RuntimeCall: IsSubType>, { #[cfg(feature = "std")] fn fmt(&self, f: &mut sp_std::fmt::Formatter) -> sp_std::fmt::Result { @@ -616,7 +616,7 @@ where impl PrevalidateAttests where - ::Call: IsSubType>, + ::RuntimeCall: IsSubType>, { /// Create new `SignedExtension` to check runtime version. pub fn new() -> Self { @@ -626,10 +626,10 @@ where impl SignedExtension for PrevalidateAttests where - ::Call: IsSubType>, + ::RuntimeCall: IsSubType>, { type AccountId = T::AccountId; - type Call = ::Call; + type Call = ::RuntimeCall; type AdditionalSigned = (); type Pre = (); const IDENTIFIER: &'static str = "PrevalidateAttests"; @@ -752,7 +752,7 @@ mod tests { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -760,7 +760,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -779,7 +779,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -794,7 +794,7 @@ mod tests { } impl pallet_vesting::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; @@ -810,7 +810,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = frame_system::EnsureSignedBy; @@ -1052,7 +1052,7 @@ mod tests { fn valid_attest_transactions_are_free() { new_test_ext().execute_with(|| { let p = PrevalidateAttests::::new(); - let c = Call::Claims(ClaimsCall::attest { + let c = RuntimeCall::Claims(ClaimsCall::attest { statement: StatementKind::Saft.to_text().to_vec(), }); let di = c.get_dispatch_info(); @@ -1066,13 +1066,13 @@ mod tests { fn invalid_attest_transactions_are_recognized() { new_test_ext().execute_with(|| { let p = PrevalidateAttests::::new(); - let c = Call::Claims(ClaimsCall::attest { + let c = RuntimeCall::Claims(ClaimsCall::attest { statement: StatementKind::Regular.to_text().to_vec(), }); let di = c.get_dispatch_info(); let r = p.validate(&42, &c, &di, 20); assert!(r.is_err()); - let c = Call::Claims(ClaimsCall::attest { + let c = RuntimeCall::Claims(ClaimsCall::attest { statement: StatementKind::Saft.to_text().to_vec(), }); let di = c.get_dispatch_info(); diff --git a/runtime/common/src/crowdloan/mod.rs b/runtime/common/src/crowdloan/mod.rs index ca0ac5721621..684c6a088a3f 100644 --- a/runtime/common/src/crowdloan/mod.rs +++ b/runtime/common/src/crowdloan/mod.rs @@ -189,7 +189,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// `PalletId` for the crowdloan pallet. An appropriate value could be `PalletId(*b"py/cfund")` #[pallet::constant] @@ -893,7 +893,7 @@ mod tests { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -901,7 +901,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -920,7 +920,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -1072,7 +1072,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; type PalletId = CrowdloanPalletId; @@ -1129,8 +1129,8 @@ mod tests { } } - fn last_event() -> Event { - System::events().pop().expect("Event expected").event + fn last_event() -> RuntimeEvent { + System::events().pop().expect("RuntimeEvent expected").event } #[test] @@ -1906,9 +1906,9 @@ mod benchmarking { use frame_benchmarking::{account, benchmarks, whitelisted_caller}; - fn assert_last_event(generic_event: ::Event) { + fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/common/src/impls.rs b/runtime/common/src/impls.rs index 635771b29dfb..f165f238eee8 100644 --- a/runtime/common/src/impls.rs +++ b/runtime/common/src/impls.rs @@ -112,13 +112,13 @@ mod tests { type Origin = Origin; type Index = u64; type BlockNumber = u64; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hash = H256; type Hashing = BlakeTwo256; type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockLength = BlockLength; type BlockWeights = BlockWeights; @@ -136,7 +136,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = (); type AccountStore = System; @@ -155,7 +155,7 @@ mod tests { type Currency = pallet_balances::Pallet; type ApproveOrigin = frame_system::EnsureRoot; type RejectOrigin = frame_system::EnsureRoot; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = (); type ProposalBond = (); type ProposalBondMinimum = (); diff --git a/runtime/common/src/integration_tests.rs b/runtime/common/src/integration_tests.rs index 6f833b9cad29..c81d58c8798a 100644 --- a/runtime/common/src/integration_tests.rs +++ b/runtime/common/src/integration_tests.rs @@ -93,10 +93,10 @@ frame_support::construct_runtime!( impl frame_system::offchain::SendTransactionTypes for Test where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } use crate::{auctions::Error as AuctionsError, crowdloan::Error as CrowdloanError}; @@ -113,7 +113,7 @@ impl frame_system::Config for Test { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -121,7 +121,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -179,7 +179,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = (); type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -201,7 +201,7 @@ parameter_types! { } impl paras::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = crate::mock::TestNextSessionRotation; @@ -213,7 +213,7 @@ parameter_types! { } impl paras_registrar::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSwap = (Crowdloan, Slots); type ParaDeposit = ParaDeposit; type DataDepositPerByte = DataDepositPerByte; @@ -228,7 +228,7 @@ parameter_types! { } impl auctions::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = Slots; type Registrar = Registrar; type EndingPeriod = EndingPeriod; @@ -244,7 +244,7 @@ parameter_types! { } impl slots::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -262,7 +262,7 @@ parameter_types! { } impl crowdloan::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = CrowdloanId; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; @@ -343,11 +343,11 @@ fn run_to_session(n: u32) { run_to_block(block_number); } -fn last_event() -> Event { - System::events().pop().expect("Event expected").event +fn last_event() -> RuntimeEvent { + System::events().pop().expect("RuntimeEvent expected").event } -fn contains_event(event: Event) -> bool { +fn contains_event(event: RuntimeEvent) -> bool { System::events().iter().any(|x| x.event == event) } diff --git a/runtime/common/src/paras_registrar.rs b/runtime/common/src/paras_registrar.rs index 5c891cc6c89f..4d63a8f8fe86 100644 --- a/runtime/common/src/paras_registrar.rs +++ b/runtime/common/src/paras_registrar.rs @@ -96,7 +96,7 @@ pub mod pallet { #[pallet::disable_frame_system_supertrait_check] pub trait Config: configuration::Config + paras::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The aggregated origin type must support the `parachains` origin. We require that we can /// infallibly convert between this origin and the system origin, but in reality, they're the @@ -631,10 +631,10 @@ mod tests { impl frame_system::offchain::SendTransactionTypes for Test where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } const NORMAL_RATIO: Perbill = Perbill::from_percent(75); @@ -649,7 +649,7 @@ mod tests { impl frame_system::Config for Test { type BaseCallFilter = frame_support::traits::Everything; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -657,7 +657,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); type BlockWeights = BlockWeights; @@ -680,7 +680,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u128; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = (); @@ -698,7 +698,7 @@ mod tests { } impl paras::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = crate::mock::TestNextSessionRotation; @@ -715,7 +715,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type OnSwap = MockSwap; @@ -1226,9 +1226,9 @@ mod benchmarking { use frame_benchmarking::{account, benchmarks, whitelisted_caller}; - fn assert_last_event(generic_event: ::Event) { + fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/common/src/purchase.rs b/runtime/common/src/purchase.rs index 743464d3afaf..cea93307bfb3 100644 --- a/runtime/common/src/purchase.rs +++ b/runtime/common/src/purchase.rs @@ -98,7 +98,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Balances Pallet type Currency: Currency; @@ -511,7 +511,7 @@ mod tests { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -519,7 +519,7 @@ mod tests { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -538,7 +538,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -553,7 +553,7 @@ mod tests { } impl pallet_vesting::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = Identity; type MinVestedTransfer = MinVestedTransfer; @@ -574,7 +574,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type VestingSchedule = Vesting; type ValidityOrigin = frame_system::EnsureSignedBy; @@ -1081,7 +1081,7 @@ mod tests { ); // Vesting lock is removed in whole on block 101 (100 blocks after block 1) System::set_block_number(100); - let vest_call = Call::Vesting(pallet_vesting::Call::::vest {}); + let vest_call = RuntimeCall::Vesting(pallet_vesting::Call::::vest {}); assert_ok!(vest_call.clone().dispatch(Origin::signed(alice()))); assert_ok!(vest_call.clone().dispatch(Origin::signed(bob()))); assert_eq!(::VestingSchedule::vesting_balance(&alice()), Some(45)); diff --git a/runtime/common/src/slots/mod.rs b/runtime/common/src/slots/mod.rs index a9308ca88417..982f7e5f796e 100644 --- a/runtime/common/src/slots/mod.rs +++ b/runtime/common/src/slots/mod.rs @@ -74,7 +74,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// The currency type used for bidding. type Currency: ReservableCurrency; @@ -530,7 +530,7 @@ mod tests { type BlockWeights = (); type BlockLength = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -538,7 +538,7 @@ mod tests { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = (); type Version = (); @@ -558,7 +558,7 @@ mod tests { impl pallet_balances::Config for Test { type Balance = u64; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -575,7 +575,7 @@ mod tests { } impl Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = TestRegistrar; type LeasePeriod = LeasePeriod; @@ -988,9 +988,9 @@ mod benchmarking { use crate::slots::Pallet as Slots; - fn assert_last_event(generic_event: ::Event) { + fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/kusama/src/governance/old.rs b/runtime/kusama/src/governance/old.rs index a87ddf6ec1fc..61a2f9074282 100644 --- a/runtime/kusama/src/governance/old.rs +++ b/runtime/kusama/src/governance/old.rs @@ -32,8 +32,8 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type VoteLockingPeriod = EnactmentPeriod; @@ -93,8 +93,8 @@ parameter_types! { pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; @@ -121,7 +121,7 @@ parameter_types! { const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); impl pallet_elections_phragmen::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ChangeMembers = Council; type InitializeMembers = Council; @@ -149,8 +149,8 @@ parameter_types! { pub type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -159,7 +159,7 @@ impl pallet_collective::Config for Runtime { } impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = MoreThanHalfCouncil; type RemoveOrigin = MoreThanHalfCouncil; type SwapOrigin = MoreThanHalfCouncil; diff --git a/runtime/kusama/src/lib.rs b/runtime/kusama/src/lib.rs index 9888f2d1d851..00ab87ffcd91 100644 --- a/runtime/kusama/src/lib.rs +++ b/runtime/kusama/src/lib.rs @@ -157,7 +157,7 @@ impl frame_system::Config for Runtime { type BlockWeights = BlockWeights; type BlockLength = BlockLength; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; type Hash = Hash; @@ -165,7 +165,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -215,10 +215,10 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = MaxScheduledPerBlock; @@ -236,7 +236,7 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; type MaxSize = PreimageMaxSize; @@ -292,7 +292,7 @@ impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_indices::WeightInfo; } @@ -305,7 +305,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = MaxLocks; @@ -322,7 +322,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -363,7 +363,7 @@ impl_opaque_keys! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; type ShouldEndSession = Babe; @@ -455,7 +455,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { } impl pallet_election_provider_multi_phase::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EstimateCallFee = TransactionPayment; type UnsignedPhase = UnsignedPhase; @@ -501,7 +501,7 @@ parameter_types! { } impl pallet_bags_list::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ScoreProvider = Staking; type WeightInfo = weights::pallet_bags_list::WeightInfo; type BagThresholds = BagThresholds; @@ -597,7 +597,7 @@ impl pallet_staking::Config for Runtime { type ElectionProvider = ElectionProviderMultiPhase; type GenesisElectionProvider = onchain::UnboundedExecution; type RewardRemainder = Treasury; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Slash = Treasury; type Reward = (); type SessionsPerEra = SessionsPerEra; @@ -646,7 +646,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = ApproveOrigin; type RejectOrigin = MoreThanHalfCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -681,7 +681,7 @@ impl pallet_bounties::Config for Runtime { type BountyValueMinimum = BountyValueMinimum; type ChildBountyManager = ChildBounties; type DataDepositPerByte = DataDepositPerByte; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaximumReasonLength = MaximumReasonLength; type WeightInfo = weights::pallet_bounties::WeightInfo; } @@ -692,7 +692,7 @@ parameter_types! { } impl pallet_child_bounties::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaxActiveChildBountyCount = MaxActiveChildBountyCount; type ChildBountyValueMinimum = ChildBountyValueMinimum; type WeightInfo = weights::pallet_child_bounties::WeightInfo; @@ -705,12 +705,12 @@ impl pallet_tips::Config for Runtime { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_tips::WeightInfo; } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; } @@ -725,7 +725,7 @@ parameter_types! { impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; type ReportUnresponsiveness = Offences; @@ -737,8 +737,7 @@ impl pallet_im_online::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProof = >::Proof; @@ -764,14 +763,14 @@ impl pallet_grandpa::Config for Runtime { /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, nonce: ::Index, - ) -> Option<(Call, ::SignaturePayload)> { + ) -> Option<(RuntimeCall, ::SignaturePayload)> { use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = @@ -815,10 +814,10 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } parameter_types! { @@ -826,7 +825,7 @@ parameter_types! { } impl claims::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = @@ -845,7 +844,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -860,8 +859,8 @@ impl pallet_identity::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } @@ -875,8 +874,8 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; @@ -892,9 +891,9 @@ parameter_types! { } impl pallet_recovery::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type Call = Call; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ConfigDepositBase = ConfigDepositBase; type FriendDepositFactor = FriendDepositFactor; @@ -915,7 +914,7 @@ parameter_types! { } impl pallet_society::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type CandidateDeposit = CandidateDeposit; @@ -938,7 +937,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; @@ -988,86 +987,95 @@ impl Default for ProxyType { } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::NonTransfer => matches!( c, - Call::System(..) | - Call::Babe(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim {..}) | - Call::Indices(pallet_indices::Call::free {..}) | - Call::Indices(pallet_indices::Call::freeze {..}) | + RuntimeCall::System(..) | + RuntimeCall::Babe(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Indices(pallet_indices::Call::claim {..}) | + RuntimeCall::Indices(pallet_indices::Call::free {..}) | + RuntimeCall::Indices(pallet_indices::Call::freeze {..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet - Call::Authorship(..) | - Call::Staking(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::ImOnline(..) | - Call::Democracy(..) | - Call::Council(..) | - Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::TechnicalMembership(..) | - Call::Treasury(..) | - Call::Bounties(..) | - Call::ChildBounties(..) | - Call::Tips(..) | - Call::Claims(..) | - Call::Utility(..) | - Call::Identity(..) | - Call::Society(..) | - Call::Recovery(pallet_recovery::Call::as_recovered {..}) | - Call::Recovery(pallet_recovery::Call::vouch_recovery {..}) | - Call::Recovery(pallet_recovery::Call::claim_recovery {..}) | - Call::Recovery(pallet_recovery::Call::close_recovery {..}) | - Call::Recovery(pallet_recovery::Call::remove_recovery {..}) | - Call::Recovery(pallet_recovery::Call::cancel_recovered {..}) | + RuntimeCall::Authorship(..) | + RuntimeCall::Staking(..) | + RuntimeCall::Session(..) | + RuntimeCall::Grandpa(..) | + RuntimeCall::ImOnline(..) | + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | + RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::TechnicalMembership(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::ChildBounties(..) | + RuntimeCall::Tips(..) | + RuntimeCall::Claims(..) | + RuntimeCall::Utility(..) | + RuntimeCall::Identity(..) | + RuntimeCall::Society(..) | + RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::close_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered {..}) | // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - Call::Vesting(pallet_vesting::Call::vest {..}) | - Call::Vesting(pallet_vesting::Call::vest_other {..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other {..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` - Call::Scheduler(..) | - Call::Proxy(..) | - Call::Multisig(..) | - Call::Gilt(..) | - Call::Registrar(paras_registrar::Call::register {..}) | - Call::Registrar(paras_registrar::Call::deregister {..}) | + RuntimeCall::Scheduler(..) | + RuntimeCall::Proxy(..) | + RuntimeCall::Multisig(..) | + RuntimeCall::Gilt(..) | + RuntimeCall::Registrar(paras_registrar::Call::register {..}) | + RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve {..}) | - Call::Crowdloan(..) | - Call::Slots(..) | - Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::VoterList(..) | - Call::NominationPools(..) - ), - ProxyType::Governance => matches!( - c, - Call::Democracy(..) | - Call::Council(..) | Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::Treasury(..) | Call::Bounties(..) | - Call::Tips(..) | Call::Utility(..) | - Call::ChildBounties(..) + RuntimeCall::Registrar(paras_registrar::Call::reserve {..}) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Slots(..) | + RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet + RuntimeCall::VoterList(..) | + RuntimeCall::NominationPools(..) ), + ProxyType::Governance => + matches!( + c, + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) + ), ProxyType::Staking => { - matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)) + matches!( + c, + RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..) + ) }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, - Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..) + RuntimeCall::Auctions(..) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Registrar(..) | + RuntimeCall::Slots(..) ), - ProxyType::Society => matches!(c, Call::Society(..)), + ProxyType::Society => matches!(c, RuntimeCall::Society(..)), } } fn is_superset(&self, o: &Self) -> bool { @@ -1082,8 +1090,8 @@ impl InstanceFilter for ProxyType { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -1109,7 +1117,7 @@ impl parachains_session_info::Config for Runtime { } impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; } @@ -1119,7 +1127,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -1130,7 +1138,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = crate::parachains_ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; @@ -1141,7 +1149,7 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; @@ -1160,7 +1168,7 @@ impl parachains_initializer::Config for Runtime { } impl parachains_disputes::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; type PunishValidators = (); type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; @@ -1171,7 +1179,7 @@ parameter_types! { } impl paras_registrar::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); @@ -1186,7 +1194,7 @@ parameter_types! { } impl slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -1205,7 +1213,7 @@ parameter_types! { } impl crowdloan::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = CrowdloanId; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; @@ -1230,7 +1238,7 @@ type AuctionInitiate = EitherOfDiverse< >; impl auctions::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = Slots; type Registrar = Registrar; type EndingPeriod = EndingPeriod; @@ -1252,7 +1260,7 @@ parameter_types! { } impl pallet_gilt::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; type AdminOrigin = MoreThanHalfCouncil; @@ -1275,7 +1283,7 @@ parameter_types! { } impl pallet_nomination_pools::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; type CurrencyBalance = Balance; @@ -1425,7 +1433,8 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1436,7 +1445,7 @@ pub type Executive = frame_executive::Executive< pallet_nomination_pools::migration::v3::MigrateToV3, >; /// The payload being signed in the transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] #[macro_use] @@ -1608,7 +1617,7 @@ sp_api::impl_runtime_apis! { fn candidate_events() -> Vec> { parachains_runtime_api_impl::candidate_events::(|ev| { match ev { - Event::ParaInclusion(ev) => { + RuntimeEvent::ParaInclusion(ev) => { Some(ev) } _ => None, @@ -1834,13 +1843,13 @@ sp_api::impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { - fn query_call_info(call: Call, len: u32) -> RuntimeDispatchInfo { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } - fn query_call_fee_details(call: Call, len: u32) -> FeeDetails { + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { TransactionPayment::query_call_fee_details(call, len) } } @@ -1965,7 +1974,7 @@ sp_api::impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) @@ -2084,7 +2093,7 @@ mod multiplier_tests { println!("calling {:?}", call); let info = call.get_dispatch_info(); // convert to outer call. - let call = Call::System(call); + let call = RuntimeCall::System(call); let len = call.using_encoded(|e| e.len()) as u32; let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() diff --git a/runtime/kusama/src/tests.rs b/runtime/kusama/src/tests.rs index 49a99d864e7b..a4dbe156819e 100644 --- a/runtime/kusama/src/tests.rs +++ b/runtime/kusama/src/tests.rs @@ -87,7 +87,7 @@ fn transfer_cost_min_multiplier() { }; let info = call.get_dispatch_info(); // convert to outer call. - let call = Call::Balances(call); + let call = RuntimeCall::Balances(call); let len = call.using_encoded(|e| e.len()) as u32; let mut ext = sp_io::TestExternalities::new_empty(); @@ -173,5 +173,5 @@ fn era_payout_should_give_sensible_results() { #[test] fn call_size() { - Call::assert_size_under(230); + RuntimeCall::assert_size_under(230); } diff --git a/runtime/kusama/src/weights/xcm/mod.rs b/runtime/kusama/src/weights/xcm/mod.rs index 1e173cf33e00..f03904b799a4 100644 --- a/runtime/kusama/src/weights/xcm/mod.rs +++ b/runtime/kusama/src/weights/xcm/mod.rs @@ -72,8 +72,8 @@ impl WeighMultiAssets for MultiAssets { } } -pub struct KusamaXcmWeight(core::marker::PhantomData); -impl XcmWeightInfo for KusamaXcmWeight { +pub struct KusamaXcmWeight(core::marker::PhantomData); +impl XcmWeightInfo for KusamaXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } @@ -99,7 +99,7 @@ impl XcmWeightInfo for KusamaXcmWeight { fn transact( _origin_type: &OriginKind, _require_weight_at_most: &u64, - _call: &DoubleEncoded, + _call: &DoubleEncoded, ) -> XCMWeight { XcmGeneric::::transact().ref_time() } @@ -179,10 +179,10 @@ impl XcmWeightInfo for KusamaXcmWeight { fn refund_surplus() -> XCMWeight { XcmGeneric::::refund_surplus().ref_time() } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { XcmGeneric::::set_error_handler().ref_time() } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { + fn set_appendix(_xcm: &Xcm) -> XCMWeight { XcmGeneric::::set_appendix().ref_time() } fn clear_error() -> XCMWeight { diff --git a/runtime/kusama/src/xcm_config.rs b/runtime/kusama/src/xcm_config.rs index 14fe36b059bf..1d10205153ce 100644 --- a/runtime/kusama/src/xcm_config.rs +++ b/runtime/kusama/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for the Kusama runtime. use super::{ - parachains_origin, AccountId, Balances, Call, CouncilCollective, Event, Origin, ParaId, - Runtime, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, + RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, }; use frame_support::{match_types, parameter_types, traits::Everything}; use runtime_common::{xcm_sender, ToAuthor}; @@ -131,7 +131,7 @@ pub type Barrier = ( pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -139,8 +139,11 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::KusamaXcmWeight, + RuntimeCall, + MaxInstructions, + >; // The weight trader piggybacks on the existing transaction-fee conversion logic. type Trader = UsingComponents>; type ResponseHandler = XcmPallet; @@ -170,7 +173,7 @@ pub type LocalOriginToLocation = ( SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; // We only allow the council to send messages. This is basically safe to enable for everyone // (safe the possibility of someone spamming the parachain if they're willing to pay the KSM to // send from the Relay-chain), but it's useless until we bring in XCM v3 which will make @@ -186,10 +189,10 @@ impl pallet_xcm::Config for Runtime { // Anyone is able to use reserve transfers regardless of who they are and what they want to // transfer. type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/runtime/parachains/src/disputes.rs b/runtime/parachains/src/disputes.rs index 62e555a47a36..a6fc7e75aa22 100644 --- a/runtime/parachains/src/disputes.rs +++ b/runtime/parachains/src/disputes.rs @@ -410,7 +410,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + configuration::Config + session_info::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; type RewardValidators: RewardValidators; type PunishValidators: PunishValidators; diff --git a/runtime/parachains/src/hrmp.rs b/runtime/parachains/src/hrmp.rs index 7cfedad08094..b4ab13da4c08 100644 --- a/runtime/parachains/src/hrmp.rs +++ b/runtime/parachains/src/hrmp.rs @@ -239,7 +239,7 @@ pub mod pallet { frame_system::Config + configuration::Config + paras::Config + dmp::Config { /// The outer event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; type Origin: From + From<::Origin> diff --git a/runtime/parachains/src/hrmp/benchmarking.rs b/runtime/parachains/src/hrmp/benchmarking.rs index 3486e990fe57..125a56279944 100644 --- a/runtime/parachains/src/hrmp/benchmarking.rs +++ b/runtime/parachains/src/hrmp/benchmarking.rs @@ -39,9 +39,9 @@ fn register_parachain_with_balance(id: ParaId, balance: BalanceOf) T::Currency::make_free_balance_be(&id.into_account_truncating(), balance); } -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/parachains/src/hrmp/tests.rs b/runtime/parachains/src/hrmp/tests.rs index 463c5eb39385..22824601b521 100644 --- a/runtime/parachains/src/hrmp/tests.rs +++ b/runtime/parachains/src/hrmp/tests.rs @@ -16,8 +16,8 @@ use super::*; use crate::mock::{ - new_test_ext, Configuration, Event as MockEvent, Hrmp, MockGenesisConfig, Paras, ParasShared, - System, Test, + new_test_ext, Configuration, Hrmp, MockGenesisConfig, Paras, ParasShared, + RuntimeEvent as MockEvent, System, Test, }; use frame_support::{assert_noop, assert_ok, traits::Currency as _}; use primitives::v2::BlockNumber; diff --git a/runtime/parachains/src/inclusion/mod.rs b/runtime/parachains/src/inclusion/mod.rs index f85871e5fd59..f74a8cfd3f8d 100644 --- a/runtime/parachains/src/inclusion/mod.rs +++ b/runtime/parachains/src/inclusion/mod.rs @@ -198,7 +198,7 @@ pub mod pallet { + hrmp::Config + configuration::Config { - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; type DisputesHandler: disputes::DisputesHandler; type RewardValidators: RewardValidators; } diff --git a/runtime/parachains/src/mock.rs b/runtime/parachains/src/mock.rs index 682d7bb0697c..8a1714070540 100644 --- a/runtime/parachains/src/mock.rs +++ b/runtime/parachains/src/mock.rs @@ -73,10 +73,10 @@ frame_support::construct_runtime!( impl frame_system::offchain::SendTransactionTypes for Test where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } parameter_types! { @@ -93,7 +93,7 @@ impl frame_system::Config for Test { type BlockLength = (); type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = BlockNumber; type Hash = H256; @@ -101,7 +101,7 @@ impl frame_system::Config for Test { type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -123,7 +123,7 @@ impl pallet_balances::Config for Test { type MaxReserves = (); type ReserveIdentifier = [u8; 8]; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -213,7 +213,7 @@ impl frame_support::traits::EstimateNextSessionRotation for TestNextSession } impl crate::paras::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = crate::paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = TestNextSessionRotation; @@ -226,7 +226,7 @@ parameter_types! { } impl crate::ump::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = TestUmpSink; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; @@ -234,14 +234,14 @@ impl crate::ump::Config for Test { } impl crate::hrmp::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = pallet_balances::Pallet; type WeightInfo = crate::hrmp::TestWeightInfo; } impl crate::disputes::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = Self; type PunishValidators = Self; type WeightInfo = crate::disputes::TestWeightInfo; @@ -292,7 +292,7 @@ impl crate::disputes::PunishValidators for Test { impl crate::scheduler::Config for Test {} impl crate::inclusion::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = Disputes; type RewardValidators = TestRewardValidators; } @@ -455,9 +455,9 @@ pub struct MockGenesisConfig { pub paras: crate::paras::GenesisConfig, } -pub fn assert_last_event(generic_event: Event) { +pub fn assert_last_event(generic_event: RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/parachains/src/paras/benchmarking.rs b/runtime/parachains/src/paras/benchmarking.rs index 9d31453638a7..9970937f4558 100644 --- a/runtime/parachains/src/paras/benchmarking.rs +++ b/runtime/parachains/src/paras/benchmarking.rs @@ -31,9 +31,9 @@ use self::pvf_check::{VoteCause, VoteOutcome}; // shouldn't exceed this number. const SAMPLE_SIZE: u32 = 1024; -fn assert_last_event(generic_event: ::Event) { +fn assert_last_event(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(event, &system_event); diff --git a/runtime/parachains/src/paras/mod.rs b/runtime/parachains/src/paras/mod.rs index da30c44b0741..b43300fdcd12 100644 --- a/runtime/parachains/src/paras/mod.rs +++ b/runtime/parachains/src/paras/mod.rs @@ -473,7 +473,7 @@ pub mod pallet { + shared::Config + frame_system::offchain::SendTransactionTypes> { - type Event: From + IsType<::Event>; + type RuntimeEvent: From + IsType<::RuntimeEvent>; #[pallet::constant] type UnsignedPriority: Get; diff --git a/runtime/parachains/src/paras/tests.rs b/runtime/parachains/src/paras/tests.rs index 960132d5f804..47fd15793181 100644 --- a/runtime/parachains/src/paras/tests.rs +++ b/runtime/parachains/src/paras/tests.rs @@ -112,8 +112,12 @@ fn check_code_is_not_stored(validation_code: &ValidationCode) { /// An utility for checking that certain events were deposited. struct EventValidator { - events: - Vec::Event, primitives::v2::Hash>>, + events: Vec< + frame_system::EventRecord< + ::RuntimeEvent, + primitives::v2::Hash, + >, + >, } impl EventValidator { diff --git a/runtime/parachains/src/runtime_api_impl/v2.rs b/runtime/parachains/src/runtime_api_impl/v2.rs index 20ee41636d81..77ea96742b54 100644 --- a/runtime/parachains/src/runtime_api_impl/v2.rs +++ b/runtime/parachains/src/runtime_api_impl/v2.rs @@ -323,7 +323,7 @@ pub fn candidate_pending_availability( pub fn candidate_events(extract_event: F) -> Vec> where T: initializer::Config, - F: Fn(::Event) -> Option>, + F: Fn(::RuntimeEvent) -> Option>, { use inclusion::Event as RawEvent; diff --git a/runtime/parachains/src/ump.rs b/runtime/parachains/src/ump.rs index f9042b5e3c7e..8d341410d831 100644 --- a/runtime/parachains/src/ump.rs +++ b/runtime/parachains/src/ump.rs @@ -93,7 +93,9 @@ fn upward_message_id(data: &[u8]) -> MessageId { sp_io::hashing::blake2_256(data) } -impl, C: Config> UmpSink for XcmSink { +impl, C: Config> UmpSink + for XcmSink +{ fn process_upward_message( origin: ParaId, mut data: &[u8], @@ -106,13 +108,13 @@ impl, C: Config> UmpSink for XcmSi }; let id = upward_message_id(&data[..]); - let maybe_msg_and_weight = VersionedXcm::::decode_all_with_depth_limit( + let maybe_msg_and_weight = VersionedXcm::::decode_all_with_depth_limit( xcm::MAX_XCM_DECODE_DEPTH, &mut data, ) .map(|xcm| { ( - Xcm::::try_from(xcm), + Xcm::::try_from(xcm), // NOTE: We are overestimating slightly here. // The benchmark is timing this whole function with different message sizes and a NOOP extrinsic to // measure the size-dependent weight. But as we use the weight funtion **in** the benchmarked funtion we @@ -218,7 +220,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + configuration::Config { /// The aggregate event. - type Event: From + IsType<::Event>; + type RuntimeEvent: From + IsType<::RuntimeEvent>; /// A place where all received upward messages are funneled. type UmpSink: UmpSink; diff --git a/runtime/parachains/src/ump/benchmarking.rs b/runtime/parachains/src/ump/benchmarking.rs index d7d59227ba31..c415526da7c5 100644 --- a/runtime/parachains/src/ump/benchmarking.rs +++ b/runtime/parachains/src/ump/benchmarking.rs @@ -18,9 +18,9 @@ use super::{Pallet as Ump, *}; use frame_system::RawOrigin; use xcm::prelude::*; -fn assert_last_event_type(generic_event: ::Event) { +fn assert_last_event_type(generic_event: ::RuntimeEvent) { let events = frame_system::Pallet::::events(); - let system_event: ::Event = generic_event.into(); + let system_event: ::RuntimeEvent = generic_event.into(); // compare to the last event record let frame_system::EventRecord { event, .. } = &events[events.len() - 1]; assert_eq!(sp_std::mem::discriminant(event), sp_std::mem::discriminant(&system_event)); diff --git a/runtime/polkadot/src/lib.rs b/runtime/polkadot/src/lib.rs index b40caa6134e4..24f64c649c00 100644 --- a/runtime/polkadot/src/lib.rs +++ b/runtime/polkadot/src/lib.rs @@ -147,7 +147,7 @@ impl frame_system::Config for Runtime { type BlockWeights = BlockWeights; type BlockLength = BlockLength; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; type Hash = Hash; @@ -155,7 +155,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -205,10 +205,10 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = MaxScheduledPerBlock; @@ -226,7 +226,7 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; type MaxSize = PreimageMaxSize; @@ -282,7 +282,7 @@ impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_indices::WeightInfo; } @@ -295,7 +295,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = MaxLocks; @@ -312,7 +312,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -354,7 +354,7 @@ impl_opaque_keys! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; type ShouldEndSession = Babe; @@ -446,7 +446,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { } impl pallet_election_provider_multi_phase::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EstimateCallFee = TransactionPayment; type SignedPhase = SignedPhase; @@ -492,7 +492,7 @@ parameter_types! { } impl pallet_bags_list::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ScoreProvider = Staking; type WeightInfo = weights::pallet_bags_list::WeightInfo; type BagThresholds = BagThresholds; @@ -540,7 +540,7 @@ impl pallet_staking::Config for Runtime { type UnixTime = Timestamp; type CurrencyToVote = CurrencyToVote; type RewardRemainder = Treasury; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Slash = Treasury; type Reward = (); type SessionsPerEra = SessionsPerEra; @@ -573,7 +573,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -600,8 +600,8 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type VoteLockingPeriod = EnactmentPeriod; @@ -671,8 +671,8 @@ parameter_types! { pub type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; @@ -699,7 +699,7 @@ parameter_types! { const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); impl pallet_elections_phragmen::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = PhragmenElectionPalletId; type Currency = Balances; type ChangeMembers = Council; @@ -727,8 +727,8 @@ parameter_types! { pub type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -737,7 +737,7 @@ impl pallet_collective::Config for Runtime { } impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = MoreThanHalfCouncil; type RemoveOrigin = MoreThanHalfCouncil; type SwapOrigin = MoreThanHalfCouncil; @@ -778,7 +778,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = ApproveOrigin; type RejectOrigin = MoreThanHalfCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -804,7 +804,7 @@ parameter_types! { } impl pallet_bounties::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BountyDepositBase = BountyDepositBase; type BountyDepositPayoutDelay = BountyDepositPayoutDelay; type BountyUpdatePeriod = BountyUpdatePeriod; @@ -824,14 +824,14 @@ parameter_types! { } impl pallet_child_bounties::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaxActiveChildBountyCount = MaxActiveChildBountyCount; type ChildBountyValueMinimum = ChildBountyValueMinimum; type WeightInfo = weights::pallet_child_bounties::WeightInfo; } impl pallet_tips::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DataDepositPerByte = DataDepositPerByte; type MaximumReasonLength = MaximumReasonLength; type Tippers = PhragmenElection; @@ -842,7 +842,7 @@ impl pallet_tips::Config for Runtime { } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; } @@ -859,7 +859,7 @@ parameter_types! { impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; type ReportUnresponsiveness = Offences; @@ -871,8 +871,7 @@ impl pallet_im_online::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProof = >::Proof; @@ -898,14 +897,14 @@ impl pallet_grandpa::Config for Runtime { /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, nonce: ::Index, - ) -> Option<(Call, ::SignaturePayload)> { + ) -> Option<(RuntimeCall, ::SignaturePayload)> { use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = @@ -950,10 +949,10 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } parameter_types! { @@ -966,7 +965,7 @@ parameter_types! { } impl claims::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type VestingSchedule = Vesting; type Prefix = Prefix; /// At least 3/4 of the council must agree to a claim move before it can happen. @@ -980,7 +979,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; @@ -989,8 +988,8 @@ impl pallet_vesting::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } @@ -1004,8 +1003,8 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; @@ -1085,75 +1084,84 @@ impl Default for ProxyType { Self::Any } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::NonTransfer => matches!( c, - Call::System(..) | - Call::Scheduler(..) | - Call::Babe(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim{..}) | - Call::Indices(pallet_indices::Call::free{..}) | - Call::Indices(pallet_indices::Call::freeze{..}) | + RuntimeCall::System(..) | + RuntimeCall::Scheduler(..) | + RuntimeCall::Babe(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Indices(pallet_indices::Call::claim{..}) | + RuntimeCall::Indices(pallet_indices::Call::free{..}) | + RuntimeCall::Indices(pallet_indices::Call::freeze{..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet - Call::Authorship(..) | - Call::Staking(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::ImOnline(..) | - Call::Democracy(..) | - Call::Council(..) | - Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::TechnicalMembership(..) | - Call::Treasury(..) | - Call::Bounties(..) | - Call::ChildBounties(..) | - Call::Tips(..) | - Call::Claims(..) | - Call::Vesting(pallet_vesting::Call::vest{..}) | - Call::Vesting(pallet_vesting::Call::vest_other{..}) | + RuntimeCall::Authorship(..) | + RuntimeCall::Staking(..) | + RuntimeCall::Session(..) | + RuntimeCall::Grandpa(..) | + RuntimeCall::ImOnline(..) | + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | + RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::TechnicalMembership(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::ChildBounties(..) | + RuntimeCall::Tips(..) | + RuntimeCall::Claims(..) | + RuntimeCall::Vesting(pallet_vesting::Call::vest{..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other{..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` - Call::Utility(..) | - Call::Identity(..) | - Call::Proxy(..) | - Call::Multisig(..) | - Call::Registrar(paras_registrar::Call::register {..}) | - Call::Registrar(paras_registrar::Call::deregister {..}) | + RuntimeCall::Utility(..) | + RuntimeCall::Identity(..) | + RuntimeCall::Proxy(..) | + RuntimeCall::Multisig(..) | + RuntimeCall::Registrar(paras_registrar::Call::register {..}) | + RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve {..}) | - Call::Crowdloan(..) | - Call::Slots(..) | - Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::VoterList(..) | - Call::NominationPools(..) - ), - ProxyType::Governance => matches!( - c, - Call::Democracy(..) | - Call::Council(..) | Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::Treasury(..) | Call::Bounties(..) | - Call::Tips(..) | Call::Utility(..) | - Call::ChildBounties(..) + RuntimeCall::Registrar(paras_registrar::Call::reserve {..}) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Slots(..) | + RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet + RuntimeCall::VoterList(..) | + RuntimeCall::NominationPools(..) ), + ProxyType::Governance => + matches!( + c, + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) + ), ProxyType::Staking => { - matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)) + matches!( + c, + RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..) + ) }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, - Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..) + RuntimeCall::Auctions(..) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Registrar(..) | + RuntimeCall::Slots(..) ), } } @@ -1169,8 +1177,8 @@ impl InstanceFilter for ProxyType { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -1196,7 +1204,7 @@ impl parachains_session_info::Config for Runtime { } impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; } @@ -1206,7 +1214,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -1217,7 +1225,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = crate::parachains_ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; @@ -1228,7 +1236,7 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; @@ -1247,7 +1255,7 @@ impl parachains_initializer::Config for Runtime { } impl parachains_disputes::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = (); type PunishValidators = (); type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; @@ -1261,7 +1269,7 @@ parameter_types! { } impl paras_registrar::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); @@ -1282,7 +1290,7 @@ parameter_types! { } impl slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -1304,7 +1312,7 @@ parameter_types! { } impl crowdloan::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = CrowdloanId; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; @@ -1329,7 +1337,7 @@ type AuctionInitiate = EitherOfDiverse< >; impl auctions::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = Slots; type Registrar = Registrar; type EndingPeriod = EndingPeriod; @@ -1346,7 +1354,7 @@ parameter_types! { } impl pallet_nomination_pools::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; type RewardCounter = FixedU128; @@ -1507,7 +1515,8 @@ pub type SignedExtra = ( claims::PrevalidateAttests, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1518,7 +1527,7 @@ pub type Executive = frame_executive::Executive< (InitiateNominationPools, pallet_nomination_pools::migration::v3::MigrateToV3), >; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] #[macro_use] @@ -1694,7 +1703,7 @@ sp_api::impl_runtime_apis! { fn candidate_events() -> Vec> { parachains_runtime_api_impl::candidate_events::(|ev| { match ev { - Event::ParaInclusion(ev) => { + RuntimeEvent::ParaInclusion(ev) => { Some(ev) } _ => None, @@ -1920,13 +1929,13 @@ sp_api::impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { - fn query_call_info(call: Call, len: u32) -> RuntimeDispatchInfo { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } - fn query_call_fee_details(call: Call, len: u32) -> FeeDetails { + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { TransactionPayment::query_call_fee_details(call, len) } } @@ -2079,8 +2088,8 @@ mod test_fees { }; let info = call.get_dispatch_info(); println!("call = {:?} / info = {:?}", call, info); - // convert to outer call. - let call = Call::Balances(call); + // convert to runtime call. + let call = RuntimeCall::Balances(call); let extra: SignedExtra = ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -2204,9 +2213,9 @@ mod test { #[test] fn call_size() { assert!( - core::mem::size_of::() <= 230, - "size of Call is more than 230 bytes: some calls have too big arguments, use Box to \ - reduce the size of Call. + core::mem::size_of::() <= 230, + "size of RuntimeCall is more than 230 bytes: some calls have too big arguments, use Box to \ + reduce the size of RuntimeCall. If the limit is too strong, maybe consider increase the limit", ); } @@ -2266,7 +2275,7 @@ mod multiplier_tests { println!("calling {:?}", call); let info = call.get_dispatch_info(); // convert to outer call. - let call = Call::System(call); + let call = RuntimeCall::System(call); let len = call.using_encoded(|e| e.len()) as u32; let mut t: sp_io::TestExternalities = frame_system::GenesisConfig::default() diff --git a/runtime/polkadot/src/xcm_config.rs b/runtime/polkadot/src/xcm_config.rs index a42585e57356..e985fd78860a 100644 --- a/runtime/polkadot/src/xcm_config.rs +++ b/runtime/polkadot/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Polkadot. use super::{ - parachains_origin, AccountId, Balances, Call, CouncilCollective, Event, Origin, ParaId, - Runtime, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, + RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, }; use frame_support::{ match_types, parameter_types, @@ -132,7 +132,7 @@ pub type Barrier = ( pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -141,7 +141,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; // The weight trader piggybacks on the existing transaction-fee conversion logic. type Trader = UsingComponents>; type ResponseHandler = XcmPallet; @@ -174,7 +174,7 @@ pub type LocalOriginToLocation = ( ); impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; // Only allow the council to send messages. type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; @@ -185,10 +185,10 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = xcm_executor::XcmExecutor; type XcmTeleportFilter = Everything; // == Allow All type XcmReserveTransferFilter = Everything; // == Allow All - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = AdvertisedXcmVersion; } diff --git a/runtime/rococo/src/lib.rs b/runtime/rococo/src/lib.rs index a2d6190bfb76..4ac03b638cd1 100644 --- a/runtime/rococo/src/lib.rs +++ b/runtime/rococo/src/lib.rs @@ -132,8 +132,8 @@ pub fn native_version() -> NativeVersion { /// We currently allow all calls. pub struct BaseFilter; -impl Contains for BaseFilter { - fn contains(_call: &Call) -> bool { +impl Contains for BaseFilter { + fn contains(_call: &RuntimeCall) -> bool { true } } @@ -149,7 +149,7 @@ impl frame_system::Config for Runtime { type BlockLength = BlockLength; type DbWeight = RocksDbWeight; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; type Hash = Hash; @@ -157,7 +157,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = Version; type PalletInfo = PalletInfo; @@ -206,10 +206,10 @@ impl PrivilegeCmp for OriginPrivilegeCmp { } impl pallet_scheduler::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = ScheduleOrigin; type MaxScheduledPerBlock = MaxScheduledPerBlock; @@ -227,7 +227,7 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; type MaxSize = PreimageMaxSize; @@ -277,7 +277,7 @@ impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_indices::WeightInfo; } @@ -290,7 +290,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = MaxLocks; @@ -307,7 +307,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -357,7 +357,7 @@ impl sp_runtime::traits::Convert> for ValidatorIdOf } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = ValidatorIdOf; type ShouldEndSession = Babe; @@ -398,8 +398,8 @@ parameter_types! { } impl pallet_democracy::Config for Runtime { - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EnactmentPeriod = EnactmentPeriod; type VoteLockingPeriod = EnactmentPeriod; @@ -459,8 +459,8 @@ parameter_types! { type CouncilCollective = pallet_collective::Instance1; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = CouncilMotionDuration; type MaxProposals = CouncilMaxProposals; type MaxMembers = CouncilMaxMembers; @@ -487,7 +487,7 @@ parameter_types! { const_assert!(DesiredMembers::get() <= CouncilMaxMembers::get()); impl pallet_elections_phragmen::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ChangeMembers = Council; type InitializeMembers = Council; @@ -515,8 +515,8 @@ parameter_types! { type TechnicalCollective = pallet_collective::Instance2; impl pallet_collective::Config for Runtime { type Origin = Origin; - type Proposal = Call; - type Event = Event; + type Proposal = RuntimeCall; + type RuntimeEvent = RuntimeEvent; type MotionDuration = TechnicalMotionDuration; type MaxProposals = TechnicalMaxProposals; type MaxMembers = TechnicalMaxMembers; @@ -530,7 +530,7 @@ type MoreThanHalfCouncil = EitherOfDiverse< >; impl pallet_membership::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AddOrigin = MoreThanHalfCouncil; type RemoveOrigin = MoreThanHalfCouncil; type SwapOrigin = MoreThanHalfCouncil; @@ -571,7 +571,7 @@ impl pallet_treasury::Config for Runtime { type Currency = Balances; type ApproveOrigin = ApproveOrigin; type RejectOrigin = MoreThanHalfCouncil; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnSlash = Treasury; type ProposalBond = ProposalBond; type ProposalBondMinimum = ProposalBondMinimum; @@ -606,7 +606,7 @@ impl pallet_bounties::Config for Runtime { type BountyValueMinimum = BountyValueMinimum; type ChildBountyManager = ChildBounties; type DataDepositPerByte = DataDepositPerByte; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaximumReasonLength = MaximumReasonLength; type WeightInfo = weights::pallet_bounties::WeightInfo; } @@ -617,7 +617,7 @@ parameter_types! { } impl pallet_child_bounties::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type MaxActiveChildBountyCount = MaxActiveChildBountyCount; type ChildBountyValueMinimum = ChildBountyValueMinimum; type WeightInfo = weights::pallet_child_bounties::WeightInfo; @@ -630,12 +630,12 @@ impl pallet_tips::Config for Runtime { type TipCountdown = TipCountdown; type TipFindersFee = TipFindersFee; type TipReportDepositBase = TipReportDepositBase; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_tips::WeightInfo; } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = (); } @@ -650,7 +650,7 @@ parameter_types! { impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; type ReportUnresponsiveness = Offences; @@ -662,8 +662,7 @@ impl pallet_im_online::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProof = >::Proof; @@ -689,14 +688,14 @@ impl pallet_grandpa::Config for Runtime { /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, nonce: ::Index, - ) -> Option<(Call, ::SignaturePayload)> { + ) -> Option<(RuntimeCall, ::SignaturePayload)> { use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = @@ -740,10 +739,10 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { type Extrinsic = UncheckedExtrinsic; - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; } parameter_types! { @@ -751,7 +750,7 @@ parameter_types! { } impl claims::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = @@ -770,7 +769,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BasicDeposit = BasicDeposit; type FieldDeposit = FieldDeposit; @@ -785,8 +784,8 @@ impl pallet_identity::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } @@ -800,8 +799,8 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; @@ -817,9 +816,9 @@ parameter_types! { } impl pallet_recovery::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type Call = Call; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ConfigDepositBase = ConfigDepositBase; type FriendDepositFactor = FriendDepositFactor; @@ -840,7 +839,7 @@ parameter_types! { } impl pallet_society::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Randomness = pallet_babe::RandomnessFromOneEpochAgo; type CandidateDeposit = CandidateDeposit; @@ -863,7 +862,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; @@ -910,83 +909,87 @@ impl Default for ProxyType { Self::Any } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::NonTransfer => matches!( c, - Call::System(..) | - Call::Babe(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim {..}) | - Call::Indices(pallet_indices::Call::free {..}) | - Call::Indices(pallet_indices::Call::freeze {..}) | + RuntimeCall::System(..) | + RuntimeCall::Babe(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Indices(pallet_indices::Call::claim {..}) | + RuntimeCall::Indices(pallet_indices::Call::free {..}) | + RuntimeCall::Indices(pallet_indices::Call::freeze {..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet - Call::Authorship(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::ImOnline(..) | - Call::Democracy(..) | - Call::Council(..) | - Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::TechnicalMembership(..) | - Call::Treasury(..) | - Call::Bounties(..) | - Call::ChildBounties(..) | - Call::Tips(..) | - Call::Claims(..) | - Call::Utility(..) | - Call::Identity(..) | - Call::Society(..) | - Call::Recovery(pallet_recovery::Call::as_recovered {..}) | - Call::Recovery(pallet_recovery::Call::vouch_recovery {..}) | - Call::Recovery(pallet_recovery::Call::claim_recovery {..}) | - Call::Recovery(pallet_recovery::Call::close_recovery {..}) | - Call::Recovery(pallet_recovery::Call::remove_recovery {..}) | - Call::Recovery(pallet_recovery::Call::cancel_recovered {..}) | + RuntimeCall::Authorship(..) | + RuntimeCall::Session(..) | + RuntimeCall::Grandpa(..) | + RuntimeCall::ImOnline(..) | + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | + RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::TechnicalMembership(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::ChildBounties(..) | + RuntimeCall::Tips(..) | + RuntimeCall::Claims(..) | + RuntimeCall::Utility(..) | + RuntimeCall::Identity(..) | + RuntimeCall::Society(..) | + RuntimeCall::Recovery(pallet_recovery::Call::as_recovered {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::close_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery {..}) | + RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered {..}) | // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - Call::Vesting(pallet_vesting::Call::vest {..}) | - Call::Vesting(pallet_vesting::Call::vest_other {..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest {..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other {..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` - Call::Scheduler(..) | - Call::Proxy(..) | - Call::Multisig(..) | - Call::Gilt(..) | - Call::Registrar(paras_registrar::Call::register {..}) | - Call::Registrar(paras_registrar::Call::deregister {..}) | + RuntimeCall::Scheduler(..) | + RuntimeCall::Proxy(..) | + RuntimeCall::Multisig(..) | + RuntimeCall::Gilt(..) | + RuntimeCall::Registrar(paras_registrar::Call::register {..}) | + RuntimeCall::Registrar(paras_registrar::Call::deregister {..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve {..}) | - Call::Crowdloan(..) | - Call::Slots(..) | - Call::Auctions(..) // Specifically omitting the entire XCM Pallet - ), - ProxyType::Governance => matches!( - c, - Call::Democracy(..) | - Call::Council(..) | Call::TechnicalCommittee(..) | - Call::PhragmenElection(..) | - Call::Treasury(..) | Call::Bounties(..) | - Call::Tips(..) | Call::Utility(..) | - Call::ChildBounties(..) + RuntimeCall::Registrar(paras_registrar::Call::reserve {..}) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Slots(..) | + RuntimeCall::Auctions(..) // Specifically omitting the entire XCM Pallet ), + ProxyType::Governance => + matches!( + c, + RuntimeCall::Democracy(..) | + RuntimeCall::Council(..) | RuntimeCall::TechnicalCommittee(..) | + RuntimeCall::PhragmenElection(..) | + RuntimeCall::Treasury(..) | + RuntimeCall::Bounties(..) | + RuntimeCall::Tips(..) | RuntimeCall::Utility(..) | + RuntimeCall::ChildBounties(..) + ), ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, - Call::Auctions { .. } | - Call::Crowdloan { .. } | - Call::Registrar { .. } | - Call::Multisig(..) | Call::Slots { .. } + RuntimeCall::Auctions { .. } | + RuntimeCall::Crowdloan { .. } | + RuntimeCall::Registrar { .. } | + RuntimeCall::Multisig(..) | + RuntimeCall::Slots { .. } ), - ProxyType::Society => matches!(c, Call::Society(..)), + ProxyType::Society => matches!(c, RuntimeCall::Society(..)), } } fn is_superset(&self, o: &Self) -> bool { @@ -1001,8 +1004,8 @@ impl InstanceFilter for ProxyType { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -1035,7 +1038,7 @@ impl runtime_parachains::inclusion::RewardValidators for RewardValidators { } impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidators; } @@ -1045,7 +1048,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -1056,7 +1059,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = crate::parachains_ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; @@ -1067,7 +1070,7 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; @@ -1086,7 +1089,7 @@ impl parachains_initializer::Config for Runtime { } impl parachains_disputes::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = (); type PunishValidators = (); type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; @@ -1097,7 +1100,7 @@ parameter_types! { } impl paras_registrar::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); @@ -1111,7 +1114,7 @@ parameter_types! { } impl slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -1130,7 +1133,7 @@ parameter_types! { } impl crowdloan::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = CrowdloanId; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; @@ -1155,7 +1158,7 @@ type AuctionInitiate = EitherOfDiverse< >; impl auctions::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = Slots; type Registrar = Registrar; type EndingPeriod = EndingPeriod; @@ -1177,7 +1180,7 @@ parameter_types! { } impl pallet_gilt::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type CurrencyBalance = Balance; type AdminOrigin = MoreThanHalfCouncil; @@ -1261,7 +1264,7 @@ parameter_types! { } impl assigned_slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssignSlotOrigin = EnsureRoot; type Leaser = Slots; type PermanentSlotLeasePeriodLength = PermanentSlotLeasePeriodLength; @@ -1272,13 +1275,13 @@ impl assigned_slots::Config for Runtime { } impl validator_manager::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PrivilegedOrigin = EnsureRoot; } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } construct_runtime! { @@ -1422,7 +1425,8 @@ pub type SignedExtra = ( ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1432,7 +1436,7 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] #[macro_use] @@ -1599,7 +1603,7 @@ sp_api::impl_runtime_apis! { fn candidate_events() -> Vec> { parachains_runtime_api_impl::candidate_events::(|ev| { match ev { - Event::ParaInclusion(ev) => { + RuntimeEvent::ParaInclusion(ev) => { Some(ev) } _ => None, @@ -1926,7 +1930,7 @@ sp_api::impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) diff --git a/runtime/rococo/src/validator_manager.rs b/runtime/rococo/src/validator_manager.rs index 2fd60b682ea5..b6b1b8c22d24 100644 --- a/runtime/rococo/src/validator_manager.rs +++ b/runtime/rococo/src/validator_manager.rs @@ -37,7 +37,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + pallet_session::Config { /// The overreaching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Privileged origin that can add or remove validators. type PrivilegedOrigin: EnsureOrigin<::Origin>; diff --git a/runtime/rococo/src/xcm_config.rs b/runtime/rococo/src/xcm_config.rs index 083ddb1bf081..df594ec95715 100644 --- a/runtime/rococo/src/xcm_config.rs +++ b/runtime/rococo/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configuration for Rococo. use super::{ - parachains_origin, AccountId, Balances, Call, CouncilCollective, Event, Origin, ParaId, - Runtime, WeightToFee, XcmPallet, + parachains_origin, AccountId, Balances, CouncilCollective, Origin, ParaId, Runtime, + RuntimeCall, RuntimeEvent, WeightToFee, XcmPallet, }; use frame_support::{match_types, parameter_types, traits::Everything}; use runtime_common::{xcm_sender, ToAuthor}; @@ -145,7 +145,7 @@ pub type Barrier = ( pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -153,8 +153,11 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = - WeightInfoBounds, Call, MaxInstructions>; + type Weigher = WeightInfoBounds< + crate::weights::xcm::RococoXcmWeight, + RuntimeCall, + MaxInstructions, + >; // The weight trader piggybacks on the existing transaction-fee conversion logic. type Trader = UsingComponents>; type ResponseHandler = XcmPallet; @@ -188,7 +191,7 @@ pub type LocalOriginToLocation = ( SignedToAccountId32, ); impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally. @@ -200,10 +203,10 @@ impl pallet_xcm::Config for Runtime { // Anyone is able to use reserve transfers regardless of who they are and what they want to // transfer. type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/runtime/test-runtime/src/lib.rs b/runtime/test-runtime/src/lib.rs index de4f64675cbc..339d6a4a9ee1 100644 --- a/runtime/test-runtime/src/lib.rs +++ b/runtime/test-runtime/src/lib.rs @@ -137,7 +137,7 @@ impl frame_system::Config for Runtime { type BlockLength = BlockLength; type DbWeight = (); type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; type Hash = HashT; @@ -145,7 +145,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = Indices; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = Version; type PalletInfo = PalletInfo; @@ -160,9 +160,9 @@ impl frame_system::Config for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -206,7 +206,7 @@ impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); } @@ -219,7 +219,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = MaxLocks; @@ -236,7 +236,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = CurrencyAdapter; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -282,7 +282,7 @@ impl_opaque_keys! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; type ShouldEndSession = Babe; @@ -337,7 +337,7 @@ impl pallet_staking::Config for Runtime { type UnixTime = Timestamp; type CurrencyToVote = frame_support::traits::U128CurrencyToVote; type RewardRemainder = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Slash = (); type Reward = (); type SessionsPerEra = SessionsPerEra; @@ -362,8 +362,7 @@ impl pallet_staking::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProofSystem = (); @@ -383,14 +382,14 @@ impl pallet_grandpa::Config for Runtime { impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, nonce: ::Index, - ) -> Option<(Call, ::SignaturePayload)> { + ) -> Option<(RuntimeCall, ::SignaturePayload)> { let period = BlockHashCount::get().checked_next_power_of_two().map(|c| c / 2).unwrap_or(2) as u64; @@ -427,7 +426,7 @@ impl frame_system::offchain::SigningTypes for Runtime { } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; } @@ -446,7 +445,7 @@ parameter_types! { } impl claims::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type VestingSchedule = Vesting; type Prefix = Prefix; type MoveClaimOrigin = frame_system::EnsureRoot; @@ -458,7 +457,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; @@ -467,8 +466,8 @@ impl pallet_vesting::Config for Runtime { } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } impl parachains_configuration::Config for Runtime { @@ -478,13 +477,13 @@ impl parachains_configuration::Config for Runtime { impl parachains_shared::Config for Runtime {} impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = RewardValidatorsWithEraPoints; } impl parachains_disputes::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = (); type PunishValidators = (); type WeightInfo = parachains_disputes::TestWeightInfo; @@ -509,7 +508,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = parachains_paras::TestWeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -522,7 +521,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = (); type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; @@ -540,24 +539,24 @@ pub type LocalOriginToLocation = xcm_builder::SignedToAccountId32; type LocationInverter = xcm_config::InvertNothing; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; - type Weigher = xcm_builder::FixedWeightBounds; + type Weigher = xcm_builder::FixedWeightBounds; type XcmRouter = xcm_config::DoNothingRouter; type XcmExecuteFilter = Everything; type XcmExecutor = xcm_executor::XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } impl parachains_hrmp::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type WeightInfo = parachains_hrmp::TestWeightInfo; @@ -570,9 +569,9 @@ impl paras_sudo_wrapper::Config for Runtime {} impl parachains_origin::Config for Runtime {} impl pallet_test_notifier::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; } #[frame_support::pallet] @@ -589,10 +588,10 @@ pub mod pallet_test_notifier { #[pallet::config] pub trait Config: frame_system::Config + pallet_xcm::Config { - type Event: IsType<::Event> + From>; + type RuntimeEvent: IsType<::RuntimeEvent> + From>; type Origin: IsType<::Origin> + Into::Origin>>; - type Call: IsType<::Call> + From>; + type RuntimeCall: IsType<::RuntimeCall> + From>; } #[pallet::event] @@ -635,7 +634,7 @@ pub mod pallet_test_notifier { Call::::notification_received { query_id: 0, response: Default::default() }; let qid = pallet_xcm::Pallet::::new_notify_query( Junction::AccountId32 { network: Any, id }.into(), - ::Call::from(call), + ::RuntimeCall::from(call), 100u32.into(), ); Self::deposit_event(Event::::NotifyQueryPrepared(qid)); @@ -732,7 +731,8 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -742,7 +742,7 @@ pub type Executive = frame_executive::Executive< AllPalletsWithSystem, >; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; pub type Hash = ::Hash; pub type Extrinsic = ::Extrinsic; @@ -1061,13 +1061,13 @@ sp_api::impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { - fn query_call_info(call: Call, len: u32) -> RuntimeDispatchInfo { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } - fn query_call_fee_details(call: Call, len: u32) -> FeeDetails { + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { TransactionPayment::query_call_fee_details(call, len) } } diff --git a/runtime/test-runtime/src/xcm_config.rs b/runtime/test-runtime/src/xcm_config.rs index 79ebf385d69c..7d1aa7de40b7 100644 --- a/runtime/test-runtime/src/xcm_config.rs +++ b/runtime/test-runtime/src/xcm_config.rs @@ -78,7 +78,7 @@ impl InvertLocation for InvertNothing { pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = super::Call; + type RuntimeCall = super::RuntimeCall; type XcmSender = DoNothingRouter; type AssetTransactor = DummyAssetTransactor; type OriginConverter = pallet_xcm::XcmPassthrough; @@ -86,7 +86,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = (); type LocationInverter = InvertNothing; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = DummyWeightTrader; type ResponseHandler = super::Xcm; type AssetTrap = super::Xcm; diff --git a/runtime/westend/src/lib.rs b/runtime/westend/src/lib.rs index daa48d51d659..e7edb2d209d4 100644 --- a/runtime/westend/src/lib.rs +++ b/runtime/westend/src/lib.rs @@ -139,7 +139,7 @@ impl frame_system::Config for Runtime { type BlockWeights = BlockWeights; type BlockLength = BlockLength; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = Nonce; type BlockNumber = BlockNumber; type Hash = Hash; @@ -147,7 +147,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = AccountIdLookup; type Header = generic::Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type DbWeight = RocksDbWeight; type Version = Version; @@ -169,10 +169,10 @@ parameter_types! { } impl pallet_scheduler::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type PalletsOrigin = OriginCaller; - type Call = Call; + type RuntimeCall = RuntimeCall; type MaximumWeight = MaximumSchedulerWeight; type ScheduleOrigin = EnsureRoot; type MaxScheduledPerBlock = MaxScheduledPerBlock; @@ -190,7 +190,7 @@ parameter_types! { impl pallet_preimage::Config for Runtime { type WeightInfo = weights::pallet_preimage::WeightInfo; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type ManagerOrigin = EnsureRoot; type MaxSize = PreimageMaxSize; @@ -245,7 +245,7 @@ impl pallet_indices::Config for Runtime { type AccountIndex = AccountIndex; type Currency = Balances; type Deposit = IndexDeposit; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_indices::WeightInfo; } @@ -258,7 +258,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type Balance = Balance; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type MaxLocks = MaxLocks; @@ -275,7 +275,7 @@ parameter_types! { } impl pallet_transaction_payment::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type OnChargeTransaction = CurrencyAdapter>; type OperationalFeeMultiplier = OperationalFeeMultiplier; type WeightToFee = WeightToFee; @@ -321,7 +321,7 @@ impl_opaque_keys! { } impl pallet_session::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorId = AccountId; type ValidatorIdOf = pallet_staking::StashOf; type ShouldEndSession = Babe; @@ -408,7 +408,7 @@ impl pallet_election_provider_multi_phase::MinerConfig for Runtime { } impl pallet_election_provider_multi_phase::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type EstimateCallFee = TransactionPayment; type SignedPhase = SignedPhase; @@ -451,7 +451,7 @@ parameter_types! { } impl pallet_bags_list::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ScoreProvider = Staking; type WeightInfo = weights::pallet_bags_list::WeightInfo; type BagThresholds = BagThresholds; @@ -489,7 +489,7 @@ impl pallet_staking::Config for Runtime { type UnixTime = Timestamp; type CurrencyToVote = CurrencyToVote; type RewardRemainder = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Slash = (); type Reward = (); type SessionsPerEra = SessionsPerEra; @@ -516,7 +516,7 @@ parameter_types! { } impl pallet_offences::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type IdentificationTuple = pallet_session::historical::IdentificationTuple; type OnOffenceHandler = Staking; } @@ -535,7 +535,7 @@ parameter_types! { impl pallet_im_online::Config for Runtime { type AuthorityId = ImOnlineId; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ValidatorSet = Historical; type NextSessionRotation = Babe; type ReportUnresponsiveness = Offences; @@ -547,8 +547,7 @@ impl pallet_im_online::Config for Runtime { } impl pallet_grandpa::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; type KeyOwnerProofSystem = Historical; @@ -574,14 +573,14 @@ impl pallet_grandpa::Config for Runtime { /// format of the chain. impl frame_system::offchain::CreateSignedTransaction for Runtime where - Call: From, + RuntimeCall: From, { fn create_transaction>( - call: Call, + call: RuntimeCall, public: ::Signer, account: AccountId, nonce: ::Index, - ) -> Option<(Call, ::SignaturePayload)> { + ) -> Option<(RuntimeCall, ::SignaturePayload)> { use sp_runtime::traits::StaticLookup; // take the biggest period possible. let period = @@ -625,9 +624,9 @@ impl frame_system::offchain::SigningTypes for Runtime { impl frame_system::offchain::SendTransactionTypes for Runtime where - Call: From, + RuntimeCall: From, { - type OverarchingCall = Call; + type OverarchingCall = RuntimeCall; type Extrinsic = UncheckedExtrinsic; } @@ -642,7 +641,7 @@ parameter_types! { } impl pallet_identity::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Slashed = (); type BasicDeposit = BasicDeposit; @@ -657,8 +656,8 @@ impl pallet_identity::Config for Runtime { } impl pallet_utility::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type PalletsOrigin = OriginCaller; type WeightInfo = weights::pallet_utility::WeightInfo; } @@ -672,8 +671,8 @@ parameter_types! { } impl pallet_multisig::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type DepositBase = DepositBase; type DepositFactor = DepositFactor; @@ -689,9 +688,9 @@ parameter_types! { } impl pallet_recovery::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = (); - type Call = Call; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ConfigDepositBase = ConfigDepositBase; type FriendDepositFactor = FriendDepositFactor; @@ -704,7 +703,7 @@ parameter_types! { } impl pallet_vesting::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type BlockNumberToBalance = ConvertInto; type MinVestedTransfer = MinVestedTransfer; @@ -713,8 +712,8 @@ impl pallet_vesting::Config for Runtime { } impl pallet_sudo::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; } parameter_types! { @@ -756,71 +755,78 @@ impl Default for ProxyType { Self::Any } } -impl InstanceFilter for ProxyType { - fn filter(&self, c: &Call) -> bool { +impl InstanceFilter for ProxyType { + fn filter(&self, c: &RuntimeCall) -> bool { match self { ProxyType::Any => true, ProxyType::NonTransfer => matches!( c, - Call::System(..) | - Call::Babe(..) | - Call::Timestamp(..) | - Call::Indices(pallet_indices::Call::claim{..}) | - Call::Indices(pallet_indices::Call::free{..}) | - Call::Indices(pallet_indices::Call::freeze{..}) | + RuntimeCall::System(..) | + RuntimeCall::Babe(..) | + RuntimeCall::Timestamp(..) | + RuntimeCall::Indices(pallet_indices::Call::claim{..}) | + RuntimeCall::Indices(pallet_indices::Call::free{..}) | + RuntimeCall::Indices(pallet_indices::Call::freeze{..}) | // Specifically omitting Indices `transfer`, `force_transfer` // Specifically omitting the entire Balances pallet - Call::Authorship(..) | - Call::Staking(..) | - Call::Session(..) | - Call::Grandpa(..) | - Call::ImOnline(..) | - Call::Utility(..) | - Call::Identity(..) | - Call::Recovery(pallet_recovery::Call::as_recovered{..}) | - Call::Recovery(pallet_recovery::Call::vouch_recovery{..}) | - Call::Recovery(pallet_recovery::Call::claim_recovery{..}) | - Call::Recovery(pallet_recovery::Call::close_recovery{..}) | - Call::Recovery(pallet_recovery::Call::remove_recovery{..}) | - Call::Recovery(pallet_recovery::Call::cancel_recovered{..}) | + RuntimeCall::Authorship(..) | + RuntimeCall::Staking(..) | + RuntimeCall::Session(..) | + RuntimeCall::Grandpa(..) | + RuntimeCall::ImOnline(..) | + RuntimeCall::Utility(..) | + RuntimeCall::Identity(..) | + RuntimeCall::Recovery(pallet_recovery::Call::as_recovered{..}) | + RuntimeCall::Recovery(pallet_recovery::Call::vouch_recovery{..}) | + RuntimeCall::Recovery(pallet_recovery::Call::claim_recovery{..}) | + RuntimeCall::Recovery(pallet_recovery::Call::close_recovery{..}) | + RuntimeCall::Recovery(pallet_recovery::Call::remove_recovery{..}) | + RuntimeCall::Recovery(pallet_recovery::Call::cancel_recovered{..}) | // Specifically omitting Recovery `create_recovery`, `initiate_recovery` - Call::Vesting(pallet_vesting::Call::vest{..}) | - Call::Vesting(pallet_vesting::Call::vest_other{..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest{..}) | + RuntimeCall::Vesting(pallet_vesting::Call::vest_other{..}) | // Specifically omitting Vesting `vested_transfer`, and `force_vested_transfer` - Call::Scheduler(..) | + RuntimeCall::Scheduler(..) | // Specifically omitting Sudo pallet - Call::Proxy(..) | - Call::Multisig(..) | - Call::Registrar(paras_registrar::Call::register{..}) | - Call::Registrar(paras_registrar::Call::deregister{..}) | + RuntimeCall::Proxy(..) | + RuntimeCall::Multisig(..) | + RuntimeCall::Registrar(paras_registrar::Call::register{..}) | + RuntimeCall::Registrar(paras_registrar::Call::deregister{..}) | // Specifically omitting Registrar `swap` - Call::Registrar(paras_registrar::Call::reserve{..}) | - Call::Crowdloan(..) | - Call::Slots(..) | - Call::Auctions(..) | // Specifically omitting the entire XCM Pallet - Call::VoterList(..) | - Call::NominationPools(..) + RuntimeCall::Registrar(paras_registrar::Call::reserve{..}) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Slots(..) | + RuntimeCall::Auctions(..) | // Specifically omitting the entire XCM Pallet + RuntimeCall::VoterList(..) | + RuntimeCall::NominationPools(..) ), ProxyType::Staking => { - matches!(c, Call::Staking(..) | Call::Session(..) | Call::Utility(..)) + matches!( + c, + RuntimeCall::Staking(..) | RuntimeCall::Session(..) | RuntimeCall::Utility(..) + ) }, ProxyType::SudoBalances => match c { - Call::Sudo(pallet_sudo::Call::sudo { call: ref x }) => { - matches!(x.as_ref(), &Call::Balances(..)) + RuntimeCall::Sudo(pallet_sudo::Call::sudo { call: ref x }) => { + matches!(x.as_ref(), &RuntimeCall::Balances(..)) }, - Call::Utility(..) => true, + RuntimeCall::Utility(..) => true, _ => false, }, ProxyType::IdentityJudgement => matches!( c, - Call::Identity(pallet_identity::Call::provide_judgement { .. }) | Call::Utility(..) + RuntimeCall::Identity(pallet_identity::Call::provide_judgement { .. }) | + RuntimeCall::Utility(..) ), ProxyType::CancelProxy => { - matches!(c, Call::Proxy(pallet_proxy::Call::reject_announcement { .. })) + matches!(c, RuntimeCall::Proxy(pallet_proxy::Call::reject_announcement { .. })) }, ProxyType::Auction => matches!( c, - Call::Auctions(..) | Call::Crowdloan(..) | Call::Registrar(..) | Call::Slots(..) + RuntimeCall::Auctions(..) | + RuntimeCall::Crowdloan(..) | + RuntimeCall::Registrar(..) | + RuntimeCall::Slots(..) ), } } @@ -836,8 +842,8 @@ impl InstanceFilter for ProxyType { } impl pallet_proxy::Config for Runtime { - type Event = Event; - type Call = Call; + type RuntimeEvent = RuntimeEvent; + type RuntimeCall = RuntimeCall; type Currency = Balances; type ProxyType = ProxyType; type ProxyDepositBase = ProxyDepositBase; @@ -863,7 +869,7 @@ impl parachains_session_info::Config for Runtime { } impl parachains_inclusion::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DisputesHandler = ParasDisputes; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; } @@ -873,7 +879,7 @@ parameter_types! { } impl parachains_paras::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::runtime_parachains_paras::WeightInfo; type UnsignedPriority = ParasUnsignedPriority; type NextSessionRotation = Babe; @@ -884,7 +890,7 @@ parameter_types! { } impl parachains_ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = crate::parachains_ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; @@ -895,7 +901,7 @@ impl parachains_ump::Config for Runtime { impl parachains_dmp::Config for Runtime {} impl parachains_hrmp::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type WeightInfo = weights::runtime_parachains_hrmp::WeightInfo; @@ -924,7 +930,7 @@ parameter_types! { } impl assigned_slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type AssignSlotOrigin = EnsureRoot; type Leaser = Slots; type PermanentSlotLeasePeriodLength = PermanentSlotLeasePeriodLength; @@ -935,7 +941,7 @@ impl assigned_slots::Config for Runtime { } impl parachains_disputes::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type RewardValidators = parachains_reward_points::RewardValidatorsWithEraPoints; type PunishValidators = (); type WeightInfo = weights::runtime_parachains_disputes::WeightInfo; @@ -947,7 +953,7 @@ parameter_types! { } impl paras_registrar::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; type Currency = Balances; type OnSwap = (Crowdloan, Slots); @@ -961,7 +967,7 @@ parameter_types! { } impl slots::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Currency = Balances; type Registrar = Registrar; type LeasePeriod = LeasePeriod; @@ -980,7 +986,7 @@ parameter_types! { } impl crowdloan::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type PalletId = CrowdloanId; type SubmissionDeposit = SubmissionDeposit; type MinContribution = MinContribution; @@ -1000,7 +1006,7 @@ parameter_types! { } impl auctions::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Leaser = Slots; type Registrar = Registrar; type EndingPeriod = EndingPeriod; @@ -1016,7 +1022,7 @@ parameter_types! { } impl pallet_nomination_pools::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type WeightInfo = weights::pallet_nomination_pools::WeightInfo; type Currency = Balances; type CurrencyBalance = Balance; @@ -1147,7 +1153,8 @@ pub type SignedExtra = ( pallet_transaction_payment::ChargeTransactionPayment, ); /// Unchecked extrinsic type as expected by this runtime. -pub type UncheckedExtrinsic = generic::UncheckedExtrinsic; +pub type UncheckedExtrinsic = + generic::UncheckedExtrinsic; /// Executive: handles dispatch to the various modules. pub type Executive = frame_executive::Executive< Runtime, @@ -1158,7 +1165,7 @@ pub type Executive = frame_executive::Executive< pallet_nomination_pools::migration::v3::MigrateToV3, >; /// The payload being signed in transactions. -pub type SignedPayload = generic::SignedPayload; +pub type SignedPayload = generic::SignedPayload; #[cfg(feature = "runtime-benchmarks")] #[macro_use] @@ -1319,7 +1326,7 @@ sp_api::impl_runtime_apis! { fn candidate_events() -> Vec> { parachains_runtime_api_impl::candidate_events::(|ev| { match ev { - Event::ParaInclusion(ev) => { + RuntimeEvent::ParaInclusion(ev) => { Some(ev) } _ => None, @@ -1552,13 +1559,13 @@ sp_api::impl_runtime_apis! { } } - impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi + impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentCallApi for Runtime { - fn query_call_info(call: Call, len: u32) -> RuntimeDispatchInfo { + fn query_call_info(call: RuntimeCall, len: u32) -> RuntimeDispatchInfo { TransactionPayment::query_call_info(call, len) } - fn query_call_fee_details(call: Call, len: u32) -> FeeDetails { + fn query_call_fee_details(call: RuntimeCall, len: u32) -> FeeDetails { TransactionPayment::query_call_fee_details(call, len) } } @@ -1687,7 +1694,7 @@ sp_api::impl_runtime_apis! { } impl pallet_xcm_benchmarks::generic::Config for Runtime { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { (0u64, Response::Version(Default::default())) diff --git a/runtime/westend/src/tests.rs b/runtime/westend/src/tests.rs index 0257be0529a0..385bf55caaa6 100644 --- a/runtime/westend/src/tests.rs +++ b/runtime/westend/src/tests.rs @@ -43,9 +43,9 @@ fn sample_size_is_sensible() { #[test] fn call_size() { assert!( - core::mem::size_of::() <= 230, - "size of Call is more than 230 bytes: some calls have too big arguments, use Box to reduce \ - the size of Call. + core::mem::size_of::() <= 230, + "size of RuntimeCall is more than 230 bytes: some calls have too big arguments, use Box to reduce \ + the size of RuntimeCall. If the limit is too strong, maybe consider increase the limit to 300.", ); } diff --git a/runtime/westend/src/weights/xcm/mod.rs b/runtime/westend/src/weights/xcm/mod.rs index 87ac6cfe4a5a..81a657fc2ff7 100644 --- a/runtime/westend/src/weights/xcm/mod.rs +++ b/runtime/westend/src/weights/xcm/mod.rs @@ -72,8 +72,8 @@ impl WeighMultiAssets for MultiAssets { } } -pub struct WestendXcmWeight(core::marker::PhantomData); -impl XcmWeightInfo for WestendXcmWeight { +pub struct WestendXcmWeight(core::marker::PhantomData); +impl XcmWeightInfo for WestendXcmWeight { fn withdraw_asset(assets: &MultiAssets) -> XCMWeight { assets.weigh_multi_assets(XcmBalancesWeight::::withdraw_asset()) } @@ -99,7 +99,7 @@ impl XcmWeightInfo for WestendXcmWeight { fn transact( _origin_type: &OriginKind, _require_weight_at_most: &u64, - _call: &DoubleEncoded, + _call: &DoubleEncoded, ) -> XCMWeight { XcmGeneric::::transact().ref_time() } @@ -179,10 +179,10 @@ impl XcmWeightInfo for WestendXcmWeight { fn refund_surplus() -> XCMWeight { XcmGeneric::::refund_surplus().ref_time() } - fn set_error_handler(_xcm: &Xcm) -> XCMWeight { + fn set_error_handler(_xcm: &Xcm) -> XCMWeight { XcmGeneric::::set_error_handler().ref_time() } - fn set_appendix(_xcm: &Xcm) -> XCMWeight { + fn set_appendix(_xcm: &Xcm) -> XCMWeight { XcmGeneric::::set_appendix().ref_time() } fn clear_error() -> XCMWeight { diff --git a/runtime/westend/src/xcm_config.rs b/runtime/westend/src/xcm_config.rs index 867bdb2cacf3..36b9893662bb 100644 --- a/runtime/westend/src/xcm_config.rs +++ b/runtime/westend/src/xcm_config.rs @@ -17,8 +17,8 @@ //! XCM configurations for Westend. use super::{ - parachains_origin, weights, AccountId, Balances, Call, Event, Origin, ParaId, Runtime, - WeightToFee, XcmPallet, + parachains_origin, weights, AccountId, Balances, Origin, ParaId, Runtime, RuntimeCall, + RuntimeEvent, WeightToFee, XcmPallet, }; use frame_support::{ parameter_types, @@ -107,7 +107,7 @@ pub type Barrier = ( pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -115,7 +115,8 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = WeightInfoBounds, Call, MaxInstructions>; + type Weigher = + WeightInfoBounds, RuntimeCall, MaxInstructions>; type Trader = UsingComponents>; type ResponseHandler = XcmPallet; type AssetTrap = XcmPallet; @@ -131,7 +132,7 @@ pub type LocalOriginToLocation = ( ); impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... @@ -141,10 +142,11 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = xcm_executor::XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = WeightInfoBounds, Call, MaxInstructions>; + type Weigher = + WeightInfoBounds, RuntimeCall, MaxInstructions>; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/utils/staking-miner/src/main.rs b/utils/staking-miner/src/main.rs index 971e771e0073..7a6a0b71dbcb 100644 --- a/utils/staking-miner/src/main.rs +++ b/utils/staking-miner/src/main.rs @@ -94,7 +94,7 @@ macro_rules! construct_runtime_prelude { let crate::signer::Signer { account, pair, .. } = signer; let local_call = EPMCall::::submit { raw_solution: Box::new(raw_solution) }; - let call: Call = as std::convert::TryInto>::try_into(local_call) + let call: RuntimeCall = as std::convert::TryInto>::try_into(local_call) .expect("election provider pallet must exist in the runtime, thus \ inner call can be converted, qed." ); diff --git a/utils/staking-miner/src/monitor.rs b/utils/staking-miner/src/monitor.rs index 0553693a84ef..676440d018fd 100644 --- a/utils/staking-miner/src/monitor.rs +++ b/utils/staking-miner/src/monitor.rs @@ -377,7 +377,7 @@ macro_rules! monitor_cmd_for { ($runtime:tt) => { paste::paste! { ); let events = match rpc.get_storage_and_decode::< - Vec::Hash>>, + Vec::Hash>>, >(&key, Some(hash)) .await { Ok(rp) => rp.unwrap_or_default(), diff --git a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs index 39adedcb9d75..5accdb946e90 100644 --- a/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/fungible/mock.rs @@ -58,12 +58,12 @@ impl frame_system::Config for Test { type Index = u64; type BlockNumber = u64; type Hash = H256; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -86,7 +86,7 @@ impl pallet_balances::Config for Test { type ReserveIdentifier = [u8; 8]; type Balance = u64; type DustRemoval = (); - type Event = Event; + type RuntimeEvent = RuntimeEvent; type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; type WeightInfo = (); @@ -128,7 +128,7 @@ parameter_types! { pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = DevNull; type AssetTransactor = AssetTransactor; type OriginConverter = (); @@ -136,7 +136,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = xcm_builder::LocationInverter; type Barrier = AllowUnpaidExecutionFrom; - type Weigher = xcm_builder::FixedWeightBounds; + type Weigher = xcm_builder::FixedWeightBounds; type Trader = xcm_builder::FixedRateOfFungible; type ResponseHandler = DevNull; type AssetTrap = (); diff --git a/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs b/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs index e30f0bfab4c1..aed6140b3a4b 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/benchmarking.rs @@ -85,7 +85,7 @@ benchmarks! { transact { let origin = T::transact_origin()?; let mut executor = new_executor::(origin); - let noop_call: ::Call = frame_system::Call::remark_with_event { + let noop_call: ::RuntimeCall = frame_system::Call::remark_with_event { remark: Default::default() }.into(); let double_encoded_noop_call: DoubleEncoded<_> = noop_call.encode().into(); diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs index 3677a4a6c651..6c628ce5df54 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mock.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mock.rs @@ -64,12 +64,12 @@ impl frame_system::Config for Test { type Index = u64; type BlockNumber = u64; type Hash = H256; - type Call = Call; + type RuntimeCall = RuntimeCall; type Hashing = BlakeTwo256; type AccountId = u64; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type Version = (); type PalletInfo = PalletInfo; @@ -100,7 +100,7 @@ parameter_types! { pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = DevNull; type AssetTransactor = NoAssetTransactor; type OriginConverter = AlwaysSignedByDefault; @@ -108,7 +108,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = (); type LocationInverter = xcm_builder::LocationInverter; type Barrier = AllowUnpaidExecutionFrom; - type Weigher = xcm_builder::FixedWeightBounds; + type Weigher = xcm_builder::FixedWeightBounds; type Trader = xcm_builder::FixedRateOfFungible; type ResponseHandler = DevNull; type AssetTrap = TestAssetTrap; @@ -131,7 +131,7 @@ impl crate::Config for Test { } impl generic::Config for Test { - type Call = Call; + type RuntimeCall = RuntimeCall; fn worst_case_response() -> (u64, Response) { let assets: MultiAssets = (Concrete(Here.into()), 100).into(); diff --git a/xcm/pallet-xcm-benchmarks/src/generic/mod.rs b/xcm/pallet-xcm-benchmarks/src/generic/mod.rs index 270eaf896e7e..9b8b718c6bd4 100644 --- a/xcm/pallet-xcm-benchmarks/src/generic/mod.rs +++ b/xcm/pallet-xcm-benchmarks/src/generic/mod.rs @@ -12,7 +12,7 @@ pub mod pallet { #[pallet::config] pub trait Config: frame_system::Config + crate::Config { - type Call: Dispatchable + type RuntimeCall: Dispatchable + GetDispatchInfo + From> + Encode; diff --git a/xcm/pallet-xcm-benchmarks/src/lib.rs b/xcm/pallet-xcm-benchmarks/src/lib.rs index 8492dac5a622..352f7376ef46 100644 --- a/xcm/pallet-xcm-benchmarks/src/lib.rs +++ b/xcm/pallet-xcm-benchmarks/src/lib.rs @@ -54,11 +54,11 @@ const SEED: u32 = 0; /// The XCM executor to use for doing stuff. pub type ExecutorOf = xcm_executor::XcmExecutor<::XcmConfig>; /// The overarching call type. -pub type OverArchingCallOf = ::Call; +pub type OverArchingCallOf = ::RuntimeCall; /// The asset transactor of our executor pub type AssetTransactorOf = <::XcmConfig as xcm_executor::Config>::AssetTransactor; /// The call type of executor's config. Should eventually resolve to the same overarching call type. -pub type XcmCallOf = <::XcmConfig as xcm_executor::Config>::Call; +pub type XcmCallOf = <::XcmConfig as xcm_executor::Config>::RuntimeCall; pub fn mock_worst_case_holding() -> MultiAssets { const HOLDING_FUNGIBLES: u32 = 99; diff --git a/xcm/pallet-xcm/src/lib.rs b/xcm/pallet-xcm/src/lib.rs index dd075c69424d..5d297e144df1 100644 --- a/xcm/pallet-xcm/src/lib.rs +++ b/xcm/pallet-xcm/src/lib.rs @@ -71,7 +71,7 @@ pub mod pallet { /// The module configuration trait. pub trait Config: frame_system::Config { /// The overarching event type. - type Event: From> + IsType<::Event>; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; /// Required origin for sending XCM messages. If successful, it resolves to `MultiLocation` /// which exists as an interior location within this chain's XCM context. @@ -86,10 +86,10 @@ pub mod pallet { type ExecuteXcmOrigin: EnsureOrigin<::Origin, Success = MultiLocation>; /// Our XCM filter which messages to be executed using `XcmExecutor` must pass. - type XcmExecuteFilter: Contains<(MultiLocation, Xcm<::Call>)>; + type XcmExecuteFilter: Contains<(MultiLocation, Xcm<::RuntimeCall>)>; /// Something to execute an XCM message. - type XcmExecutor: ExecuteXcm<::Call>; + type XcmExecutor: ExecuteXcm<::RuntimeCall>; /// Our XCM filter which messages to be teleported using the dedicated extrinsic must pass. type XcmTeleportFilter: Contains<(MultiLocation, Vec)>; @@ -98,7 +98,7 @@ pub mod pallet { type XcmReserveTransferFilter: Contains<(MultiLocation, Vec)>; /// Means of measuring the weight consumed by an XCM message locally. - type Weigher: WeightBounds<::Call>; + type Weigher: WeightBounds<::RuntimeCall>; /// Means of inverting a location. type LocationInverter: InvertLocation; @@ -107,9 +107,9 @@ pub mod pallet { type Origin: From + From<::Origin>; /// The outer `Call` type. - type Call: Parameter + type RuntimeCall: Parameter + GetDispatchInfo - + IsType<::Call> + + IsType<::RuntimeCall> + Dispatchable::Origin, PostInfo = PostDispatchInfo>; const VERSION_DISCOVERY_QUEUE_SIZE: u32; @@ -564,7 +564,7 @@ pub mod pallet { #[pallet::weight(max_weight.saturating_add(Weight::from_ref_time(100_000_000u64)))] pub fn execute( origin: OriginFor, - message: Box::Call>>, + message: Box::RuntimeCall>>, max_weight: Weight, ) -> DispatchResultWithPostInfo { let origin_location = T::ExecuteXcmOrigin::ensure_origin(origin)?; @@ -1142,13 +1142,13 @@ pub mod pallet { pub fn report_outcome_notify( message: &mut Xcm<()>, responder: impl Into, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, timeout: T::BlockNumber, ) -> Result<(), XcmError> { let responder = responder.into(); let dest = T::LocationInverter::invert_location(&responder) .map_err(|()| XcmError::MultiLocationNotInvertible)?; - let notify: ::Call = notify.into(); + let notify: ::RuntimeCall = notify.into(); let max_response_weight = notify.get_dispatch_info().weight; let query_id = Self::new_notify_query(responder, notify, timeout); let report_error = Xcm(vec![ReportError { @@ -1169,7 +1169,7 @@ pub mod pallet { /// which will call a dispatchable when a response happens. pub fn new_notify_query( responder: impl Into, - notify: impl Into<::Call>, + notify: impl Into<::RuntimeCall>, timeout: T::BlockNumber, ) -> u64 { let notify = @@ -1214,10 +1214,10 @@ pub mod pallet { } impl WrapVersion for Pallet { - fn wrap_version( + fn wrap_version( dest: &MultiLocation, - xcm: impl Into>, - ) -> Result, ()> { + xcm: impl Into>, + ) -> Result, ()> { SupportedVersion::::get(XCM_VERSION, LatestVersionedMultiLocation(dest)) .or_else(|| { Self::note_unknown_version(dest); @@ -1399,9 +1399,9 @@ pub mod pallet { // be built by `(pallet_index: u8, call_index: u8, QueryId, Response)`. // So we just encode that and then re-encode to a real Call. let bare = (pallet_index, call_index, query_id, response); - if let Ok(call) = bare - .using_encoded(|mut bytes| ::Call::decode(&mut bytes)) - { + if let Ok(call) = bare.using_encoded(|mut bytes| { + ::RuntimeCall::decode(&mut bytes) + }) { Queries::::remove(query_id); let weight = call.get_dispatch_info().weight; let max_weight = Weight::from_ref_time(max_weight); diff --git a/xcm/pallet-xcm/src/mock.rs b/xcm/pallet-xcm/src/mock.rs index 5490f443a34b..a42d7f109136 100644 --- a/xcm/pallet-xcm/src/mock.rs +++ b/xcm/pallet-xcm/src/mock.rs @@ -51,10 +51,10 @@ pub mod pallet_test_notifier { #[pallet::config] pub trait Config: frame_system::Config + crate::Config { - type Event: IsType<::Event> + From>; + type RuntimeEvent: IsType<::RuntimeEvent> + From>; type Origin: IsType<::Origin> + Into::Origin>>; - type Call: IsType<::Call> + From>; + type RuntimeCall: IsType<::RuntimeCall> + From>; } #[pallet::event] @@ -97,7 +97,7 @@ pub mod pallet_test_notifier { Call::::notification_received { query_id: 0, response: Default::default() }; let qid = crate::Pallet::::new_notify_query( Junction::AccountId32 { network: Any, id }.into(), - ::Call::from(call), + ::RuntimeCall::from(call), 100u32.into(), ); Self::deposit_event(Event::::NotifyQueryPrepared(qid)); @@ -172,7 +172,7 @@ parameter_types! { impl frame_system::Config for Test { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -180,7 +180,7 @@ impl frame_system::Config for Test { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -206,7 +206,7 @@ parameter_types! { impl pallet_balances::Config for Test { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -251,7 +251,7 @@ pub type Barrier = ( pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = TestSendXcm; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -259,7 +259,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = Case; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = XcmPallet; type AssetTrap = XcmPallet; @@ -274,7 +274,7 @@ parameter_types! { } impl pallet_xcm::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = (TestSendXcmErrX8, TestSendXcm); type ExecuteXcmOrigin = xcm_builder::EnsureXcmOrigin; @@ -282,10 +282,10 @@ impl pallet_xcm::Config for Test { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = AdvertisedXcmVersion; } @@ -293,16 +293,16 @@ impl pallet_xcm::Config for Test { impl origin::Config for Test {} impl pallet_test_notifier::Config for Test { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; } -pub(crate) fn last_event() -> Event { - System::events().pop().expect("Event expected").event +pub(crate) fn last_event() -> RuntimeEvent { + System::events().pop().expect("RuntimeEvent expected").event } -pub(crate) fn last_events(n: usize) -> Vec { +pub(crate) fn last_events(n: usize) -> Vec { System::events().into_iter().map(|e| e.event).rev().take(n).rev().collect() } diff --git a/xcm/pallet-xcm/src/tests.rs b/xcm/pallet-xcm/src/tests.rs index b93d130a0f09..2e7703a062b4 100644 --- a/xcm/pallet-xcm/src/tests.rs +++ b/xcm/pallet-xcm/src/tests.rs @@ -50,7 +50,7 @@ fn report_outcome_notify_works() { query_id: 0, response: Default::default(), }; - let notify = Call::TestNotifier(call); + let notify = RuntimeCall::TestNotifier(call); new_test_ext_with_balances(balances).execute_with(|| { XcmPallet::report_outcome_notify(&mut message, Parachain(PARA_ID).into(), notify, 100) .unwrap(); @@ -85,12 +85,12 @@ fn report_outcome_notify_works() { assert_eq!( last_events(2), vec![ - Event::TestNotifier(pallet_test_notifier::Event::ResponseReceived( + RuntimeEvent::TestNotifier(pallet_test_notifier::Event::ResponseReceived( Parachain(PARA_ID).into(), 0, Response::ExecutionResult(None), )), - Event::XcmPallet(crate::Event::Notified(0, 4, 2)), + RuntimeEvent::XcmPallet(crate::Event::Notified(0, 4, 2)), ] ); assert_eq!(crate::Queries::::iter().collect::>(), vec![]); @@ -140,7 +140,10 @@ fn report_outcome_works() { assert_eq!(r, Outcome::Complete(1_000)); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::ResponseReady(0, Response::ExecutionResult(None),)) + RuntimeEvent::XcmPallet(crate::Event::ResponseReady( + 0, + Response::ExecutionResult(None), + )) ); let response = Some((Response::ExecutionResult(None), 1)); @@ -181,7 +184,7 @@ fn send_works() { ); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Sent(sender, RelayLocation::get(), message)) + RuntimeEvent::XcmPallet(crate::Event::Sent(sender, RelayLocation::get(), message)) ); }); } @@ -253,7 +256,7 @@ fn teleport_assets_works() { let _check_v0_ok: xcm::v0::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -297,7 +300,7 @@ fn limmited_teleport_assets_works() { let _check_v0_ok: xcm::v0::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -339,7 +342,7 @@ fn unlimmited_teleport_assets_works() { ); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -387,7 +390,7 @@ fn reserve_transfer_assets_works() { let _check_v0_ok: xcm::v0::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -436,7 +439,7 @@ fn limited_reserve_transfer_assets_works() { let _check_v0_ok: xcm::v0::Xcm<()> = versioned_sent.try_into().unwrap(); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -483,7 +486,7 @@ fn unlimited_reserve_transfer_assets_works() { ); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -516,7 +519,7 @@ fn execute_withdraw_to_deposit_works() { assert_eq!(Balances::total_balance(&BOB), SEND_AMOUNT); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete(weight))) ); }); } @@ -552,8 +555,8 @@ fn trapped_assets_can_be_claimed() { assert_eq!( last_events(2), vec![ - Event::XcmPallet(crate::Event::AssetsTrapped(hash.clone(), source, vma)), - Event::XcmPallet(crate::Event::Attempted(Outcome::Complete( + RuntimeEvent::XcmPallet(crate::Event::AssetsTrapped(hash.clone(), source, vma)), + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Complete( 5 * BaseXcmWeight::get() ))) ] @@ -591,7 +594,7 @@ fn trapped_assets_can_be_claimed() { )); assert_eq!( last_event(), - Event::XcmPallet(crate::Event::Attempted(Outcome::Incomplete( + RuntimeEvent::XcmPallet(crate::Event::Attempted(Outcome::Incomplete( BaseXcmWeight::get(), XcmError::UnknownClaim ))) diff --git a/xcm/src/lib.rs b/xcm/src/lib.rs index 37157f2c3499..6396f2228e33 100644 --- a/xcm/src/lib.rs +++ b/xcm/src/lib.rs @@ -308,11 +308,11 @@ impl TryFrom for v1::MultiAssets { #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum VersionedXcm { - V0(v0::Xcm), - V1(v1::Xcm), - V2(v2::Xcm), +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum VersionedXcm { + V0(v0::Xcm), + V1(v1::Xcm), + V2(v2::Xcm), } impl IntoVersion for VersionedXcm { @@ -326,27 +326,27 @@ impl IntoVersion for VersionedXcm { } } -impl From> for VersionedXcm { - fn from(x: v0::Xcm) -> Self { +impl From> for VersionedXcm { + fn from(x: v0::Xcm) -> Self { VersionedXcm::V0(x) } } -impl From> for VersionedXcm { - fn from(x: v1::Xcm) -> Self { +impl From> for VersionedXcm { + fn from(x: v1::Xcm) -> Self { VersionedXcm::V1(x) } } -impl From> for VersionedXcm { - fn from(x: v2::Xcm) -> Self { +impl From> for VersionedXcm { + fn from(x: v2::Xcm) -> Self { VersionedXcm::V2(x) } } -impl TryFrom> for v0::Xcm { +impl TryFrom> for v0::Xcm { type Error = (); - fn try_from(x: VersionedXcm) -> Result { + fn try_from(x: VersionedXcm) -> Result { use VersionedXcm::*; match x { V0(x) => Ok(x), @@ -356,9 +356,9 @@ impl TryFrom> for v0::Xcm { } } -impl TryFrom> for v1::Xcm { +impl TryFrom> for v1::Xcm { type Error = (); - fn try_from(x: VersionedXcm) -> Result { + fn try_from(x: VersionedXcm) -> Result { use VersionedXcm::*; match x { V0(x) => x.try_into(), @@ -368,9 +368,9 @@ impl TryFrom> for v1::Xcm { } } -impl TryFrom> for v2::Xcm { +impl TryFrom> for v2::Xcm { type Error = (); - fn try_from(x: VersionedXcm) -> Result { + fn try_from(x: VersionedXcm) -> Result { use VersionedXcm::*; match x { V0(x) => V1(x.try_into()?).try_into(), @@ -382,18 +382,18 @@ impl TryFrom> for v2::Xcm { /// Convert an `Xcm` datum into a `VersionedXcm`, based on a destination `MultiLocation` which will interpret it. pub trait WrapVersion { - fn wrap_version( + fn wrap_version( dest: &latest::MultiLocation, - xcm: impl Into>, - ) -> Result, ()>; + xcm: impl Into>, + ) -> Result, ()>; } /// `()` implementation does nothing with the XCM, just sending with whatever version it was authored as. impl WrapVersion for () { - fn wrap_version( + fn wrap_version( _: &latest::MultiLocation, - xcm: impl Into>, - ) -> Result, ()> { + xcm: impl Into>, + ) -> Result, ()> { Ok(xcm.into()) } } @@ -401,33 +401,33 @@ impl WrapVersion for () { /// `WrapVersion` implementation which attempts to always convert the XCM to version 0 before wrapping it. pub struct AlwaysV0; impl WrapVersion for AlwaysV0 { - fn wrap_version( + fn wrap_version( _: &latest::MultiLocation, - xcm: impl Into>, - ) -> Result, ()> { - Ok(VersionedXcm::::V0(xcm.into().try_into()?)) + xcm: impl Into>, + ) -> Result, ()> { + Ok(VersionedXcm::::V0(xcm.into().try_into()?)) } } /// `WrapVersion` implementation which attempts to always convert the XCM to version 1 before wrapping it. pub struct AlwaysV1; impl WrapVersion for AlwaysV1 { - fn wrap_version( + fn wrap_version( _: &latest::MultiLocation, - xcm: impl Into>, - ) -> Result, ()> { - Ok(VersionedXcm::::V1(xcm.into().try_into()?)) + xcm: impl Into>, + ) -> Result, ()> { + Ok(VersionedXcm::::V1(xcm.into().try_into()?)) } } /// `WrapVersion` implementation which attempts to always convert the XCM to version 2 before wrapping it. pub struct AlwaysV2; impl WrapVersion for AlwaysV2 { - fn wrap_version( + fn wrap_version( _: &latest::MultiLocation, - xcm: impl Into>, - ) -> Result, ()> { - Ok(VersionedXcm::::V2(xcm.into().try_into()?)) + xcm: impl Into>, + ) -> Result, ()> { + Ok(VersionedXcm::::V2(xcm.into().try_into()?)) } } diff --git a/xcm/src/v0/mod.rs b/xcm/src/v0/mod.rs index 08db57c2e061..2a7bd3625bb0 100644 --- a/xcm/src/v0/mod.rs +++ b/xcm/src/v0/mod.rs @@ -97,8 +97,8 @@ pub enum Response { #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum Xcm { +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum Xcm { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into `holding`. Execute the /// orders (`effects`). /// @@ -109,7 +109,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 0)] - WithdrawAsset { assets: Vec, effects: Vec> }, + WithdrawAsset { assets: Vec, effects: Vec> }, /// Asset(s) (`assets`) have been received into the ownership of this system on the `origin` system. /// @@ -126,7 +126,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 1)] - ReserveAssetDeposit { assets: Vec, effects: Vec> }, + ReserveAssetDeposit { assets: Vec, effects: Vec> }, /// Asset(s) (`assets`) have been destroyed on the `origin` system and equivalent assets should be /// created on this system. @@ -144,7 +144,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 2)] - TeleportAsset { assets: Vec, effects: Vec> }, + TeleportAsset { assets: Vec, effects: Vec> }, /// Indication of the contents of the holding account corresponding to the `QueryHolding` order of `query_id`. /// @@ -209,7 +209,11 @@ pub enum Xcm { /// /// Errors: #[codec(index = 6)] - Transact { origin_type: OriginKind, require_weight_at_most: u64, call: DoubleEncoded }, + Transact { + origin_type: OriginKind, + require_weight_at_most: u64, + call: DoubleEncoded, + }, /// A message to notify about a new incoming HRMP channel. This message is meant to be sent by the /// relay-chain to a para. @@ -276,10 +280,10 @@ pub enum Xcm { /// /// Errors: #[codec(index = 10)] - RelayedFrom { who: MultiLocation, message: alloc::boxed::Box> }, + RelayedFrom { who: MultiLocation, message: alloc::boxed::Box> }, } -impl Xcm { +impl Xcm { pub fn into(self) -> Xcm { Xcm::from(self) } @@ -330,9 +334,9 @@ impl TryFrom for Response { } } -impl TryFrom> for Xcm { +impl TryFrom> for Xcm { type Error = (); - fn try_from(x: Xcm1) -> result::Result, ()> { + fn try_from(x: Xcm1) -> result::Result, ()> { use Xcm::*; Ok(match x { Xcm1::WithdrawAsset { assets, effects } => WithdrawAsset { diff --git a/xcm/src/v0/order.rs b/xcm/src/v0/order.rs index c55a61f6ffe9..306610c28c9c 100644 --- a/xcm/src/v0/order.rs +++ b/xcm/src/v0/order.rs @@ -27,8 +27,8 @@ use parity_scale_codec::{self, Decode, Encode}; #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum Order { +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum Order { /// Do nothing. Not generally used. #[codec(index = 0)] Null, @@ -122,7 +122,7 @@ pub enum Order { weight: u64, debt: u64, halt_on_error: bool, - xcm: Vec>, + xcm: Vec>, }, } @@ -130,7 +130,7 @@ pub mod opaque { pub type Order = super::Order<()>; } -impl Order { +impl Order { pub fn into(self) -> Order { Order::from(self) } @@ -155,9 +155,9 @@ impl Order { } } -impl TryFrom> for Order { +impl TryFrom> for Order { type Error = (); - fn try_from(old: Order1) -> result::Result, ()> { + fn try_from(old: Order1) -> result::Result, ()> { use Order::*; Ok(match old { Order1::Noop => Null, @@ -195,7 +195,7 @@ impl TryFrom> for Order { Order1::BuyExecution { fees, weight, debt, halt_on_error, instructions } => { let xcm = instructions .into_iter() - .map(Xcm::::try_from) + .map(Xcm::::try_from) .collect::>()?; BuyExecution { fees: fees.try_into()?, weight, debt, halt_on_error, xcm } }, diff --git a/xcm/src/v0/traits.rs b/xcm/src/v0/traits.rs index cfbc6a2e6a8f..ace93ef64ff5 100644 --- a/xcm/src/v0/traits.rs +++ b/xcm/src/v0/traits.rs @@ -139,11 +139,15 @@ impl Outcome { } /// Type of XCM message executor. -pub trait ExecuteXcm { +pub trait ExecuteXcm { /// Execute some XCM `message` from `origin` using no more than `weight_limit` weight. The weight limit is /// a basic hard-limit and the implementation may place further restrictions or requirements on weight and /// other aspects. - fn execute_xcm(origin: MultiLocation, message: Xcm, weight_limit: Weight) -> Outcome { + fn execute_xcm( + origin: MultiLocation, + message: Xcm, + weight_limit: Weight, + ) -> Outcome { log::debug!( target: "xcm::execute_xcm", "origin: {:?}, message: {:?}, weight_limit: {:?}", @@ -160,7 +164,7 @@ pub trait ExecuteXcm { /// execution without associated payment. fn execute_xcm_in_credit( origin: MultiLocation, - message: Xcm, + message: Xcm, weight_limit: Weight, weight_credit: Weight, ) -> Outcome; diff --git a/xcm/src/v1/mod.rs b/xcm/src/v1/mod.rs index 83b1124904e5..7703425149a4 100644 --- a/xcm/src/v1/mod.rs +++ b/xcm/src/v1/mod.rs @@ -136,8 +136,8 @@ pub enum Response { #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum Xcm { +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum Xcm { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into `holding`. Execute the /// orders (`effects`). /// @@ -148,7 +148,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 0)] - WithdrawAsset { assets: MultiAssets, effects: Vec> }, + WithdrawAsset { assets: MultiAssets, effects: Vec> }, /// Asset(s) (`assets`) have been received into the ownership of this system on the `origin` system. /// @@ -165,7 +165,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 1)] - ReserveAssetDeposited { assets: MultiAssets, effects: Vec> }, + ReserveAssetDeposited { assets: MultiAssets, effects: Vec> }, /// Asset(s) (`assets`) have been destroyed on the `origin` system and equivalent assets should be /// created on this system. @@ -183,7 +183,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 2)] - ReceiveTeleportedAsset { assets: MultiAssets, effects: Vec> }, + ReceiveTeleportedAsset { assets: MultiAssets, effects: Vec> }, /// Indication of the contents of the holding register corresponding to the `QueryHolding` order of `query_id`. /// @@ -249,7 +249,11 @@ pub enum Xcm { /// /// Errors: #[codec(index = 6)] - Transact { origin_type: OriginKind, require_weight_at_most: u64, call: DoubleEncoded }, + Transact { + origin_type: OriginKind, + require_weight_at_most: u64, + call: DoubleEncoded, + }, /// A message to notify about a new incoming HRMP channel. This message is meant to be sent by the /// relay-chain to a para. @@ -313,7 +317,7 @@ pub enum Xcm { /// /// Errors: #[codec(index = 10)] - RelayedFrom { who: InteriorMultiLocation, message: alloc::boxed::Box> }, + RelayedFrom { who: InteriorMultiLocation, message: alloc::boxed::Box> }, /// Ask the destination system to respond with the most recent version of XCM that they /// support in a `QueryResponse` instruction. Any changes to this should also elicit similar @@ -335,7 +339,7 @@ pub enum Xcm { UnsubscribeVersion, } -impl Xcm { +impl Xcm { pub fn into(self) -> Xcm { Xcm::from(self) } @@ -390,9 +394,9 @@ impl TryFrom for Response { } } -impl TryFrom> for Xcm { +impl TryFrom> for Xcm { type Error = (); - fn try_from(old: OldXcm) -> result::Result, ()> { + fn try_from(old: OldXcm) -> result::Result, ()> { use Xcm::*; Ok(match old { OldXcm::WithdrawAsset { assets, effects } => WithdrawAsset { @@ -443,9 +447,9 @@ impl TryFrom> for Xcm { } } -impl TryFrom> for Xcm { +impl TryFrom> for Xcm { type Error = (); - fn try_from(old: NewXcm) -> result::Result, ()> { + fn try_from(old: NewXcm) -> result::Result, ()> { use Xcm::*; let mut iter = old.0.into_iter(); let instruction = iter.next().ok_or(())?; diff --git a/xcm/src/v1/order.rs b/xcm/src/v1/order.rs index f97e56f653f4..3076e2d43c36 100644 --- a/xcm/src/v1/order.rs +++ b/xcm/src/v1/order.rs @@ -29,8 +29,8 @@ use scale_info::TypeInfo; #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum Order { +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum Order { /// Do nothing. Not generally used. #[codec(index = 0)] Noop, @@ -148,7 +148,7 @@ pub enum Order { weight: u64, debt: u64, halt_on_error: bool, - instructions: Vec>, + instructions: Vec>, }, } @@ -156,7 +156,7 @@ pub mod opaque { pub type Order = super::Order<()>; } -impl Order { +impl Order { pub fn into(self) -> Order { Order::from(self) } @@ -182,9 +182,9 @@ impl Order { } } -impl TryFrom> for Order { +impl TryFrom> for Order { type Error = (); - fn try_from(old: OldOrder) -> result::Result, ()> { + fn try_from(old: OldOrder) -> result::Result, ()> { use Order::*; Ok(match old { OldOrder::Null => Noop, @@ -224,17 +224,19 @@ impl TryFrom> for Order { OldOrder::QueryHolding { query_id, dest, assets } => QueryHolding { query_id, dest: dest.try_into()?, assets: assets.try_into()? }, OldOrder::BuyExecution { fees, weight, debt, halt_on_error, xcm } => { - let instructions = - xcm.into_iter().map(Xcm::::try_from).collect::>()?; + let instructions = xcm + .into_iter() + .map(Xcm::::try_from) + .collect::>()?; BuyExecution { fees: fees.try_into()?, weight, debt, halt_on_error, instructions } }, }) } } -impl TryFrom> for Order { +impl TryFrom> for Order { type Error = (); - fn try_from(old: Instruction) -> result::Result, ()> { + fn try_from(old: Instruction) -> result::Result, ()> { use Order::*; Ok(match old { Instruction::DepositAsset { assets, max_assets, beneficiary } => diff --git a/xcm/src/v1/traits.rs b/xcm/src/v1/traits.rs index 33b60455b0b2..e4b3542d41a4 100644 --- a/xcm/src/v1/traits.rs +++ b/xcm/src/v1/traits.rs @@ -142,13 +142,13 @@ impl Outcome { } /// Type of XCM message executor. -pub trait ExecuteXcm { +pub trait ExecuteXcm { /// Execute some XCM `message` from `origin` using no more than `weight_limit` weight. The weight limit is /// a basic hard-limit and the implementation may place further restrictions or requirements on weight and /// other aspects. fn execute_xcm( origin: impl Into, - message: Xcm, + message: Xcm, weight_limit: Weight, ) -> Outcome { let origin = origin.into(); @@ -168,7 +168,7 @@ pub trait ExecuteXcm { /// execution without associated payment. fn execute_xcm_in_credit( origin: impl Into, - message: Xcm, + message: Xcm, weight_limit: Weight, weight_credit: Weight, ) -> Outcome; diff --git a/xcm/src/v2/mod.rs b/xcm/src/v2/mod.rs index 94e9ddf3817d..50f15689fc2c 100644 --- a/xcm/src/v2/mod.rs +++ b/xcm/src/v2/mod.rs @@ -78,10 +78,10 @@ pub type QueryId = u64; #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub struct Xcm(pub Vec>); +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub struct Xcm(pub Vec>); -impl Xcm { +impl Xcm { /// Create an empty instance. pub fn new() -> Self { Self(vec![]) @@ -108,17 +108,17 @@ impl Xcm { } /// Return the first instruction, if any. - pub fn first(&self) -> Option<&Instruction> { + pub fn first(&self) -> Option<&Instruction> { self.0.first() } /// Return the last instruction, if any. - pub fn last(&self) -> Option<&Instruction> { + pub fn last(&self) -> Option<&Instruction> { self.0.last() } /// Return the only instruction, contained in `Self`, iff only one exists (`None` otherwise). - pub fn only(&self) -> Option<&Instruction> { + pub fn only(&self) -> Option<&Instruction> { if self.0.len() == 1 { self.0.first() } else { @@ -128,7 +128,7 @@ impl Xcm { /// Return the only instruction, contained in `Self`, iff only one exists (returns `self` /// otherwise). - pub fn into_only(mut self) -> core::result::Result, Self> { + pub fn into_only(mut self) -> core::result::Result, Self> { if self.0.len() == 1 { self.0.pop().ok_or(self) } else { @@ -233,8 +233,8 @@ pub type Weight = u64; #[derivative(Clone(bound = ""), Eq(bound = ""), PartialEq(bound = ""), Debug(bound = ""))] #[codec(encode_bound())] #[codec(decode_bound())] -#[scale_info(bounds(), skip_type_params(Call))] -pub enum Instruction { +#[scale_info(bounds(), skip_type_params(RuntimeCall))] +pub enum Instruction { /// Withdraw asset(s) (`assets`) from the ownership of `origin` and place them into the Holding /// Register. /// @@ -340,7 +340,7 @@ pub enum Instruction { origin_type: OriginKind, #[codec(compact)] require_weight_at_most: u64, - call: DoubleEncoded, + call: DoubleEncoded, }, /// A message to notify about a new incoming HRMP channel. This message is meant to be sent by the @@ -584,7 +584,7 @@ pub enum Instruction { /// Kind: *Instruction* /// /// Errors: None. - SetErrorHandler(Xcm), + SetErrorHandler(Xcm), /// Set the Appendix Register. This is code that should be called after code execution /// (including the error handler if any) is finished. This will be called regardless of whether @@ -600,7 +600,7 @@ pub enum Instruction { /// Kind: *Instruction* /// /// Errors: None. - SetAppendix(Xcm), + SetAppendix(Xcm), /// Clear the Error Register. /// @@ -647,16 +647,16 @@ pub enum Instruction { UnsubscribeVersion, } -impl Xcm { +impl Xcm { pub fn into(self) -> Xcm { Xcm::from(self) } pub fn from(xcm: Xcm) -> Self { - Self(xcm.0.into_iter().map(Instruction::::from).collect()) + Self(xcm.0.into_iter().map(Instruction::::from).collect()) } } -impl Instruction { +impl Instruction { pub fn into(self) -> Instruction { Instruction::from(self) } @@ -707,7 +707,7 @@ impl Instruction { } // TODO: Automate Generation -impl> GetWeight for Instruction { +impl> GetWeight for Instruction { fn weight(&self) -> Weight { use Instruction::*; match self { @@ -775,9 +775,9 @@ impl TryFrom for Response { } } -impl TryFrom> for Xcm { +impl TryFrom> for Xcm { type Error = (); - fn try_from(old: OldXcm) -> result::Result, ()> { + fn try_from(old: OldXcm) -> result::Result, ()> { use Instruction::*; Ok(Xcm(match old { OldXcm::WithdrawAsset { assets, effects } => Some(Ok(WithdrawAsset(assets))) @@ -827,9 +827,9 @@ impl TryFrom> for Xcm { } } -impl TryFrom> for Instruction { +impl TryFrom> for Instruction { type Error = (); - fn try_from(old: OldOrder) -> result::Result, ()> { + fn try_from(old: OldOrder) -> result::Result, ()> { use Instruction::*; Ok(match old { OldOrder::Noop => return Err(()), diff --git a/xcm/src/v2/traits.rs b/xcm/src/v2/traits.rs index 059def0b7259..94d48034fc36 100644 --- a/xcm/src/v2/traits.rs +++ b/xcm/src/v2/traits.rs @@ -160,13 +160,13 @@ impl Outcome { } /// Type of XCM message executor. -pub trait ExecuteXcm { +pub trait ExecuteXcm { /// Execute some XCM `message` from `origin` using no more than `weight_limit` weight. The weight limit is /// a basic hard-limit and the implementation may place further restrictions or requirements on weight and /// other aspects. fn execute_xcm( origin: impl Into, - message: Xcm, + message: Xcm, weight_limit: Weight, ) -> Outcome { let origin = origin.into(); @@ -186,7 +186,7 @@ pub trait ExecuteXcm { /// execution without associated payment. fn execute_xcm_in_credit( origin: impl Into, - message: Xcm, + message: Xcm, weight_limit: Weight, weight_credit: Weight, ) -> Outcome; diff --git a/xcm/xcm-builder/src/barriers.rs b/xcm/xcm-builder/src/barriers.rs index 67f46f3e5c1c..ce830554f3b5 100644 --- a/xcm/xcm-builder/src/barriers.rs +++ b/xcm/xcm-builder/src/barriers.rs @@ -31,9 +31,9 @@ use xcm_executor::traits::{OnResponse, ShouldExecute}; /// out of the local chain to another one. pub struct TakeWeightCredit; impl ShouldExecute for TakeWeightCredit { - fn should_execute( + fn should_execute( _origin: &MultiLocation, - _message: &mut Xcm, + _message: &mut Xcm, max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -54,9 +54,9 @@ impl ShouldExecute for TakeWeightCredit { /// because they are the only ones that place assets in the Holding Register to pay for execution. pub struct AllowTopLevelPaidExecutionFrom(PhantomData); impl> ShouldExecute for AllowTopLevelPaidExecutionFrom { - fn should_execute( + fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut Xcm, max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -97,9 +97,9 @@ impl> ShouldExecute for AllowTopLevelPaidExecutionFro /// Use only for executions from trusted origin groups. pub struct AllowUnpaidExecutionFrom(PhantomData); impl> ShouldExecute for AllowUnpaidExecutionFrom { - fn should_execute( + fn should_execute( origin: &MultiLocation, - _message: &mut Xcm, + _message: &mut Xcm, _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -128,9 +128,9 @@ impl> Contains for IsChildSystemPara /// Allows only messages if the generic `ResponseHandler` expects them via `expecting_response`. pub struct AllowKnownQueryResponses(PhantomData); impl ShouldExecute for AllowKnownQueryResponses { - fn should_execute( + fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut Xcm, _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { @@ -152,9 +152,9 @@ impl ShouldExecute for AllowKnownQueryResponses(PhantomData); impl> ShouldExecute for AllowSubscriptionsFrom { - fn should_execute( + fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut Xcm, _max_weight: Weight, _weight_credit: &mut Weight, ) -> Result<(), ()> { diff --git a/xcm/xcm-builder/src/mock.rs b/xcm/xcm-builder/src/mock.rs index bb5a958ae1af..b1de9a4fdf16 100644 --- a/xcm/xcm-builder/src/mock.rs +++ b/xcm/xcm-builder/src/mock.rs @@ -277,7 +277,7 @@ pub type TestBarrier = ( pub struct TestConfig; impl Config for TestConfig { - type Call = TestCall; + type RuntimeCall = TestCall; type XcmSender = TestSendXcm; type AssetTransactor = TestAssetTransactor; type OriginConverter = TestOriginConverter; diff --git a/xcm/xcm-builder/tests/mock/mod.rs b/xcm/xcm-builder/tests/mock/mod.rs index 7f6b31891b7e..f5f7cf6a1959 100644 --- a/xcm/xcm-builder/tests/mock/mod.rs +++ b/xcm/xcm-builder/tests/mock/mod.rs @@ -62,7 +62,7 @@ parameter_types! { impl frame_system::Config for Runtime { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -70,7 +70,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -96,7 +96,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -160,7 +160,7 @@ pub type TrustedTeleporters = (xcm_builder::Case,); pub struct XcmConfig; impl xcm_executor::Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = TestSendXcm; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -168,7 +168,7 @@ impl xcm_executor::Config for XcmConfig { type IsTeleporter = TrustedTeleporters; type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = XcmPallet; type AssetTrap = XcmPallet; @@ -179,7 +179,7 @@ impl xcm_executor::Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type LocationInverter = LocationInverter; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = TestSendXcm; @@ -189,8 +189,8 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; - type Call = Call; + type Weigher = FixedWeightBounds; + type RuntimeCall = RuntimeCall; type Origin = Origin; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; diff --git a/xcm/xcm-executor/integration-tests/src/lib.rs b/xcm/xcm-executor/integration-tests/src/lib.rs index f74ff1963f91..6d263fe46245 100644 --- a/xcm/xcm-executor/integration-tests/src/lib.rs +++ b/xcm/xcm-executor/integration-tests/src/lib.rs @@ -45,7 +45,7 @@ fn basic_buy_fees_message_executes() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + polkadot_test_runtime::RuntimeCall::Xcm(pallet_xcm::Call::execute { message: Box::new(VersionedXcm::from(msg)), max_weight: Weight::from_ref_time(1_000_000_000), }), @@ -67,9 +67,9 @@ fn basic_buy_fees_message_executes() { .inspect_state(|| { assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!( r.event, - polkadot_test_runtime::Event::Xcm(pallet_xcm::Event::Attempted(Outcome::Complete( - _ - ))), + polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::Attempted( + Outcome::Complete(_) + )), ))); }); } @@ -78,7 +78,7 @@ fn basic_buy_fees_message_executes() { fn query_response_fires() { use pallet_test_notifier::Event::*; use pallet_xcm::QueryStatus; - use polkadot_test_runtime::Event::TestNotifier; + use polkadot_test_runtime::RuntimeEvent::TestNotifier; sp_tracing::try_init_simple(); let mut client = TestClientBuilder::new() @@ -89,7 +89,9 @@ fn query_response_fires() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::TestNotifier(pallet_test_notifier::Call::prepare_new_query {}), + polkadot_test_runtime::RuntimeCall::TestNotifier( + pallet_test_notifier::Call::prepare_new_query {}, + ), sp_keyring::Sr25519Keyring::Alice, 0, ); @@ -125,7 +127,7 @@ fn query_response_fires() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + polkadot_test_runtime::RuntimeCall::Xcm(pallet_xcm::Call::execute { message: msg, max_weight: Weight::from_ref_time(1_000_000_000), }), @@ -147,7 +149,7 @@ fn query_response_fires() { .inspect_state(|| { assert!(polkadot_test_runtime::System::events().iter().any(|r| matches!( r.event, - polkadot_test_runtime::Event::Xcm(pallet_xcm::Event::ResponseReady( + polkadot_test_runtime::RuntimeEvent::Xcm(pallet_xcm::Event::ResponseReady( q, Response::ExecutionResult(None), )) if q == query_id, @@ -165,7 +167,7 @@ fn query_response_fires() { #[test] fn query_response_elicits_handler() { use pallet_test_notifier::Event::*; - use polkadot_test_runtime::Event::TestNotifier; + use polkadot_test_runtime::RuntimeEvent::TestNotifier; sp_tracing::try_init_simple(); let mut client = TestClientBuilder::new() @@ -176,7 +178,7 @@ fn query_response_elicits_handler() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::TestNotifier( + polkadot_test_runtime::RuntimeCall::TestNotifier( pallet_test_notifier::Call::prepare_new_notify_query {}, ), sp_keyring::Sr25519Keyring::Alice, @@ -213,7 +215,7 @@ fn query_response_elicits_handler() { let execute = construct_extrinsic( &client, - polkadot_test_runtime::Call::Xcm(pallet_xcm::Call::execute { + polkadot_test_runtime::RuntimeCall::Xcm(pallet_xcm::Call::execute { message: Box::new(VersionedXcm::from(msg)), max_weight: Weight::from_ref_time(1_000_000_000), }), diff --git a/xcm/xcm-executor/src/config.rs b/xcm/xcm-executor/src/config.rs index e7d81dc8328c..5f9021f7018c 100644 --- a/xcm/xcm-executor/src/config.rs +++ b/xcm/xcm-executor/src/config.rs @@ -27,7 +27,7 @@ use xcm::latest::SendXcm; /// The trait to parameterize the `XcmExecutor`. pub trait Config { /// The outer call dispatch type. - type Call: Parameter + Dispatchable + GetDispatchInfo; + type RuntimeCall: Parameter + Dispatchable + GetDispatchInfo; /// How to send an onward XCM message. type XcmSender: SendXcm; @@ -36,7 +36,7 @@ pub trait Config { type AssetTransactor: TransactAsset; /// How to get a call origin from a `OriginKind` value. - type OriginConverter: ConvertOrigin<::Origin>; + type OriginConverter: ConvertOrigin<::Origin>; /// Combinations of (Location, Asset) pairs which we trust as reserves. type IsReserve: FilterAssetLocation; @@ -51,7 +51,7 @@ pub trait Config { type Barrier: ShouldExecute; /// The means of determining an XCM message's weight. - type Weigher: WeightBounds; + type Weigher: WeightBounds; /// The means of purchasing weight credit for XCM execution. type Trader: WeightTrader; diff --git a/xcm/xcm-executor/src/lib.rs b/xcm/xcm-executor/src/lib.rs index 6e1f0eb3c1bb..94b234cf3501 100644 --- a/xcm/xcm-executor/src/lib.rs +++ b/xcm/xcm-executor/src/lib.rs @@ -51,9 +51,9 @@ pub struct XcmExecutor { /// the weight of dynamically determined instructions such as `Transact`). pub total_surplus: u64, pub total_refunded: u64, - pub error_handler: Xcm, + pub error_handler: Xcm, pub error_handler_weight: u64, - pub appendix: Xcm, + pub appendix: Xcm, pub appendix_weight: u64, _config: PhantomData, } @@ -61,10 +61,10 @@ pub struct XcmExecutor { /// The maximum recursion limit for `execute_xcm` and `execute_effects`. pub const MAX_RECURSION_LIMIT: u32 = 8; -impl ExecuteXcm for XcmExecutor { +impl ExecuteXcm for XcmExecutor { fn execute_xcm_in_credit( origin: impl Into, - mut message: Xcm, + mut message: Xcm, weight_limit: Weight, mut weight_credit: Weight, ) -> Outcome { @@ -180,7 +180,7 @@ impl XcmExecutor { /// Execute the XCM program fragment and report back the error and which instruction caused it, /// or `Ok` if there was no error. - pub fn execute(&mut self, xcm: Xcm) -> Result<(), ExecutorError> { + pub fn execute(&mut self, xcm: Xcm) -> Result<(), ExecutorError> { log::trace!( target: "xcm::execute", "origin: {:?}, total_surplus/refunded: {:?}/{:?}, error_handler_weight: {:?}", @@ -231,8 +231,8 @@ impl XcmExecutor { } /// Remove the registered error handler and return it. Do not refund its weight. - fn take_error_handler(&mut self) -> Xcm { - let mut r = Xcm::(vec![]); + fn take_error_handler(&mut self) -> Xcm { + let mut r = Xcm::(vec![]); sp_std::mem::swap(&mut self.error_handler, &mut r); self.error_handler_weight = 0; r @@ -240,14 +240,14 @@ impl XcmExecutor { /// Drop the registered error handler and refund its weight. fn drop_error_handler(&mut self) { - self.error_handler = Xcm::(vec![]); + self.error_handler = Xcm::(vec![]); self.total_surplus.saturating_accrue(self.error_handler_weight); self.error_handler_weight = 0; } /// Remove the registered appendix and return it. - fn take_appendix(&mut self) -> Xcm { - let mut r = Xcm::(vec![]); + fn take_appendix(&mut self) -> Xcm { + let mut r = Xcm::(vec![]); sp_std::mem::swap(&mut self.appendix, &mut r); self.appendix_weight = 0; r @@ -265,7 +265,10 @@ impl XcmExecutor { } /// Process a single XCM instruction, mutating the state of the XCM virtual machine. - fn process_instruction(&mut self, instr: Instruction) -> Result<(), XcmError> { + fn process_instruction( + &mut self, + instr: Instruction, + ) -> Result<(), XcmError> { match instr { WithdrawAsset(assets) => { // Take `assets` from the origin account (on-chain) and place in holding. diff --git a/xcm/xcm-executor/src/traits/should_execute.rs b/xcm/xcm-executor/src/traits/should_execute.rs index ecfed6119408..ca3283467cfb 100644 --- a/xcm/xcm-executor/src/traits/should_execute.rs +++ b/xcm/xcm-executor/src/traits/should_execute.rs @@ -30,9 +30,9 @@ pub trait ShouldExecute { /// - `weight_credit`: The pre-established amount of weight that the system has determined this /// message may utilize in its execution. Typically non-zero only because of prior fee /// payment, but could in principle be due to other factors. - fn should_execute( + fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut Xcm, max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()>; @@ -40,9 +40,9 @@ pub trait ShouldExecute { #[impl_trait_for_tuples::impl_for_tuples(30)] impl ShouldExecute for Tuple { - fn should_execute( + fn should_execute( origin: &MultiLocation, - message: &mut Xcm, + message: &mut Xcm, max_weight: Weight, weight_credit: &mut Weight, ) -> Result<(), ()> { diff --git a/xcm/xcm-executor/src/traits/weight.rs b/xcm/xcm-executor/src/traits/weight.rs index 91bdd5ec2965..76f411e5c1f5 100644 --- a/xcm/xcm-executor/src/traits/weight.rs +++ b/xcm/xcm-executor/src/traits/weight.rs @@ -19,14 +19,14 @@ use sp_std::result::Result; use xcm::latest::{prelude::*, Weight}; /// Determine the weight of an XCM message. -pub trait WeightBounds { +pub trait WeightBounds { /// Return the maximum amount of weight that an attempted execution of this message could /// consume. - fn weight(message: &mut Xcm) -> Result; + fn weight(message: &mut Xcm) -> Result; /// Return the maximum amount of weight that an attempted execution of this instruction could /// consume. - fn instr_weight(instruction: &Instruction) -> Result; + fn instr_weight(instruction: &Instruction) -> Result; } /// A means of getting approximate weight consumption for a given destination message executor and a diff --git a/xcm/xcm-simulator/example/src/lib.rs b/xcm/xcm-simulator/example/src/lib.rs index 741732cc797a..1782a69e8de6 100644 --- a/xcm/xcm-simulator/example/src/lib.rs +++ b/xcm/xcm-simulator/example/src/lib.rs @@ -118,10 +118,9 @@ mod tests { fn dmp() { MockNet::reset(); - let remark = - parachain::Call::System(frame_system::Call::::remark_with_event { - remark: vec![1, 2, 3], - }); + let remark = parachain::RuntimeCall::System( + frame_system::Call::::remark_with_event { remark: vec![1, 2, 3] }, + ); Relay::execute_with(|| { assert_ok!(RelayChainPalletXcm::send_xcm( Here, @@ -135,10 +134,11 @@ mod tests { }); ParaA::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -146,7 +146,7 @@ mod tests { fn ump() { MockNet::reset(); - let remark = relay_chain::Call::System( + let remark = relay_chain::RuntimeCall::System( frame_system::Call::::remark_with_event { remark: vec![1, 2, 3] }, ); ParaA::execute_with(|| { @@ -162,10 +162,11 @@ mod tests { }); Relay::execute_with(|| { - use relay_chain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use relay_chain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } @@ -173,10 +174,9 @@ mod tests { fn xcmp() { MockNet::reset(); - let remark = - parachain::Call::System(frame_system::Call::::remark_with_event { - remark: vec![1, 2, 3], - }); + let remark = parachain::RuntimeCall::System( + frame_system::Call::::remark_with_event { remark: vec![1, 2, 3] }, + ); ParaA::execute_with(|| { assert_ok!(ParachainPalletXcm::send_xcm( Here, @@ -190,10 +190,11 @@ mod tests { }); ParaB::execute_with(|| { - use parachain::{Event, System}; - assert!(System::events() - .iter() - .any(|r| matches!(r.event, Event::System(frame_system::Event::Remarked { .. })))); + use parachain::{RuntimeEvent, System}; + assert!(System::events().iter().any(|r| matches!( + r.event, + RuntimeEvent::System(frame_system::Event::Remarked { .. }) + ))); }); } diff --git a/xcm/xcm-simulator/example/src/parachain.rs b/xcm/xcm-simulator/example/src/parachain.rs index 6b47e42a12c2..77322054a258 100644 --- a/xcm/xcm-simulator/example/src/parachain.rs +++ b/xcm/xcm-simulator/example/src/parachain.rs @@ -53,7 +53,7 @@ parameter_types! { impl frame_system::Config for Runtime { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -61,7 +61,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -87,7 +87,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -133,7 +133,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; @@ -141,7 +141,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type AssetTrap = (); @@ -156,8 +156,8 @@ pub mod mock_msg_queue { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; - type XcmExecutor: ExecuteXcm; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmExecutor: ExecuteXcm; } #[pallet::call] @@ -175,7 +175,7 @@ pub mod mock_msg_queue { #[pallet::storage] #[pallet::getter(fn received_dmp)] /// A queue of received DMP messages - pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; + pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; impl Get for Pallet { fn get() -> ParaId { @@ -215,11 +215,11 @@ pub mod mock_msg_queue { fn handle_xcmp_message( sender: ParaId, _sent_at: RelayBlockNumber, - xcm: VersionedXcm, + xcm: VersionedXcm, max_weight: Weight, ) -> Result { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); - let (result, event) = match Xcm::::try_from(xcm) { + let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { let location = (1, Parachain(sender.into())); match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) { @@ -251,7 +251,9 @@ pub mod mock_msg_queue { let mut remaining_fragments = &data_ref[..]; while !remaining_fragments.is_empty() { - if let Ok(xcm) = VersionedXcm::::decode(&mut remaining_fragments) { + if let Ok(xcm) = + VersionedXcm::::decode(&mut remaining_fragments) + { let _ = Self::handle_xcmp_message(sender, sent_at, xcm, max_weight); } else { debug_assert!(false, "Invalid incoming XCMP message data"); @@ -269,8 +271,8 @@ pub mod mock_msg_queue { ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { let id = sp_io::hashing::blake2_256(&data[..]); - let maybe_msg = - VersionedXcm::::decode(&mut &data[..]).map(Xcm::::try_from); + let maybe_msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); match maybe_msg { Err(_) => { Self::deposit_event(Event::InvalidFormat(id)); @@ -292,14 +294,14 @@ pub mod mock_msg_queue { } impl mock_msg_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; @@ -307,10 +309,10 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/xcm/xcm-simulator/example/src/relay_chain.rs b/xcm/xcm-simulator/example/src/relay_chain.rs index 3ba65bc2938a..f664947487f6 100644 --- a/xcm/xcm-simulator/example/src/relay_chain.rs +++ b/xcm/xcm-simulator/example/src/relay_chain.rs @@ -43,7 +43,7 @@ parameter_types! { impl frame_system::Config for Runtime { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -51,7 +51,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -77,7 +77,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -124,7 +124,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -132,7 +132,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type AssetTrap = (); @@ -143,7 +143,7 @@ impl Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... @@ -152,10 +152,10 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -165,7 +165,7 @@ parameter_types! { } impl ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot; diff --git a/xcm/xcm-simulator/fuzzer/src/parachain.rs b/xcm/xcm-simulator/fuzzer/src/parachain.rs index fa6014bc7865..25a20e97fc37 100644 --- a/xcm/xcm-simulator/fuzzer/src/parachain.rs +++ b/xcm/xcm-simulator/fuzzer/src/parachain.rs @@ -53,7 +53,7 @@ parameter_types! { impl frame_system::Config for Runtime { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -61,7 +61,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -87,7 +87,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -133,7 +133,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = XcmOriginToCallOrigin; @@ -141,7 +141,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type AssetTrap = (); @@ -156,8 +156,8 @@ pub mod mock_msg_queue { #[pallet::config] pub trait Config: frame_system::Config { - type Event: From> + IsType<::Event>; - type XcmExecutor: ExecuteXcm; + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + type XcmExecutor: ExecuteXcm; } #[pallet::call] @@ -175,7 +175,7 @@ pub mod mock_msg_queue { #[pallet::storage] #[pallet::getter(fn received_dmp)] /// A queue of received DMP messages - pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; + pub(super) type ReceivedDmp = StorageValue<_, Vec>, ValueQuery>; impl Get for Pallet { fn get() -> ParaId { @@ -215,11 +215,11 @@ pub mod mock_msg_queue { fn handle_xcmp_message( sender: ParaId, _sent_at: RelayBlockNumber, - xcm: VersionedXcm, + xcm: VersionedXcm, max_weight: Weight, ) -> Result { let hash = Encode::using_encoded(&xcm, T::Hashing::hash); - let (result, event) = match Xcm::::try_from(xcm) { + let (result, event) = match Xcm::::try_from(xcm) { Ok(xcm) => { let location = MultiLocation::new(1, X1(Parachain(sender.into()))); match T::XcmExecutor::execute_xcm(location, xcm, max_weight.ref_time()) { @@ -251,7 +251,9 @@ pub mod mock_msg_queue { let mut remaining_fragments = &data_ref[..]; while !remaining_fragments.is_empty() { - if let Ok(xcm) = VersionedXcm::::decode(&mut remaining_fragments) { + if let Ok(xcm) = + VersionedXcm::::decode(&mut remaining_fragments) + { let _ = Self::handle_xcmp_message(sender, sent_at, xcm, max_weight); } else { debug_assert!(false, "Invalid incoming XCMP message data"); @@ -269,8 +271,8 @@ pub mod mock_msg_queue { ) -> Weight { for (_i, (_sent_at, data)) in iter.enumerate() { let id = sp_io::hashing::blake2_256(&data[..]); - let maybe_msg = - VersionedXcm::::decode(&mut &data[..]).map(Xcm::::try_from); + let maybe_msg = VersionedXcm::::decode(&mut &data[..]) + .map(Xcm::::try_from); match maybe_msg { Err(_) => { Self::deposit_event(Event::InvalidFormat(id)); @@ -292,14 +294,14 @@ pub mod mock_msg_queue { } impl mock_msg_queue::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type XcmExecutor = XcmExecutor; } pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = EnsureXcmOrigin; type XcmRouter = XcmRouter; type ExecuteXcmOrigin = EnsureXcmOrigin; @@ -307,10 +309,10 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Nothing; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } diff --git a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs index 3ba65bc2938a..f664947487f6 100644 --- a/xcm/xcm-simulator/fuzzer/src/relay_chain.rs +++ b/xcm/xcm-simulator/fuzzer/src/relay_chain.rs @@ -43,7 +43,7 @@ parameter_types! { impl frame_system::Config for Runtime { type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; type Index = u64; type BlockNumber = u64; type Hash = H256; @@ -51,7 +51,7 @@ impl frame_system::Config for Runtime { type AccountId = AccountId; type Lookup = IdentityLookup; type Header = Header; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type BlockHashCount = BlockHashCount; type BlockWeights = (); type BlockLength = (); @@ -77,7 +77,7 @@ parameter_types! { impl pallet_balances::Config for Runtime { type MaxLocks = MaxLocks; type Balance = Balance; - type Event = Event; + type RuntimeEvent = RuntimeEvent; type DustRemoval = (); type ExistentialDeposit = ExistentialDeposit; type AccountStore = System; @@ -124,7 +124,7 @@ pub type Barrier = AllowUnpaidExecutionFrom; pub struct XcmConfig; impl Config for XcmConfig { - type Call = Call; + type RuntimeCall = RuntimeCall; type XcmSender = XcmRouter; type AssetTransactor = LocalAssetTransactor; type OriginConverter = LocalOriginConverter; @@ -132,7 +132,7 @@ impl Config for XcmConfig { type IsTeleporter = (); type LocationInverter = LocationInverter; type Barrier = Barrier; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type Trader = FixedRateOfFungible; type ResponseHandler = (); type AssetTrap = (); @@ -143,7 +143,7 @@ impl Config for XcmConfig { pub type LocalOriginToLocation = SignedToAccountId32; impl pallet_xcm::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type SendXcmOrigin = xcm_builder::EnsureXcmOrigin; type XcmRouter = XcmRouter; // Anyone can execute XCM messages locally... @@ -152,10 +152,10 @@ impl pallet_xcm::Config for Runtime { type XcmExecutor = XcmExecutor; type XcmTeleportFilter = Everything; type XcmReserveTransferFilter = Everything; - type Weigher = FixedWeightBounds; + type Weigher = FixedWeightBounds; type LocationInverter = LocationInverter; type Origin = Origin; - type Call = Call; + type RuntimeCall = RuntimeCall; const VERSION_DISCOVERY_QUEUE_SIZE: u32 = 100; type AdvertisedXcmVersion = pallet_xcm::CurrentXcmVersion; } @@ -165,7 +165,7 @@ parameter_types! { } impl ump::Config for Runtime { - type Event = Event; + type RuntimeEvent = RuntimeEvent; type UmpSink = ump::XcmSink, Runtime>; type FirstMessageFactorPercent = FirstMessageFactorPercent; type ExecuteOverweightOrigin = frame_system::EnsureRoot;