diff --git a/cumulus/Cargo.lock b/cumulus/Cargo.lock
index 4e5210d387..ed2b62b019 100644
--- a/cumulus/Cargo.lock
+++ b/cumulus/Cargo.lock
@@ -563,6 +563,7 @@ dependencies = [
"frame-support",
"frame-system",
"integration-tests-common",
+ "pallet-asset-conversion",
"pallet-assets",
"pallet-balances",
"pallet-xcm",
@@ -606,7 +607,8 @@ dependencies = [
"frame-try-runtime",
"hex-literal 0.4.1",
"log",
- "pallet-asset-tx-payment",
+ "pallet-asset-conversion",
+ "pallet-asset-conversion-tx-payment",
"pallet-assets",
"pallet-aura",
"pallet-authorship",
@@ -631,6 +633,7 @@ dependencies = [
"polkadot-core-primitives",
"polkadot-parachain",
"polkadot-runtime-common",
+ "primitive-types",
"scale-info",
"smallvec",
"sp-api",
@@ -692,6 +695,8 @@ dependencies = [
"cumulus-primitives-core",
"frame-support",
"log",
+ "pallet-asset-conversion",
+ "pallet-asset-tx-payment",
"pallet-xcm",
"parachains-common",
"parity-scale-codec",
@@ -865,7 +870,7 @@ dependencies = [
[[package]]
name = "binary-merkle-tree"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"hash-db",
"log",
@@ -4138,7 +4143,7 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
[[package]]
name = "fork-tree"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
]
@@ -4161,7 +4166,7 @@ checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa"
[[package]]
name = "frame-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-support-procedural",
@@ -4186,7 +4191,7 @@ dependencies = [
[[package]]
name = "frame-benchmarking-cli"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"Inflector",
"array-bytes 4.2.0",
@@ -4233,7 +4238,7 @@ dependencies = [
[[package]]
name = "frame-election-provider-solution-type"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -4244,7 +4249,7 @@ dependencies = [
[[package]]
name = "frame-election-provider-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-election-provider-solution-type",
"frame-support",
@@ -4261,7 +4266,7 @@ dependencies = [
[[package]]
name = "frame-executive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -4290,7 +4295,7 @@ dependencies = [
[[package]]
name = "frame-remote-externalities"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-recursion",
"futures",
@@ -4311,7 +4316,7 @@ dependencies = [
[[package]]
name = "frame-support"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"bitflags",
"environmental",
@@ -4346,7 +4351,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"Inflector",
"cfg-expr",
@@ -4364,7 +4369,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural-tools"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support-procedural-tools-derive",
"proc-macro-crate",
@@ -4376,7 +4381,7 @@ dependencies = [
[[package]]
name = "frame-support-procedural-tools-derive"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro2",
"quote",
@@ -4386,7 +4391,7 @@ dependencies = [
[[package]]
name = "frame-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"cfg-if",
"frame-support",
@@ -4405,7 +4410,7 @@ dependencies = [
[[package]]
name = "frame-system-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -4420,7 +4425,7 @@ dependencies = [
[[package]]
name = "frame-system-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -4429,7 +4434,7 @@ dependencies = [
[[package]]
name = "frame-try-runtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"parity-scale-codec",
@@ -5133,6 +5138,17 @@ dependencies = [
"parity-scale-codec",
]
+[[package]]
+name = "impl-num-traits"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "951641f13f873bff03d4bf19ae8bec531935ac0ac2cc775f84d7edfdcfed3f17"
+dependencies = [
+ "integer-sqrt",
+ "num-traits",
+ "uint",
+]
+
[[package]]
name = "impl-rlp"
version = "0.3.0"
@@ -6564,7 +6580,7 @@ dependencies = [
[[package]]
name = "mmr-gadget"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"log",
@@ -6583,7 +6599,7 @@ dependencies = [
[[package]]
name = "mmr-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"anyhow",
"jsonrpsee",
@@ -7087,7 +7103,7 @@ dependencies = [
[[package]]
name = "pallet-alliance"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"frame-benchmarking",
@@ -7105,10 +7121,42 @@ dependencies = [
"sp-std",
]
+[[package]]
+name = "pallet-asset-conversion"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
+dependencies = [
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-api",
+ "sp-arithmetic",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+]
+
+[[package]]
+name = "pallet-asset-conversion-tx-payment"
+version = "4.0.0-dev"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
+dependencies = [
+ "frame-support",
+ "frame-system",
+ "pallet-transaction-payment",
+ "parity-scale-codec",
+ "scale-info",
+ "sp-runtime",
+ "sp-std",
+]
+
[[package]]
name = "pallet-asset-tx-payment"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7126,7 +7174,7 @@ dependencies = [
[[package]]
name = "pallet-assets"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7141,7 +7189,7 @@ dependencies = [
[[package]]
name = "pallet-aura"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7157,7 +7205,7 @@ dependencies = [
[[package]]
name = "pallet-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7173,7 +7221,7 @@ dependencies = [
[[package]]
name = "pallet-authorship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7187,7 +7235,7 @@ dependencies = [
[[package]]
name = "pallet-babe"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7211,7 +7259,7 @@ dependencies = [
[[package]]
name = "pallet-bags-list"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7231,7 +7279,7 @@ dependencies = [
[[package]]
name = "pallet-balances"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7246,7 +7294,7 @@ dependencies = [
[[package]]
name = "pallet-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7265,7 +7313,7 @@ dependencies = [
[[package]]
name = "pallet-beefy-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"binary-merkle-tree",
@@ -7289,7 +7337,7 @@ dependencies = [
[[package]]
name = "pallet-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7395,7 +7443,7 @@ dependencies = [
[[package]]
name = "pallet-child-bounties"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7439,7 +7487,7 @@ dependencies = [
[[package]]
name = "pallet-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7456,7 +7504,7 @@ dependencies = [
[[package]]
name = "pallet-contracts"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"bitflags",
"environmental",
@@ -7486,7 +7534,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-primitives"
version = "24.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"bitflags",
"parity-scale-codec",
@@ -7499,7 +7547,7 @@ dependencies = [
[[package]]
name = "pallet-contracts-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro2",
"quote",
@@ -7509,7 +7557,7 @@ dependencies = [
[[package]]
name = "pallet-conviction-voting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"assert_matches",
"frame-benchmarking",
@@ -7526,7 +7574,7 @@ dependencies = [
[[package]]
name = "pallet-core-fellowship"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7544,7 +7592,7 @@ dependencies = [
[[package]]
name = "pallet-democracy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7562,7 +7610,7 @@ dependencies = [
[[package]]
name = "pallet-election-provider-multi-phase"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7585,7 +7633,7 @@ dependencies = [
[[package]]
name = "pallet-election-provider-support-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7598,7 +7646,7 @@ dependencies = [
[[package]]
name = "pallet-elections-phragmen"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7616,7 +7664,7 @@ dependencies = [
[[package]]
name = "pallet-fast-unstake"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"docify",
"frame-benchmarking",
@@ -7635,7 +7683,7 @@ dependencies = [
[[package]]
name = "pallet-glutton"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"blake2",
"frame-benchmarking",
@@ -7653,7 +7701,7 @@ dependencies = [
[[package]]
name = "pallet-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7676,7 +7724,7 @@ dependencies = [
[[package]]
name = "pallet-identity"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -7692,7 +7740,7 @@ dependencies = [
[[package]]
name = "pallet-im-online"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7712,7 +7760,7 @@ dependencies = [
[[package]]
name = "pallet-indices"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7729,7 +7777,7 @@ dependencies = [
[[package]]
name = "pallet-insecure-randomness-collective-flip"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7743,7 +7791,7 @@ dependencies = [
[[package]]
name = "pallet-membership"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7760,7 +7808,7 @@ dependencies = [
[[package]]
name = "pallet-message-queue"
version = "7.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7779,7 +7827,7 @@ dependencies = [
[[package]]
name = "pallet-mmr"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7796,7 +7844,7 @@ dependencies = [
[[package]]
name = "pallet-multisig"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7812,7 +7860,7 @@ dependencies = [
[[package]]
name = "pallet-nft-fractionalization"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7829,7 +7877,7 @@ dependencies = [
[[package]]
name = "pallet-nfts"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"enumflags2",
"frame-benchmarking",
@@ -7847,7 +7895,7 @@ dependencies = [
[[package]]
name = "pallet-nfts-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"pallet-nfts",
@@ -7858,7 +7906,7 @@ dependencies = [
[[package]]
name = "pallet-nis"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7874,7 +7922,7 @@ dependencies = [
[[package]]
name = "pallet-nomination-pools"
version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7891,7 +7939,7 @@ dependencies = [
[[package]]
name = "pallet-nomination-pools-benchmarking"
version = "1.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7911,7 +7959,7 @@ dependencies = [
[[package]]
name = "pallet-nomination-pools-runtime-api"
version = "1.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"pallet-nomination-pools",
"parity-scale-codec",
@@ -7922,7 +7970,7 @@ dependencies = [
[[package]]
name = "pallet-offences"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -7939,7 +7987,7 @@ dependencies = [
[[package]]
name = "pallet-offences-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -7978,7 +8026,7 @@ dependencies = [
[[package]]
name = "pallet-preimage"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -7995,7 +8043,7 @@ dependencies = [
[[package]]
name = "pallet-proxy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8010,7 +8058,7 @@ dependencies = [
[[package]]
name = "pallet-ranked-collective"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8028,7 +8076,7 @@ dependencies = [
[[package]]
name = "pallet-recovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8043,7 +8091,7 @@ dependencies = [
[[package]]
name = "pallet-referenda"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"assert_matches",
"frame-benchmarking",
@@ -8062,7 +8110,7 @@ dependencies = [
[[package]]
name = "pallet-salary"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8080,7 +8128,7 @@ dependencies = [
[[package]]
name = "pallet-scheduler"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8097,7 +8145,7 @@ dependencies = [
[[package]]
name = "pallet-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -8118,7 +8166,7 @@ dependencies = [
[[package]]
name = "pallet-session-benchmarking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8134,7 +8182,7 @@ dependencies = [
[[package]]
name = "pallet-society"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8153,7 +8201,7 @@ dependencies = [
[[package]]
name = "pallet-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-election-provider-support",
@@ -8176,7 +8224,7 @@ dependencies = [
[[package]]
name = "pallet-staking-reward-curve"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -8187,7 +8235,7 @@ dependencies = [
[[package]]
name = "pallet-staking-reward-fn"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"log",
"sp-arithmetic",
@@ -8196,7 +8244,7 @@ dependencies = [
[[package]]
name = "pallet-staking-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -8205,7 +8253,7 @@ dependencies = [
[[package]]
name = "pallet-state-trie-migration"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8222,7 +8270,7 @@ dependencies = [
[[package]]
name = "pallet-sudo"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8237,7 +8285,7 @@ dependencies = [
[[package]]
name = "pallet-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8255,7 +8303,7 @@ dependencies = [
[[package]]
name = "pallet-tips"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8274,7 +8322,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-support",
"frame-system",
@@ -8290,7 +8338,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"jsonrpsee",
"pallet-transaction-payment-rpc-runtime-api",
@@ -8306,7 +8354,7 @@ dependencies = [
[[package]]
name = "pallet-transaction-payment-rpc-runtime-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"pallet-transaction-payment",
"parity-scale-codec",
@@ -8318,7 +8366,7 @@ dependencies = [
[[package]]
name = "pallet-treasury"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8335,7 +8383,7 @@ dependencies = [
[[package]]
name = "pallet-uniques"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8350,7 +8398,7 @@ dependencies = [
[[package]]
name = "pallet-utility"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8366,7 +8414,7 @@ dependencies = [
[[package]]
name = "pallet-vesting"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8381,7 +8429,7 @@ dependencies = [
[[package]]
name = "pallet-whitelist"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-benchmarking",
"frame-support",
@@ -8558,9 +8606,11 @@ dependencies = [
name = "parachains-common"
version = "1.0.0"
dependencies = [
+ "cumulus-primitives-core",
"cumulus-primitives-utility",
"frame-support",
"frame-system",
+ "num-traits",
"pallet-asset-tx-payment",
"pallet-assets",
"pallet-authorship",
@@ -10612,6 +10662,7 @@ checksum = "5cfd65aea0c5fa0bfcc7c9e7ca828c921ef778f43d325325ec84bda371bfa75a"
dependencies = [
"fixed-hash",
"impl-codec",
+ "impl-num-traits",
"impl-rlp",
"impl-serde",
"scale-info",
@@ -11570,7 +11621,7 @@ dependencies = [
[[package]]
name = "sc-allocator"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"log",
"sp-core",
@@ -11581,7 +11632,7 @@ dependencies = [
[[package]]
name = "sc-authority-discovery"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -11610,7 +11661,7 @@ dependencies = [
[[package]]
name = "sc-basic-authorship"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"futures-timer",
@@ -11633,7 +11684,7 @@ dependencies = [
[[package]]
name = "sc-block-builder"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"sc-client-api",
@@ -11648,7 +11699,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"memmap2",
"sc-chain-spec-derive",
@@ -11667,7 +11718,7 @@ dependencies = [
[[package]]
name = "sc-chain-spec-derive"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -11678,7 +11729,7 @@ dependencies = [
[[package]]
name = "sc-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"chrono",
@@ -11718,7 +11769,7 @@ dependencies = [
[[package]]
name = "sc-client-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"fnv",
"futures",
@@ -11745,7 +11796,7 @@ dependencies = [
[[package]]
name = "sc-client-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"hash-db",
"kvdb",
@@ -11771,7 +11822,7 @@ dependencies = [
[[package]]
name = "sc-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -11796,7 +11847,7 @@ dependencies = [
[[package]]
name = "sc-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -11825,7 +11876,7 @@ dependencies = [
[[package]]
name = "sc-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"fork-tree",
@@ -11861,7 +11912,7 @@ dependencies = [
[[package]]
name = "sc-consensus-babe-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"jsonrpsee",
@@ -11883,7 +11934,7 @@ dependencies = [
[[package]]
name = "sc-consensus-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-channel",
@@ -11919,7 +11970,7 @@ dependencies = [
[[package]]
name = "sc-consensus-beefy-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"jsonrpsee",
@@ -11938,7 +11989,7 @@ dependencies = [
[[package]]
name = "sc-consensus-epochs"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"fork-tree",
"parity-scale-codec",
@@ -11951,7 +12002,7 @@ dependencies = [
[[package]]
name = "sc-consensus-grandpa"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ahash 0.8.2",
"array-bytes 4.2.0",
@@ -11991,7 +12042,7 @@ dependencies = [
[[package]]
name = "sc-consensus-grandpa-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"finality-grandpa",
"futures",
@@ -12011,7 +12062,7 @@ dependencies = [
[[package]]
name = "sc-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -12034,7 +12085,7 @@ dependencies = [
[[package]]
name = "sc-executor"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"lru 0.10.0",
"parity-scale-codec",
@@ -12056,7 +12107,7 @@ dependencies = [
[[package]]
name = "sc-executor-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"sc-allocator",
"sp-maybe-compressed-blob",
@@ -12068,7 +12119,7 @@ dependencies = [
[[package]]
name = "sc-executor-wasmtime"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"anyhow",
"cfg-if",
@@ -12086,7 +12137,7 @@ dependencies = [
[[package]]
name = "sc-informant"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ansi_term",
"futures",
@@ -12102,7 +12153,7 @@ dependencies = [
[[package]]
name = "sc-keystore"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"parking_lot 0.12.1",
@@ -12116,7 +12167,7 @@ dependencies = [
[[package]]
name = "sc-network"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-channel",
@@ -12162,7 +12213,7 @@ dependencies = [
[[package]]
name = "sc-network-bitswap"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-channel",
"cid",
@@ -12183,7 +12234,7 @@ dependencies = [
[[package]]
name = "sc-network-common"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-trait",
@@ -12210,7 +12261,7 @@ dependencies = [
[[package]]
name = "sc-network-gossip"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ahash 0.8.2",
"futures",
@@ -12228,7 +12279,7 @@ dependencies = [
[[package]]
name = "sc-network-light"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-channel",
@@ -12250,7 +12301,7 @@ dependencies = [
[[package]]
name = "sc-network-sync"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-channel",
@@ -12284,7 +12335,7 @@ dependencies = [
[[package]]
name = "sc-network-transactions"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"futures",
@@ -12302,7 +12353,7 @@ dependencies = [
[[package]]
name = "sc-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"bytes",
@@ -12332,7 +12383,7 @@ dependencies = [
[[package]]
name = "sc-proposer-metrics"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"log",
"substrate-prometheus-endpoint",
@@ -12341,7 +12392,7 @@ dependencies = [
[[package]]
name = "sc-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"jsonrpsee",
@@ -12372,7 +12423,7 @@ dependencies = [
[[package]]
name = "sc-rpc-api"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"jsonrpsee",
"parity-scale-codec",
@@ -12391,7 +12442,7 @@ dependencies = [
[[package]]
name = "sc-rpc-server"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"http",
"jsonrpsee",
@@ -12406,7 +12457,7 @@ dependencies = [
[[package]]
name = "sc-rpc-spec-v2"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"futures",
@@ -12432,7 +12483,7 @@ dependencies = [
[[package]]
name = "sc-service"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"directories",
@@ -12498,7 +12549,7 @@ dependencies = [
[[package]]
name = "sc-state-db"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"log",
"parity-scale-codec",
@@ -12509,7 +12560,7 @@ dependencies = [
[[package]]
name = "sc-storage-monitor"
version = "0.1.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"clap",
"fs4",
@@ -12525,7 +12576,7 @@ dependencies = [
[[package]]
name = "sc-sync-state-rpc"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"jsonrpsee",
"parity-scale-codec",
@@ -12544,7 +12595,7 @@ dependencies = [
[[package]]
name = "sc-sysinfo"
version = "6.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"libc",
@@ -12563,7 +12614,7 @@ dependencies = [
[[package]]
name = "sc-telemetry"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"chrono",
"futures",
@@ -12582,7 +12633,7 @@ dependencies = [
[[package]]
name = "sc-tracing"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ansi_term",
"atty",
@@ -12613,7 +12664,7 @@ dependencies = [
[[package]]
name = "sc-tracing-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -12624,7 +12675,7 @@ dependencies = [
[[package]]
name = "sc-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -12650,7 +12701,7 @@ dependencies = [
[[package]]
name = "sc-transaction-pool-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -12666,7 +12717,7 @@ dependencies = [
[[package]]
name = "sc-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-channel",
"futures",
@@ -13224,7 +13275,7 @@ dependencies = [
[[package]]
name = "sp-api"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"hash-db",
"log",
@@ -13244,7 +13295,7 @@ dependencies = [
[[package]]
name = "sp-api-proc-macro"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"Inflector",
"blake2",
@@ -13258,7 +13309,7 @@ dependencies = [
[[package]]
name = "sp-application-crypto"
version = "23.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13271,7 +13322,7 @@ dependencies = [
[[package]]
name = "sp-arithmetic"
version = "16.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"integer-sqrt",
"num-traits",
@@ -13285,7 +13336,7 @@ dependencies = [
[[package]]
name = "sp-authority-discovery"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13298,7 +13349,7 @@ dependencies = [
[[package]]
name = "sp-block-builder"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"sp-api",
@@ -13310,7 +13361,7 @@ dependencies = [
[[package]]
name = "sp-blockchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"log",
@@ -13328,7 +13379,7 @@ dependencies = [
[[package]]
name = "sp-consensus"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures",
@@ -13343,7 +13394,7 @@ dependencies = [
[[package]]
name = "sp-consensus-aura"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -13361,7 +13412,7 @@ dependencies = [
[[package]]
name = "sp-consensus-babe"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"parity-scale-codec",
@@ -13382,7 +13433,7 @@ dependencies = [
[[package]]
name = "sp-consensus-beefy"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"lazy_static",
"parity-scale-codec",
@@ -13401,7 +13452,7 @@ dependencies = [
[[package]]
name = "sp-consensus-grandpa"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"finality-grandpa",
"log",
@@ -13419,7 +13470,7 @@ dependencies = [
[[package]]
name = "sp-consensus-slots"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13431,7 +13482,7 @@ dependencies = [
[[package]]
name = "sp-core"
version = "21.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"bitflags",
@@ -13475,7 +13526,7 @@ dependencies = [
[[package]]
name = "sp-core-hashing"
version = "9.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"blake2b_simd",
"byteorder",
@@ -13489,7 +13540,7 @@ dependencies = [
[[package]]
name = "sp-core-hashing-proc-macro"
version = "9.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro2",
"quote",
@@ -13500,7 +13551,7 @@ dependencies = [
[[package]]
name = "sp-database"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"kvdb",
"parking_lot 0.12.1",
@@ -13509,7 +13560,7 @@ dependencies = [
[[package]]
name = "sp-debug-derive"
version = "8.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro2",
"quote",
@@ -13519,7 +13570,7 @@ dependencies = [
[[package]]
name = "sp-externalities"
version = "0.19.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"environmental",
"parity-scale-codec",
@@ -13530,7 +13581,7 @@ dependencies = [
[[package]]
name = "sp-inherents"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"impl-trait-for-tuples",
@@ -13545,7 +13596,7 @@ dependencies = [
[[package]]
name = "sp-io"
version = "23.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"bytes",
"ed25519",
@@ -13571,7 +13622,7 @@ dependencies = [
[[package]]
name = "sp-keyring"
version = "24.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"lazy_static",
"sp-core",
@@ -13582,7 +13633,7 @@ dependencies = [
[[package]]
name = "sp-keystore"
version = "0.27.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"parity-scale-codec",
@@ -13596,7 +13647,7 @@ dependencies = [
[[package]]
name = "sp-maybe-compressed-blob"
version = "4.1.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"thiserror",
"zstd 0.12.3+zstd.1.5.2",
@@ -13605,7 +13656,7 @@ dependencies = [
[[package]]
name = "sp-metadata-ir"
version = "0.1.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-metadata",
"parity-scale-codec",
@@ -13616,7 +13667,7 @@ dependencies = [
[[package]]
name = "sp-mmr-primitives"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ckb-merkle-mountain-range",
"log",
@@ -13634,7 +13685,7 @@ dependencies = [
[[package]]
name = "sp-npos-elections"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13648,7 +13699,7 @@ dependencies = [
[[package]]
name = "sp-offchain"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"sp-api",
"sp-core",
@@ -13658,7 +13709,7 @@ dependencies = [
[[package]]
name = "sp-panic-handler"
version = "8.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"backtrace",
"lazy_static",
@@ -13668,7 +13719,7 @@ dependencies = [
[[package]]
name = "sp-rpc"
version = "6.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"rustc-hash",
"serde",
@@ -13678,7 +13729,7 @@ dependencies = [
[[package]]
name = "sp-runtime"
version = "24.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"either",
"hash256-std-hasher",
@@ -13700,7 +13751,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface"
version = "17.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"bytes",
"impl-trait-for-tuples",
@@ -13718,7 +13769,7 @@ dependencies = [
[[package]]
name = "sp-runtime-interface-proc-macro"
version = "11.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"Inflector",
"proc-macro-crate",
@@ -13730,7 +13781,7 @@ dependencies = [
[[package]]
name = "sp-session"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13744,7 +13795,7 @@ dependencies = [
[[package]]
name = "sp-staking"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -13757,7 +13808,7 @@ dependencies = [
[[package]]
name = "sp-state-machine"
version = "0.28.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"hash-db",
"log",
@@ -13777,7 +13828,7 @@ dependencies = [
[[package]]
name = "sp-statement-store"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"log",
"parity-scale-codec",
@@ -13795,12 +13846,12 @@ dependencies = [
[[package]]
name = "sp-std"
version = "8.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
[[package]]
name = "sp-storage"
version = "13.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -13813,7 +13864,7 @@ dependencies = [
[[package]]
name = "sp-timestamp"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"futures-timer",
@@ -13828,7 +13879,7 @@ dependencies = [
[[package]]
name = "sp-tracing"
version = "10.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"sp-std",
@@ -13840,7 +13891,7 @@ dependencies = [
[[package]]
name = "sp-transaction-pool"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"sp-api",
"sp-runtime",
@@ -13849,7 +13900,7 @@ dependencies = [
[[package]]
name = "sp-transaction-storage-proof"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"log",
@@ -13865,7 +13916,7 @@ dependencies = [
[[package]]
name = "sp-trie"
version = "22.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ahash 0.8.2",
"hash-db",
@@ -13888,7 +13939,7 @@ dependencies = [
[[package]]
name = "sp-version"
version = "22.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"impl-serde",
"parity-scale-codec",
@@ -13905,7 +13956,7 @@ dependencies = [
[[package]]
name = "sp-version-proc-macro"
version = "8.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"proc-macro2",
@@ -13916,7 +13967,7 @@ dependencies = [
[[package]]
name = "sp-wasm-interface"
version = "14.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"anyhow",
"impl-trait-for-tuples",
@@ -13929,7 +13980,7 @@ dependencies = [
[[package]]
name = "sp-weights"
version = "20.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"parity-scale-codec",
"scale-info",
@@ -14127,7 +14178,7 @@ dependencies = [
[[package]]
name = "substrate-build-script-utils"
version = "3.0.0"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"platforms",
]
@@ -14135,7 +14186,7 @@ dependencies = [
[[package]]
name = "substrate-frame-rpc-system"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"frame-system-rpc-runtime-api",
"futures",
@@ -14154,7 +14205,7 @@ dependencies = [
[[package]]
name = "substrate-prometheus-endpoint"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"hyper",
"log",
@@ -14166,7 +14217,7 @@ dependencies = [
[[package]]
name = "substrate-rpc-client"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"jsonrpsee",
@@ -14179,7 +14230,7 @@ dependencies = [
[[package]]
name = "substrate-state-trie-migration-rpc"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"jsonrpsee",
"log",
@@ -14198,7 +14249,7 @@ dependencies = [
[[package]]
name = "substrate-test-client"
version = "2.0.1"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"array-bytes 4.2.0",
"async-trait",
@@ -14224,7 +14275,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils"
version = "4.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"futures",
"substrate-test-utils-derive",
@@ -14234,7 +14285,7 @@ dependencies = [
[[package]]
name = "substrate-test-utils-derive"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -14245,7 +14296,7 @@ dependencies = [
[[package]]
name = "substrate-wasm-builder"
version = "5.0.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"ansi_term",
"build-helper",
@@ -14916,7 +14967,7 @@ checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642"
[[package]]
name = "try-runtime-cli"
version = "0.10.0-dev"
-source = "git+https://github.com/paritytech/substrate?branch=master#dc3fb3d4cf9efb779a068cdc201babc7ae2d233c"
+source = "git+https://github.com/paritytech/substrate?branch=master#81d125fe2a938ba336716c8b1d5e0faff0487d50"
dependencies = [
"async-trait",
"clap",
diff --git a/cumulus/parachains/common/Cargo.toml b/cumulus/parachains/common/Cargo.toml
index b35e919310..576659d94e 100644
--- a/cumulus/parachains/common/Cargo.toml
+++ b/cumulus/parachains/common/Cargo.toml
@@ -11,6 +11,7 @@ targets = ["x86_64-unknown-linux-gnu"]
[dependencies]
codec = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"], default-features = false }
scale-info = { version = "2.8.0", default-features = false, features = ["derive"] }
+num-traits = { version = "0.2", default-features = false}
# Substrate
frame-support = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" }
@@ -33,6 +34,7 @@ xcm-executor = { git = "https://github.com/paritytech/polkadot", default-feature
# Cumulus
pallet-collator-selection = { path = "../../pallets/collator-selection", default-features = false }
+cumulus-primitives-core = { path = "../../primitives/core", default-features = false }
cumulus-primitives-utility = { path = "../../primitives/utility", default-features = false }
[dev-dependencies]
@@ -47,7 +49,6 @@ default = ["std"]
std = [
"frame-support/std",
"frame-system/std",
- "pallet-asset-tx-payment/std",
"pallet-assets/std",
"pallet-authorship/std",
"pallet-balances/std",
@@ -56,6 +57,7 @@ std = [
"sp-io/std",
"sp-std/std",
"pallet-collator-selection/std",
+ "cumulus-primitives-core/std",
"cumulus-primitives-utility/std",
"xcm/std",
"xcm-executor/std",
diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml
index c216a84191..8d42392b4b 100644
--- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml
+++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/Cargo.toml
@@ -16,6 +16,7 @@ sp-core = { default-features = false, git = "https://github.com/paritytech/subst
sp-weights = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-balances = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
pallet-assets = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
+pallet-asset-conversion = { default-features = false, git = "https://github.com/paritytech/substrate", branch = "master" }
# Polkadot
polkadot-core-primitives = { default-features = false, git = "https://github.com/paritytech/polkadot", branch = "master" }
diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs
index 68a5ccfaa0..e3d33dabaa 100644
--- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs
+++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/lib.rs
@@ -26,7 +26,8 @@ pub use integration_tests_common::{
},
AccountId, AssetHubWestend, AssetHubWestendPallet, AssetHubWestendReceiver,
AssetHubWestendSender, Collectives, CollectivesPallet, CollectivesReceiver, CollectivesSender,
- PenpalWestend, Westend, WestendPallet, WestendReceiver, WestendSender,
+ PenpalWestend, PenpalWestendPallet, PenpalWestendReceiver, PenpalWestendSender, Westend,
+ WestendPallet, WestendReceiver, WestendSender,
};
pub use polkadot_core_primitives::InboundDownwardMessage;
pub use xcm::{
diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/mod.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/mod.rs
index 44861d2a87..d4e304eb0f 100644
--- a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/mod.rs
+++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/mod.rs
@@ -15,5 +15,6 @@
// along with Cumulus. If not, see .
mod reserve_transfer;
+mod swap;
mod teleport;
mod transact;
diff --git a/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/swap.rs b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/swap.rs
new file mode 100644
index 0000000000..27d15b689b
--- /dev/null
+++ b/cumulus/parachains/integration-tests/emulated/assets/asset-hub-westend/src/tests/swap.rs
@@ -0,0 +1,307 @@
+use crate::*;
+use frame_support::{instances::Instance2, BoundedVec};
+use xcm_emulator::Parachain;
+
+#[test]
+fn swap_locally_on_chain_using_local_assets() {
+ const ASSET_ID: u32 = 1;
+
+ let asset_native = Box::new(MultiLocation { parents: 0, interior: Here });
+ let asset_one = Box::new(MultiLocation {
+ parents: 0,
+ interior: X2(PalletInstance(50), GeneralIndex(ASSET_ID.into())),
+ });
+
+ AssetHubWestend::execute_with(|| {
+ type RuntimeEvent = ::RuntimeEvent;
+
+ assert_ok!(::Assets::create(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ ASSET_ID.into(),
+ AssetHubWestendSender::get().into(),
+ 1000,
+ ));
+ assert!(::Assets::asset_exists(ASSET_ID));
+
+ assert_ok!(::Assets::mint(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ ASSET_ID.into(),
+ AssetHubWestendSender::get().into(),
+ 3_000_000_000_000,
+ ));
+
+ assert_ok!(::AssetConversion::create_pool(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ asset_native.clone(),
+ asset_one.clone(),
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {},
+ ]
+ );
+
+ assert_ok!(::AssetConversion::add_liquidity(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ asset_native.clone(),
+ asset_one.clone(),
+ 1_000_000_000_000,
+ 2_000_000_000_000,
+ 0,
+ 0,
+ AssetHubWestendSender::get().into()
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => { lp_token_minted: *lp_token_minted == 1414213562273, },
+ ]
+ );
+
+ let path = BoundedVec::<_, _>::truncate_from(vec![asset_native.clone(), asset_one.clone()]);
+
+ assert_ok!(::AssetConversion::swap_exact_tokens_for_tokens(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ path,
+ 100,
+ 1,
+ AssetHubWestendSender::get().into(),
+ true
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. }) => {
+ amount_in: *amount_in == 100,
+ amount_out: *amount_out == 199,
+ },
+ ]
+ );
+
+ assert_ok!(::AssetConversion::remove_liquidity(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ asset_native,
+ asset_one,
+ 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved.
+ 0,
+ 0,
+ AssetHubWestendSender::get().into(),
+ ));
+ });
+}
+
+#[test]
+fn swap_locally_on_chain_using_foreign_assets() {
+ use frame_support::weights::WeightToFee;
+
+ const ASSET_ID: u32 = 1;
+ let asset_native = Box::new(MultiLocation { parents: 0, interior: Here });
+
+ let foreign_asset1_at_asset_hub_westend = Box::new(MultiLocation {
+ parents: 1,
+ interior: X3(
+ Parachain(PenpalWestend::para_id().into()),
+ PalletInstance(50),
+ GeneralIndex(ASSET_ID.into()),
+ ),
+ });
+
+ let assets_para_destination: VersionedMultiLocation =
+ MultiLocation { parents: 1, interior: X1(Parachain(AssetHubWestend::para_id().into())) }
+ .into();
+
+ let penpal_location =
+ MultiLocation { parents: 1, interior: X1(Parachain(PenpalWestend::para_id().into())) };
+
+ // 1. Create asset on penpal:
+ PenpalWestend::execute_with(|| {
+ assert_ok!(::Assets::create(
+ ::RuntimeOrigin::signed(PenpalWestendSender::get()),
+ ASSET_ID.into(),
+ PenpalWestendSender::get().into(),
+ 1000,
+ ));
+
+ assert!(::Assets::asset_exists(ASSET_ID));
+ });
+
+ // 2. Create foreign asset on asset_hub_westend:
+
+ let require_weight_at_most = Weight::from_parts(1_100_000_000_000, 30_000);
+ let origin_kind = OriginKind::Xcm;
+ let sov_penpal_on_asset_hub_westend = AssetHubWestend::sovereign_account_id_of(penpal_location);
+
+ AssetHubWestend::fund_accounts(vec![
+ (AssetHubWestendSender::get(), 5_000_000), // An account to swap dot for something else.
+ (sov_penpal_on_asset_hub_westend.clone(), 1000_000_000_000_000_000),
+ ]);
+
+ let sov_penpal_on_asset_hub_westend_as_location: MultiLocation = MultiLocation {
+ parents: 0,
+ interior: X1(AccountId32 {
+ network: None,
+ id: sov_penpal_on_asset_hub_westend.clone().into(),
+ }),
+ };
+
+ let call_foreign_assets_create =
+ ::RuntimeCall::ForeignAssets(pallet_assets::Call::<
+ ::Runtime,
+ Instance2,
+ >::create {
+ id: *foreign_asset1_at_asset_hub_westend,
+ min_balance: 1000,
+ admin: sov_penpal_on_asset_hub_westend.clone().into(),
+ })
+ .encode()
+ .into();
+
+ let buy_execution_fee_amount =
+ asset_hub_westend_runtime::constants::fee::WeightToFee::weight_to_fee(&Weight::from_parts(
+ 10_100_000_000_000,
+ 300_000,
+ ));
+ let buy_execution_fee = MultiAsset {
+ id: Concrete(MultiLocation { parents: 1, interior: Here }),
+ fun: Fungible(buy_execution_fee_amount),
+ };
+
+ let xcm = VersionedXcm::from(Xcm(vec![
+ WithdrawAsset { 0: vec![buy_execution_fee.clone()].into() },
+ BuyExecution { fees: buy_execution_fee.clone(), weight_limit: Unlimited },
+ Transact { require_weight_at_most, origin_kind, call: call_foreign_assets_create },
+ RefundSurplus,
+ DepositAsset {
+ assets: All.into(),
+ beneficiary: sov_penpal_on_asset_hub_westend_as_location,
+ },
+ ]));
+
+ // Send XCM message from penpal => asset_hub_westend
+ let sudo_penpal_origin = ::RuntimeOrigin::root();
+ PenpalWestend::execute_with(|| {
+ assert_ok!(::PolkadotXcm::send(
+ sudo_penpal_origin.clone(),
+ bx!(assets_para_destination.clone()),
+ bx!(xcm),
+ ));
+
+ type RuntimeEvent = ::RuntimeEvent;
+
+ assert_expected_events!(
+ PenpalWestend,
+ vec![
+ RuntimeEvent::PolkadotXcm(pallet_xcm::Event::Sent { .. }) => {},
+ ]
+ );
+ });
+
+ // Receive XCM message in Assets Parachain
+ AssetHubWestend::execute_with(|| {
+ assert!(::ForeignAssets::asset_exists(
+ *foreign_asset1_at_asset_hub_westend
+ ));
+
+ // 3: Mint foreign asset on asset_hub_westend:
+ //
+ // (While it might be nice to use batch,
+ // currently that's disabled due to safe call filters.)
+
+ type RuntimeEvent = ::RuntimeEvent;
+ // 3. Mint foreign asset (in reality this should be a teleport or some such)
+ assert_ok!(::ForeignAssets::mint(
+ ::RuntimeOrigin::signed(
+ sov_penpal_on_asset_hub_westend.clone().into()
+ ),
+ *foreign_asset1_at_asset_hub_westend,
+ sov_penpal_on_asset_hub_westend.clone().into(),
+ 3_000_000_000_000,
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::ForeignAssets(pallet_assets::Event::Issued { .. }) => {},
+ ]
+ );
+
+ // 4. Create pool:
+ assert_ok!(::AssetConversion::create_pool(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ asset_native.clone(),
+ foreign_asset1_at_asset_hub_westend.clone(),
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::PoolCreated { .. }) => {},
+ ]
+ );
+
+ // 5. Add liquidity:
+ assert_ok!(::AssetConversion::add_liquidity(
+ ::RuntimeOrigin::signed(
+ sov_penpal_on_asset_hub_westend.clone()
+ ),
+ asset_native.clone(),
+ foreign_asset1_at_asset_hub_westend.clone(),
+ 1_000_000_000_000,
+ 2_000_000_000_000,
+ 0,
+ 0,
+ sov_penpal_on_asset_hub_westend.clone().into()
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::LiquidityAdded {lp_token_minted, .. }) => {
+ lp_token_minted: *lp_token_minted == 1414213562273,
+ },
+ ]
+ );
+
+ // 6. Swap!
+ let path = BoundedVec::<_, _>::truncate_from(vec![
+ asset_native.clone(),
+ foreign_asset1_at_asset_hub_westend.clone(),
+ ]);
+
+ assert_ok!(::AssetConversion::swap_exact_tokens_for_tokens(
+ ::RuntimeOrigin::signed(AssetHubWestendSender::get()),
+ path,
+ 100000,
+ 1000,
+ AssetHubWestendSender::get().into(),
+ true
+ ));
+
+ assert_expected_events!(
+ AssetHubWestend,
+ vec![
+ RuntimeEvent::AssetConversion(pallet_asset_conversion::Event::SwapExecuted { amount_in, amount_out, .. },) => {
+ amount_in: *amount_in == 100000,
+ amount_out: *amount_out == 199399,
+ },
+ ]
+ );
+
+ // 7. Remove liquidity
+ assert_ok!(::AssetConversion::remove_liquidity(
+ ::RuntimeOrigin::signed(
+ sov_penpal_on_asset_hub_westend.clone()
+ ),
+ asset_native,
+ foreign_asset1_at_asset_hub_westend,
+ 1414213562273 - 2_000_000_000, // all but the 2 EDs can't be retrieved.
+ 0,
+ 0,
+ sov_penpal_on_asset_hub_westend.clone().into(),
+ ));
+ });
+}
diff --git a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs
index 2b2af134a5..dba3ef7dca 100644
--- a/cumulus/parachains/integration-tests/emulated/common/src/lib.rs
+++ b/cumulus/parachains/integration-tests/emulated/common/src/lib.rs
@@ -98,6 +98,7 @@ decl_test_parachains! {
PolkadotXcm: asset_hub_westend_runtime::PolkadotXcm,
Assets: asset_hub_westend_runtime::Assets,
ForeignAssets: asset_hub_westend_runtime::ForeignAssets,
+ AssetConversion: asset_hub_westend_runtime::AssetConversion,
}
},
// Polkadot
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
index 5c4c4de935..2d926be7e9 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/Cargo.toml
@@ -20,8 +20,9 @@ frame-system = { git = "https://github.com/paritytech/substrate", default-featur
frame-system-benchmarking = { git = "https://github.com/paritytech/substrate", optional = true, default-features = false, branch = "master" }
frame-system-rpc-runtime-api = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
frame-try-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, optional = true, branch = "master" }
-pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+pallet-asset-conversion-tx-payment = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-assets = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+pallet-asset-conversion = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-aura = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-authorship = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
pallet-balances = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
@@ -47,6 +48,8 @@ sp-session = { git = "https://github.com/paritytech/substrate", default-features
sp-std = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-transaction-pool = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
sp-version = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+# num-traits feature needed for dex integer sq root:
+primitive-types = { version = "0.12.0", default-features = false, features = ["codec", "scale-info", "num-traits"] }
# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
@@ -90,6 +93,7 @@ runtime-benchmarks = [
"frame-system-benchmarking/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"pallet-assets/runtime-benchmarks",
+ "pallet-asset-conversion/runtime-benchmarks",
"pallet-balances/runtime-benchmarks",
"pallet-multisig/runtime-benchmarks",
"pallet-nft-fractionalization/runtime-benchmarks",
@@ -117,8 +121,9 @@ try-runtime = [
"frame-executive/try-runtime",
"frame-system/try-runtime",
"frame-try-runtime/try-runtime",
- "pallet-asset-tx-payment/try-runtime",
+ "pallet-asset-conversion-tx-payment/try-runtime",
"pallet-assets/try-runtime",
+ "pallet-asset-conversion/try-runtime",
"pallet-aura/try-runtime",
"pallet-authorship/try-runtime",
"pallet-balances/try-runtime",
@@ -143,8 +148,9 @@ std = [
"frame-support/std",
"frame-system-rpc-runtime-api/std",
"frame-system/std",
- "pallet-asset-tx-payment/std",
+ "pallet-asset-conversion-tx-payment/std",
"pallet-assets/std",
+ "pallet-asset-conversion/std",
"pallet-aura/std",
"pallet-authorship/std",
"pallet-balances/std",
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
index 566e707506..0aeb2edee8 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/lib.rs
@@ -28,49 +28,51 @@ pub mod constants;
mod weights;
pub mod xcm_config;
-use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
-use sp_api::impl_runtime_apis;
-use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
-use sp_runtime::{
- create_runtime_str, generic, impl_opaque_keys,
- traits::{AccountIdLookup, BlakeTwo256, Block as BlockT, ConvertInto, Verify},
- transaction_validity::{TransactionSource, TransactionValidity},
- ApplyExtrinsicResult,
-};
-
-use sp_std::prelude::*;
-#[cfg(feature = "std")]
-use sp_version::NativeVersion;
-use sp_version::RuntimeVersion;
-
+use crate::xcm_config::{TrustBackedAssetsPalletLocation, UniversalLocation};
+use assets_common::local_and_foreign_assets::{LocalAndForeignAssets, MultiLocationConverter};
use codec::{Decode, Encode, MaxEncodedLen};
use constants::{currency::*, fee::WeightToFee};
+use cumulus_pallet_parachain_system::RelayNumberStrictlyIncreases;
use frame_support::{
construct_runtime,
dispatch::DispatchClass,
- parameter_types,
+ ord_parameter_types, parameter_types,
traits::{
- tokens::nonfungibles_v2::Inspect, AsEnsureOriginWithArg, ConstBool, ConstU32, ConstU64,
- ConstU8, InstanceFilter,
+ tokens::nonfungibles_v2::Inspect, AsEnsureOriginWithArg, ConstBool, ConstU128, ConstU32,
+ ConstU64, ConstU8, InstanceFilter,
},
weights::{ConstantMultiplier, Weight},
BoundedVec, PalletId, RuntimeDebug,
};
use frame_system::{
limits::{BlockLength, BlockWeights},
- EnsureRoot, EnsureSigned,
+ EnsureRoot, EnsureSigned, EnsureSignedBy,
};
+use pallet_asset_conversion_tx_payment::AssetConversionAdapter;
use pallet_nfts::PalletFeatures;
pub use parachains_common as common;
use parachains_common::{
- impls::{AssetsToBlockAuthor, DealWithFees},
- opaque, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance, BlockNumber, Hash, Header,
- Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS, MAXIMUM_BLOCK_WEIGHT,
- NORMAL_DISPATCH_RATIO, SLOT_DURATION,
+ impls::DealWithFees, opaque, AccountId, AssetIdForTrustBackedAssets, AuraId, Balance,
+ BlockNumber, Hash, Header, Index, Signature, AVERAGE_ON_INITIALIZE_RATIO, DAYS, HOURS,
+ MAXIMUM_BLOCK_WEIGHT, NORMAL_DISPATCH_RATIO, SLOT_DURATION,
};
+use sp_api::impl_runtime_apis;
+use sp_core::{crypto::KeyTypeId, OpaqueMetadata};
+use sp_runtime::{
+ create_runtime_str, generic, impl_opaque_keys,
+ traits::{AccountIdConversion, AccountIdLookup, BlakeTwo256, Block as BlockT, Verify},
+ transaction_validity::{TransactionSource, TransactionValidity},
+ ApplyExtrinsicResult, Permill,
+};
+use sp_std::prelude::*;
+#[cfg(feature = "std")]
+use sp_version::NativeVersion;
+use sp_version::RuntimeVersion;
+use xcm::opaque::v3::MultiLocation;
use xcm_config::{
- ForeignAssetsConvertedConcreteId, TrustBackedAssetsConvertedConcreteId, WestendLocation,
- XcmConfig, XcmOriginToTransactDispatchOrigin,
+ ForeignAssetsConvertedConcreteId, PoolAssetsConvertedConcreteId,
+ TrustBackedAssetsConvertedConcreteId, WestendLocation, XcmConfig,
+ XcmOriginToTransactDispatchOrigin,
};
#[cfg(any(feature = "std", test))]
@@ -251,11 +253,77 @@ impl pallet_assets::Config for Runtime {
type WeightInfo = weights::pallet_assets_local::WeightInfo;
type CallbackHandle = ();
type AssetAccountDeposit = AssetAccountDeposit;
- type RemoveItemsLimit = frame_support::traits::ConstU32<1000>;
+ type RemoveItemsLimit = ConstU32<1000>;
#[cfg(feature = "runtime-benchmarks")]
type BenchmarkHelper = ();
}
+parameter_types! {
+ pub const AssetConversionPalletId: PalletId = PalletId(*b"py/ascon");
+ pub storage AllowMultiAssetPools: bool = false;
+ // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero
+ pub storage LiquidityWithdrawalFee: Permill = Permill::from_percent(0);
+}
+
+ord_parameter_types! {
+ pub const AssetConversionOrigin: sp_runtime::AccountId32 = AccountIdConversion::::into_account_truncating(&AssetConversionPalletId::get());
+}
+
+pub type PoolAssetsInstance = pallet_assets::Instance3;
+impl pallet_assets::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Balance = Balance;
+ type RemoveItemsLimit = ConstU32<1000>;
+ type AssetId = u32;
+ type AssetIdParameter = u32;
+ type Currency = Balances;
+ type CreateOrigin =
+ AsEnsureOriginWithArg>;
+ type ForceOrigin = AssetsForceOrigin;
+ type AssetDeposit = ConstU128<0>;
+ type AssetAccountDeposit = ConstU128<0>;
+ type MetadataDepositBase = ConstU128<0>;
+ type MetadataDepositPerByte = ConstU128<0>;
+ type ApprovalDeposit = ConstU128<0>;
+ type StringLimit = ConstU32<50>;
+ type Freezer = ();
+ type Extra = ();
+ type WeightInfo = weights::pallet_assets_pool::WeightInfo;
+ type CallbackHandle = ();
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = ();
+}
+
+impl pallet_asset_conversion::Config for Runtime {
+ type RuntimeEvent = RuntimeEvent;
+ type Balance = Balance;
+ type HigherPrecisionBalance = sp_core::U256;
+ type Currency = Balances;
+ type AssetBalance = ::Balance;
+ type AssetId = MultiLocation;
+ type Assets = LocalAndForeignAssets;
+ type PoolAssets = PoolAssets;
+ type PoolAssetId = u32;
+ type PoolSetupFee = ConstU128<0>; // Asset class deposit fees are sufficient to prevent spam
+ type PoolSetupFeeReceiver = AssetConversionOrigin;
+ type LiquidityWithdrawalFee = LiquidityWithdrawalFee; // should be non-zero if AllowMultiAssetPools is true, otherwise can be zero.
+ type LPFee = ConstU32<3>;
+ type PalletId = AssetConversionPalletId;
+ type AllowMultiAssetPools = AllowMultiAssetPools;
+ type MaxSwapPathLength = ConstU32<4>;
+
+ type MultiAssetId = Box;
+ type MultiAssetIdConverter = MultiLocationConverter;
+
+ type MintMinLiquidity = ConstU128<100>;
+
+ type WeightInfo = ();
+
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper =
+ crate::xcm_config::BenchmarkMultiLocationConverter>;
+}
+
parameter_types! {
// we just reuse the same deposits
pub const ForeignAssetsAssetDeposit: Balance = AssetDeposit::get();
@@ -587,18 +655,10 @@ impl pallet_collator_selection::Config for Runtime {
type WeightInfo = weights::pallet_collator_selection::WeightInfo;
}
-impl pallet_asset_tx_payment::Config for Runtime {
+impl pallet_asset_conversion_tx_payment::Config for Runtime {
type RuntimeEvent = RuntimeEvent;
- type Fungibles = Assets;
- type OnChargeAssetTransaction = pallet_asset_tx_payment::FungiblesAdapter<
- pallet_assets::BalanceToAssetBalance<
- Balances,
- Runtime,
- ConvertInto,
- TrustBackedAssetsInstance,
- >,
- AssetsToBlockAuthor,
- >;
+ type Fungibles = LocalAndForeignAssets;
+ type OnChargeAssetTransaction = AssetConversionAdapter;
}
parameter_types! {
@@ -715,7 +775,8 @@ construct_runtime!(
// Monetary stuff.
Balances: pallet_balances::{Pallet, Call, Storage, Config, Event} = 10,
TransactionPayment: pallet_transaction_payment::{Pallet, Storage, Event} = 11,
- AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event} = 12,
+ // AssetTxPayment: pallet_asset_tx_payment::{Pallet, Event} = 12,
+ AssetTxPayment: pallet_asset_conversion_tx_payment::{Pallet, Event} = 13,
// Collator support. the order of these 5 are important and shall not change.
Authorship: pallet_authorship::{Pallet, Storage} = 20,
@@ -741,6 +802,8 @@ construct_runtime!(
Nfts: pallet_nfts::{Pallet, Call, Storage, Event} = 52,
ForeignAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 53,
NftFractionalization: pallet_nft_fractionalization::{Pallet, Call, Storage, Event, HoldReason} = 54,
+ PoolAssets: pallet_assets::::{Pallet, Call, Storage, Event} = 55,
+ AssetConversion: pallet_asset_conversion::{Pallet, Call, Storage, Event} = 56,
}
);
@@ -761,7 +824,7 @@ pub type SignedExtra = (
frame_system::CheckEra,
frame_system::CheckNonce,
frame_system::CheckWeight,
- pallet_asset_tx_payment::ChargeAssetTxPayment,
+ pallet_asset_conversion_tx_payment::ChargeAssetTxPayment,
);
/// Unchecked extrinsic type as expected by this runtime.
pub type UncheckedExtrinsic =
@@ -795,6 +858,8 @@ mod benches {
[frame_system, SystemBench::]
[pallet_assets, Local]
[pallet_assets, Foreign]
+ [pallet_assets, PoolAssets]
+ [pallet_asset_conversion, AssetConversion]
[pallet_balances, Balances]
[pallet_multisig, Multisig]
[pallet_nft_fractionalization, NftFractionalization]
@@ -952,6 +1017,26 @@ impl_runtime_apis! {
}
}
+ impl pallet_asset_conversion::AssetConversionApi<
+ Block,
+ Balance,
+ u128,
+ Box,
+ > for Runtime
+ {
+ fn quote_price_exact_tokens_for_tokens(asset1: Box, asset2: Box, amount: u128, include_fee: bool) -> Option {
+ AssetConversion::quote_price_exact_tokens_for_tokens(asset1, asset2, amount, include_fee)
+ }
+
+ fn quote_price_tokens_for_exact_tokens(asset1: Box, asset2: Box, amount: u128, include_fee: bool) -> Option {
+ AssetConversion::quote_price_tokens_for_exact_tokens(asset1, asset2, amount, include_fee)
+ }
+
+ fn get_reserves(asset1: Box, asset2: Box) -> Option<(Balance, Balance)> {
+ AssetConversion::get_reserves(&asset1, &asset2).ok()
+ }
+ }
+
impl pallet_transaction_payment_rpc_runtime_api::TransactionPaymentApi for Runtime {
fn query_info(
uxt: ::Extrinsic,
@@ -1021,7 +1106,13 @@ impl_runtime_apis! {
)?,
// collect pallet_assets (ForeignAssets)
convert::<_, _, _, _, ForeignAssetsConvertedConcreteId>(
- ForeignAssets::account_balances(account)
+ ForeignAssets::account_balances(account.clone())
+ .iter()
+ .filter(|(_, balance)| balance > &0)
+ )?,
+ // collect pallet_assets (PoolAssets)
+ convert::<_, _, _, _, PoolAssetsConvertedConcreteId>(
+ PoolAssets::account_balances(account)
.iter()
.filter(|(_, balance)| balance > &0)
)?,
@@ -1078,6 +1169,7 @@ impl_runtime_apis! {
// `pallet_assets_local.rs / pallet_assets_foreign.rs`.
type Local = pallet_assets::Pallet::;
type Foreign = pallet_assets::Pallet::;
+ type Pool = pallet_assets::Pallet::;
let mut list = Vec::::new();
list_benchmarks!(list, extra);
@@ -1215,6 +1307,7 @@ impl_runtime_apis! {
type Local = pallet_assets::Pallet::;
type Foreign = pallet_assets::Pallet::;
+ type Pool = pallet_assets::Pallet::;
let whitelist: Vec = vec![
// Block Number
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
index 6948d2b6d5..fe750e4e1c 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/mod.rs
@@ -4,6 +4,7 @@ pub mod extrinsic_weights;
pub mod frame_system;
pub mod pallet_assets_foreign;
pub mod pallet_assets_local;
+pub mod pallet_assets_pool;
pub mod pallet_balances;
pub mod pallet_collator_selection;
pub mod pallet_multisig;
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_assets_pool.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_assets_pool.rs
new file mode 100644
index 0000000000..d7d0756981
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/weights/pallet_assets_pool.rs
@@ -0,0 +1,534 @@
+// Copyright Parity Technologies (UK) Ltd.
+// This file is part of Cumulus.
+
+// Cumulus 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.
+
+// Cumulus 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 Cumulus. If not, see .
+
+//! Autogenerated weights for `pallet_assets`
+//!
+//! THIS FILE WAS AUTO-GENERATED USING THE SUBSTRATE BENCHMARK CLI VERSION 4.0.0-dev
+//! DATE: 2023-06-20, STEPS: `50`, REPEAT: `20`, LOW RANGE: `[]`, HIGH RANGE: `[]`
+//! WORST CASE MAP SIZE: `1000000`
+//! HOSTNAME: `bm3`, CPU: `Intel(R) Core(TM) i7-7700K CPU @ 4.20GHz`
+//! EXECUTION: Some(Wasm), WASM-EXECUTION: Compiled, CHAIN: Some("asset-hub-westend-dev"), DB CACHE: 1024
+
+// Executed Command:
+// target/production/polkadot-parachain
+// benchmark
+// pallet
+// --steps=50
+// --repeat=20
+// --extrinsic=*
+// --execution=wasm
+// --wasm-execution=compiled
+// --heap-pages=4096
+// --json-file=/var/lib/gitlab-runner/builds/zyw4fam_/0/parity/mirrors/cumulus/.git/.artifacts/bench.json
+// --pallet=pallet_assets
+// --chain=asset-hub-westend-dev
+// --header=./file_header.txt
+// --output=./parachains/runtimes/assets/asset-hub-westend/src/weights/
+
+#![cfg_attr(rustfmt, rustfmt_skip)]
+#![allow(unused_parens)]
+#![allow(unused_imports)]
+#![allow(missing_docs)]
+
+use frame_support::{traits::Get, weights::Weight};
+use core::marker::PhantomData;
+
+/// Weight functions for `pallet_assets`.
+pub struct WeightInfo(PhantomData);
+impl pallet_assets::WeightInfo for WeightInfo {
+ /// Storage: ParachainInfo ParachainId (r:1 w:0)
+ /// Proof: ParachainInfo ParachainId (max_values: Some(1), max_size: Some(4), added: 499, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn create() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `107`
+ // Estimated: `4273`
+ // Minimum execution time: 31_477_000 picoseconds.
+ Weight::from_parts(32_036_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(3))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn force_create() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `4`
+ // Estimated: `4273`
+ // Minimum execution time: 13_084_000 picoseconds.
+ Weight::from_parts(13_591_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn start_destroy() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `276`
+ // Estimated: `4273`
+ // Minimum execution time: 15_413_000 picoseconds.
+ Weight::from_parts(16_009_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1001 w:1000)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1000 w:1000)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ /// The range of component `c` is `[0, 1000]`.
+ /// The range of component `c` is `[0, 1000]`.
+ fn destroy_accounts(c: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `0 + c * (208 ±0)`
+ // Estimated: `4273 + c * (3207 ±0)`
+ // Minimum execution time: 18_503_000 picoseconds.
+ Weight::from_parts(18_705_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ // Standard Error: 5_073
+ .saturating_add(Weight::from_parts(12_123_380, 0).saturating_mul(c.into()))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().reads((2_u64).saturating_mul(c.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((2_u64).saturating_mul(c.into())))
+ .saturating_add(Weight::from_parts(0, 3207).saturating_mul(c.into()))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Approvals (r:1001 w:1000)
+ /// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
+ /// The range of component `a` is `[0, 1000]`.
+ /// The range of component `a` is `[0, 1000]`.
+ fn destroy_approvals(a: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `413 + a * (86 ±0)`
+ // Estimated: `4273 + a * (3221 ±0)`
+ // Minimum execution time: 19_736_000 picoseconds.
+ Weight::from_parts(20_044_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ // Standard Error: 3_446
+ .saturating_add(Weight::from_parts(14_117_950, 0).saturating_mul(a.into()))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().reads((1_u64).saturating_mul(a.into())))
+ .saturating_add(T::DbWeight::get().writes(1))
+ .saturating_add(T::DbWeight::get().writes((1_u64).saturating_mul(a.into())))
+ .saturating_add(Weight::from_parts(0, 3221).saturating_mul(a.into()))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:0)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ fn finish_destroy() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 15_520_000 picoseconds.
+ Weight::from_parts(16_042_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ fn mint() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 27_380_000 picoseconds.
+ Weight::from_parts(27_731_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ fn burn() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `4273`
+ // Minimum execution time: 33_762_000 picoseconds.
+ Weight::from_parts(34_201_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:2 w:2)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn transfer() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `7404`
+ // Minimum execution time: 45_731_000 picoseconds.
+ Weight::from_parts(46_587_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:2 w:2)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn transfer_keep_alive() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `7404`
+ // Minimum execution time: 40_758_000 picoseconds.
+ Weight::from_parts(41_283_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:2 w:2)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn force_transfer() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `7404`
+ // Minimum execution time: 46_265_000 picoseconds.
+ Weight::from_parts(47_105_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(4))
+ .saturating_add(T::DbWeight::get().writes(4))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ fn freeze() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `4273`
+ // Minimum execution time: 19_186_000 picoseconds.
+ Weight::from_parts(19_697_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ fn thaw() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `4273`
+ // Minimum execution time: 18_930_000 picoseconds.
+ Weight::from_parts(19_378_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn freeze_asset() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `276`
+ // Estimated: `4273`
+ // Minimum execution time: 15_091_000 picoseconds.
+ Weight::from_parts(15_429_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn thaw_asset() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `276`
+ // Estimated: `4273`
+ // Minimum execution time: 14_820_000 picoseconds.
+ Weight::from_parts(15_227_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:0)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ fn transfer_ownership() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 16_832_000 picoseconds.
+ Weight::from_parts(17_104_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn set_team() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 15_212_000 picoseconds.
+ Weight::from_parts(15_819_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:1)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ /// The range of component `n` is `[0, 50]`.
+ /// The range of component `s` is `[0, 50]`.
+ /// The range of component `n` is `[0, 50]`.
+ /// The range of component `s` is `[0, 50]`.
+ fn set_metadata(n: u32, s: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 30_119_000 picoseconds.
+ Weight::from_parts(30_931_884, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ // Standard Error: 2_734
+ .saturating_add(Weight::from_parts(2_665, 0).saturating_mul(n.into()))
+ // Standard Error: 2_734
+ .saturating_add(Weight::from_parts(725, 0).saturating_mul(s.into()))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:1)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ fn clear_metadata() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `406`
+ // Estimated: `4273`
+ // Minimum execution time: 30_740_000 picoseconds.
+ Weight::from_parts(31_699_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:1)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ /// The range of component `n` is `[0, 50]`.
+ /// The range of component `s` is `[0, 50]`.
+ /// The range of component `n` is `[0, 50]`.
+ /// The range of component `s` is `[0, 50]`.
+ fn force_set_metadata(n: u32, s: u32, ) -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `81`
+ // Estimated: `4273`
+ // Minimum execution time: 14_270_000 picoseconds.
+ Weight::from_parts(14_791_008, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ // Standard Error: 1_649
+ .saturating_add(Weight::from_parts(227, 0).saturating_mul(n.into()))
+ // Standard Error: 1_649
+ .saturating_add(Weight::from_parts(4_436, 0).saturating_mul(s.into()))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Metadata (r:1 w:1)
+ /// Proof: ForeignAssets Metadata (max_values: None, max_size: Some(738), added: 3213, mode: MaxEncodedLen)
+ fn force_clear_metadata() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `406`
+ // Estimated: `4273`
+ // Minimum execution time: 29_653_000 picoseconds.
+ Weight::from_parts(30_256_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn force_asset_status() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 13_914_000 picoseconds.
+ Weight::from_parts(14_372_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Approvals (r:1 w:1)
+ /// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
+ fn approve_transfer() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `276`
+ // Estimated: `4273`
+ // Minimum execution time: 33_615_000 picoseconds.
+ Weight::from_parts(34_064_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Approvals (r:1 w:1)
+ /// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:2 w:2)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn transfer_approved() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `520`
+ // Estimated: `7404`
+ // Minimum execution time: 64_837_000 picoseconds.
+ Weight::from_parts(65_668_000, 0)
+ .saturating_add(Weight::from_parts(0, 7404))
+ .saturating_add(T::DbWeight::get().reads(5))
+ .saturating_add(T::DbWeight::get().writes(5))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Approvals (r:1 w:1)
+ /// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
+ fn cancel_approval() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `446`
+ // Estimated: `4273`
+ // Minimum execution time: 35_648_000 picoseconds.
+ Weight::from_parts(36_163_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Approvals (r:1 w:1)
+ /// Proof: ForeignAssets Approvals (max_values: None, max_size: Some(746), added: 3221, mode: MaxEncodedLen)
+ fn force_cancel_approval() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `446`
+ // Estimated: `4273`
+ // Minimum execution time: 36_452_000 picoseconds.
+ Weight::from_parts(36_885_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn set_min_balance() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 15_963_000 picoseconds.
+ Weight::from_parts(16_345_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(1))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn touch() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `345`
+ // Estimated: `4273`
+ // Minimum execution time: 35_359_000 picoseconds.
+ Weight::from_parts(36_006_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(3))
+ .saturating_add(T::DbWeight::get().writes(3))
+ }
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn touch_other() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `242`
+ // Estimated: `4273`
+ // Minimum execution time: 33_524_000 picoseconds.
+ Weight::from_parts(34_090_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: System Account (r:1 w:1)
+ /// Proof: System Account (max_values: None, max_size: Some(128), added: 2603, mode: MaxEncodedLen)
+ fn refund() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `471`
+ // Estimated: `4273`
+ // Minimum execution time: 31_777_000 picoseconds.
+ Weight::from_parts(32_319_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(3))
+ .saturating_add(T::DbWeight::get().writes(3))
+ }
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Asset (r:1 w:1)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ fn refund_other() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `401`
+ // Estimated: `4273`
+ // Minimum execution time: 30_160_000 picoseconds.
+ Weight::from_parts(30_665_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(2))
+ }
+ /// Storage: ForeignAssets Asset (r:1 w:0)
+ /// Proof: ForeignAssets Asset (max_values: None, max_size: Some(808), added: 3283, mode: MaxEncodedLen)
+ /// Storage: ForeignAssets Account (r:1 w:1)
+ /// Proof: ForeignAssets Account (max_values: None, max_size: Some(732), added: 3207, mode: MaxEncodedLen)
+ fn block() -> Weight {
+ // Proof Size summary in bytes:
+ // Measured: `350`
+ // Estimated: `4273`
+ // Minimum execution time: 19_011_000 picoseconds.
+ Weight::from_parts(19_491_000, 0)
+ .saturating_add(Weight::from_parts(0, 4273))
+ .saturating_add(T::DbWeight::get().reads(2))
+ .saturating_add(T::DbWeight::get().writes(1))
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
index 401a40b434..e3615705e2 100644
--- a/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
+++ b/cumulus/parachains/runtimes/assets/asset-hub-westend/src/xcm_config.rs
@@ -15,7 +15,7 @@
use super::{
AccountId, AllPalletsWithSystem, Assets, Authorship, Balance, Balances, ParachainInfo,
- ParachainSystem, PolkadotXcm, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
+ ParachainSystem, PolkadotXcm, PoolAssets, Runtime, RuntimeCall, RuntimeEvent, RuntimeOrigin,
TrustBackedAssetsInstance, WeightToFee, XcmpQueue,
};
use crate::ForeignAssets;
@@ -43,6 +43,9 @@ use xcm_builder::{
};
use xcm_executor::{traits::WithOriginFilter, XcmExecutor};
+#[cfg(feature = "runtime-benchmarks")]
+use {cumulus_primitives_core::ParaId, sp_core::Get};
+
parameter_types! {
pub const WestendLocation: MultiLocation = MultiLocation::parent();
pub RelayNetwork: Option = Some(NetworkId::Westend);
@@ -52,6 +55,10 @@ parameter_types! {
pub UniversalLocationNetworkId: NetworkId = UniversalLocation::get().global_consensus().unwrap();
pub TrustBackedAssetsPalletLocation: MultiLocation =
PalletInstance(::index() as u8).into();
+ pub ForeignAssetsPalletLocation: MultiLocation =
+ PalletInstance(::index() as u8).into();
+ pub PoolAssetsPalletLocation: MultiLocation =
+ PalletInstance(::index() as u8).into();
pub CheckingAccount: AccountId = PolkadotXcm::check_account();
}
@@ -131,8 +138,30 @@ pub type ForeignFungiblesTransactor = FungiblesAdapter<
CheckingAccount,
>;
+/// `AssetId/Balance` converter for `PoolAssets`
+pub type PoolAssetsConvertedConcreteId =
+ assets_common::PoolAssetsConvertedConcreteId;
+
+/// Means for transacting asset conversion pool assets on this chain.
+pub type PoolFungiblesTransactor = FungiblesAdapter<
+ // Use this fungibles implementation:
+ PoolAssets,
+ // Use this currency when it is a fungible asset matching the given location or name:
+ PoolAssetsConvertedConcreteId,
+ // 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):
+ AccountId,
+ // We only want to allow teleports of known assets. We use non-zero issuance as an indication
+ // that this asset is known.
+ LocalMint>,
+ // The account to use for tracking teleports.
+ CheckingAccount,
+>;
+
/// Means for transacting assets on this chain.
-pub type AssetTransactors = (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor);
+pub type AssetTransactors =
+ (CurrencyTransactor, FungiblesTransactor, ForeignFungiblesTransactor, PoolFungiblesTransactor);
/// This is the type we use to convert an (incoming) XCM origin into a local `Origin` instance,
/// ready for dispatching a transaction with Xcm's `Transact`. There is an `OriginKind` which can
@@ -269,6 +298,12 @@ impl Contains for SafeCallFilter {
pallet_assets::Call::transfer_approved { .. } |
pallet_assets::Call::touch { .. } |
pallet_assets::Call::refund { .. },
+ ) | RuntimeCall::AssetConversion(
+ pallet_asset_conversion::Call::create_pool { .. } |
+ pallet_asset_conversion::Call::add_liquidity { .. } |
+ pallet_asset_conversion::Call::remove_liquidity { .. } |
+ pallet_asset_conversion::Call::swap_tokens_for_exact_tokens { .. } |
+ pallet_asset_conversion::Call::swap_exact_tokens_for_tokens { .. },
) | RuntimeCall::NftFractionalization(
pallet_nft_fractionalization::Call::fractionalize { .. } |
pallet_nft_fractionalization::Call::unify { .. },
@@ -364,6 +399,11 @@ pub type Barrier = TrailingSetTopicAsId<
>,
>;
+// TODO: This calls into the Assets pallet's default `BalanceToAssetBalance` implementation, which
+// uses the ratio of minimum balances and requires asset sufficiency. This means that purchasing
+// weight within XCM programs will still use the old way, and paying fees via asset conversion will
+// only be possible when transacting locally. We should add an impl of this trait that does asset
+// conversion.
pub type AssetFeeAsExistentialDepositMultiplierFeeCharger = AssetFeeAsExistentialDepositMultiplier<
Runtime,
WeightToFee,
@@ -493,3 +533,26 @@ impl pallet_assets::BenchmarkHelper for XcmBenchmarkHelper {
MultiLocation { parents: 1, interior: X1(Parachain(id)) }
}
}
+
+#[cfg(feature = "runtime-benchmarks")]
+pub struct BenchmarkMultiLocationConverter {
+ _phantom: sp_std::marker::PhantomData,
+}
+
+#[cfg(feature = "runtime-benchmarks")]
+impl pallet_asset_conversion::BenchmarkHelper
+ for BenchmarkMultiLocationConverter
+where
+ SelfParaId: Get,
+{
+ fn asset_id(asset_id: u32) -> MultiLocation {
+ MultiLocation {
+ parents: 1,
+ interior: X3(
+ Parachain(SelfParaId::get().into()),
+ PalletInstance(::index() as u8),
+ GeneralIndex(asset_id.into()),
+ ),
+ }
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/common/Cargo.toml b/cumulus/parachains/runtimes/assets/common/Cargo.toml
index 3faebcfe78..f60aa03717 100644
--- a/cumulus/parachains/runtimes/assets/common/Cargo.toml
+++ b/cumulus/parachains/runtimes/assets/common/Cargo.toml
@@ -15,6 +15,8 @@ frame-support = { git = "https://github.com/paritytech/substrate", default-featu
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" }
sp-runtime = { git = "https://github.com/paritytech/substrate", default-features = false, branch = "master" }
+pallet-asset-conversion = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" }
+pallet-asset-tx-payment = { git = "https://github.com/paritytech/substrate", default-features = false , branch = "master" }
# Polkadot
pallet-xcm = { git = "https://github.com/paritytech/polkadot", default-features = false, branch = "master" }
@@ -35,6 +37,8 @@ std = [
"codec/std",
"log/std",
"frame-support/std",
+ "pallet-asset-conversion/std",
+ "pallet-asset-tx-payment/std",
"parachains-common/std",
"cumulus-primitives-core/std",
"sp-api/std",
diff --git a/cumulus/parachains/runtimes/assets/common/src/lib.rs b/cumulus/parachains/runtimes/assets/common/src/lib.rs
index bdd127c914..72eb84590f 100644
--- a/cumulus/parachains/runtimes/assets/common/src/lib.rs
+++ b/cumulus/parachains/runtimes/assets/common/src/lib.rs
@@ -17,6 +17,7 @@
pub mod foreign_creators;
pub mod fungible_conversion;
+pub mod local_and_foreign_assets;
pub mod matching;
pub mod runtime_api;
@@ -76,6 +77,20 @@ pub type ForeignAssetsConvertedConcreteId;
+type AssetIdForPoolAssets = u32;
+/// `MultiLocation` vs `AssetIdForPoolAssets` converter for `PoolAssets`.
+pub type AssetIdForPoolAssetsConvert =
+ AsPrefixedGeneralIndex;
+/// [`MatchedConvertedConcreteId`] converter dedicated for `PoolAssets`
+pub type PoolAssetsConvertedConcreteId =
+ MatchedConvertedConcreteId<
+ AssetIdForPoolAssets,
+ Balance,
+ StartsWith,
+ AssetIdForPoolAssetsConvert,
+ JustTry,
+ >;
+
#[cfg(test)]
mod tests {
use super::*;
diff --git a/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
new file mode 100644
index 0000000000..f50cf1331a
--- /dev/null
+++ b/cumulus/parachains/runtimes/assets/common/src/local_and_foreign_assets.rs
@@ -0,0 +1,394 @@
+// Copyright (C) 2021 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.
+
+use crate::local_and_foreign_assets::fungibles::Inspect;
+use cumulus_primitives_core::InteriorMultiLocation;
+use frame_support::{
+ pallet_prelude::DispatchError,
+ traits::{
+ fungibles::{
+ self, Balanced, Create, HandleImbalanceDrop, Mutate as MutateFungible, Unbalanced,
+ },
+ tokens::{DepositConsequence, Fortitude, Preservation, Provenance, WithdrawConsequence},
+ AccountTouch, ContainsPair, Get, PalletInfoAccess,
+ },
+};
+use pallet_asset_conversion::MultiAssetIdConverter;
+use parachains_common::{AccountId, AssetIdForTrustBackedAssets};
+use sp_runtime::{traits::MaybeEquivalence, DispatchResult};
+use sp_std::{boxed::Box, marker::PhantomData};
+use xcm::{latest::MultiLocation, opaque::lts::Junctions::Here};
+use xcm_builder::AsPrefixedGeneralIndex;
+use xcm_executor::traits::JustTry;
+
+/// Whether the multilocation refers to an asset in the local assets pallet or not,
+/// and if return the asset id.
+fn is_local>(
+ multilocation: MultiLocation,
+) -> Option {
+ AsPrefixedGeneralIndex::::convert(&multilocation)
+}
+
+pub struct MultiLocationConverter> {
+ _phantom: PhantomData<(Balances, ParachainLocation)>,
+}
+
+impl MultiAssetIdConverter, MultiLocation>
+ for MultiLocationConverter
+where
+ Balances: PalletInfoAccess,
+ ParachainLocation: Get,
+{
+ fn get_native() -> Box {
+ Box::new(MultiLocation { parents: 0, interior: Here })
+ }
+
+ fn is_native(asset_id: &Box) -> bool {
+ let mut asset_id = asset_id.clone();
+ asset_id.simplify(&ParachainLocation::get());
+ *asset_id == *Self::get_native()
+ }
+
+ fn try_convert(asset_id: &Box) -> Result {
+ let mut asset_id = asset_id.clone();
+ asset_id.simplify(&ParachainLocation::get());
+ if Self::is_native(&asset_id) {
+ // Otherwise it will try and touch the asset to create an account.
+ return Err(())
+ }
+ // Return simplified MultiLocation:
+ Ok(*asset_id)
+ }
+
+ fn into_multiasset_id(asset_id: &MultiLocation) -> Box {
+ let mut asset_id = *asset_id;
+ asset_id.simplify(&ParachainLocation::get());
+ Box::new(asset_id)
+ }
+}
+
+pub struct LocalAndForeignAssets {
+ _phantom: PhantomData<(Assets, ForeignAssets, Location)>,
+}
+
+impl Unbalanced
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: Inspect
+ + Unbalanced
+ + Balanced,
+ Assets: Inspect
+ + Unbalanced
+ + Balanced
+ + PalletInfoAccess,
+{
+ fn handle_dust(dust: frame_support::traits::fungibles::Dust) {
+ let credit = dust.into_credit();
+
+ if let Some(asset) = is_local::(credit.asset()) {
+ Assets::handle_raw_dust(asset, credit.peek());
+ } else {
+ ForeignAssets::handle_raw_dust(credit.asset(), credit.peek());
+ }
+
+ // As we have already handled the dust, we must stop credit's drop from happening:
+ sp_std::mem::forget(credit);
+ }
+
+ fn write_balance(
+ asset: >::AssetId,
+ who: &AccountId,
+ amount: >::Balance,
+ ) -> Result<
+ Option<>::Balance>,
+ sp_runtime::DispatchError,
+ > {
+ if let Some(asset) = is_local::(asset) {
+ Assets::write_balance(asset, who, amount)
+ } else {
+ ForeignAssets::write_balance(asset, who, amount)
+ }
+ }
+
+ /// Set the total issuance of `asset` to `amount`.
+ fn set_total_issuance(asset: Self::AssetId, amount: Self::Balance) {
+ if let Some(asset) = is_local::(asset) {
+ Assets::set_total_issuance(asset, amount)
+ } else {
+ ForeignAssets::set_total_issuance(asset, amount)
+ }
+ }
+}
+
+impl Inspect
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: Inspect,
+ Assets: Inspect,
+{
+ type AssetId = MultiLocation;
+ type Balance = u128;
+
+ /// The total amount of issuance in the system.
+ fn total_issuance(asset: Self::AssetId) -> Self::Balance {
+ if let Some(asset) = is_local::(asset) {
+ Assets::total_issuance(asset)
+ } else {
+ ForeignAssets::total_issuance(asset)
+ }
+ }
+
+ /// The minimum balance any single account may have.
+ fn minimum_balance(asset: Self::AssetId) -> Self::Balance {
+ if let Some(asset) = is_local::(asset) {
+ Assets::minimum_balance(asset)
+ } else {
+ ForeignAssets::minimum_balance(asset)
+ }
+ }
+
+ /// Get the `asset` balance of `who`.
+ fn balance(asset: Self::AssetId, who: &AccountId) -> Self::Balance {
+ if let Some(asset) = is_local::(asset) {
+ Assets::balance(asset, who)
+ } else {
+ ForeignAssets::balance(asset, who)
+ }
+ }
+
+ /// Get the maximum amount of `asset` that `who` can withdraw/transfer successfully.
+ fn reducible_balance(
+ asset: Self::AssetId,
+ who: &AccountId,
+ presevation: Preservation,
+ fortitude: Fortitude,
+ ) -> Self::Balance {
+ if let Some(asset) = is_local::(asset) {
+ Assets::reducible_balance(asset, who, presevation, fortitude)
+ } else {
+ ForeignAssets::reducible_balance(asset, who, presevation, fortitude)
+ }
+ }
+
+ /// Returns `true` if the `asset` balance of `who` may be increased by `amount`.
+ ///
+ /// - `asset`: The asset that should be deposited.
+ /// - `who`: The account of which the balance should be increased by `amount`.
+ /// - `amount`: How much should the balance be increased?
+ /// - `mint`: Will `amount` be minted to deposit it into `account`?
+ fn can_deposit(
+ asset: Self::AssetId,
+ who: &AccountId,
+ amount: Self::Balance,
+ mint: Provenance,
+ ) -> DepositConsequence {
+ if let Some(asset) = is_local::(asset) {
+ Assets::can_deposit(asset, who, amount, mint)
+ } else {
+ ForeignAssets::can_deposit(asset, who, amount, mint)
+ }
+ }
+
+ /// Returns `Failed` if the `asset` balance of `who` may not be decreased by `amount`, otherwise
+ /// the consequence.
+ fn can_withdraw(
+ asset: Self::AssetId,
+ who: &AccountId,
+ amount: Self::Balance,
+ ) -> WithdrawConsequence {
+ if let Some(asset) = is_local::(asset) {
+ Assets::can_withdraw(asset, who, amount)
+ } else {
+ ForeignAssets::can_withdraw(asset, who, amount)
+ }
+ }
+
+ /// Returns `true` if an `asset` exists.
+ fn asset_exists(asset: Self::AssetId) -> bool {
+ if let Some(asset) = is_local::(asset) {
+ Assets::asset_exists(asset)
+ } else {
+ ForeignAssets::asset_exists(asset)
+ }
+ }
+
+ fn total_balance(
+ asset: >::AssetId,
+ account: &AccountId,
+ ) -> >::Balance {
+ if let Some(asset) = is_local::(asset) {
+ Assets::total_balance(asset, account)
+ } else {
+ ForeignAssets::total_balance(asset, account)
+ }
+ }
+}
+
+impl MutateFungible
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: MutateFungible
+ + Inspect
+ + Balanced,
+ Assets: MutateFungible
+ + Inspect
+ + Balanced
+ + PalletInfoAccess,
+{
+ /// Transfer funds from one account into another.
+ fn transfer(
+ asset: MultiLocation,
+ source: &AccountId,
+ dest: &AccountId,
+ amount: Self::Balance,
+ keep_alive: Preservation,
+ ) -> Result {
+ if let Some(asset_id) = is_local::(asset) {
+ Assets::transfer(asset_id, source, dest, amount, keep_alive)
+ } else {
+ ForeignAssets::transfer(asset, source, dest, amount, keep_alive)
+ }
+ }
+}
+
+impl Create
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: Create + Inspect,
+ Assets: Create + Inspect,
+{
+ /// Create a new fungible asset.
+ fn create(
+ asset_id: Self::AssetId,
+ admin: AccountId,
+ is_sufficient: bool,
+ min_balance: Self::Balance,
+ ) -> DispatchResult {
+ if let Some(asset_id) = is_local::(asset_id) {
+ Assets::create(asset_id, admin, is_sufficient, min_balance)
+ } else {
+ ForeignAssets::create(asset_id, admin, is_sufficient, min_balance)
+ }
+ }
+}
+
+impl AccountTouch
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: AccountTouch,
+ Assets: AccountTouch,
+{
+ type Balance = u128;
+
+ fn deposit_required(
+ asset_id: MultiLocation,
+ ) -> >::Balance {
+ if let Some(asset_id) = is_local::(asset_id) {
+ Assets::deposit_required(asset_id)
+ } else {
+ ForeignAssets::deposit_required(asset_id)
+ }
+ }
+
+ fn touch(
+ asset_id: MultiLocation,
+ who: AccountId,
+ depositor: AccountId,
+ ) -> Result<(), sp_runtime::DispatchError> {
+ if let Some(asset_id) = is_local::(asset_id) {
+ Assets::touch(asset_id, who, depositor)
+ } else {
+ ForeignAssets::touch(asset_id, who, depositor)
+ }
+ }
+}
+
+/// Implements [`ContainsPair`] trait for a pair of asset and account IDs.
+impl ContainsPair
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets: ContainsPair,
+ Assets: PalletInfoAccess + ContainsPair,
+{
+ /// Check if an account with the given asset ID and account address exists.
+ fn contains(asset_id: &MultiLocation, who: &AccountId) -> bool {
+ if let Some(asset_id) = is_local::(*asset_id) {
+ Assets::contains(&asset_id, &who)
+ } else {
+ ForeignAssets::contains(&asset_id, &who)
+ }
+ }
+}
+
+impl Balanced
+ for LocalAndForeignAssets
+where
+ Location: Get,
+ ForeignAssets:
+ Balanced + Inspect,
+ Assets:
+ Balanced + Inspect + PalletInfoAccess,
+{
+ type OnDropDebt = DebtDropIndirection;
+ type OnDropCredit = CreditDropIndirection;
+}
+
+pub struct DebtDropIndirection {
+ _phantom: PhantomData>,
+}
+
+impl HandleImbalanceDrop
+ for DebtDropIndirection
+where
+ Location: Get,
+ ForeignAssets:
+ Balanced + Inspect,
+ Assets: Balanced + Inspect,
+{
+ fn handle(asset: MultiLocation, amount: u128) {
+ if let Some(asset_id) = is_local::(asset) {
+ Assets::OnDropDebt::handle(asset_id, amount);
+ } else {
+ ForeignAssets::OnDropDebt::handle(asset, amount);
+ }
+ }
+}
+
+pub struct CreditDropIndirection {
+ _phantom: PhantomData>,
+}
+
+impl HandleImbalanceDrop
+ for CreditDropIndirection
+where
+ Location: Get,
+ ForeignAssets:
+ Balanced + Inspect,
+ Assets: Balanced + Inspect,
+{
+ fn handle(asset: MultiLocation, amount: u128) {
+ if let Some(asset_id) = is_local::(asset) {
+ Assets::OnDropCredit::handle(asset_id, amount);
+ } else {
+ ForeignAssets::OnDropCredit::handle(asset, amount);
+ }
+ }
+}
diff --git a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs
index ceb8bc13fc..96e3605fb8 100644
--- a/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs
+++ b/cumulus/parachains/runtimes/assets/common/src/runtime_api.rs
@@ -17,8 +17,8 @@
use codec::{Codec, Decode, Encode};
use frame_support::RuntimeDebug;
-use sp_std::vec::Vec;
-use xcm::latest::MultiAsset;
+#[cfg(feature = "std")]
+use {sp_std::vec::Vec, xcm::latest::MultiAsset};
/// The possible errors that can happen querying the storage of assets.
#[derive(Eq, PartialEq, Encode, Decode, RuntimeDebug, scale_info::TypeInfo)]
diff --git a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
index 14aeaca03e..a3e0a7564d 100644
--- a/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
+++ b/cumulus/parachains/runtimes/testing/penpal/Cargo.toml
@@ -108,6 +108,7 @@ std = [
"pallet-xcm/std",
"polkadot-primitives/std",
"parachain-info/std",
+ "parachains-common/std",
"polkadot-parachain/std",
"polkadot-runtime-common/std",
"sp-api/std",
diff --git a/cumulus/test/runtime/Cargo.toml b/cumulus/test/runtime/Cargo.toml
index d875b95105..32fb285f1c 100644
--- a/cumulus/test/runtime/Cargo.toml
+++ b/cumulus/test/runtime/Cargo.toml
@@ -49,6 +49,7 @@ std = [
"frame-system/std",
"pallet-balances/std",
"pallet-sudo/std",
+ "pallet-glutton/std",
"pallet-timestamp/std",
"pallet-transaction-payment/std",
"pallet-glutton/std",