diff --git a/Cargo.lock b/Cargo.lock index 9ba12f7d3f6..bd2c980e834 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -342,6 +342,21 @@ dependencies = [ "substrate-wasm-builder", ] +[[package]] +name = "assets-common" +version = "0.1.0" +dependencies = [ + "frame-support", + "parachains-common", + "parity-scale-codec", + "sp-api", + "sp-std", + "substrate-wasm-builder", + "xcm", + "xcm-builder", + "xcm-executor", +] + [[package]] name = "async-channel" version = "1.8.0" @@ -485,7 +500,7 @@ dependencies = [ [[package]] name = "binary-merkle-tree" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "hash-db", "log", @@ -3204,7 +3219,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "fork-tree" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", ] @@ -3227,7 +3242,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" [[package]] name = "frame-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-support-procedural", @@ -3252,7 +3267,7 @@ dependencies = [ [[package]] name = "frame-benchmarking-cli" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "Inflector", "array-bytes 4.2.0", @@ -3299,7 +3314,7 @@ dependencies = [ [[package]] name = "frame-election-provider-solution-type" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -3310,7 +3325,7 @@ dependencies = [ [[package]] name = "frame-election-provider-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-election-provider-solution-type", "frame-support", @@ -3327,7 +3342,7 @@ dependencies = [ [[package]] name = "frame-executive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -3356,7 +3371,7 @@ dependencies = [ [[package]] name = "frame-remote-externalities" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "log", @@ -3372,7 +3387,7 @@ dependencies = [ [[package]] name = "frame-support" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "bitflags", "environmental", @@ -3405,7 +3420,7 @@ dependencies = [ [[package]] name = "frame-support-procedural" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "Inflector", "cfg-expr", @@ -3420,7 +3435,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -3432,7 +3447,7 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro2", "quote", @@ -3442,7 +3457,7 @@ dependencies = [ [[package]] name = "frame-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "log", @@ -3460,7 +3475,7 @@ dependencies = [ [[package]] name = "frame-system-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -3475,7 +3490,7 @@ dependencies = [ [[package]] name = "frame-system-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "sp-api", @@ -3484,7 +3499,7 @@ dependencies = [ [[package]] name = "frame-try-runtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "parity-scale-codec", @@ -5375,7 +5390,7 @@ dependencies = [ [[package]] name = "mmr-gadget" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "log", @@ -5394,7 +5409,7 @@ dependencies = [ [[package]] name = "mmr-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "anyhow", "jsonrpsee", @@ -5892,7 +5907,7 @@ dependencies = [ [[package]] name = "pallet-alliance" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "frame-benchmarking", @@ -5913,7 +5928,7 @@ dependencies = [ [[package]] name = "pallet-asset-tx-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5931,7 +5946,7 @@ dependencies = [ [[package]] name = "pallet-assets" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -5946,7 +5961,7 @@ dependencies = [ [[package]] name = "pallet-aura" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -5962,7 +5977,7 @@ dependencies = [ [[package]] name = "pallet-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -5978,7 +5993,7 @@ dependencies = [ [[package]] name = "pallet-authorship" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -5992,7 +6007,7 @@ dependencies = [ [[package]] name = "pallet-babe" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6016,7 +6031,7 @@ dependencies = [ [[package]] name = "pallet-bags-list" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6036,7 +6051,7 @@ dependencies = [ [[package]] name = "pallet-balances" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6051,7 +6066,7 @@ dependencies = [ [[package]] name = "pallet-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6070,7 +6085,7 @@ dependencies = [ [[package]] name = "pallet-beefy-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "binary-merkle-tree", @@ -6094,7 +6109,7 @@ dependencies = [ [[package]] name = "pallet-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6112,7 +6127,7 @@ dependencies = [ [[package]] name = "pallet-child-bounties" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6156,7 +6171,7 @@ dependencies = [ [[package]] name = "pallet-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6173,7 +6188,7 @@ dependencies = [ [[package]] name = "pallet-contracts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "bitflags", "frame-benchmarking", @@ -6202,7 +6217,7 @@ dependencies = [ [[package]] name = "pallet-contracts-primitives" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "bitflags", "parity-scale-codec", @@ -6215,7 +6230,7 @@ dependencies = [ [[package]] name = "pallet-contracts-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro2", "quote", @@ -6225,7 +6240,7 @@ dependencies = [ [[package]] name = "pallet-conviction-voting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6242,7 +6257,7 @@ dependencies = [ [[package]] name = "pallet-democracy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6260,7 +6275,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-multi-phase" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6283,7 +6298,7 @@ dependencies = [ [[package]] name = "pallet-election-provider-support-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6296,7 +6311,7 @@ dependencies = [ [[package]] name = "pallet-elections-phragmen" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6314,7 +6329,7 @@ dependencies = [ [[package]] name = "pallet-fast-unstake" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6332,7 +6347,7 @@ dependencies = [ [[package]] name = "pallet-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6355,7 +6370,7 @@ dependencies = [ [[package]] name = "pallet-identity" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6371,7 +6386,7 @@ dependencies = [ [[package]] name = "pallet-im-online" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6391,7 +6406,7 @@ dependencies = [ [[package]] name = "pallet-indices" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6408,7 +6423,7 @@ dependencies = [ [[package]] name = "pallet-insecure-randomness-collective-flip" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6422,7 +6437,7 @@ dependencies = [ [[package]] name = "pallet-membership" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6439,7 +6454,7 @@ dependencies = [ [[package]] name = "pallet-mmr" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6456,7 +6471,7 @@ dependencies = [ [[package]] name = "pallet-multisig" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6472,7 +6487,7 @@ dependencies = [ [[package]] name = "pallet-nfts" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "enumflags2", "frame-benchmarking", @@ -6490,7 +6505,7 @@ dependencies = [ [[package]] name = "pallet-nfts-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "pallet-nfts", @@ -6501,7 +6516,7 @@ dependencies = [ [[package]] name = "pallet-nis" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6517,7 +6532,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6534,7 +6549,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-benchmarking" version = "1.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6554,7 +6569,7 @@ dependencies = [ [[package]] name = "pallet-nomination-pools-runtime-api" version = "1.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "pallet-nomination-pools", "parity-scale-codec", @@ -6565,7 +6580,7 @@ dependencies = [ [[package]] name = "pallet-offences" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6582,7 +6597,7 @@ dependencies = [ [[package]] name = "pallet-offences-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6606,7 +6621,7 @@ dependencies = [ [[package]] name = "pallet-preimage" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6623,7 +6638,7 @@ dependencies = [ [[package]] name = "pallet-proxy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6638,7 +6653,7 @@ dependencies = [ [[package]] name = "pallet-ranked-collective" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6656,7 +6671,7 @@ dependencies = [ [[package]] name = "pallet-recovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6671,7 +6686,7 @@ dependencies = [ [[package]] name = "pallet-referenda" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "assert_matches", "frame-benchmarking", @@ -6690,7 +6705,7 @@ dependencies = [ [[package]] name = "pallet-scheduler" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6707,7 +6722,7 @@ dependencies = [ [[package]] name = "pallet-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6728,7 +6743,7 @@ dependencies = [ [[package]] name = "pallet-session-benchmarking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6744,7 +6759,7 @@ dependencies = [ [[package]] name = "pallet-society" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6758,7 +6773,7 @@ dependencies = [ [[package]] name = "pallet-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-election-provider-support", @@ -6781,7 +6796,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-curve" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -6792,7 +6807,7 @@ dependencies = [ [[package]] name = "pallet-staking-reward-fn" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "log", "sp-arithmetic", @@ -6801,7 +6816,7 @@ dependencies = [ [[package]] name = "pallet-staking-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "sp-api", @@ -6810,7 +6825,7 @@ dependencies = [ [[package]] name = "pallet-state-trie-migration" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6827,7 +6842,7 @@ dependencies = [ [[package]] name = "pallet-sudo" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6856,7 +6871,7 @@ dependencies = [ [[package]] name = "pallet-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6874,7 +6889,7 @@ dependencies = [ [[package]] name = "pallet-tips" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6893,7 +6908,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-support", "frame-system", @@ -6909,7 +6924,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "jsonrpsee", "pallet-transaction-payment-rpc-runtime-api", @@ -6925,7 +6940,7 @@ dependencies = [ [[package]] name = "pallet-transaction-payment-rpc-runtime-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "pallet-transaction-payment", "parity-scale-codec", @@ -6937,7 +6952,7 @@ dependencies = [ [[package]] name = "pallet-treasury" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6954,7 +6969,7 @@ dependencies = [ [[package]] name = "pallet-uniques" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6969,7 +6984,7 @@ dependencies = [ [[package]] name = "pallet-utility" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -6985,7 +7000,7 @@ dependencies = [ [[package]] name = "pallet-vesting" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -7000,7 +7015,7 @@ dependencies = [ [[package]] name = "pallet-whitelist" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-benchmarking", "frame-support", @@ -9949,7 +9964,7 @@ dependencies = [ [[package]] name = "sc-allocator" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "log", "sp-core", @@ -9960,7 +9975,7 @@ dependencies = [ [[package]] name = "sc-authority-discovery" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -9987,7 +10002,7 @@ dependencies = [ [[package]] name = "sc-basic-authorship" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "futures-timer", @@ -10010,7 +10025,7 @@ dependencies = [ [[package]] name = "sc-block-builder" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "sc-client-api", @@ -10025,7 +10040,7 @@ dependencies = [ [[package]] name = "sc-chain-spec" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "memmap2", "sc-chain-spec-derive", @@ -10044,7 +10059,7 @@ dependencies = [ [[package]] name = "sc-chain-spec-derive" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -10055,7 +10070,7 @@ dependencies = [ [[package]] name = "sc-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "chrono", @@ -10095,7 +10110,7 @@ dependencies = [ [[package]] name = "sc-client-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "fnv", "futures", @@ -10121,7 +10136,7 @@ dependencies = [ [[package]] name = "sc-client-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "hash-db", "kvdb", @@ -10147,7 +10162,7 @@ dependencies = [ [[package]] name = "sc-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -10172,7 +10187,7 @@ dependencies = [ [[package]] name = "sc-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -10201,7 +10216,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "fork-tree", @@ -10240,7 +10255,7 @@ dependencies = [ [[package]] name = "sc-consensus-babe-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "jsonrpsee", @@ -10262,7 +10277,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10296,7 +10311,7 @@ dependencies = [ [[package]] name = "sc-consensus-beefy-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "jsonrpsee", @@ -10315,7 +10330,7 @@ dependencies = [ [[package]] name = "sc-consensus-epochs" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "fork-tree", "parity-scale-codec", @@ -10328,7 +10343,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ahash 0.8.2", "array-bytes 4.2.0", @@ -10368,7 +10383,7 @@ dependencies = [ [[package]] name = "sc-consensus-grandpa-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "finality-grandpa", "futures", @@ -10388,7 +10403,7 @@ dependencies = [ [[package]] name = "sc-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -10411,7 +10426,7 @@ dependencies = [ [[package]] name = "sc-executor" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "lru 0.8.1", "parity-scale-codec", @@ -10435,7 +10450,7 @@ dependencies = [ [[package]] name = "sc-executor-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "sc-allocator", "sp-maybe-compressed-blob", @@ -10448,7 +10463,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmi" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "log", "sc-allocator", @@ -10461,7 +10476,7 @@ dependencies = [ [[package]] name = "sc-executor-wasmtime" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "anyhow", "cfg-if", @@ -10479,7 +10494,7 @@ dependencies = [ [[package]] name = "sc-informant" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ansi_term", "futures", @@ -10494,7 +10509,7 @@ dependencies = [ [[package]] name = "sc-keystore" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10509,7 +10524,7 @@ dependencies = [ [[package]] name = "sc-network" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "async-channel", @@ -10552,7 +10567,7 @@ dependencies = [ [[package]] name = "sc-network-bitswap" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "cid", "futures", @@ -10571,7 +10586,7 @@ dependencies = [ [[package]] name = "sc-network-common" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "bitflags", @@ -10597,7 +10612,7 @@ dependencies = [ [[package]] name = "sc-network-gossip" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ahash 0.8.2", "futures", @@ -10615,7 +10630,7 @@ dependencies = [ [[package]] name = "sc-network-light" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10636,7 +10651,7 @@ dependencies = [ [[package]] name = "sc-network-sync" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -10668,7 +10683,7 @@ dependencies = [ [[package]] name = "sc-network-transactions" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10687,7 +10702,7 @@ dependencies = [ [[package]] name = "sc-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "bytes", @@ -10717,7 +10732,7 @@ dependencies = [ [[package]] name = "sc-peerset" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "libp2p", @@ -10730,7 +10745,7 @@ dependencies = [ [[package]] name = "sc-proposer-metrics" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "log", "substrate-prometheus-endpoint", @@ -10739,7 +10754,7 @@ dependencies = [ [[package]] name = "sc-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "jsonrpsee", @@ -10769,7 +10784,7 @@ dependencies = [ [[package]] name = "sc-rpc-api" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10788,7 +10803,7 @@ dependencies = [ [[package]] name = "sc-rpc-server" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "http", "jsonrpsee", @@ -10803,7 +10818,7 @@ dependencies = [ [[package]] name = "sc-rpc-spec-v2" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "futures", @@ -10829,7 +10844,7 @@ dependencies = [ [[package]] name = "sc-service" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "directories", @@ -10895,7 +10910,7 @@ dependencies = [ [[package]] name = "sc-state-db" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "log", "parity-scale-codec", @@ -10906,7 +10921,7 @@ dependencies = [ [[package]] name = "sc-storage-monitor" version = "0.1.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "clap 4.1.6", "fs4", @@ -10922,7 +10937,7 @@ dependencies = [ [[package]] name = "sc-sync-state-rpc" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -10941,7 +10956,7 @@ dependencies = [ [[package]] name = "sc-sysinfo" version = "6.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "libc", @@ -10960,7 +10975,7 @@ dependencies = [ [[package]] name = "sc-telemetry" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "chrono", "futures", @@ -10979,7 +10994,7 @@ dependencies = [ [[package]] name = "sc-tracing" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ansi_term", "atty", @@ -11010,7 +11025,7 @@ dependencies = [ [[package]] name = "sc-tracing-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -11021,7 +11036,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -11048,7 +11063,7 @@ dependencies = [ [[package]] name = "sc-transaction-pool-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -11062,7 +11077,7 @@ dependencies = [ [[package]] name = "sc-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "backtrace", "futures", @@ -11589,7 +11604,7 @@ dependencies = [ [[package]] name = "sp-api" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "hash-db", "log", @@ -11607,7 +11622,7 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "blake2", "proc-macro-crate", @@ -11619,7 +11634,7 @@ dependencies = [ [[package]] name = "sp-application-crypto" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -11632,7 +11647,7 @@ dependencies = [ [[package]] name = "sp-arithmetic" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "integer-sqrt", "num-traits", @@ -11646,7 +11661,7 @@ dependencies = [ [[package]] name = "sp-authority-discovery" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -11659,7 +11674,7 @@ dependencies = [ [[package]] name = "sp-block-builder" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "sp-api", @@ -11671,7 +11686,7 @@ dependencies = [ [[package]] name = "sp-blockchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "log", @@ -11689,7 +11704,7 @@ dependencies = [ [[package]] name = "sp-consensus" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -11704,7 +11719,7 @@ dependencies = [ [[package]] name = "sp-consensus-aura" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "parity-scale-codec", @@ -11722,7 +11737,7 @@ dependencies = [ [[package]] name = "sp-consensus-babe" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "merlin", @@ -11745,7 +11760,7 @@ dependencies = [ [[package]] name = "sp-consensus-beefy" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "lazy_static", "parity-scale-codec", @@ -11764,7 +11779,7 @@ dependencies = [ [[package]] name = "sp-consensus-grandpa" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "finality-grandpa", "log", @@ -11782,7 +11797,7 @@ dependencies = [ [[package]] name = "sp-consensus-slots" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -11794,7 +11809,7 @@ dependencies = [ [[package]] name = "sp-consensus-vrf" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -11807,7 +11822,7 @@ dependencies = [ [[package]] name = "sp-core" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "base58", @@ -11850,7 +11865,7 @@ dependencies = [ [[package]] name = "sp-core-hashing" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "blake2", "byteorder", @@ -11864,7 +11879,7 @@ dependencies = [ [[package]] name = "sp-core-hashing-proc-macro" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro2", "quote", @@ -11875,7 +11890,7 @@ dependencies = [ [[package]] name = "sp-database" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "kvdb", "parking_lot 0.12.1", @@ -11884,7 +11899,7 @@ dependencies = [ [[package]] name = "sp-debug-derive" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro2", "quote", @@ -11894,7 +11909,7 @@ dependencies = [ [[package]] name = "sp-externalities" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "environmental", "parity-scale-codec", @@ -11905,7 +11920,7 @@ dependencies = [ [[package]] name = "sp-inherents" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "impl-trait-for-tuples", @@ -11920,7 +11935,7 @@ dependencies = [ [[package]] name = "sp-io" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "bytes", "ed25519", @@ -11945,7 +11960,7 @@ dependencies = [ [[package]] name = "sp-keyring" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "lazy_static", "sp-core", @@ -11956,7 +11971,7 @@ dependencies = [ [[package]] name = "sp-keystore" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures", @@ -11973,7 +11988,7 @@ dependencies = [ [[package]] name = "sp-maybe-compressed-blob" version = "4.1.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "thiserror", "zstd", @@ -11982,7 +11997,7 @@ dependencies = [ [[package]] name = "sp-mmr-primitives" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ckb-merkle-mountain-range", "log", @@ -12000,7 +12015,7 @@ dependencies = [ [[package]] name = "sp-npos-elections" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -12014,7 +12029,7 @@ dependencies = [ [[package]] name = "sp-offchain" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "sp-api", "sp-core", @@ -12024,7 +12039,7 @@ dependencies = [ [[package]] name = "sp-panic-handler" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "backtrace", "lazy_static", @@ -12034,7 +12049,7 @@ dependencies = [ [[package]] name = "sp-rpc" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "rustc-hash", "serde", @@ -12044,7 +12059,7 @@ dependencies = [ [[package]] name = "sp-runtime" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "either", "hash256-std-hasher", @@ -12066,7 +12081,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -12084,7 +12099,7 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "Inflector", "proc-macro-crate", @@ -12096,7 +12111,7 @@ dependencies = [ [[package]] name = "sp-serializer" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "serde", "serde_json", @@ -12105,7 +12120,7 @@ dependencies = [ [[package]] name = "sp-session" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -12119,7 +12134,7 @@ dependencies = [ [[package]] name = "sp-staking" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -12131,7 +12146,7 @@ dependencies = [ [[package]] name = "sp-state-machine" version = "0.13.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "hash-db", "log", @@ -12151,12 +12166,12 @@ dependencies = [ [[package]] name = "sp-std" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" [[package]] name = "sp-storage" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12169,7 +12184,7 @@ dependencies = [ [[package]] name = "sp-timestamp" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "futures-timer", @@ -12184,7 +12199,7 @@ dependencies = [ [[package]] name = "sp-tracing" version = "6.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "sp-std", @@ -12196,7 +12211,7 @@ dependencies = [ [[package]] name = "sp-transaction-pool" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "sp-api", "sp-runtime", @@ -12205,7 +12220,7 @@ dependencies = [ [[package]] name = "sp-transaction-storage-proof" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "log", @@ -12221,7 +12236,7 @@ dependencies = [ [[package]] name = "sp-trie" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ahash 0.8.2", "hash-db", @@ -12244,7 +12259,7 @@ dependencies = [ [[package]] name = "sp-version" version = "5.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "impl-serde", "parity-scale-codec", @@ -12261,7 +12276,7 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -12272,7 +12287,7 @@ dependencies = [ [[package]] name = "sp-wasm-interface" version = "7.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "anyhow", "impl-trait-for-tuples", @@ -12286,7 +12301,7 @@ dependencies = [ [[package]] name = "sp-weights" version = "4.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "parity-scale-codec", "scale-info", @@ -12346,6 +12361,7 @@ name = "statemine-runtime" version = "2.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -12412,6 +12428,7 @@ name = "statemint-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", @@ -12594,7 +12611,7 @@ dependencies = [ [[package]] name = "substrate-build-script-utils" version = "3.0.0" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "platforms", ] @@ -12602,7 +12619,7 @@ dependencies = [ [[package]] name = "substrate-frame-rpc-system" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "frame-system-rpc-runtime-api", "futures", @@ -12621,7 +12638,7 @@ dependencies = [ [[package]] name = "substrate-prometheus-endpoint" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "hyper", "log", @@ -12633,7 +12650,7 @@ dependencies = [ [[package]] name = "substrate-rpc-client" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "jsonrpsee", @@ -12646,7 +12663,7 @@ dependencies = [ [[package]] name = "substrate-state-trie-migration-rpc" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "jsonrpsee", "log", @@ -12665,7 +12682,7 @@ dependencies = [ [[package]] name = "substrate-test-client" version = "2.0.1" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "array-bytes 4.2.0", "async-trait", @@ -12691,7 +12708,7 @@ dependencies = [ [[package]] name = "substrate-test-utils" version = "4.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "futures", "substrate-test-utils-derive", @@ -12701,7 +12718,7 @@ dependencies = [ [[package]] name = "substrate-test-utils-derive" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -12712,7 +12729,7 @@ dependencies = [ [[package]] name = "substrate-wasm-builder" version = "5.0.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "ansi_term", "build-helper", @@ -13361,7 +13378,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] name = "try-runtime-cli" version = "0.10.0-dev" -source = "git+https://github.com/paritytech/substrate?branch=master#4aa213ce1aef94f97836e7ceec753e2a131c849a" +source = "git+https://github.com/paritytech/substrate?branch=master#d1d67cddf577ef275a2ca339312805c6d25ef9e5" dependencies = [ "async-trait", "clap 4.1.6", @@ -14396,6 +14413,7 @@ name = "westmint-runtime" version = "1.0.0" dependencies = [ "asset-test-utils", + "assets-common", "cumulus-pallet-aura-ext", "cumulus-pallet-dmp-queue", "cumulus-pallet-parachain-system", diff --git a/Cargo.toml b/Cargo.toml index a4b817ffe87..acb6ae62f72 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,6 +35,7 @@ members = [ "parachains/runtimes/testing/rococo-parachain", "parachains/runtimes/starters/shell", "parachains/runtimes/starters/seedling", + "parachains/runtimes/assets/common", "parachains/runtimes/assets/statemint", "parachains/runtimes/assets/statemine", "parachains/runtimes/assets/westmint", diff --git a/parachains/runtimes/assets/common/Cargo.toml b/parachains/runtimes/assets/common/Cargo.toml new file mode 100644 index 00000000000..c551a97757b --- /dev/null +++ b/parachains/runtimes/assets/common/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "assets-common" +version = "0.1.0" +authors = ["Parity Technologies "] +edition = "2021" +description = "Assets common utilities" + +[dependencies] +codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive"] } + +# Substrate +frame-support = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } +sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" } + +# Polkadot +xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-builder = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +xcm-executor = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } + +# Cumulus +parachains-common = { path = "../../../common", default-features = false } + +[build-dependencies] +substrate-wasm-builder = { git = "https://github.com/paritytech/substrate", branch = "master" } + +[features] +default = [ "std" ] +std = [ + "codec/std", + "frame-support/std", + "parachains-common/std", + "sp-api/std", + "sp-std/std", + "xcm/std", + "xcm-builder/std", + "xcm-executor/std", +] diff --git a/parachains/runtimes/assets/common/src/fungible_conversion.rs b/parachains/runtimes/assets/common/src/fungible_conversion.rs new file mode 100644 index 00000000000..2b8413cfe6e --- /dev/null +++ b/parachains/runtimes/assets/common/src/fungible_conversion.rs @@ -0,0 +1,136 @@ +// This file is part of Substrate. + +// Copyright (C) 2018-2022 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: GPL-3.0-or-later WITH Classpath-exception-2.0 + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. + +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +//! Runtime API definition for assets. + +use crate::runtime_api::FungiblesAccessError; +use sp_std::{borrow::Borrow, vec::Vec}; +use xcm::latest::{MultiAsset, MultiLocation}; +use xcm_builder::ConvertedConcreteId; +use xcm_executor::traits::{Convert, MatchesFungibles}; + +/// Converting any [`(AssetId, Balance)`] to [`MultiAsset`] +pub trait MultiAssetConverter: + MatchesFungibles +where + AssetId: Clone, + Balance: Clone, + ConvertAssetId: Convert, + ConvertBalance: Convert, +{ + fn convert_ref( + value: impl Borrow<(AssetId, Balance)>, + ) -> Result; +} + +impl< + AssetId: Clone, + Balance: Clone, + ConvertAssetId: Convert, + ConvertBalance: Convert, + > MultiAssetConverter + for ConvertedConcreteId +{ + fn convert_ref( + value: impl Borrow<(AssetId, Balance)>, + ) -> Result { + let (asset_id, balance) = value.borrow(); + match ConvertAssetId::reverse_ref(asset_id) { + Ok(asset_id_as_multilocation) => match ConvertBalance::reverse_ref(balance) { + Ok(amount) => Ok((asset_id_as_multilocation, amount).into()), + Err(_) => Err(FungiblesAccessError::AmountToBalanceConversionFailed), + }, + Err(_) => Err(FungiblesAccessError::AssetIdConversionFailed), + } + } +} + +/// Helper function to convert collections with [`(AssetId, Balance)`] to [`MultiAsset`] +pub fn convert<'a, AssetId, Balance, ConvertAssetId, ConvertBalance, Converter>( + items: impl Iterator, +) -> Result, FungiblesAccessError> +where + AssetId: Clone + 'a, + Balance: Clone + 'a, + ConvertAssetId: Convert, + ConvertBalance: Convert, + Converter: MultiAssetConverter, +{ + items.map(Converter::convert_ref).collect() +} + +/// Helper function to convert `Balance` with MultiLocation` to `MultiAsset` +pub fn convert_balance< + T: frame_support::pallet_prelude::Get, + Balance: TryInto, +>( + balance: Balance, +) -> Result { + match balance.try_into() { + Ok(balance) => Ok((T::get(), balance).into()), + Err(_) => Err(FungiblesAccessError::AmountToBalanceConversionFailed), + } +} + +#[cfg(test)] +mod tests { + use super::*; + + use xcm::latest::prelude::*; + use xcm_executor::traits::{Identity, JustTry}; + + type Converter = ConvertedConcreteId; + + #[test] + fn converted_concrete_id_fungible_multi_asset_conversion_roundtrip_works() { + let location = MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32])))); + let amount = 123456_u64; + let expected_multi_asset = MultiAsset { + id: Concrete(MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32]))))), + fun: Fungible(123456_u128), + }; + + assert_eq!( + Converter::matches_fungibles(&expected_multi_asset).map_err(|_| ()), + Ok((location, amount)) + ); + + assert_eq!(Converter::convert_ref((location, amount)), Ok(expected_multi_asset)); + } + + #[test] + fn converted_concrete_id_fungible_multi_asset_conversion_collection_works() { + let data = vec![ + (MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32])))), 123456_u64), + (MultiLocation::new(1, X1(GlobalConsensus(ByGenesis([1; 32])))), 654321_u64), + ]; + + let expected_data = vec![ + MultiAsset { + id: Concrete(MultiLocation::new(0, X1(GlobalConsensus(ByGenesis([0; 32]))))), + fun: Fungible(123456_u128), + }, + MultiAsset { + id: Concrete(MultiLocation::new(1, X1(GlobalConsensus(ByGenesis([1; 32]))))), + fun: Fungible(654321_u128), + }, + ]; + + assert_eq!(convert::<_, _, _, _, Converter>(data.iter()), Ok(expected_data)); + } +} diff --git a/parachains/runtimes/assets/common/src/lib.rs b/parachains/runtimes/assets/common/src/lib.rs new file mode 100644 index 00000000000..28d8ca59106 --- /dev/null +++ b/parachains/runtimes/assets/common/src/lib.rs @@ -0,0 +1,70 @@ +// Copyright (C) 2023 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#![cfg_attr(not(feature = "std"), no_std)] + +pub mod fungible_conversion; +pub mod runtime_api; + +use parachains_common::AssetIdForTrustBackedAssets; +use xcm_builder::{AsPrefixedGeneralIndex, ConvertedConcreteId}; +use xcm_executor::traits::JustTry; + +/// `MultiLocation` vs `AssetIdForTrustBackedAssets` converter for `TrustBackedAssets` +pub type AssetIdForTrustBackedAssetsConvert = + AsPrefixedGeneralIndex; + +/// [`ConvertedConcreteId`] converter dedicated for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + ConvertedConcreteId< + AssetIdForTrustBackedAssets, + Balance, + AssetIdForTrustBackedAssetsConvert, + JustTry, + >; + +#[cfg(test)] +mod tests { + + use super::*; + use xcm::latest::prelude::*; + use xcm_executor::traits::Convert; + + frame_support::parameter_types! { + pub TrustBackedAssetsPalletLocation: MultiLocation = MultiLocation::new(5, X1(PalletInstance(13))); + } + + #[test] + fn asset_id_for_trust_backed_assets_convert_works() { + let local_asset_id = 123456789 as AssetIdForTrustBackedAssets; + let expected_reverse_ref = + MultiLocation::new(5, X2(PalletInstance(13), GeneralIndex(local_asset_id.into()))); + + assert_eq!( + AssetIdForTrustBackedAssetsConvert::::reverse_ref( + local_asset_id + ) + .unwrap(), + expected_reverse_ref + ); + assert_eq!( + AssetIdForTrustBackedAssetsConvert::::convert_ref( + expected_reverse_ref + ) + .unwrap(), + local_asset_id + ); + } +} diff --git a/parachains/runtimes/assets/common/src/runtime_api.rs b/parachains/runtimes/assets/common/src/runtime_api.rs new file mode 100644 index 00000000000..6d060f22687 --- /dev/null +++ b/parachains/runtimes/assets/common/src/runtime_api.rs @@ -0,0 +1,41 @@ +// Copyright (C) 2023 Parity Technologies (UK) Ltd. +// SPDX-License-Identifier: Apache-2.0 + +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +//! Runtime API definition for fungibles. + +use codec::{Codec, Decode, Encode}; +use frame_support::RuntimeDebug; +use sp_std::vec::Vec; +use xcm::latest::MultiAsset; + +/// The possible errors that can happen querying the storage of assets. +#[derive(Eq, PartialEq, Encode, Decode, RuntimeDebug)] +pub enum FungiblesAccessError { + /// `MultiLocation` to `AssetId`/`ClassId` conversion failed. + AssetIdConversionFailed, + /// `u128` amount to currency `Balance` conversion failed. + AmountToBalanceConversionFailed, +} + +sp_api::decl_runtime_apis! { + /// The API for querying account's balances from runtime. + pub trait FungiblesApi + where + AccountId: Codec, + { + /// Returns the list of all [`MultiAsset`] that an `AccountId` has. + fn query_account_balances(account: AccountId) -> Result, FungiblesAccessError>; + } +} diff --git a/parachains/runtimes/assets/statemine/Cargo.toml b/parachains/runtimes/assets/statemine/Cargo.toml index 7ec11cf5786..0f0921976a8 100644 --- a/parachains/runtimes/assets/statemine/Cargo.toml +++ b/parachains/runtimes/assets/statemine/Cargo.toml @@ -49,6 +49,7 @@ pallet-state-trie-migration = { git = "https://github.com/paritytech/substrate", # Polkadot kusama-runtime-constants = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -69,8 +70,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } - +assets-common = { path = "../common", default-features = false } [dev-dependencies] asset-test-utils = { path = "../test-utils"} @@ -187,4 +187,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/statemine/src/lib.rs b/parachains/runtimes/assets/statemine/src/lib.rs index 90cd768f989..dacae893b01 100644 --- a/parachains/runtimes/assets/statemine/src/lib.rs +++ b/parachains/runtimes/assets/statemine/src/lib.rs @@ -64,7 +64,7 @@ use parachains_common::{ Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{KsmLocation, XcmConfig}; +use xcm_config::{KsmLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -831,6 +831,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/statemine/src/xcm_config.rs b/parachains/runtimes/assets/statemine/src/xcm_config.rs index 43b1c67f0bd..8d139f59a7b 100644 --- a/parachains/runtimes/assets/statemine/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemine/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const KsmLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -302,16 +293,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/statemine/tests/tests.rs b/parachains/runtimes/assets/statemine/tests/tests.rs index 9c9b23f77e4..041d766a65d 100644 --- a/parachains/runtimes/assets/statemine/tests/tests.rs +++ b/parachains/runtimes/assets/statemine/tests/tests.rs @@ -3,20 +3,27 @@ use codec::Encode; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ assert_noop, assert_ok, sp_io, - traits::PalletInfo, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, AuraId}; -use statemine_runtime::xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger; +use parachains_common::{AccountId, AuraId, Balance}; +use statemine_runtime::xcm_config::{ + AssetFeeAsExistentialDepositMultiplierFeeCharger, KsmLocation, TrustBackedAssetsPalletLocation, +}; pub use statemine_runtime::{ constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, ReservedDmpWeight, Runtime, SessionKeys, System, }; use xcm::latest::prelude::*; -use xcm_executor::{traits::WeightTrader, XcmExecutor}; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, +}; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -48,16 +55,8 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); @@ -95,12 +94,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -141,16 +143,7 @@ fn test_asset_xcm_trader_with_refund() { // We are going to buy 4e9 weight let bought = Weight::from_ref_time(4_000_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -219,16 +212,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // We are going to buy small amount let bought = Weight::from_ref_time(500_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -279,16 +263,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -363,16 +338,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -390,6 +356,75 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { }); } +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_FungiblesApi::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + #[test] fn receive_teleported_asset_works() { ExtBuilder::::default() diff --git a/parachains/runtimes/assets/statemint/Cargo.toml b/parachains/runtimes/assets/statemint/Cargo.toml index 08d3f689152..f6d54cbd85f 100644 --- a/parachains/runtimes/assets/statemint/Cargo.toml +++ b/parachains/runtimes/assets/statemint/Cargo.toml @@ -47,6 +47,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -68,7 +69,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } +assets-common = { path = "../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" @@ -176,4 +177,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/statemint/src/lib.rs b/parachains/runtimes/assets/statemint/src/lib.rs index b03c68ada10..b9050cdc83c 100644 --- a/parachains/runtimes/assets/statemint/src/lib.rs +++ b/parachains/runtimes/assets/statemint/src/lib.rs @@ -93,7 +93,9 @@ use parachains_common::{ Signature, StatemintAuraId as AuraId, AVERAGE_ON_INITIALIZE_RATIO, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{DotLocation, XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + DotLocation, TrustBackedAssetsConvertedConcreteId, XcmConfig, XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -828,6 +830,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/statemint/src/xcm_config.rs b/parachains/runtimes/assets/statemint/src/xcm_config.rs index 21daa980cc5..d7d349d311f 100644 --- a/parachains/runtimes/assets/statemint/src/xcm_config.rs +++ b/parachains/runtimes/assets/statemint/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const DotLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets`` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -302,16 +293,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/statemint/tests/tests.rs b/parachains/runtimes/assets/statemint/tests/tests.rs index 371a442a449..61811366c87 100644 --- a/parachains/runtimes/assets/statemint/tests/tests.rs +++ b/parachains/runtimes/assets/statemint/tests/tests.rs @@ -3,20 +3,27 @@ use codec::Encode; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ assert_noop, assert_ok, sp_io, - traits::PalletInfo, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, StatemintAuraId as AuraId}; -use statemint_runtime::xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger; +use parachains_common::{AccountId, Balance, StatemintAuraId as AuraId}; +use statemint_runtime::xcm_config::{ + AssetFeeAsExistentialDepositMultiplierFeeCharger, DotLocation, TrustBackedAssetsPalletLocation, +}; pub use statemint_runtime::{ constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, ReservedDmpWeight, Runtime, SessionKeys, System, }; use xcm::latest::prelude::*; -use xcm_executor::{traits::WeightTrader, XcmExecutor}; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, +}; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -48,16 +55,8 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); @@ -98,12 +97,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -147,16 +149,7 @@ fn test_asset_xcm_trader_with_refund() { // bit more of weight let bought = Weight::from_ref_time(400_000_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -228,16 +221,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // bit more of weight let bought = Weight::from_ref_time(50_000_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -288,16 +272,7 @@ fn test_that_buying_ed_refund_does_not_refund() { // We are gonna buy ED let bought = Weight::from_ref_time(ExistentialDeposit::get().try_into().unwrap()); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -375,16 +350,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -402,6 +368,75 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { }); } +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_FungiblesApi::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::ed25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + #[test] fn receive_teleported_asset_works() { ExtBuilder::::default() diff --git a/parachains/runtimes/assets/westmint/Cargo.toml b/parachains/runtimes/assets/westmint/Cargo.toml index cabdb3df62b..591c7699f8b 100644 --- a/parachains/runtimes/assets/westmint/Cargo.toml +++ b/parachains/runtimes/assets/westmint/Cargo.toml @@ -49,6 +49,7 @@ sp-version = { git = "https://github.com/paritytech/substrate", default-features # Polkadot pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } +pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-parachain = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" } @@ -70,7 +71,7 @@ cumulus-primitives-utility = { path = "../../../../primitives/utility", default- pallet-collator-selection = { path = "../../../../pallets/collator-selection", default-features = false } parachain-info = { path = "../../../pallets/parachain-info", default-features = false } parachains-common = { path = "../../../common", default-features = false } -pallet-xcm-benchmarks = { git = "https://github.com/paritytech/polkadot", branch = "master", default-features = false, optional = true } +assets-common = { path = "../common", default-features = false } [dev-dependencies] hex-literal = "0.3.4" @@ -182,4 +183,5 @@ std = [ "pallet-collator-selection/std", "parachain-info/std", "parachains-common/std", + "assets-common/std", ] diff --git a/parachains/runtimes/assets/westmint/src/lib.rs b/parachains/runtimes/assets/westmint/src/lib.rs index 19b2c1efa1e..c894e73a3e2 100644 --- a/parachains/runtimes/assets/westmint/src/lib.rs +++ b/parachains/runtimes/assets/westmint/src/lib.rs @@ -68,7 +68,10 @@ use parachains_common::{ Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION, }; -use xcm_config::{XcmConfig, XcmOriginToTransactDispatchOrigin}; +use xcm_config::{ + TrustBackedAssetsConvertedConcreteId, WestendLocation, XcmConfig, + XcmOriginToTransactDispatchOrigin, +}; #[cfg(any(feature = "std", test))] pub use sp_runtime::BuildStorage; @@ -890,6 +893,34 @@ impl_runtime_apis! { } } + impl assets_common::runtime_api::FungiblesApi< + Block, + AccountId, + > for Runtime + { + fn query_account_balances(account: AccountId) -> Result, assets_common::runtime_api::FungiblesAccessError> { + use assets_common::fungible_conversion::{convert, convert_balance}; + Ok([ + // collect pallet_balance + { + let balance = Balances::free_balance(account.clone()); + if balance > 0 { + vec![convert_balance::(balance)?] + } else { + vec![] + } + }, + // collect pallet_assets (TrustBackedAssets) + convert::<_, _, _, _, TrustBackedAssetsConvertedConcreteId>( + Assets::account_balances(account) + .iter() + .filter(|(_, balance)| balance > &0) + )?, + // collect ... e.g. pallet_assets ForeignAssets + ].concat()) + } + } + impl cumulus_primitives_core::CollectCollationInfo for Runtime { fn collect_collation_info(header: &::Header) -> cumulus_primitives_core::CollationInfo { ParachainSystem::collect_collation_info(header) diff --git a/parachains/runtimes/assets/westmint/src/xcm_config.rs b/parachains/runtimes/assets/westmint/src/xcm_config.rs index fd2e349a2c3..d21389fc40e 100644 --- a/parachains/runtimes/assets/westmint/src/xcm_config.rs +++ b/parachains/runtimes/assets/westmint/src/xcm_config.rs @@ -14,9 +14,9 @@ // limitations under the License. use super::{ - AccountId, AllPalletsWithSystem, AssetIdForTrustBackedAssets, Assets, Authorship, Balance, - Balances, ParachainInfo, ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, - RuntimeOrigin, TrustBackedAssetsInstance, WeightToFee, XcmpQueue, + AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo, + ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin, + TrustBackedAssetsInstance, WeightToFee, XcmpQueue, }; use frame_support::{ match_types, parameter_types, @@ -34,17 +34,13 @@ use sp_runtime::traits::ConvertInto; use xcm::latest::prelude::*; use xcm_builder::{ AccountId32Aliases, AllowExplicitUnpaidExecutionFrom, AllowKnownQueryResponses, - AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, AsPrefixedGeneralIndex, - ConvertedConcreteId, CurrencyAdapter, EnsureXcmOrigin, FungiblesAdapter, IsConcrete, LocalMint, - NativeAsset, ParentAsSuperuser, ParentIsPreset, RelayChainAsNative, SiblingParachainAsNative, - SiblingParachainConvertsVia, SignedAccountId32AsNative, SignedToAccountId32, - SovereignSignedViaLocation, TakeWeightCredit, UsingComponents, WeightInfoBounds, - WithComputedOrigin, -}; -use xcm_executor::{ - traits::{JustTry, WithOriginFilter}, - XcmExecutor, + AllowSubscriptionsFrom, AllowTopLevelPaidExecutionFrom, CurrencyAdapter, EnsureXcmOrigin, + FungiblesAdapter, IsConcrete, LocalMint, NativeAsset, ParentAsSuperuser, ParentIsPreset, + RelayChainAsNative, SiblingParachainAsNative, SiblingParachainConvertsVia, + SignedAccountId32AsNative, SignedToAccountId32, SovereignSignedViaLocation, TakeWeightCredit, + UsingComponents, WeightInfoBounds, WithComputedOrigin, }; +use xcm_executor::{traits::WithOriginFilter, XcmExecutor}; parameter_types! { pub const WestendLocation: MultiLocation = MultiLocation::parent(); @@ -84,21 +80,16 @@ pub type CurrencyTransactor = CurrencyAdapter< (), >; +/// `AssetId/Balancer` converter for `TrustBackedAssets` +pub type TrustBackedAssetsConvertedConcreteId = + assets_common::TrustBackedAssetsConvertedConcreteId; + /// Means for transacting assets besides the native currency on this chain. pub type FungiblesTransactor = FungiblesAdapter< // Use this fungibles implementation: Assets, // Use this currency when it is a fungible asset matching the given location or name: - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, // Convert an XCM MultiLocation into a local account id: LocationToAccountId, // Our chain's account ID type (we can't get away without mentioning it explicitly): @@ -297,16 +288,7 @@ impl xcm_executor::Config for XcmConfig { cumulus_primitives_utility::TakeFirstAssetTrader< AccountId, AssetFeeAsExistentialDepositMultiplierFeeCharger, - ConvertedConcreteId< - AssetIdForTrustBackedAssets, - Balance, - AsPrefixedGeneralIndex< - TrustBackedAssetsPalletLocation, - AssetIdForTrustBackedAssets, - JustTry, - >, - JustTry, - >, + TrustBackedAssetsConvertedConcreteId, Assets, cumulus_primitives_utility::XcmFeesTo32ByteAccount< FungiblesTransactor, diff --git a/parachains/runtimes/assets/westmint/tests/tests.rs b/parachains/runtimes/assets/westmint/tests/tests.rs index d6b8c6eb0cb..d436b31d411 100644 --- a/parachains/runtimes/assets/westmint/tests/tests.rs +++ b/parachains/runtimes/assets/westmint/tests/tests.rs @@ -3,20 +3,29 @@ use codec::{DecodeLimit, Encode}; use cumulus_primitives_utility::ChargeWeightInFungibles; use frame_support::{ assert_noop, assert_ok, sp_io, - traits::PalletInfo, weights::{Weight, WeightToFee as WeightToFeeT}, }; -use parachains_common::{AccountId, AuraId}; +use parachains_common::{AccountId, AuraId, Balance}; pub use westmint_runtime::{ - constants::fee::WeightToFee, xcm_config::XcmConfig, Assets, Balances, ExistentialDeposit, - ReservedDmpWeight, Runtime, SessionKeys, System, + constants::fee::WeightToFee, + xcm_config::{TrustBackedAssetsPalletLocation, XcmConfig}, + Assets, Balances, ExistentialDeposit, ReservedDmpWeight, Runtime, SessionKeys, System, +}; +use westmint_runtime::{ + xcm_config::{AssetFeeAsExistentialDepositMultiplierFeeCharger, WestendLocation}, + RuntimeCall, }; -use westmint_runtime::{xcm_config::AssetFeeAsExistentialDepositMultiplierFeeCharger, RuntimeCall}; use xcm::{latest::prelude::*, VersionedXcm, MAX_XCM_DECODE_DEPTH}; -use xcm_executor::{traits::WeightTrader, XcmExecutor}; +use xcm_executor::{ + traits::{Convert, WeightTrader}, + XcmExecutor, +}; pub const ALICE: [u8; 32] = [1u8; 32]; +type AssetIdForTrustBackedAssetsConvert = + assets_common::AssetIdForTrustBackedAssetsConvert; + #[test] fn test_asset_xcm_trader() { ExtBuilder::::default() @@ -48,16 +57,8 @@ fn test_asset_xcm_trader() { )); // get asset id as multilocation - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(local_asset_id.into()), - ), - ); + let asset_multilocation = + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(); // Set Alice as block author, who will receive fees RuntimeHelper::::run_to_block(2, Some(AccountId::from(ALICE))); @@ -95,12 +96,15 @@ fn test_asset_xcm_trader() { // Make sure author(Alice) has received the amount assert_eq!( - Assets::balance(1, AccountId::from(ALICE)), + Assets::balance(local_asset_id, AccountId::from(ALICE)), minimum_asset_balance + asset_amount_needed ); // We also need to ensure the total supply increased - assert_eq!(Assets::total_supply(1), minimum_asset_balance + asset_amount_needed); + assert_eq!( + Assets::total_supply(local_asset_id), + minimum_asset_balance + asset_amount_needed + ); }); } @@ -140,16 +144,7 @@ fn test_asset_xcm_trader_with_refund() { // We are going to buy 4e9 weight let bought = Weight::from_ref_time(4_000_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); // lets calculate amount needed let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -218,16 +213,7 @@ fn test_asset_xcm_trader_refund_not_possible_since_amount_less_than_ed() { // We are going to buy 5e9 weight let bought = Weight::from_ref_time(500_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -277,16 +263,7 @@ fn test_that_buying_ed_refund_does_not_refund() { let bought = Weight::from_ref_time(500_000_000u64); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let amount_bought = WeightToFee::weight_to_fee(&bought); @@ -361,16 +338,7 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { // lets calculate amount needed let asset_amount_needed = WeightToFee::weight_to_fee(&bought); - let asset_multilocation = MultiLocation::new( - 0, - X2( - PalletInstance( - ::PalletInfo::index::().unwrap() - as u8, - ), - GeneralIndex(1), - ), - ); + let asset_multilocation = AssetIdForTrustBackedAssetsConvert::reverse_ref(1).unwrap(); let asset: MultiAsset = (asset_multilocation, asset_amount_needed).into(); @@ -388,6 +356,75 @@ fn test_asset_xcm_trader_not_possible_for_non_sufficient_assets() { }); } +#[test] +fn test_assets_balances_api_works() { + use assets_common::runtime_api::runtime_decl_for_FungiblesApi::FungiblesApi; + + ExtBuilder::::default() + .with_collators(vec![AccountId::from(ALICE)]) + .with_session_keys(vec![( + AccountId::from(ALICE), + AccountId::from(ALICE), + SessionKeys { aura: AuraId::from(sp_core::sr25519::Public::from_raw(ALICE)) }, + )]) + .build() + .execute_with(|| { + let local_asset_id = 1; + + // check before + assert_eq!(Assets::balance(local_asset_id, AccountId::from(ALICE)), 0); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), 0); + assert!(Runtime::query_account_balances(AccountId::from(ALICE)).unwrap().is_empty()); + + // Drip some balance + use frame_support::traits::fungible::Mutate; + let some_currency = ExistentialDeposit::get(); + Balances::mint_into(&AccountId::from(ALICE), some_currency).unwrap(); + + // We need root origin to create a sufficient asset + let minimum_asset_balance = 3333333_u128; + assert_ok!(Assets::force_create( + RuntimeHelper::::root_origin(), + local_asset_id.into(), + AccountId::from(ALICE).into(), + true, + minimum_asset_balance + )); + + // We first mint enough asset for the account to exist for assets + assert_ok!(Assets::mint( + RuntimeHelper::::origin_of(AccountId::from(ALICE)), + local_asset_id.into(), + AccountId::from(ALICE).into(), + minimum_asset_balance + )); + + // check after + assert_eq!( + Assets::balance(local_asset_id, AccountId::from(ALICE)), + minimum_asset_balance + ); + assert_eq!(Balances::free_balance(AccountId::from(ALICE)), some_currency); + + let result = Runtime::query_account_balances(AccountId::from(ALICE)).unwrap(); + assert_eq!(result.len(), 2); + + // check currency + assert!(result.iter().any(|asset| asset.eq( + &assets_common::fungible_conversion::convert_balance::( + some_currency + ) + .unwrap() + ))); + // check trusted asset + assert!(result.iter().any(|asset| asset.eq(&( + AssetIdForTrustBackedAssetsConvert::reverse_ref(local_asset_id).unwrap(), + minimum_asset_balance + ) + .into()))); + }); +} + #[test] fn receive_teleported_asset_works() { ExtBuilder::::default()