diff --git a/Cargo.lock b/Cargo.lock index c103365e4..10f9eadf6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2136,7 +2136,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", ] @@ -2159,7 +2159,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2182,7 +2182,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "array-bytes", @@ -2234,7 +2234,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -2245,7 +2245,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -2262,7 +2262,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -2291,7 +2291,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "env_logger 0.9.3", "futures", @@ -2310,7 +2310,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "frame-metadata", @@ -2342,7 +2342,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "cfg-expr", @@ -2356,7 +2356,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -2368,7 +2368,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -2378,7 +2378,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "log", @@ -2396,7 +2396,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -2411,7 +2411,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -2420,7 +2420,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "parity-scale-codec", @@ -4279,7 +4279,7 @@ dependencies = [ [[package]] name = "node-primitives" version = "2.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-system", "parity-scale-codec", @@ -4440,7 +4440,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -4456,7 +4456,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -4471,7 +4471,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4495,7 +4495,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4515,7 +4515,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4530,7 +4530,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4578,7 +4578,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4597,7 +4597,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4614,7 +4614,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "frame-benchmarking", @@ -4643,7 +4643,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bitflags 1.3.2", "parity-scale-codec", @@ -4655,7 +4655,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -4806,7 +4806,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4824,7 +4824,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4848,7 +4848,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4861,7 +4861,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4913,7 +4913,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -4931,7 +4931,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4954,7 +4954,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "enumflags2", "frame-benchmarking", @@ -4970,7 +4970,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -4990,7 +4990,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5007,7 +5007,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5024,7 +5024,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5040,7 +5040,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5057,7 +5057,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5077,7 +5077,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -5087,7 +5087,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5104,7 +5104,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5127,7 +5127,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5142,7 +5142,7 @@ dependencies = [ [[package]] name = "pallet-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5156,7 +5156,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5171,7 +5171,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5188,7 +5188,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5209,7 +5209,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5225,7 +5225,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5239,7 +5239,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -5262,7 +5262,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -5273,7 +5273,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5287,7 +5287,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5305,7 +5305,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5324,7 +5324,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-support", "frame-system", @@ -5340,7 +5340,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -5356,7 +5356,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -5368,7 +5368,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5385,7 +5385,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -5401,7 +5401,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-benchmarking", "frame-support", @@ -6504,7 +6504,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "sp-core", @@ -6515,7 +6515,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -6542,7 +6542,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "futures-timer", @@ -6565,7 +6565,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -6581,7 +6581,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "memmap2", @@ -6598,7 +6598,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6609,7 +6609,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "chrono", @@ -6649,7 +6649,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fnv", "futures", @@ -6677,7 +6677,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "kvdb", @@ -6702,7 +6702,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -6727,7 +6727,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "fork-tree", @@ -6768,7 +6768,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "jsonrpsee", @@ -6790,7 +6790,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "fork-tree", "parity-scale-codec", @@ -6803,7 +6803,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -6827,7 +6827,7 @@ dependencies = [ [[package]] name = "sc-consensus-uncles" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sc-client-api", "sp-authorship", @@ -6838,7 +6838,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "lru", "parity-scale-codec", @@ -6862,7 +6862,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -6875,7 +6875,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "sc-allocator", @@ -6888,7 +6888,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cfg-if", "libc", @@ -6905,7 +6905,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "array-bytes", @@ -6946,7 +6946,7 @@ dependencies = [ [[package]] name = "sc-finality-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "futures", @@ -6967,7 +6967,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term 0.12.1", "futures", @@ -6983,7 +6983,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "async-trait", @@ -6998,7 +6998,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "async-trait", @@ -7045,7 +7045,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "cid", "futures", @@ -7065,7 +7065,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "bitflags 1.3.2", @@ -7091,7 +7091,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "futures", @@ -7109,7 +7109,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "futures", @@ -7130,7 +7130,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "async-trait", @@ -7162,7 +7162,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "futures", @@ -7181,7 +7181,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "bytes", @@ -7211,7 +7211,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "libp2p", @@ -7224,7 +7224,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -7233,7 +7233,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "hash-db", @@ -7263,7 +7263,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "jsonrpsee", @@ -7286,7 +7286,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "http", @@ -7302,7 +7302,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "hex", @@ -7321,7 +7321,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "directories", @@ -7391,7 +7391,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "log", "parity-scale-codec", @@ -7403,7 +7403,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -7422,7 +7422,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "libc", @@ -7441,7 +7441,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "chrono", "futures", @@ -7459,7 +7459,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term 0.12.1", "atty", @@ -7490,7 +7490,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -7501,7 +7501,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -7527,7 +7527,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -7541,7 +7541,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "futures-timer", @@ -7968,7 +7968,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -7986,7 +7986,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "proc-macro-crate", @@ -7998,7 +7998,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8011,7 +8011,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "integer-sqrt", "num-traits", @@ -8026,7 +8026,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8039,7 +8039,7 @@ dependencies = [ [[package]] name = "sp-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "parity-scale-codec", @@ -8051,7 +8051,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-api", @@ -8063,7 +8063,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "log", @@ -8081,7 +8081,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -8100,7 +8100,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "merlin", @@ -8123,7 +8123,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8137,7 +8137,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8150,7 +8150,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "array-bytes", "base58", @@ -8195,7 +8195,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "blake2", "byteorder", @@ -8209,7 +8209,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -8220,7 +8220,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -8229,7 +8229,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro2", "quote", @@ -8239,7 +8239,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "environmental", "parity-scale-codec", @@ -8250,7 +8250,7 @@ dependencies = [ [[package]] name = "sp-finality-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "finality-grandpa", "log", @@ -8268,7 +8268,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -8282,7 +8282,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", "ed25519-dalek", @@ -8309,7 +8309,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "lazy_static", "sp-core", @@ -8320,7 +8320,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures", @@ -8337,7 +8337,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "thiserror", "zstd", @@ -8346,7 +8346,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8360,7 +8360,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-core", @@ -8370,7 +8370,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "backtrace", "lazy_static", @@ -8380,7 +8380,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "rustc-hash", "serde", @@ -8390,7 +8390,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "either", "hash256-std-hasher", @@ -8412,7 +8412,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -8430,7 +8430,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "Inflector", "proc-macro-crate", @@ -8442,7 +8442,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8456,7 +8456,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "scale-info", @@ -8468,7 +8468,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "hash-db", "log", @@ -8490,12 +8490,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8508,7 +8508,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "futures-timer", @@ -8524,7 +8524,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "sp-std", @@ -8536,7 +8536,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "sp-api", "sp-runtime", @@ -8545,7 +8545,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "log", @@ -8561,7 +8561,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ahash", "hash-db", @@ -8584,7 +8584,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-serde", "parity-scale-codec", @@ -8601,7 +8601,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -8612,7 +8612,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "log", @@ -8625,7 +8625,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -8772,7 +8772,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "platforms 2.0.0", ] @@ -8780,7 +8780,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -8801,7 +8801,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures-util", "hyper", @@ -8814,7 +8814,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "async-trait", "jsonrpsee", @@ -8827,7 +8827,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "jsonrpsee", "log", @@ -8848,7 +8848,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "futures", "substrate-test-utils-derive", @@ -8858,7 +8858,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -8869,7 +8869,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "ansi_term 0.12.1", "build-helper", @@ -9363,7 +9363,7 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" +source = "git+https://github.com/paritytech/substrate?branch=polkadot-v0.9.36#cb4f2491b00af7d7817f3a54209c26b20faa1f51" dependencies = [ "clap", "frame-remote-externalities", diff --git a/pallets/chainbridge/Cargo.toml b/pallets/chainbridge/Cargo.toml index 0537b3603..27e34a58d 100644 --- a/pallets/chainbridge/Cargo.toml +++ b/pallets/chainbridge/Cargo.toml @@ -34,4 +34,5 @@ std = [ "sp-io/std", "sp-std/std", "sp-core/std", + "sp-runtime/std", ] diff --git a/pallets/chainbridge/src/lib.rs b/pallets/chainbridge/src/lib.rs index 9972be688..a03bf2ee7 100644 --- a/pallets/chainbridge/src/lib.rs +++ b/pallets/chainbridge/src/lib.rs @@ -2,15 +2,21 @@ // Ensure we're `no_std` when compiling for Wasm. #![cfg_attr(not(feature = "std"), no_std)] +#[cfg(test)] +pub(crate) mod mock; +#[cfg(test)] +mod tests; + use codec::{Decode, Encode, EncodeLike}; use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, - dispatch::{DispatchResult, GetDispatchInfo, Pays, Weight}, + dispatch::{DispatchResult, GetDispatchInfo, Weight}, ensure, + pallet_prelude::*, traits::{EnsureOrigin, Get}, PalletId, Parameter, }; -use frame_system::{self as system, ensure_root, ensure_signed}; +use frame_system::{self as system, ensure_root, ensure_signed, pallet_prelude::*}; +pub use pallet::*; use sp_core::U256; use sp_runtime::{ traits::{AccountIdConversion, Dispatchable}, @@ -18,9 +24,6 @@ use sp_runtime::{ }; use sp_std::prelude::*; -mod mock; -mod tests; - const DEFAULT_RELAYER_THRESHOLD: u32 = 1; pub const MODULE_ID: PalletId = PalletId(*b"cb/bridg"); @@ -28,18 +31,6 @@ pub type ChainId = u8; pub type DepositNonce = u64; pub type ResourceId = [u8; 32]; -/// Helper function to concatenate a chain ID and some bytes to produce a resource ID. -/// The common format is (31 bytes unique ID + 1 byte chain ID). -pub fn derive_resource_id(chain: u8, id: &[u8]) -> ResourceId { - let mut r_id: ResourceId = [0; 32]; - r_id[31] = chain; // last byte is chain id - let range = if id.len() > 31 { 31 } else { id.len() }; // Use at most 31 bytes - for i in 0..range { - r_id[30 - i] = id[range - 1 - i]; // Ensure left padding for eth compatibility - } - r_id -} - #[derive(PartialEq, Eq, Clone, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)] pub enum ProposalStatus { Initiated, @@ -97,24 +88,116 @@ impl Default for ProposalVotes> + Into<::RuntimeEvent>; - /// Origin used to administer the pallet - type AdminOrigin: EnsureOrigin; - /// Proposed dispatchable call - type Proposal: Parameter - + Dispatchable - + EncodeLike - + GetDispatchInfo; - /// The identifier for this chain. - /// This must be unique and must not collide with existing IDs within a set of bridged chains. - type ChainId: Get; - - type ProposalLifetime: Get; +/// Helper function to concatenate a chain ID and some bytes to produce a resource ID. +/// The common format is (31 bytes unique ID + 1 byte chain ID). +pub fn derive_resource_id(chain: u8, id: &[u8]) -> ResourceId { + let mut r_id: ResourceId = [0; 32]; + r_id[31] = chain; // last byte is chain id + let range = if id.len() > 31 { 31 } else { id.len() }; // Use at most 31 bytes + for i in 0..range { + r_id[30 - i] = id[range - 1 - i]; // Ensure left padding for eth compatibility + } + r_id } -decl_error! { - pub enum Error for Module { +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + /// Simple ensure origin for the bridge account + pub struct EnsureBridge(sp_std::marker::PhantomData); + impl EnsureOrigin for EnsureBridge { + type Success = T::AccountId; + fn try_origin(o: T::RuntimeOrigin) -> Result { + let bridge_id = + AccountIdConversion::::into_account_truncating(&MODULE_ID); + o.into().and_then(|o| match o { + system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), + r => Err(T::RuntimeOrigin::from(r)), + }) + } + + #[cfg(feature = "runtime-benchmarks")] + fn successful_origin() -> T::RuntimeOrigin { + T::RuntimeOrigin::from(system::RawOrigin::Signed(>::account_id())) + } + } + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Origin used to administer the pallet + type AdminOrigin: EnsureOrigin; + /// Proposed dispatchable call + type Proposal: Parameter + + Dispatchable + + EncodeLike + + GetDispatchInfo; + /// The identifier for this chain. + /// This must be unique and must not collide with existing IDs within a set of bridged + /// chains. + type ChainId: Get; + + type ProposalLifetime: Get; + } + + /// All whitelisted chains and their respective transaction counts + #[pallet::storage] + #[pallet::getter(fn chains)] + pub type ChainNonces = StorageMap<_, Blake2_128Concat, ChainId, DepositNonce>; + + /// Tracks current relayer set + #[pallet::storage] + #[pallet::getter(fn relayers)] + pub type Relayers = StorageMap<_, Blake2_128Concat, T::AccountId, bool>; + + /// Utilized by the bridge software to map resource IDs to actual methods + #[pallet::storage] + #[pallet::getter(fn resources)] + pub type Resources = StorageMap<_, Blake2_128Concat, ResourceId, Vec>; + + /// All known proposals. + /// The key is the hash of the call and the deposit ID, to ensure it's unique + #[pallet::storage] + #[pallet::getter(fn votes)] + pub type Votes = StorageDoubleMap< + _, + Blake2_128Concat, + ChainId, + Blake2_128Concat, + (DepositNonce, T::Proposal), + ProposalVotes, + >; + + #[pallet::type_value] + pub fn DefaultRelayerThreshold() -> u32 { + DEFAULT_RELAYER_THRESHOLD + } + + /// Number of votes required for a proposal to execute + #[pallet::storage] + #[pallet::getter(fn relayer_threshold)] + pub type RelayerThreshold = + StorageValue>; + + #[pallet::type_value] + pub fn DefaultRelayerCount() -> u32 { + 0u32 + } + + /// Number of relayers in set + #[pallet::storage] + #[pallet::getter(fn relayer_count)] + pub type RelayerCount = + StorageValue>; + + #[pallet::error] + pub enum Error { /// Relayer threshold not set ThresholdNotSet, /// Provided chain Id is not valid @@ -146,54 +229,30 @@ decl_error! { /// Lifetime of proposal has been exceeded ProposalExpired, } -} - -decl_storage! { - trait Store for Module as ChainBridge { - /// All whitelisted chains and their respective transaction counts - ChainNonces get(fn chains): map hasher(opaque_blake2_256) ChainId => Option; - - /// Number of votes required for a proposal to execute - RelayerThreshold get(fn relayer_threshold): u32 = DEFAULT_RELAYER_THRESHOLD; - - /// Tracks current relayer set - pub Relayers get(fn relayers): map hasher(opaque_blake2_256) T::AccountId => bool; - - /// Number of relayers in set - pub RelayerCount get(fn relayer_count): u32; - - /// All known proposals. - /// The key is the hash of the call and the deposit ID, to ensure it's unique. - pub Votes get(fn votes): - double_map hasher(opaque_blake2_256) ChainId, hasher(opaque_blake2_256) (DepositNonce, T::Proposal) - => Option>; - - /// Utilized by the bridge software to map resource IDs to actual methods - pub Resources get(fn resources): - map hasher(opaque_blake2_256) ResourceId => Option> - } -} -decl_event!( - pub enum Event where ::AccountId { + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { /// Vote threshold has changed (new_threshold) RelayerThresholdChanged(u32), /// Chain now available for transfers (chain_id) ChainWhitelisted(ChainId), /// Relayer added to set - RelayerAdded(AccountId), + RelayerAdded(T::AccountId), /// Relayer removed from set - RelayerRemoved(AccountId), - /// FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, recipient, metadata) + RelayerRemoved(T::AccountId), + /// FunglibleTransfer is for relaying fungibles (dest_id, nonce, resource_id, amount, + /// recipient, metadata) FungibleTransfer(ChainId, DepositNonce, ResourceId, U256, Vec), - /// NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, recipient, metadata) + /// NonFungibleTransfer is for relaying NFTS (dest_id, nonce, resource_id, token_id, + /// recipient, metadata) NonFungibleTransfer(ChainId, DepositNonce, ResourceId, Vec, Vec, Vec), /// GenericTransfer is for a generic data payload (dest_id, nonce, resource_id, metadata) GenericTransfer(ChainId, DepositNonce, ResourceId, Vec), /// Vote submitted in favour of proposal - VoteFor(ChainId, DepositNonce, AccountId), + VoteFor(ChainId, DepositNonce, T::AccountId), /// Vot submitted against proposal - VoteAgainst(ChainId, DepositNonce, AccountId), + VoteAgainst(ChainId, DepositNonce, T::AccountId), /// Voting successful for a proposal ProposalApproved(ChainId, DepositNonce), /// Voting rejected a proposal @@ -203,18 +262,9 @@ decl_event!( /// Execution of call failed ProposalFailed(ChainId, DepositNonce), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - type Error = Error; - - const ChainIdentity: ChainId = T::ChainId::get(); - const ProposalLifetime: T::BlockNumber = T::ProposalLifetime::get(); - const BridgeAccountId: T::AccountId = AccountIdConversion::::into_account_truncating(&MODULE_ID); - - fn deposit_event() = default; + #[pallet::call] + impl Pallet { /// Sets the vote threshold for proposals. /// /// This threshold is used to determine how many votes are required @@ -223,8 +273,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn set_threshold(origin, threshold: u32) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn set_threshold(origin: OriginFor, threshold: u32) -> DispatchResult { Self::ensure_admin(origin)?; Self::set_relayer_threshold(threshold) } @@ -234,8 +285,13 @@ decl_module! { /// # /// - O(1) write /// # - #[weight = 195_000_000] - pub fn set_resource(origin, id: ResourceId, method: Vec) -> DispatchResult { + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn set_resource( + origin: OriginFor, + id: ResourceId, + method: Vec, + ) -> DispatchResult { Self::ensure_admin(origin)?; Self::register_resource(id, method) } @@ -248,8 +304,9 @@ decl_module! { /// # /// - O(1) removal /// # - #[weight = 195_000_000] - pub fn remove_resource(origin, id: ResourceId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn remove_resource(origin: OriginFor, id: ResourceId) -> DispatchResult { Self::ensure_admin(origin)?; Self::unregister_resource(id) } @@ -259,8 +316,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn whitelist_chain(origin, id: ChainId) -> DispatchResult { + #[pallet::call_index(3)] + #[pallet::weight(195_000_000)] + pub fn whitelist_chain(origin: OriginFor, id: ChainId) -> DispatchResult { Self::ensure_admin(origin)?; Self::whitelist(id) } @@ -270,8 +328,9 @@ decl_module! { /// # /// - O(1) lookup and insert /// # - #[weight = 195_000_000] - pub fn add_relayer(origin, v: T::AccountId) -> DispatchResult { + #[pallet::call_index(4)] + #[pallet::weight(195_000_000)] + pub fn add_relayer(origin: OriginFor, v: T::AccountId) -> DispatchResult { Self::ensure_admin(origin)?; Self::register_relayer(v) } @@ -281,8 +340,9 @@ decl_module! { /// # /// - O(1) lookup and removal /// # - #[weight = 195_000_000] - pub fn remove_relayer(origin, v: T::AccountId) -> DispatchResult { + #[pallet::call_index(5)] + #[pallet::weight(195_000_000)] + pub fn remove_relayer(origin: OriginFor, v: T::AccountId) -> DispatchResult { Self::ensure_admin(origin)?; Self::unregister_relayer(v) } @@ -295,8 +355,15 @@ decl_module! { /// # /// - weight of proposed call, regardless of whether execution is performed /// # - #[weight = (call.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64), call.get_dispatch_info().class, Pays::Yes)] - pub fn acknowledge_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(6)] + #[pallet::weight(call.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + pub fn acknowledge_proposal( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + r_id: ResourceId, + call: Box<::Proposal>, + ) -> DispatchResult { let who = ensure_signed(origin)?; ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); @@ -310,8 +377,15 @@ decl_module! { /// # /// - Fixed, since execution of proposal should not be included /// # - #[weight = 195_000_000] - pub fn reject_proposal(origin, nonce: DepositNonce, src_id: ChainId, r_id: ResourceId, call: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(7)] + #[pallet::weight(195_000_000)] + pub fn reject_proposal( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + r_id: ResourceId, + call: Box<::Proposal>, + ) -> DispatchResult { let who = ensure_signed(origin)?; ensure!(Self::is_relayer(&who), Error::::MustBeRelayer); ensure!(Self::chain_whitelisted(src_id), Error::::ChainNotWhitelisted); @@ -328,275 +402,264 @@ decl_module! { /// # /// - weight of proposed call, regardless of whether execution is performed /// # - #[weight = (prop.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64), prop.get_dispatch_info().class, Pays::Yes)] - pub fn eval_vote_state(origin, nonce: DepositNonce, src_id: ChainId, prop: Box<::Proposal>) -> DispatchResult { + #[pallet::call_index(8)] + #[pallet::weight(prop.get_dispatch_info().weight + Weight::from_ref_time(195_000_000_u64))] + pub fn eval_vote_state( + origin: OriginFor, + nonce: DepositNonce, + src_id: ChainId, + prop: Box<::Proposal>, + ) -> DispatchResult { ensure_signed(origin)?; Self::try_resolve_proposal(nonce, src_id, prop) } } -} - -impl Module { - // *** Utility methods *** - - pub fn ensure_admin(o: T::RuntimeOrigin) -> DispatchResult { - T::AdminOrigin::try_origin(o).map(|_| ()).or_else(ensure_root)?; - Ok(()) - } - /// Checks if who is a relayer - pub fn is_relayer(who: &T::AccountId) -> bool { - Self::relayers(who) - } + impl Pallet { + // *** Utility methods *** - /// Provides an AccountId for the pallet. - /// This is used both as an origin check and deposit/withdrawal account. - pub fn account_id() -> T::AccountId { - AccountIdConversion::::into_account_truncating(&MODULE_ID) - } + pub fn ensure_admin(o: T::RuntimeOrigin) -> DispatchResult { + T::AdminOrigin::try_origin(o).map(|_| ()).or_else(ensure_root)?; + Ok(()) + } - /// Asserts if a resource is registered - pub fn resource_exists(id: ResourceId) -> bool { - Self::resources(id).is_some() - } + /// Checks if who is a relayer + pub fn is_relayer(who: &T::AccountId) -> bool { + Self::relayers(who).unwrap_or(false) + } - /// Checks if a chain exists as a whitelisted destination - pub fn chain_whitelisted(id: ChainId) -> bool { - Self::chains(id).is_some() - } + /// Provides an AccountId for the pallet. + /// This is used both as an origin check and deposit/withdrawal account. + pub fn account_id() -> T::AccountId { + AccountIdConversion::::into_account_truncating(&MODULE_ID) + } - /// Increments the deposit nonce for the specified chain ID - fn bump_nonce(id: ChainId) -> DepositNonce { - let nonce = Self::chains(id).unwrap_or_default() + 1; - ::insert(id, nonce); - nonce - } + /// Asserts if a resource is registered + pub fn resource_exists(id: ResourceId) -> bool { + Self::resources(id).is_some() + } - // *** Admin methods *** + /// Checks if a chain exists as a whitelisted destination + pub fn chain_whitelisted(id: ChainId) -> bool { + Self::chains(id).is_some() + } - /// Set a new voting threshold - pub fn set_relayer_threshold(threshold: u32) -> DispatchResult { - ensure!(threshold > 0, Error::::InvalidThreshold); - ::put(threshold); - Self::deposit_event(RawEvent::RelayerThresholdChanged(threshold)); - Ok(()) - } + /// Increments the deposit nonce for the specified chain ID + fn bump_nonce(id: ChainId) -> DepositNonce { + let nonce = Self::chains(id).unwrap_or_default() + 1; + >::insert(id, nonce); + nonce + } - /// Register a method for a resource Id, enabling associated transfers - pub fn register_resource(id: ResourceId, method: Vec) -> DispatchResult { - ::insert(id, method); - Ok(()) - } + // *** Admin methods *** - /// Removes a resource ID, disabling associated transfer - pub fn unregister_resource(id: ResourceId) -> DispatchResult { - ::remove(id); - Ok(()) - } + /// Set a new voting threshold + pub fn set_relayer_threshold(threshold: u32) -> DispatchResult { + ensure!(threshold > 0, Error::::InvalidThreshold); + >::put(threshold); + Self::deposit_event(Event::RelayerThresholdChanged(threshold)); + Ok(()) + } - /// Whitelist a chain ID for transfer - pub fn whitelist(id: ChainId) -> DispatchResult { - // Cannot whitelist this chain - ensure!(id != T::ChainId::get(), Error::::InvalidChainId); - // Cannot whitelist with an existing entry - ensure!(!Self::chain_whitelisted(id), Error::::ChainAlreadyWhitelisted); - ::insert(id, 0); - Self::deposit_event(RawEvent::ChainWhitelisted(id)); - Ok(()) - } + /// Register a method for a resource Id, enabling associated transfers + pub fn register_resource(id: ResourceId, method: Vec) -> DispatchResult { + >::insert(id, method); + Ok(()) + } - /// Adds a new relayer to the set - pub fn register_relayer(relayer: T::AccountId) -> DispatchResult { - ensure!(!Self::is_relayer(&relayer), Error::::RelayerAlreadyExists); - >::insert(&relayer, true); - ::mutate(|i| *i += 1); + /// Removes a resource ID, disabling associated transfer + pub fn unregister_resource(id: ResourceId) -> DispatchResult { + >::remove(id); + Ok(()) + } - Self::deposit_event(RawEvent::RelayerAdded(relayer)); - Ok(()) - } + /// Whitelist a chain ID for transfer + pub fn whitelist(id: ChainId) -> DispatchResult { + // Cannot whitelist this chain + ensure!(id != T::ChainId::get(), Error::::InvalidChainId); + // Cannot whitelist with an existing entry + ensure!(!Self::chain_whitelisted(id), Error::::ChainAlreadyWhitelisted); + >::insert(id, 0); + Self::deposit_event(Event::ChainWhitelisted(id)); + Ok(()) + } - /// Removes a relayer from the set - pub fn unregister_relayer(relayer: T::AccountId) -> DispatchResult { - ensure!(Self::is_relayer(&relayer), Error::::RelayerInvalid); - >::remove(&relayer); - ::mutate(|i| *i -= 1); - Self::deposit_event(RawEvent::RelayerRemoved(relayer)); - Ok(()) - } + /// Adds a new relayer to the set + pub fn register_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!(!Self::is_relayer(&relayer), Error::::RelayerAlreadyExists); + >::insert(&relayer, true); + >::mutate(|i| *i += 1); - // *** Proposal voting and execution methods *** - - /// Commits a vote for a proposal. If the proposal doesn't exist it will be created. - fn commit_vote( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - in_favour: bool, - ) -> DispatchResult { - let now = >::block_number(); - let mut votes = match >::get(src_id, (nonce, prop.clone())) { - Some(v) => v, - None => { - let mut v = ProposalVotes::default(); - v.expiry = now + T::ProposalLifetime::get(); - v - }, - }; - - // Ensure the proposal isn't complete and relayer hasn't already voted - ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); - ensure!(!votes.is_expired(now), Error::::ProposalExpired); - ensure!(!votes.has_voted(&who), Error::::RelayerAlreadyVoted); - - if in_favour { - votes.votes_for.push(who.clone()); - Self::deposit_event(RawEvent::VoteFor(src_id, nonce, who)); - } else { - votes.votes_against.push(who.clone()); - Self::deposit_event(RawEvent::VoteAgainst(src_id, nonce, who)); + Self::deposit_event(Event::RelayerAdded(relayer)); + Ok(()) } - >::insert(src_id, (nonce, prop), votes.clone()); + /// Removes a relayer from the set + pub fn unregister_relayer(relayer: T::AccountId) -> DispatchResult { + ensure!(Self::is_relayer(&relayer), Error::::RelayerInvalid); + >::remove(&relayer); + >::mutate(|i| *i -= 1); + Self::deposit_event(Event::RelayerRemoved(relayer)); + Ok(()) + } - Ok(()) - } + // *** Proposal voting and execution methods *** - /// Attempts to finalize or cancel the proposal if the vote count allows. - fn try_resolve_proposal( - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - if let Some(mut votes) = >::get(src_id, (nonce, prop.clone())) { + /// Commits a vote for a proposal. If the proposal doesn't exist it will be created. + fn commit_vote( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + in_favour: bool, + ) -> DispatchResult { let now = >::block_number(); + let mut votes = match >::get(src_id, (nonce, prop.clone())) { + Some(v) => v, + None => { + let mut v = ProposalVotes::default(); + v.expiry = now + T::ProposalLifetime::get(); + v + }, + }; + + // Ensure the proposal isn't complete and relayer hasn't already voted ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); ensure!(!votes.is_expired(now), Error::::ProposalExpired); + ensure!(!votes.has_voted(&who), Error::::RelayerAlreadyVoted); + + if in_favour { + votes.votes_for.push(who.clone()); + Self::deposit_event(Event::VoteFor(src_id, nonce, who)); + } else { + votes.votes_against.push(who.clone()); + Self::deposit_event(Event::VoteAgainst(src_id, nonce, who)); + } - let status = votes.try_to_complete(::get(), ::get()); - >::insert(src_id, (nonce, prop.clone()), votes.clone()); + >::insert(src_id, (nonce, prop), votes.clone()); - match status { - ProposalStatus::Approved => Self::finalize_execution(src_id, nonce, prop), - ProposalStatus::Rejected => Self::cancel_execution(src_id, nonce), - _ => Ok(()), - } - } else { - Err(Error::::ProposalDoesNotExist)? + Ok(()) } - } - /// Commits a vote in favour of the proposal and executes it if the vote threshold is met. - fn vote_for( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - Self::commit_vote(who, nonce, src_id, prop.clone(), true)?; - Self::try_resolve_proposal(nonce, src_id, prop) - } - - /// Commits a vote against the proposal and cancels it if more than (relayers.len() - threshold) - /// votes against exist. - fn vote_against( - who: T::AccountId, - nonce: DepositNonce, - src_id: ChainId, - prop: Box, - ) -> DispatchResult { - Self::commit_vote(who, nonce, src_id, prop.clone(), false)?; - Self::try_resolve_proposal(nonce, src_id, prop) - } + /// Attempts to finalize or cancel the proposal if the vote count allows. + fn try_resolve_proposal( + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + if let Some(mut votes) = >::get(src_id, (nonce, prop.clone())) { + let now = >::block_number(); + ensure!(!votes.is_complete(), Error::::ProposalAlreadyComplete); + ensure!(!votes.is_expired(now), Error::::ProposalExpired); + + let status = + votes.try_to_complete(>::get(), >::get()); + >::insert(src_id, (nonce, prop.clone()), votes.clone()); + + match status { + ProposalStatus::Approved => Self::finalize_execution(src_id, nonce, prop), + ProposalStatus::Rejected => Self::cancel_execution(src_id, nonce), + _ => Ok(()), + } + } else { + Err(Error::::ProposalDoesNotExist)? + } + } - /// Execute the proposal and signals the result as an event - fn finalize_execution( - src_id: ChainId, - nonce: DepositNonce, - call: Box, - ) -> DispatchResult { - Self::deposit_event(RawEvent::ProposalApproved(src_id, nonce)); - call.dispatch(frame_system::RawOrigin::Signed(Self::account_id()).into()) - .map(|_| ()) - .map_err(|e| e.error)?; - Self::deposit_event(RawEvent::ProposalSucceeded(src_id, nonce)); - Ok(()) - } + /// Commits a vote in favour of the proposal and executes it if the vote threshold is met. + fn vote_for( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), true)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } - /// Cancels a proposal. - fn cancel_execution(src_id: ChainId, nonce: DepositNonce) -> DispatchResult { - Self::deposit_event(RawEvent::ProposalRejected(src_id, nonce)); - Ok(()) - } + /// Commits a vote against the proposal and cancels it if more than (relayers.len() - + /// threshold) votes against exist. + fn vote_against( + who: T::AccountId, + nonce: DepositNonce, + src_id: ChainId, + prop: Box, + ) -> DispatchResult { + Self::commit_vote(who, nonce, src_id, prop.clone(), false)?; + Self::try_resolve_proposal(nonce, src_id, prop) + } - /// Initiates a transfer of a fungible asset out of the chain. This should be called by another - /// pallet. - pub fn transfer_fungible( - dest_id: ChainId, - resource_id: ResourceId, - to: Vec, - amount: U256, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::FungibleTransfer(dest_id, nonce, resource_id, amount, to)); - Ok(()) - } + /// Execute the proposal and signals the result as an event + fn finalize_execution( + src_id: ChainId, + nonce: DepositNonce, + call: Box, + ) -> DispatchResult { + Self::deposit_event(Event::ProposalApproved(src_id, nonce)); + call.dispatch(frame_system::RawOrigin::Signed(Self::account_id()).into()) + .map(|_| ()) + .map_err(|e| e.error)?; + Self::deposit_event(Event::ProposalSucceeded(src_id, nonce)); + Ok(()) + } - /// Initiates a transfer of a nonfungible asset out of the chain. This should be called by - /// another pallet. - pub fn transfer_nonfungible( - dest_id: ChainId, - resource_id: ResourceId, - token_id: Vec, - to: Vec, - metadata: Vec, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::NonFungibleTransfer( - dest_id, - nonce, - resource_id, - token_id, - to, - metadata, - )); - Ok(()) - } + /// Cancels a proposal. + fn cancel_execution(src_id: ChainId, nonce: DepositNonce) -> DispatchResult { + Self::deposit_event(Event::ProposalRejected(src_id, nonce)); + Ok(()) + } - /// Initiates a transfer of generic data out of the chain. This should be called by another - /// pallet. - pub fn transfer_generic( - dest_id: ChainId, - resource_id: ResourceId, - metadata: Vec, - ) -> DispatchResult { - ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); - ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); - let nonce = Self::bump_nonce(dest_id); - Self::deposit_event(RawEvent::GenericTransfer(dest_id, nonce, resource_id, metadata)); - Ok(()) - } -} + /// Initiates a transfer of a fungible asset out of the chain. This should be called by + /// another pallet. + pub fn transfer_fungible( + dest_id: ChainId, + resource_id: ResourceId, + to: Vec, + amount: U256, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::FungibleTransfer(dest_id, nonce, resource_id, amount, to)); + Ok(()) + } -/// Simple ensure origin for the bridge account -pub struct EnsureBridge(sp_std::marker::PhantomData); -impl EnsureOrigin for EnsureBridge { - type Success = T::AccountId; - fn try_origin(o: T::RuntimeOrigin) -> Result { - let bridge_id = AccountIdConversion::::into_account_truncating(&MODULE_ID); - o.into().and_then(|o| match o { - system::RawOrigin::Signed(who) if who == bridge_id => Ok(bridge_id), - r => Err(T::RuntimeOrigin::from(r)), - }) - } + /// Initiates a transfer of a nonfungible asset out of the chain. This should be called by + /// another pallet. + pub fn transfer_nonfungible( + dest_id: ChainId, + resource_id: ResourceId, + token_id: Vec, + to: Vec, + metadata: Vec, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::NonFungibleTransfer( + dest_id, + nonce, + resource_id, + token_id, + to, + metadata, + )); + Ok(()) + } - #[cfg(feature = "runtime-benchmarks")] - fn successful_origin() -> T::RuntimeOrigin { - T::RuntimeOrigin::from(system::RawOrigin::Signed(>::account_id())) + /// Initiates a transfer of generic data out of the chain. This should be called by another + /// pallet. + pub fn transfer_generic( + dest_id: ChainId, + resource_id: ResourceId, + metadata: Vec, + ) -> DispatchResult { + ensure!(Self::chain_whitelisted(dest_id), Error::::ChainNotWhitelisted); + ensure!(Self::resource_exists(resource_id), Error::::ResourceDoesNotExist); + let nonce = Self::bump_nonce(dest_id); + Self::deposit_event(Event::GenericTransfer(dest_id, nonce, resource_id, metadata)); + Ok(()) + } } } diff --git a/pallets/chainbridge/src/mock.rs b/pallets/chainbridge/src/mock.rs index 33fd9c5c0..c980befec 100644 --- a/pallets/chainbridge/src/mock.rs +++ b/pallets/chainbridge/src/mock.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use frame_support::{ assert_ok, ord_parameter_types, parameter_types, traits::Everything, weights::Weight, }; @@ -12,8 +10,7 @@ use sp_runtime::{ Perbill, }; -use super::*; -use crate::{self as bridge, Config}; +use crate::{self as bridge, *}; parameter_types! { pub const BlockHashCount: u64 = 250; @@ -77,7 +74,7 @@ parameter_types! { pub const ProposalLifetime: u64 = 50; } -impl Config for Test { +impl crate::pallet::Config for Test { type RuntimeEvent = RuntimeEvent; type AdminOrigin = frame_system::EnsureRoot; type Proposal = RuntimeCall; @@ -94,7 +91,7 @@ frame_support::construct_runtime!( NodeBlock = Block, UncheckedExtrinsic = UncheckedExtrinsic { - System: system::{Pallet, Call, Event}, + System: system::{Pallet, Call, Config, Storage, Event}, Balances: balances::{Pallet, Call, Storage, Config, Event}, Bridge: bridge::{Pallet, Call, Storage, Event}, } diff --git a/pallets/chainbridge/src/tests.rs b/pallets/chainbridge/src/tests.rs index 673b33cb9..3263718b3 100644 --- a/pallets/chainbridge/src/tests.rs +++ b/pallets/chainbridge/src/tests.rs @@ -1,5 +1,3 @@ -#![cfg(test)] - use frame_support::{assert_noop, assert_ok}; use super::{ @@ -105,24 +103,24 @@ fn whitelist_chain() { Error::::InvalidChainId ); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(0))]); + assert_events(vec![(Event::ChainWhitelisted(0)).into()]); }) } #[test] fn set_get_threshold() { new_test_ext().execute_with(|| { - assert_eq!(::get(), 1); + assert_eq!(>::get(), 1); assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), TEST_THRESHOLD)); - assert_eq!(::get(), TEST_THRESHOLD); + assert_eq!(>::get(), TEST_THRESHOLD); assert_ok!(Bridge::set_threshold(RuntimeOrigin::root(), 5)); - assert_eq!(::get(), 5); + assert_eq!(>::get(), 5); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(TEST_THRESHOLD)), - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(5)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(TEST_THRESHOLD)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(5)), ]); }) } @@ -144,8 +142,8 @@ fn asset_transfer_success() { assert_ok!(Bridge::whitelist_chain(RuntimeOrigin::root(), dest_id)); assert_ok!(Bridge::transfer_fungible(dest_id, resource_id, to.clone(), amount.into())); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(dest_id)), - RuntimeEvent::Bridge(RawEvent::FungibleTransfer( + RuntimeEvent::Bridge(Event::ChainWhitelisted(dest_id)), + RuntimeEvent::Bridge(Event::FungibleTransfer( dest_id, 1, resource_id, @@ -161,22 +159,18 @@ fn asset_transfer_success() { to.clone(), metadata.clone() )); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::NonFungibleTransfer( + assert_events(vec![Event::NonFungibleTransfer( dest_id, 2, resource_id, token_id, to, metadata.clone(), - ))]); + ) + .into()]); assert_ok!(Bridge::transfer_generic(dest_id, resource_id, metadata.clone())); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::GenericTransfer( - dest_id, - 3, - resource_id, - metadata, - ))]); + assert_events(vec![Event::GenericTransfer(dest_id, 3, resource_id, metadata).into()]); }) } @@ -216,7 +210,7 @@ fn asset_transfer_invalid_chain() { let resource_id = [4; 32]; assert_ok!(Bridge::whitelist_chain(RuntimeOrigin::root(), chain_id)); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::ChainWhitelisted(chain_id))]); + assert_events(vec![Event::ChainWhitelisted(chain_id).into()]); assert_noop!( Bridge::transfer_fungible(bad_dest_id, resource_id, vec![], U256::zero()), @@ -262,10 +256,10 @@ fn add_remove_relayer() { assert_eq!(Bridge::relayer_count(), 2); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::RelayerAdded(RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::RelayerRemoved(RELAYER_B)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_A)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_B)), + RuntimeEvent::Bridge(Event::RelayerAdded(RELAYER_C)), + RuntimeEvent::Bridge(Event::RelayerRemoved(RELAYER_B)), ]); }) } @@ -335,11 +329,11 @@ fn create_sucessful_proposal() { assert_eq!(prop, expected); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::ProposalApproved(src_id, prop_id)), - RuntimeEvent::Bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_B)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_C)), + RuntimeEvent::Bridge(Event::ProposalApproved(src_id, prop_id)), + RuntimeEvent::Bridge(Event::ProposalSucceeded(src_id, prop_id)), ]); }) } @@ -408,10 +402,10 @@ fn create_unsucessful_proposal() { assert_eq!(Balances::free_balance(Bridge::account_id()), ENDOWED_BALANCE); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_B)), - RuntimeEvent::Bridge(RawEvent::VoteAgainst(src_id, prop_id, RELAYER_C)), - RuntimeEvent::Bridge(RawEvent::ProposalRejected(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_B)), + RuntimeEvent::Bridge(Event::VoteAgainst(src_id, prop_id, RELAYER_C)), + RuntimeEvent::Bridge(Event::ProposalRejected(src_id, prop_id)), ]); }) } @@ -466,10 +460,10 @@ fn execute_after_threshold_change() { assert_eq!(Balances::free_balance(Bridge::account_id()), ENDOWED_BALANCE); assert_events(vec![ - RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A)), - RuntimeEvent::Bridge(RawEvent::RelayerThresholdChanged(1)), - RuntimeEvent::Bridge(RawEvent::ProposalApproved(src_id, prop_id)), - RuntimeEvent::Bridge(RawEvent::ProposalSucceeded(src_id, prop_id)), + RuntimeEvent::Bridge(Event::VoteFor(src_id, prop_id, RELAYER_A)), + RuntimeEvent::Bridge(Event::RelayerThresholdChanged(1)), + RuntimeEvent::Bridge(Event::ProposalApproved(src_id, prop_id)), + RuntimeEvent::Bridge(Event::ProposalSucceeded(src_id, prop_id)), ]); }) } @@ -544,6 +538,6 @@ fn proposal_expires() { }; assert_eq!(prop, expected); - assert_events(vec![RuntimeEvent::Bridge(RawEvent::VoteFor(src_id, prop_id, RELAYER_A))]); + assert_events(vec![Event::VoteFor(src_id, prop_id, RELAYER_A).into()]); }) } diff --git a/pallets/erc20/src/lib.rs b/pallets/erc20/src/lib.rs index cdc37a064..6d3b9f07f 100644 --- a/pallets/erc20/src/lib.rs +++ b/pallets/erc20/src/lib.rs @@ -3,12 +3,13 @@ #![cfg_attr(not(feature = "std"), no_std)] use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, + pallet_prelude::*, traits::{Currency, EnsureOrigin, ExistenceRequirement::AllowDeath, Get}, }; -use frame_system::{self as system, ensure_signed}; +use frame_system::{ensure_signed, pallet_prelude::*}; +pub use pallet::*; use pallet_chainbridge as bridge; use pallet_erc721 as erc721; use sp_arithmetic::traits::SaturatedConversion; @@ -17,93 +18,118 @@ use sp_std::prelude::*; type ResourceId = bridge::ResourceId; -type BalanceOf = +pub type BalanceOf = <::Currency as Currency<::AccountId>>::Balance; -pub trait Config: system::Config + bridge::Config + erc721::Config { - type RuntimeEvent: From> + Into<::RuntimeEvent>; - /// Specifies the origin check provided by the bridge for calls that can only be called by the - /// bridge pallet - type BridgeOrigin: EnsureOrigin; - - /// The currency mechanism. - type Currency: Currency; - - /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. - type HashId: Get; - type NativeTokenId: Get; - type Erc721Id: Get; -} +#[frame_support::pallet] +pub mod pallet { + use super::*; + + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config + bridge::Config + erc721::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + /// Specifies the origin check provided by the bridge for calls that can only be called by + /// the bridge pallet + type BridgeOrigin: EnsureOrigin; + + /// The currency mechanism. + type Currency: Currency; + + /// Ids can be defined by the runtime and passed in, perhaps from blake2b_128 hashes. + type HashId: Get; + type NativeTokenId: Get; + type Erc721Id: Get; + } -decl_error! { - pub enum Error for Module{ + #[pallet::error] + pub enum Error { InvalidTransfer, } -} -decl_storage! { - trait Store for Module as Test {} -} - -decl_event!( - pub enum Event where - ::Hash, - { - Remark(Hash), + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { + Remark(::Hash), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - const HashId: ResourceId = T::HashId::get(); - const NativeTokenId: ResourceId = T::NativeTokenId::get(); - const Erc721Id: ResourceId = T::Erc721Id::get(); - - fn deposit_event() = default; + #[pallet::call] + impl Pallet { // // Initiation calls. These start a bridge transfer. // /// Transfers an arbitrary hash to a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_hash(origin, hash: T::Hash, dest_id: bridge::ChainId) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn transfer_hash( + origin: OriginFor, + hash: T::Hash, + dest_id: bridge::ChainId, + ) -> DispatchResult { ensure_signed(origin)?; let resource_id = T::HashId::get(); let metadata: Vec = hash.as_ref().to_vec(); - >::transfer_generic(dest_id, resource_id, metadata) + >::transfer_generic(dest_id, resource_id, metadata) } - /// Transfers some amount of the native token to some recipient on a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_native(origin, amount: BalanceOf, recipient: Vec, dest_id: bridge::ChainId) -> DispatchResult { + /// Transfers some amount of the native token to some recipient on a (whitelisted) + /// destination chain. + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn transfer_native( + origin: OriginFor, + amount: BalanceOf, + recipient: Vec, + dest_id: bridge::ChainId, + ) -> DispatchResult { let source = ensure_signed(origin)?; - ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); - let bridge_id = >::account_id(); + ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); + let bridge_id = >::account_id(); T::Currency::transfer(&source, &bridge_id, amount, AllowDeath)?; let resource_id = T::NativeTokenId::get(); let number_amount: u128 = amount.saturated_into(); - >::transfer_fungible(dest_id, resource_id, recipient, U256::from(number_amount)) + >::transfer_fungible( + dest_id, + resource_id, + recipient, + U256::from(number_amount), + ) } - /// Transfer a non-fungible token (erc721) to a (whitelisted) destination chain. - #[weight = 195_000_000] - pub fn transfer_erc721(origin, recipient: Vec, token_id: U256, dest_id: bridge::ChainId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn transfer_erc721( + origin: OriginFor, + recipient: Vec, + token_id: U256, + dest_id: bridge::ChainId, + ) -> DispatchResult { let source = ensure_signed(origin)?; - ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); - match >::tokens(token_id) { + ensure!(>::chain_whitelisted(dest_id), Error::::InvalidTransfer); + match >::tokens(token_id) { Some(token) => { - >::burn_token(source, token_id)?; + >::burn_token(source, token_id)?; let resource_id = T::Erc721Id::get(); - let tid: &mut [u8] = &mut[0; 32]; + let tid: &mut [u8] = &mut [0; 32]; token_id.to_big_endian(tid); - >::transfer_nonfungible(dest_id, resource_id, tid.to_vec(), recipient, token.metadata) - } - None => Err(Error::::InvalidTransfer)? + >::transfer_nonfungible( + dest_id, + resource_id, + tid.to_vec(), + recipient, + token.metadata, + ) + }, + None => Err(Error::::InvalidTransfer)?, } } @@ -112,26 +138,38 @@ decl_module! { // /// Executes a simple currency transfer using the bridge account as the source - #[weight = 195_000_000] - pub fn transfer(origin, to: T::AccountId, amount: BalanceOf) -> DispatchResult { + #[pallet::call_index(3)] + #[pallet::weight(195_000_000)] + pub fn transfer( + origin: OriginFor, + to: T::AccountId, + amount: BalanceOf, + ) -> DispatchResult { let source = T::BridgeOrigin::ensure_origin(origin)?; ::Currency::transfer(&source, &to, amount, AllowDeath)?; Ok(()) } /// This can be called by the bridge to demonstrate an arbitrary call from a proposal. - #[weight = 195_000_000] - pub fn remark(origin, hash: T::Hash) -> DispatchResult { + #[pallet::call_index(4)] + #[pallet::weight(195_000_000)] + pub fn remark(origin: OriginFor, hash: T::Hash) -> DispatchResult { T::BridgeOrigin::ensure_origin(origin)?; - Self::deposit_event(RawEvent::Remark(hash)); + Self::deposit_event(Event::::Remark(hash)); Ok(()) } /// Allows the bridge to issue new erc721 tokens - #[weight = 195_000_000] - pub fn mint_erc721(origin, recipient: T::AccountId, id: U256, metadata: Vec) -> DispatchResult { + #[pallet::call_index(5)] + #[pallet::weight(195_000_000)] + pub fn mint_erc721( + origin: OriginFor, + recipient: T::AccountId, + id: U256, + metadata: Vec, + ) -> DispatchResult { T::BridgeOrigin::ensure_origin(origin)?; - >::mint_token(recipient, id, metadata)?; + >::mint_token(recipient, id, metadata)?; Ok(()) } } diff --git a/pallets/erc20/src/mock.rs b/pallets/erc20/src/mock.rs index e35085a5c..4402ed635 100644 --- a/pallets/erc20/src/mock.rs +++ b/pallets/erc20/src/mock.rs @@ -12,7 +12,7 @@ use sp_runtime::{ Perbill, }; -use crate::{self as example, Trait}; +use crate::{self as example, Config}; use chainbridge as bridge; pub use pallet_balances as balances; @@ -23,7 +23,7 @@ parameter_types! { pub const AvailableBlockRatio: Perbill = Perbill::one(); } -impl frame_system::Trait for Test { +impl frame_system::Config for Test { type BaseCallFilter = (); type Origin = Origin; type Call = Call; @@ -59,7 +59,7 @@ ord_parameter_types! { pub const One: u64 = 1; } -impl pallet_balances::Trait for Test { +impl pallet_balances::Config for Test { type Balance = u64; type DustRemoval = (); type Event = Event; @@ -73,7 +73,7 @@ parameter_types! { pub const ProposalLifetime: u64 = 100; } -impl bridge::Trait for Test { +impl bridge::Config for Test { type Event = Event; type AdminOrigin = frame_system::EnsureRoot; type Proposal = Call; @@ -87,12 +87,12 @@ parameter_types! { pub Erc721Id: bridge::ResourceId = bridge::derive_resource_id(1, &blake2_128(b"NFT")); } -impl erc721::Trait for Test { +impl erc721::Config for Test { type Event = Event; type Identifier = Erc721Id; } -impl Trait for Test { +impl Config for Test { type Event = Event; type BridgeOrigin = bridge::EnsureBridge; type Currency = Balances; diff --git a/pallets/erc721/src/lib.rs b/pallets/erc721/src/lib.rs index 638dc864a..090ce27e0 100644 --- a/pallets/erc721/src/lib.rs +++ b/pallets/erc721/src/lib.rs @@ -4,10 +4,13 @@ use codec::{Decode, Encode}; use frame_support::{ - decl_error, decl_event, decl_module, decl_storage, dispatch::DispatchResult, ensure, + dispatch::DispatchResult, + ensure, + pallet_prelude::{ValueQuery, *}, traits::Get, }; -use frame_system::{self as system, ensure_root, ensure_signed}; +use frame_system::{ensure_root, ensure_signed, pallet_prelude::*}; +pub use pallet::*; use sp_core::U256; use sp_runtime::RuntimeDebug; use sp_std::prelude::*; @@ -23,17 +26,47 @@ pub struct Erc721Token { pub metadata: Vec, } -pub trait Config: system::Config { - type RuntimeEvent: From> + Into<::RuntimeEvent>; +#[frame_support::pallet] +pub mod pallet { + use super::*; - /// Some identifier for this token type, possibly the originating ethereum address. - /// This is not explicitly used for anything, but may reflect the bridge's notion of resource - /// ID. - type Identifier: Get<[u8; 32]>; -} + #[pallet::pallet] + #[pallet::generate_store(pub(super) trait Store)] + #[pallet::without_storage_info] + pub struct Pallet(_); + + #[pallet::config] + pub trait Config: frame_system::Config { + type RuntimeEvent: From> + IsType<::RuntimeEvent>; + + /// Some identifier for this token type, possibly the originating ethereum address. + /// This is not explicitly used for anything, but may reflect the bridge's notion of + /// resource ID. + type Identifier: Get<[u8; 32]>; + } -decl_error! { - pub enum Error for Module { + /// Maps tokenId to Erc721 object + #[pallet::storage] + #[pallet::getter(fn tokens)] + pub type Tokens = StorageMap<_, Blake2_128Concat, TokenId, Erc721Token>; + + /// Maps tokenId to owner + #[pallet::storage] + #[pallet::getter(fn owner_of)] + pub type TokenOwner = StorageMap<_, Blake2_128Concat, TokenId, T::AccountId>; + + #[pallet::type_value] + pub fn DefaultTokenCount() -> U256 { + U256::zero() + } + + #[pallet::storage] + #[pallet::getter(fn token_count)] + pub type TokenCount = + StorageValue>; + + #[pallet::error] + pub enum Error { /// ID not recognized TokenIdDoesNotExist, /// Already exists with an owner @@ -41,41 +74,29 @@ decl_error! { /// Origin is not owner NotOwner, } -} - -decl_storage! { - trait Store for Module as TokenStorage { - /// Maps tokenId to Erc721 object - Tokens get(fn tokens): map hasher(opaque_blake2_256) TokenId => Option; - /// Maps tokenId to owner - TokenOwner get(fn owner_of): map hasher(opaque_blake2_256) TokenId => Option; - /// Total number of tokens in existence - TokenCount get(fn token_count): U256 = U256::zero(); - } -} -decl_event!( - pub enum Event - where - ::AccountId, - { + #[pallet::event] + #[pallet::generate_deposit(pub(crate) fn deposit_event)] + pub enum Event { /// New token created - Minted(AccountId, TokenId), + Minted(T::AccountId, TokenId), /// Token transfer between two parties - Transferred(AccountId, AccountId, TokenId), + Transferred(T::AccountId, T::AccountId, TokenId), /// Token removed from the system Burned(TokenId), } -); - -decl_module! { - pub struct Module for enum Call where origin: T::RuntimeOrigin { - type Error = Error; - fn deposit_event() = default; + #[pallet::call] + impl Pallet { /// Creates a new token with the given token ID and metadata, and gives ownership to owner - #[weight = 195_000_000] - pub fn mint(origin, owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { + #[pallet::call_index(0)] + #[pallet::weight(195_000_000)] + pub fn mint( + origin: OriginFor, + owner: T::AccountId, + id: TokenId, + metadata: Vec, + ) -> DispatchResult { ensure_root(origin)?; Self::mint_token(owner, id, metadata)?; @@ -84,8 +105,9 @@ decl_module! { } /// Changes ownership of a token sender owns - #[weight = 195_000_000] - pub fn transfer(origin, to: T::AccountId, id: TokenId) -> DispatchResult { + #[pallet::call_index(1)] + #[pallet::weight(195_000_000)] + pub fn transfer(origin: OriginFor, to: T::AccountId, id: TokenId) -> DispatchResult { let sender = ensure_signed(origin)?; Self::transfer_from(sender, to, id)?; @@ -94,8 +116,9 @@ decl_module! { } /// Remove token from the system - #[weight = 195_000_000] - pub fn burn(origin, id: TokenId) -> DispatchResult { + #[pallet::call_index(2)] + #[pallet::weight(195_000_000)] + pub fn burn(origin: OriginFor, id: TokenId) -> DispatchResult { ensure_root(origin)?; let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; @@ -105,50 +128,50 @@ decl_module! { Ok(()) } } -} -impl Module { - /// Creates a new token in the system. - pub fn mint_token(owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { - ensure!(!Tokens::contains_key(id), Error::::TokenAlreadyExists); + impl Pallet { + /// Creates a new token in the system. + pub fn mint_token(owner: T::AccountId, id: TokenId, metadata: Vec) -> DispatchResult { + ensure!(!Tokens::::contains_key(id), Error::::TokenAlreadyExists); - let new_token = Erc721Token { id, metadata }; + let new_token = Erc721Token { id, metadata }; - ::insert(id, new_token); - >::insert(id, owner.clone()); - let new_total = ::get().saturating_add(U256::one()); - ::put(new_total); + >::insert(id, new_token); + >::insert(id, owner.clone()); + let new_total = >::get().saturating_add(U256::one()); + >::put(new_total); - Self::deposit_event(RawEvent::Minted(owner, id)); + Self::deposit_event(Event::Minted(owner, id)); - Ok(()) - } + Ok(()) + } - /// Modifies ownership of a token - pub fn transfer_from(from: T::AccountId, to: T::AccountId, id: TokenId) -> DispatchResult { - // Check from is owner and token exists - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; - ensure!(owner == from, Error::::NotOwner); - // Update owner - >::insert(id, to.clone()); + /// Modifies ownership of a token + pub fn transfer_from(from: T::AccountId, to: T::AccountId, id: TokenId) -> DispatchResult { + // Check from is owner and token exists + let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + ensure!(owner == from, Error::::NotOwner); + // Update owner + >::insert(id, to.clone()); - Self::deposit_event(RawEvent::Transferred(from, to, id)); + Self::deposit_event(Event::Transferred(from, to, id)); - Ok(()) - } + Ok(()) + } - /// Deletes a token from the system. - pub fn burn_token(from: T::AccountId, id: TokenId) -> DispatchResult { - let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; - ensure!(owner == from, Error::::NotOwner); + /// Deletes a token from the system. + pub fn burn_token(from: T::AccountId, id: TokenId) -> DispatchResult { + let owner = Self::owner_of(id).ok_or(Error::::TokenIdDoesNotExist)?; + ensure!(owner == from, Error::::NotOwner); - ::remove(id); - >::remove(id); - let new_total = ::get().saturating_sub(U256::one()); - ::put(new_total); + >::remove(id); + >::remove(id); + let new_total = >::get().saturating_sub(U256::one()); + >::put(new_total); - Self::deposit_event(RawEvent::Burned(id)); + Self::deposit_event(Event::Burned(id)); - Ok(()) + Ok(()) + } } } diff --git a/pallets/erc721/src/tests.rs b/pallets/erc721/src/tests.rs index 2a2add321..e4bfb0ca0 100644 --- a/pallets/erc721/src/tests.rs +++ b/pallets/erc721/src/tests.rs @@ -40,12 +40,12 @@ fn mint_burn_tokens() { assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_a)); assert_eq!(Erc721::token_count(), 1.into()); - assert!(!::contains_key(id_a)); + assert!(!>::contains_key(id_a)); assert!(!>::contains_key(id_a)); assert_ok!(Erc721::burn(RuntimeOrigin::root(), id_b)); assert_eq!(Erc721::token_count(), 0.into()); - assert!(!::contains_key(id_b)); + assert!(!>::contains_key(id_b)); assert!(!>::contains_key(id_b)); }) }