diff --git a/Cargo.lock b/Cargo.lock
index 7e0248ec11..d7c7b65e46 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -300,15 +300,6 @@ version = "6.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d9b1c5a481ec30a5abd8dfbd94ab5cf1bb4e9a66be7f1b3b322f2f1170c200fd"
-[[package]]
-name = "array-init"
-version = "0.0.4"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "23589ecb866b460d3a0f1278834750268c607e8e28a1b982c907219f3178cd72"
-dependencies = [
- "nodrop",
-]
-
[[package]]
name = "arrayref"
version = "0.3.7"
@@ -614,7 +605,7 @@ dependencies = [
"polkadot-primitives",
"polkadot-runtime-common",
"scale-info",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
@@ -634,6 +625,33 @@ dependencies = [
"xcm-executor",
]
+[[package]]
+name = "astar-xcm-benchmarks"
+version = "0.1.0"
+dependencies = [
+ "astar-primitives",
+ "frame-benchmarking",
+ "frame-support",
+ "frame-system",
+ "log",
+ "pallet-assets",
+ "pallet-balances",
+ "pallet-xc-asset-config",
+ "pallet-xcm",
+ "parity-scale-codec",
+ "paste",
+ "scale-info",
+ "serde",
+ "sp-core",
+ "sp-io",
+ "sp-runtime",
+ "sp-std",
+ "sp-tracing",
+ "xcm",
+ "xcm-builder",
+ "xcm-executor",
+]
+
[[package]]
name = "async-channel"
version = "1.9.0"
@@ -687,9 +705,9 @@ dependencies = [
[[package]]
name = "async-trait"
-version = "0.1.73"
+version = "0.1.74"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0"
+checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9"
dependencies = [
"proc-macro2",
"quote",
@@ -1182,7 +1200,7 @@ version = "0.15.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "215c0072ecc28f92eeb0eea38ba63ddfcb65c2828c46311d646f1a3ff5f9841c"
dependencies = [
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -1454,9 +1472,9 @@ dependencies = [
[[package]]
name = "const-hex"
-version = "1.8.0"
+version = "1.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08849ed393c907c90016652a01465a12d86361cd38ad2a7de026c56a520cc259"
+checksum = "c37be52ef5e3b394db27a2341010685ad5103c72ac15ce2e9420a7e8f93f342c"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -1566,7 +1584,7 @@ dependencies = [
"hashbrown 0.13.2",
"log",
"regalloc2",
- "smallvec 1.11.0",
+ "smallvec",
"target-lexicon",
]
@@ -1602,7 +1620,7 @@ checksum = "64a25d9d0a0ae3079c463c34115ec59507b4707175454f0eee0891e83e30e82d"
dependencies = [
"cranelift-codegen",
"log",
- "smallvec 1.11.0",
+ "smallvec",
"target-lexicon",
]
@@ -1634,7 +1652,7 @@ dependencies = [
"cranelift-frontend",
"itertools",
"log",
- "smallvec 1.11.0",
+ "smallvec",
"wasmparser",
"wasmtime-types",
]
@@ -2858,9 +2876,9 @@ dependencies = [
[[package]]
name = "enr"
-version = "0.9.0"
+version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0be7b2ac146c1f99fe245c02d16af0696450d8e06c135db75e10eeb9e642c20d"
+checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b"
dependencies = [
"base64 0.21.2",
"bytes",
@@ -2870,7 +2888,6 @@ dependencies = [
"rand 0.8.5",
"rlp",
"serde",
- "serde-hex",
"sha3",
"zeroize",
]
@@ -3067,9 +3084,9 @@ dependencies = [
[[package]]
name = "ethers"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ba3fd516c15a9a587135229466dbbfc85796de55c5660afbbb1b1c78517d85c"
+checksum = "1ad13497f6e0a24292fc7b408e30d22fe9dc262da1f40d7b542c3a44e7fc0476"
dependencies = [
"ethers-addressbook",
"ethers-contract",
@@ -3082,9 +3099,9 @@ dependencies = [
[[package]]
name = "ethers-addressbook"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0245617f11b8178fa50b52e433e2c34ac69f39116b62c8be2437decf2edf1986"
+checksum = "c6e9e8acd0ed348403cc73a670c24daba3226c40b98dc1a41903766b3ab6240a"
dependencies = [
"ethers-core",
"once_cell",
@@ -3094,9 +3111,9 @@ dependencies = [
[[package]]
name = "ethers-contract"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "02bb80fd2c22631a5eb8a02cbf373cc5fd86937fc966bb670b9a884580c8e71c"
+checksum = "d79269278125006bb0552349c03593ffa9702112ca88bc7046cc669f148fb47c"
dependencies = [
"const-hex",
"ethers-contract-abigen",
@@ -3113,9 +3130,9 @@ dependencies = [
[[package]]
name = "ethers-contract-abigen"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "22c54db0d393393e732a5b20273e4f8ab89f0cce501c84e75fab9c126799a6e6"
+checksum = "ce95a43c939b2e4e2f3191c5ad4a1f279780b8a39139c9905b43a7433531e2ab"
dependencies = [
"Inflector",
"const-hex",
@@ -3135,9 +3152,9 @@ dependencies = [
[[package]]
name = "ethers-contract-derive"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "62ee4f216184a1304b707ed258f4f70aa40bf7e1522ab8963d127a8d516eaa1a"
+checksum = "8e9ce44906fc871b3ee8c69a695ca7ec7f70e50cb379c9b9cb5e532269e492f6"
dependencies = [
"Inflector",
"const-hex",
@@ -3151,9 +3168,9 @@ dependencies = [
[[package]]
name = "ethers-core"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8c29523f73c12753165781c6e5dc11c84d3e44c080a15f7c6cfbd70b514cb6f1"
+checksum = "c0a17f0708692024db9956b31d7a20163607d2745953f5ae8125ab368ba280ad"
dependencies = [
"arrayvec 0.7.4",
"bytes",
@@ -3181,9 +3198,9 @@ dependencies = [
[[package]]
name = "ethers-etherscan"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4aab5af432b3fe5b7756b60df5c9ddeb85a13414575ad8a9acd707c24f0a77a5"
+checksum = "0e53451ea4a8128fbce33966da71132cf9e1040dcfd2a2084fd7733ada7b2045"
dependencies = [
"ethers-core",
"reqwest",
@@ -3196,9 +3213,9 @@ dependencies = [
[[package]]
name = "ethers-middleware"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "356151d5ded56d4918146366abc9dfc9df367cf0096492a7a5477b21b7693615"
+checksum = "473f1ccd0c793871bbc248729fa8df7e6d2981d6226e4343e3bbaa9281074d5d"
dependencies = [
"async-trait",
"auto_impl",
@@ -3223,9 +3240,9 @@ dependencies = [
[[package]]
name = "ethers-providers"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00c84664b294e47fc2860d6db0db0246f79c4c724e552549631bb9505b834bee"
+checksum = "6838fa110e57d572336178b7c79e94ff88ef976306852d8cb87d9e5b1fc7c0b5"
dependencies = [
"async-trait",
"auto_impl",
@@ -3259,9 +3276,9 @@ dependencies = [
[[package]]
name = "ethers-signers"
-version = "2.0.9"
+version = "2.0.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "170b299698702ef1f53d2275af7d6d97409cfa4f9398ee9ff518f6bc9102d0ad"
+checksum = "5ea44bec930f12292866166f9ddbea6aa76304850e4d8dcd66dc492b43d00ff1"
dependencies = [
"async-trait",
"coins-bip32",
@@ -3448,9 +3465,9 @@ dependencies = [
[[package]]
name = "fastrand"
-version = "2.0.0"
+version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6999dc1837253364c2ebb0704ba97994bd874e8f195d665c50b7548f6ea92764"
+checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5"
[[package]]
name = "fatality"
@@ -3506,7 +3523,7 @@ dependencies = [
"parity-scale-codec",
"parking_lot 0.12.1",
"sc-client-db",
- "smallvec 1.11.0",
+ "smallvec",
"sp-blockchain",
"sp-core",
"sp-database",
@@ -4020,7 +4037,7 @@ dependencies = [
"paste",
"scale-info",
"serde",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-arithmetic",
"sp-core",
@@ -5301,7 +5318,7 @@ dependencies = [
"scale-info",
"serde",
"serde_derive",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-arithmetic",
"sp-authority-discovery",
@@ -5335,7 +5352,7 @@ dependencies = [
"frame-support",
"polkadot-primitives",
"polkadot-runtime-common",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-runtime",
"sp-weights",
@@ -5347,7 +5364,7 @@ version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7d770dcb02bf6835887c3a979b5107a04ff4bbde97a5f0928d27404a155add9"
dependencies = [
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -5371,7 +5388,7 @@ dependencies = [
"parking_lot 0.12.1",
"regex",
"rocksdb",
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -5497,7 +5514,7 @@ dependencies = [
"quick-protobuf",
"rand 0.8.5",
"rw-stream-sink",
- "smallvec 1.11.0",
+ "smallvec",
"thiserror",
"unsigned-varint",
"void",
@@ -5513,7 +5530,7 @@ dependencies = [
"libp2p-core",
"log",
"parking_lot 0.12.1",
- "smallvec 1.11.0",
+ "smallvec",
"trust-dns-resolver",
]
@@ -5534,7 +5551,7 @@ dependencies = [
"lru 0.10.1",
"quick-protobuf",
"quick-protobuf-codec",
- "smallvec 1.11.0",
+ "smallvec",
"thiserror",
"void",
]
@@ -5578,7 +5595,7 @@ dependencies = [
"quick-protobuf",
"rand 0.8.5",
"sha2 0.10.7",
- "smallvec 1.11.0",
+ "smallvec",
"thiserror",
"uint",
"unsigned-varint",
@@ -5599,7 +5616,7 @@ dependencies = [
"libp2p-swarm",
"log",
"rand 0.8.5",
- "smallvec 1.11.0",
+ "smallvec",
"socket2 0.4.9",
"tokio",
"trust-dns-proto",
@@ -5695,7 +5712,7 @@ dependencies = [
"libp2p-identity",
"libp2p-swarm",
"rand 0.8.5",
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -5714,7 +5731,7 @@ dependencies = [
"libp2p-swarm-derive",
"log",
"rand 0.8.5",
- "smallvec 1.11.0",
+ "smallvec",
"tokio",
"void",
]
@@ -6030,7 +6047,7 @@ dependencies = [
"pallet-xvm",
"parity-scale-codec",
"scale-info",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
@@ -6164,12 +6181,6 @@ dependencies = [
"rawpointer",
]
-[[package]]
-name = "maybe-uninit"
-version = "2.0.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
-
[[package]]
name = "md-5"
version = "0.10.5"
@@ -6660,7 +6671,7 @@ dependencies = [
"futures 0.3.28",
"log",
"pin-project",
- "smallvec 1.11.0",
+ "smallvec",
"unsigned-varint",
]
@@ -6784,12 +6795,6 @@ dependencies = [
"memoffset 0.6.5",
]
-[[package]]
-name = "nodrop"
-version = "0.1.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
-
[[package]]
name = "nohash-hasher"
version = "0.2.0"
@@ -7559,7 +7564,7 @@ dependencies = [
"rand_pcg",
"scale-info",
"serde",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-core",
"sp-io",
@@ -8928,7 +8933,7 @@ dependencies = [
"instant",
"libc",
"redox_syscall 0.2.16",
- "smallvec 1.11.0",
+ "smallvec",
"winapi",
]
@@ -8941,7 +8946,7 @@ dependencies = [
"cfg-if",
"libc",
"redox_syscall 0.3.5",
- "smallvec 1.11.0",
+ "smallvec",
"windows-targets 0.48.1",
]
@@ -9818,7 +9823,7 @@ dependencies = [
"polkadot-primitives",
"polkadot-statement-table",
"sc-network",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-authority-discovery",
"sp-consensus-babe",
@@ -10044,7 +10049,7 @@ dependencies = [
"scale-info",
"serde",
"serde_derive",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-arithmetic",
"sp-authority-discovery",
@@ -10124,7 +10129,7 @@ dependencies = [
"frame-support",
"polkadot-primitives",
"polkadot-runtime-common",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-runtime",
"sp-weights",
@@ -10705,9 +10710,9 @@ dependencies = [
[[package]]
name = "quinn-proto"
-version = "0.9.5"
+version = "0.9.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c956be1b23f4261676aed05a0046e204e8a6836e50203902683a718af0797989"
+checksum = "67c10f662eee9c94ddd7135043e544f3c82fa839a1e7b865911331961b53186c"
dependencies = [
"bytes",
"rand 0.8.5",
@@ -10940,7 +10945,7 @@ dependencies = [
"fxhash",
"log",
"slice-group-by",
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -10989,9 +10994,9 @@ checksum = "2ab07dc67230e4a4718e70fd5c20055a4334b121f1f9db8fe63ef39ce9b8c846"
[[package]]
name = "reqwest"
-version = "0.11.20"
+version = "0.11.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
+checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
dependencies = [
"base64 0.21.2",
"bytes",
@@ -11012,6 +11017,7 @@ dependencies = [
"serde",
"serde_json",
"serde_urlencoded",
+ "system-configuration",
"tokio",
"tower-service",
"url",
@@ -11171,7 +11177,7 @@ dependencies = [
"scale-info",
"serde",
"serde_derive",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-authority-discovery",
"sp-block-builder",
@@ -11203,7 +11209,7 @@ dependencies = [
"frame-support",
"polkadot-primitives",
"polkadot-runtime-common",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-runtime",
"sp-weights",
@@ -12039,7 +12045,7 @@ dependencies = [
"sc-utils",
"serde",
"serde_json",
- "smallvec 1.11.0",
+ "smallvec",
"snow",
"sp-arithmetic",
"sp-blockchain",
@@ -12091,7 +12097,7 @@ dependencies = [
"sc-peerset",
"sc-utils",
"serde",
- "smallvec 1.11.0",
+ "smallvec",
"sp-blockchain",
"sp-consensus",
"sp-consensus-grandpa",
@@ -12167,7 +12173,7 @@ dependencies = [
"sc-network-common",
"sc-peerset",
"sc-utils",
- "smallvec 1.11.0",
+ "smallvec",
"sp-arithmetic",
"sp-blockchain",
"sp-consensus",
@@ -12845,17 +12851,6 @@ dependencies = [
"serde_derive",
]
-[[package]]
-name = "serde-hex"
-version = "0.1.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca37e3e4d1b39afd7ff11ee4e947efae85adfddf4841787bfa47c470e96dc26d"
-dependencies = [
- "array-init",
- "serde",
- "smallvec 0.6.14",
-]
-
[[package]]
name = "serde_derive"
version = "1.0.171"
@@ -12984,6 +12979,7 @@ version = "5.20.0"
dependencies = [
"array-bytes 6.1.0",
"astar-primitives",
+ "astar-xcm-benchmarks",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -13064,7 +13060,7 @@ dependencies = [
"polkadot-primitives",
"polkadot-runtime-common",
"scale-info",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
@@ -13158,7 +13154,7 @@ dependencies = [
"polkadot-primitives",
"polkadot-runtime-common",
"scale-info",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-block-builder",
"sp-consensus-aura",
@@ -13312,15 +13308,6 @@ dependencies = [
"version_check",
]
-[[package]]
-name = "smallvec"
-version = "0.6.14"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0"
-dependencies = [
- "maybe-uninit",
-]
-
[[package]]
name = "smallvec"
version = "1.11.0"
@@ -13930,7 +13917,7 @@ dependencies = [
"parity-scale-codec",
"parking_lot 0.12.1",
"rand 0.8.5",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-externalities",
"sp-panic-handler",
@@ -14101,7 +14088,7 @@ dependencies = [
"parity-scale-codec",
"scale-info",
"serde",
- "smallvec 1.11.0",
+ "smallvec",
"sp-arithmetic",
"sp-core",
"sp-debug-derive",
@@ -14252,7 +14239,7 @@ version = "0.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125"
dependencies = [
- "strum_macros 0.25.2",
+ "strum_macros 0.25.3",
]
[[package]]
@@ -14270,9 +14257,9 @@ dependencies = [
[[package]]
name = "strum_macros"
-version = "0.25.2"
+version = "0.25.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad8d03b598d3d0fff69bf533ee3ef19b8eeb342729596df84bcc7e1f96ec4059"
+checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0"
dependencies = [
"heck",
"proc-macro2",
@@ -14503,7 +14490,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cb94d2f3cc536af71caac6b6fcebf65860b347e7ce0cc9ebe8f70d3e521054ef"
dependencies = [
"cfg-if",
- "fastrand 2.0.0",
+ "fastrand 2.0.1",
"redox_syscall 0.3.5",
"rustix 0.38.3",
"windows-sys 0.48.0",
@@ -14696,9 +14683,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"
[[package]]
name = "tokio"
-version = "1.32.0"
+version = "1.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
+checksum = "4f38200e3ef7995e5ef13baec2f432a6da0aa9ac495b2c0e8f3b7eec2c92d653"
dependencies = [
"backtrace",
"bytes",
@@ -14960,7 +14947,7 @@ dependencies = [
"serde",
"serde_json",
"sharded-slab",
- "smallvec 1.11.0",
+ "smallvec",
"thread_local",
"tracing",
"tracing-core",
@@ -14978,7 +14965,7 @@ dependencies = [
"hashbrown 0.13.2",
"log",
"rustc-hex",
- "smallvec 1.11.0",
+ "smallvec",
]
[[package]]
@@ -15017,7 +15004,7 @@ dependencies = [
"ipnet",
"lazy_static",
"rand 0.8.5",
- "smallvec 1.11.0",
+ "smallvec",
"socket2 0.4.9",
"thiserror",
"tinyvec",
@@ -15039,7 +15026,7 @@ dependencies = [
"lru-cache",
"parking_lot 0.12.1",
"resolv-conf",
- "smallvec 1.11.0",
+ "smallvec",
"thiserror",
"tokio",
"tracing",
@@ -15122,7 +15109,7 @@ checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675"
dependencies = [
"cfg-if",
"digest 0.10.7",
- "rand 0.7.3",
+ "rand 0.8.5",
"static_assertions",
]
@@ -16071,7 +16058,7 @@ dependencies = [
"scale-info",
"serde",
"serde_derive",
- "smallvec 1.11.0",
+ "smallvec",
"sp-api",
"sp-authority-discovery",
"sp-block-builder",
@@ -16104,7 +16091,7 @@ dependencies = [
"frame-support",
"polkadot-primitives",
"polkadot-runtime-common",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-runtime",
"sp-weights",
@@ -16575,7 +16562,7 @@ dependencies = [
"polkadot-primitives",
"polkadot-runtime-parachains",
"scale-info",
- "smallvec 1.11.0",
+ "smallvec",
"sp-core",
"sp-io",
"sp-runtime",
diff --git a/Cargo.toml b/Cargo.toml
index 570b9d2940..810f1947d6 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -277,6 +277,7 @@ pallet-xvm = { path = "./pallets/xvm", default-features = false }
pallet-ethereum-checked = { path = "./pallets/ethereum-checked", default-features = false }
pallet-dynamic-evm-base-fee = { path = "./pallets/dynamic-evm-base-fee", default-features = false }
pallet-unified-accounts = { path = "./pallets/unified-accounts", default-features = false }
+astar-xcm-benchmarks = { path = "./pallets/astar-xcm-benchmarks", default-features = false }
astar-primitives = { path = "./primitives", default-features = false }
diff --git a/pallets/astar-xcm-benchmarks/Cargo.toml b/pallets/astar-xcm-benchmarks/Cargo.toml
new file mode 100644
index 0000000000..de5c7a3a63
--- /dev/null
+++ b/pallets/astar-xcm-benchmarks/Cargo.toml
@@ -0,0 +1,73 @@
+[package]
+name = "astar-xcm-benchmarks"
+version = "0.1.0"
+authors.workspace = true
+edition.workspace = true
+homepage.workspace = true
+repository.workspace = true
+
+[dependencies]
+log = { workspace = true }
+serde = { workspace = true, optional = true }
+
+# Substrate
+frame-support = { workspace = true, default-features = false }
+frame-system = { workspace = true }
+parity-scale-codec = { workspace = true }
+scale-info = { workspace = true }
+sp-std = { workspace = true }
+
+# Polkadot / XCM
+astar-primitives = { workspace = true }
+sp-io = { workspace = true }
+sp-runtime = { workspace = true }
+xcm = { workspace = true }
+xcm-builder = { workspace = true }
+xcm-executor = { workspace = true }
+
+# Benchmarks
+frame-benchmarking = { workspace = true }
+
+[dev-dependencies]
+pallet-assets = { workspace = true }
+pallet-balances = { workspace = true }
+pallet-xc-asset-config = { workspace = true }
+pallet-xcm = { workspace = true }
+paste = { workspace = true }
+sp-core = { workspace = true }
+sp-tracing = { workspace = true }
+
+[features]
+default = ["std"]
+std = [
+ "frame-benchmarking/std",
+ "frame-support/std",
+ "frame-system/std",
+ "parity-scale-codec/std",
+ "sp-std/std",
+ "xcm-builder/std",
+ "xcm-executor/std",
+ "xcm/std",
+ "sp-io/std",
+ "sp-runtime/std",
+ "sp-core/std",
+ "astar-primitives/std",
+ "scale-info/std",
+ "astar-primitives/std",
+ "pallet-balances/std",
+ "pallet-assets/std",
+ "pallet-xc-asset-config/std",
+]
+
+runtime-benchmarks = [
+ "xcm-builder/runtime-benchmarks",
+ "xcm-executor/runtime-benchmarks",
+ "pallet-xcm/runtime-benchmarks",
+ "frame-benchmarking/runtime-benchmarks",
+ "frame-system/runtime-benchmarks",
+ "frame-support/runtime-benchmarks",
+ "astar-primitives/runtime-benchmarks",
+ "sp-runtime/runtime-benchmarks",
+]
+
+try-runtime = ["frame-support/try-runtime"]
diff --git a/pallets/astar-xcm-benchmarks/src/fungible/assets/benchmarking.rs b/pallets/astar-xcm-benchmarks/src/fungible/assets/benchmarking.rs
new file mode 100644
index 0000000000..76b4c79d92
--- /dev/null
+++ b/pallets/astar-xcm-benchmarks/src/fungible/assets/benchmarking.rs
@@ -0,0 +1,291 @@
+// This file is part of Astar.
+
+// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// Astar 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.
+
+// Astar 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 Astar. If not, see .
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+use super::*;
+use crate::{account_and_location, new_executor, AssetTransactorOf, XcmCallOf};
+use frame_benchmarking::v2::*;
+use frame_support::traits::fungible::Inspect;
+use sp_runtime::traits::Zero;
+use sp_std::{prelude::*, vec};
+use xcm::latest::{prelude::*, Weight};
+use xcm_executor::traits::{Convert, TransactAsset};
+
+#[benchmarks(
+ where
+ <
+ <
+ ::TransactAsset
+ as
+ Inspect
+ >::Balance
+ as
+ TryInto
+ >::Error: sp_std::fmt::Debug,
+
+ < ::TransactAsset
+ as
+ Inspect
+ >::Balance : Into
+)]
+mod benchmarks {
+ use super::*;
+
+ #[benchmark]
+ fn withdraw_asset() -> Result<(), BenchmarkError> {
+ let (sender_account, sender_location) = account_and_location::(1);
+ let worst_case_holding = T::worst_case_holding(0);
+ let asset = T::get_multi_asset();
+
+ >::deposit_asset(
+ &asset,
+ &sender_location,
+ &XcmContext {
+ origin: Some(sender_location.clone()),
+ message_hash: [0; 32],
+ topic: None,
+ },
+ )
+ .unwrap();
+ // check the assets of origin.
+ assert!(!T::TransactAsset::balance(&sender_account).is_zero());
+
+ let mut executor = new_executor::(sender_location);
+ executor.set_holding(worst_case_holding.into());
+ let instruction = Instruction::>::WithdrawAsset(vec![asset.clone()].into());
+ let xcm = Xcm(vec![instruction]);
+ #[block]
+ {
+ executor.bench_process(xcm)?;
+ }
+ // check one of the assets of origin.
+ assert!(T::TransactAsset::balance(&sender_account).is_zero());
+ assert!(executor
+ .holding()
+ .ensure_contains(&vec![asset].into())
+ .is_ok());
+ Ok(())
+ }
+
+ #[benchmark]
+ fn transfer_asset() -> Result<(), BenchmarkError> {
+ let (sender_account, sender_location) = account_and_location::(1);
+ let mut asset = T::get_multi_asset();
+ // this xcm doesn't use holding
+
+ let dest_location = T::valid_destination()?;
+ let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();
+ >::deposit_asset(
+ &asset,
+ &sender_location,
+ &XcmContext {
+ origin: Some(sender_location.clone()),
+ message_hash: [0; 32],
+ topic: None,
+ },
+ )
+ .unwrap();
+ assert!(T::TransactAsset::balance(&dest_account).is_zero());
+
+ // reducing some assets for Existential deposit
+ if let Fungible(x) = asset.fun {
+ asset.fun = Fungible(x / 10)
+ };
+
+ let assets: MultiAssets = vec![asset.clone()].into();
+ log::trace!(
+ target: "xcm::process",
+ "assets is {:?}",assets.clone());
+
+ >::transfer_asset(
+ &asset,
+ &sender_location,
+ &dest_location,
+ &XcmContext {
+ origin: Some(sender_location.clone()),
+ message_hash: [0; 32],
+ topic: None,
+ },
+ )
+ .unwrap();
+ let mut executor = new_executor::(sender_location);
+ let instruction = Instruction::TransferAsset {
+ assets,
+ beneficiary: dest_location,
+ };
+ let xcm = Xcm(vec![instruction]);
+ log::trace!(
+ target: "xcm::process",
+ "destination balance is {:?}, sender balance is {:?}",T::TransactAsset::balance(&dest_account),T::TransactAsset::balance(&sender_account));
+ assert!(!T::TransactAsset::balance(&dest_account).is_zero());
+ let previous_balance: u128 = T::TransactAsset::balance(&dest_account).into();
+
+ #[block]
+ {
+ executor.bench_process(xcm)?;
+ }
+
+ log::trace!(
+ target: "xcm::process",
+ "destination balance is {:?}, sender balance is {:?}",T::TransactAsset::balance(&dest_account),T::TransactAsset::balance(&sender_account));
+ assert!(T::TransactAsset::balance(&dest_account).into() == 2 * previous_balance);
+ Ok(())
+ }
+
+ #[benchmark]
+ fn transfer_reserve_asset() -> Result<(), BenchmarkError> {
+ let (_, sender_location) = account_and_location::(1);
+ let dest_location = T::valid_destination()?;
+ let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();
+
+ let mut asset = T::get_multi_asset();
+ >::deposit_asset(
+ &asset,
+ &sender_location,
+ &XcmContext {
+ origin: Some(sender_location.clone()),
+ message_hash: [0; 32],
+ topic: None,
+ },
+ )
+ .unwrap();
+
+ assert!(T::TransactAsset::balance(&dest_account).is_zero());
+
+ if let Fungible(x) = asset.fun {
+ asset.fun = Fungible(x / 10)
+ };
+
+ >::transfer_asset(
+ &asset,
+ &sender_location,
+ &dest_location,
+ &XcmContext {
+ origin: Some(sender_location.clone()),
+ message_hash: [0; 32],
+ topic: None,
+ },
+ )
+ .unwrap();
+ let assets: MultiAssets = vec![asset].into();
+ let mut executor = new_executor::(sender_location);
+ let instruction = Instruction::TransferReserveAsset {
+ assets,
+ dest: dest_location,
+ xcm: Xcm::new(),
+ };
+ let xcm = Xcm(vec![instruction]);
+ assert!(!T::TransactAsset::balance(&dest_account).is_zero());
+ let previous_balance: u128 = T::TransactAsset::balance(&dest_account).into();
+
+ #[block]
+ {
+ executor.bench_process(xcm)?;
+ }
+
+ assert!(T::TransactAsset::balance(&dest_account).into() == 2 * previous_balance);
+ Ok(())
+ }
+
+ #[benchmark]
+ fn receive_teleported_asset() -> Result<(), BenchmarkError> {
+ // need to add an empty block as it is necessary to have either #[block] or #[extrinsic_call]
+ #[block]
+ {}
+ Err(BenchmarkError::Override(BenchmarkResult::from_weight(
+ Weight::MAX,
+ )))
+ }
+
+ #[benchmark]
+ fn deposit_asset() -> Result<(), BenchmarkError> {
+ let asset = T::get_multi_asset();
+ let mut holding = T::worst_case_holding(1);
+
+ // Add our asset to the holding.
+ holding.push(asset.clone());
+
+ // our dest must have no balance initially.
+ let dest_location = T::valid_destination()?;
+ let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();
+ assert!(T::TransactAsset::balance(&dest_account).is_zero());
+
+ let mut executor = new_executor::(Default::default());
+ executor.set_holding(holding.into());
+ let instruction = Instruction::>::DepositAsset {
+ assets: asset.into(),
+ beneficiary: dest_location,
+ };
+ let xcm = Xcm(vec![instruction]);
+
+ #[block]
+ {
+ executor.bench_process(xcm)?;
+ }
+ // dest should have received some asset.
+ assert!(!T::TransactAsset::balance(&dest_account).is_zero());
+ Ok(())
+ }
+
+ #[benchmark]
+ fn deposit_reserve_asset() -> Result<(), BenchmarkError> {
+ let asset = T::get_multi_asset();
+ let mut holding = T::worst_case_holding(1);
+
+ // Add our asset to the holding.
+ holding.push(asset.clone());
+
+ // our dest must have no balance initially.
+ let dest_location = T::valid_destination()?;
+ let dest_account = T::AccountIdConverter::convert(dest_location.clone()).unwrap();
+ assert!(T::TransactAsset::balance(&dest_account).is_zero());
+
+ let mut executor = new_executor::(Default::default());
+ executor.set_holding(holding.into());
+ let instruction = Instruction::>::DepositReserveAsset {
+ assets: asset.into(),
+ dest: dest_location,
+ xcm: Xcm::new(),
+ };
+ let xcm = Xcm(vec![instruction]);
+
+ #[block]
+ {
+ executor.bench_process(xcm)?;
+ }
+
+ // dest should have received some asset.
+ assert!(!T::TransactAsset::balance(&dest_account).is_zero());
+ Ok(())
+ }
+
+ #[benchmark]
+ fn initiate_teleport() -> Result<(), BenchmarkError> {
+ #[block]
+ {}
+ Err(BenchmarkError::Override(BenchmarkResult::from_weight(
+ Weight::MAX,
+ )))
+ }
+
+ impl_benchmark_test_suite!(
+ Pallet,
+ crate::fungible::assets::mock::new_test_ext(),
+ crate::fungible::assets::mock::Test
+ );
+}
diff --git a/pallets/astar-xcm-benchmarks/src/fungible/assets/mock.rs b/pallets/astar-xcm-benchmarks/src/fungible/assets/mock.rs
new file mode 100644
index 0000000000..842b320382
--- /dev/null
+++ b/pallets/astar-xcm-benchmarks/src/fungible/assets/mock.rs
@@ -0,0 +1,304 @@
+// This file is part of Astar.
+
+// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// Astar 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.
+
+// Astar 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 Astar. If not, see .
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+//! A mock runtime for XCM benchmarking.
+
+use crate::{fungible::assets as xcm_assets_benchmark, mock::*};
+use frame_benchmarking::BenchmarkError;
+use frame_support::{
+ assert_ok, parameter_types,
+ traits::{tokens::fungible::ItemOf, AsEnsureOriginWithArg, ConstU32, Everything, Nothing},
+ weights::Weight,
+};
+use frame_system::{EnsureRoot, EnsureSigned};
+use parity_scale_codec::Compact;
+use sp_core::{ConstU64, H256};
+use sp_runtime::{
+ testing::Header,
+ traits::{BlakeTwo256, IdentityLookup},
+};
+use sp_std::borrow::Borrow;
+use xcm::latest::prelude::*;
+use xcm_builder::{AllowUnpaidExecutionFrom, ConvertedConcreteId, MintLocation};
+use xcm_executor::traits::{Convert, JustTry};
+
+type Block = frame_system::mocking::MockBlock;
+type UncheckedExtrinsic = frame_system::mocking::MockUncheckedExtrinsic;
+
+// For testing the pallet, we construct a mock runtime.
+frame_support::construct_runtime!(
+ pub struct Test
+ where
+ Block = Block,
+ NodeBlock = Block,
+ UncheckedExtrinsic = UncheckedExtrinsic,
+ {
+ System: frame_system,
+ Balances: pallet_balances,
+ XcmAssetsBenchmark: xcm_assets_benchmark,
+ Assets: pallet_assets,
+ XcAssetConfig: pallet_xc_asset_config,
+ }
+);
+
+parameter_types! {
+ pub const BlockHashCount: u64 = 250;
+ pub BlockWeights: frame_system::limits::BlockWeights =
+ frame_system::limits::BlockWeights::simple_max(Weight::from_parts(1024, u64::MAX));
+}
+impl frame_system::Config for Test {
+ type BaseCallFilter = Everything;
+ type BlockWeights = ();
+ type BlockLength = ();
+ type DbWeight = ();
+ type RuntimeOrigin = RuntimeOrigin;
+ type Hash = H256;
+ type Index = u64;
+ type Header = Header;
+ type BlockNumber = u64;
+ type RuntimeCall = RuntimeCall;
+ type Hashing = BlakeTwo256;
+ type AccountId = u64;
+ type Lookup = IdentityLookup;
+ type RuntimeEvent = RuntimeEvent;
+ type BlockHashCount = BlockHashCount;
+ type Version = ();
+ type PalletInfo = PalletInfo;
+ type AccountData = pallet_balances::AccountData;
+ type OnNewAccount = ();
+ type OnKilledAccount = ();
+ type SystemWeightInfo = ();
+ type SS58Prefix = ();
+ type OnSetCode = ();
+ type MaxConsumers = ConstU32<16>;
+}
+
+parameter_types! {
+ pub const ExistentialDeposit: u64 = 7;
+}
+
+impl pallet_balances::Config for Test {
+ type MaxLocks = ();
+ type MaxReserves = ();
+ type ReserveIdentifier = [u8; 8];
+ type Balance = u64;
+ type DustRemoval = ();
+ type RuntimeEvent = RuntimeEvent;
+ type ExistentialDeposit = ExistentialDeposit;
+ type AccountStore = System;
+ type WeightInfo = ();
+ type FreezeIdentifier = ();
+ type MaxHolds = ConstU32<0>;
+ type MaxFreezes = ConstU32<0>;
+ type HoldIdentifier = ();
+}
+
+parameter_types! {
+ pub const AssetDeposit: u64 = 100 * ExistentialDeposit::get();
+ pub const ApprovalDeposit: u64 = 1 * ExistentialDeposit::get();
+ pub const StringLimit: u32 = 50;
+ pub const MetadataDepositBase: u64 = 10 * ExistentialDeposit::get();
+ pub const MetadataDepositPerByte: u64 = 1 * ExistentialDeposit::get();
+ pub const AssetAccountDeposit: u64 = 1 * ExistentialDeposit::get();
+ pub const AssetsStringLimit: u32 = 50;
+
+}
+
+impl pallet_xc_asset_config::Config for Test {
+ type RuntimeEvent = RuntimeEvent;
+ type AssetId = u64;
+ type ManagerOrigin = EnsureRoot;
+ type WeightInfo = ();
+}
+
+impl pallet_assets::Config for Test {
+ type RuntimeEvent = RuntimeEvent;
+ type Balance = u64;
+ type AssetId = u64;
+ type Currency = Balances;
+ type CreateOrigin = AsEnsureOriginWithArg>;
+ type ForceOrigin = EnsureRoot;
+ type AssetDeposit = AssetDeposit;
+ type MetadataDepositBase = MetadataDepositBase;
+ type MetadataDepositPerByte = MetadataDepositPerByte;
+ type AssetAccountDeposit = AssetAccountDeposit;
+ type ApprovalDeposit = ExistentialDeposit;
+ type StringLimit = AssetsStringLimit;
+ type Freezer = ();
+ type Extra = ();
+ type WeightInfo = ();
+ type RemoveItemsLimit = ConstU32<1000>;
+ type AssetIdParameter = Compact;
+ type CallbackHandle = ();
+ #[cfg(feature = "runtime-benchmarks")]
+ type BenchmarkHelper = AssetsBenchmarkHelper;
+}
+
+pub struct AssetsBenchmarkHelper;
+impl> pallet_assets::BenchmarkHelper
+ for AssetsBenchmarkHelper
+{
+ fn create_asset_id_parameter(id: u32) -> AssetIdParameter {
+ u64::from(id).into()
+ }
+}
+
+parameter_types! {
+ pub const DummyCheckingAccount : u64 = 0;
+}
+// Use fungible transactor as the asset transactor.
+pub type AssetTransactor = xcm_builder::FungiblesAdapter<
+ Assets,
+ ConvertedConcreteId,
+ AccountIdConverter,
+ u64,
+ xcm_builder::NoChecking,
+ DummyCheckingAccount,
+>;
+
+pub struct AssetLocationIdConverter;
+impl Convert for AssetLocationIdConverter {
+ fn convert_ref(location: impl Borrow) -> Result {
+ if let X1(GeneralIndex(i)) = location.borrow().clone().interior {
+ Ok(>::try_into(i).map_err(|_| ())?)
+ } else {
+ Err(())
+ }
+ }
+
+ fn reverse_ref(id: impl Borrow) -> Result {
+ Ok(Junction::GeneralIndex(id.borrow().clone().into()).into())
+ }
+}
+
+parameter_types! {
+ /// Maximum number of instructions in a single XCM fragment. A sanity check against weight
+ /// calculations getting too crazy.
+ pub const MaxInstructions: u32 = 100;
+ pub const MaxAssetsIntoHolding: u32 = 64;
+}
+
+pub struct XcmConfig;
+impl xcm_executor::Config for XcmConfig {
+ type RuntimeCall = RuntimeCall;
+ type XcmSender = DevNull;
+ type AssetTransactor = AssetTransactor;
+ type OriginConverter = ();
+ type IsReserve = ();
+ type IsTeleporter = TrustedTeleporters;
+ type UniversalLocation = UniversalLocation;
+ type Barrier = AllowUnpaidExecutionFrom;
+ type Weigher = xcm_builder::FixedWeightBounds;
+ type Trader = xcm_builder::FixedRateOfFungible;
+ type ResponseHandler = DevNull;
+ type AssetTrap = ();
+ type AssetLocker = ();
+ type AssetExchanger = ();
+ type AssetClaims = ();
+ type SubscriptionService = ();
+ type PalletInstancesInfo = AllPalletsWithSystem;
+ type MaxAssetsIntoHolding = MaxAssetsIntoHolding;
+ type FeeManager = ();
+ type MessageExporter = ();
+ type UniversalAliases = Nothing;
+ type CallDispatcher = RuntimeCall;
+ type SafeCallFilter = Everything;
+}
+
+impl crate::Config for Test {
+ type XcmConfig = XcmConfig;
+ type AccountIdConverter = AccountIdConverter;
+ fn valid_destination() -> Result {
+ let valid_destination: MultiLocation = X1(AccountId32 {
+ network: None,
+ id: [0u8; 32],
+ })
+ .into();
+
+ Ok(valid_destination)
+ }
+ fn worst_case_holding(depositable_count: u32) -> MultiAssets {
+ crate::mock_worst_case_holding(
+ depositable_count,
+ ::MaxAssetsIntoHolding::get(),
+ )
+ }
+}
+pub type TrustedTeleporters = (xcm_builder::Case,);
+
+parameter_types! {
+ pub const CheckingAccount: Option<(u64, MintLocation)> = Some((100, MintLocation::Local));
+ pub const ChildTeleporter: MultiLocation = Parachain(1000).into_location();
+ pub const TrustedTeleporter: Option<(MultiLocation, MultiAsset)> = Some((
+ ChildTeleporter::get(),
+ MultiAsset { id: Concrete(Here.into_location()), fun: Fungible(100) },
+ ));
+ pub const TeleportConcreteFungible: (MultiAssetFilter, MultiLocation) =
+ (Wild(AllOf { fun: WildFungible, id: Concrete(Here.into_location()) }), ChildTeleporter::get());
+ pub const ReserveConcreteFungible: (MultiAssetFilter, MultiLocation) =
+ (Wild(AllOf { fun: WildFungible, id: Concrete(Here.into_location()) }), ChildTeleporter::get());
+ pub const NoCheckingAccount: Option<(::AccountId, MintLocation)> = None;
+ pub const NoTeleporter: Option<(xcm::latest::MultiLocation, xcm::latest::MultiAsset)> = None;
+}
+
+impl xcm_assets_benchmark::Config for Test {
+ type TransactAsset = ItemOf, u64>;
+ type CheckedAccount = NoCheckingAccount;
+ type TrustedTeleporter = NoTeleporter;
+
+ fn get_multi_asset() -> MultiAsset {
+ // create an asset and make it sufficient
+ assert_ok!(pallet_assets::Pallet::::force_create(
+ RuntimeOrigin::root(),
+ parity_scale_codec::Compact(1),
+ 0_u64,
+ true,
+ 1
+ ));
+ let location = MultiLocation {
+ parents: 0,
+ interior: X1(GeneralIndex(1)),
+ };
+ // convert mapping for asset id
+ assert_ok!(
+ pallet_xc_asset_config::Pallet::::register_asset_location(
+ RuntimeOrigin::root(),
+ Box::new(location.clone().into_versioned()),
+ 1
+ )
+ );
+
+ MultiAsset {
+ id: Concrete(location),
+ fun: Fungible(100_000_000_000u128),
+ }
+ }
+}
+
+#[cfg(feature = "runtime-benchmarks")]
+pub fn new_test_ext() -> sp_io::TestExternalities {
+ use sp_runtime::BuildStorage;
+ let t = GenesisConfig {
+ ..Default::default()
+ }
+ .build_storage()
+ .unwrap();
+ sp_tracing::try_init_simple();
+ t.into()
+}
diff --git a/pallets/astar-xcm-benchmarks/src/fungible/assets/mod.rs b/pallets/astar-xcm-benchmarks/src/fungible/assets/mod.rs
new file mode 100644
index 0000000000..1fa633681e
--- /dev/null
+++ b/pallets/astar-xcm-benchmarks/src/fungible/assets/mod.rs
@@ -0,0 +1,51 @@
+// This file is part of Astar.
+
+// Copyright (C) 2019-2023 Stake Technologies Pte.Ltd.
+// SPDX-License-Identifier: GPL-3.0-or-later
+
+// Astar 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.
+
+// Astar 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 Astar. If not, see .
+
+// Copyright (C) Parity Technologies (UK) Ltd.
+// Benchmarking for the `AssetTransactor` trait via `Fungible`.
+
+pub use pallet::*;
+
+#[cfg(feature = "runtime-benchmarks")]
+pub mod benchmarking;
+#[cfg(test)]
+mod mock;
+
+#[frame_support::pallet]
+pub mod pallet {
+ use frame_support::pallet_prelude::Get;
+ #[pallet::config]
+ pub trait Config: frame_system::Config + crate::Config {
+ /// The type of `fungible` that is being used under the hood.
+ ///
+ /// This is useful for testing and checking.
+ type TransactAsset: frame_support::traits::fungible::Mutate;
+
+ /// The account used to check assets being teleported.
+ type CheckedAccount: Get