diff --git a/Cargo.lock b/Cargo.lock
index bf5dbf95d1..f9c25cc9fc 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -27,7 +27,7 @@ version = "0.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97"
dependencies = [
- "gimli 0.27.2",
+ "gimli 0.27.3",
]
[[package]]
@@ -90,9 +90,9 @@ dependencies = [
[[package]]
name = "aes"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "433cfd6710c9986c576a25ca913c39d66a6474107b406f34f91d4a8923395241"
+checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2"
dependencies = [
"cfg-if",
"cipher 0.4.4",
@@ -120,7 +120,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "209b47e8954a928e1d72e86eca7000ebb6655fe1436d33eefc2201cad027e237"
dependencies = [
"aead 0.5.2",
- "aes 0.8.2",
+ "aes 0.8.3",
"cipher 0.4.4",
"ctr 0.9.2",
"ghash 0.5.0",
@@ -235,15 +235,15 @@ dependencies = [
[[package]]
name = "anstyle"
-version = "1.0.0"
+version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d"
+checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd"
[[package]]
name = "anstyle-parse"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee"
+checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333"
dependencies = [
"utf8parse",
]
@@ -314,9 +314,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b"
[[package]]
name = "arrayvec"
-version = "0.7.3"
+version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8868f09ff8cea88b079da74ae569d9b8c62a23c68c746240b704ee6f7525c89c"
+checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711"
[[package]]
name = "asn1-rs"
@@ -412,6 +412,7 @@ dependencies = [
name = "astar-collator"
version = "5.11.0"
dependencies = [
+ "astar-primitives",
"astar-runtime",
"async-trait",
"clap",
@@ -509,11 +510,27 @@ dependencies = [
"url",
]
+[[package]]
+name = "astar-primitives"
+version = "0.1.0"
+dependencies = [
+ "frame-support",
+ "log",
+ "pallet-xc-asset-config",
+ "sp-core",
+ "sp-runtime",
+ "sp-std",
+ "xcm",
+ "xcm-builder",
+ "xcm-executor",
+]
+
[[package]]
name = "astar-runtime"
version = "5.11.0"
dependencies = [
"array-bytes 6.1.0",
+ "astar-primitives",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -600,7 +617,6 @@ dependencies = [
"xcm",
"xcm-builder",
"xcm-executor",
- "xcm-primitives",
]
[[package]]
@@ -876,7 +892,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc"
dependencies = [
"arrayref",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"constant_time_eq",
]
@@ -887,7 +903,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6637f448b9e61dfadbdcbae9a885fadee1f3eaffb1f8d3c1965d3ade8bdfd44f"
dependencies = [
"arrayref",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"constant_time_eq",
]
@@ -898,7 +914,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "729b71f35bd3fa1a4c86b85d32c8b9069ea7fe14f7a53cfabb65f62d4265b888"
dependencies = [
"arrayref",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"cc",
"cfg-if",
"constant_time_eq",
@@ -1249,9 +1265,9 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.3.3"
+version = "4.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ca8f255e4b8027970e78db75e78831229c9815fdbfa67eb1a1b777a62e24b4a0"
+checksum = "2686c4115cb0810d9a984776e197823d08ec94f176549a89a9efded477c456dc"
dependencies = [
"clap_builder",
"clap_derive",
@@ -1260,9 +1276,9 @@ dependencies = [
[[package]]
name = "clap_builder"
-version = "4.3.3"
+version = "4.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "acd4f3c17c83b0ba34ffbc4f8bbd74f079413f747f84a6f89292f138057e36ab"
+checksum = "2e53afce1efce6ed1f633cf0e57612fe51db54a1ee4fd8f8503d078fe02d69ae"
dependencies = [
"anstream",
"anstyle",
@@ -1413,9 +1429,9 @@ dependencies = [
[[package]]
name = "cpufeatures"
-version = "0.2.7"
+version = "0.2.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3e4c1eaa2012c47becbbad2ab175484c2a84d1185b566fb2cc5b8707343dfe58"
+checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c"
dependencies = [
"libc",
]
@@ -1435,7 +1451,7 @@ version = "0.93.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "253531aca9b6f56103c9420369db3263e784df39aa1c90685a1f69cfbba0623e"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bumpalo",
"cranelift-bforest",
"cranelift-codegen-meta",
@@ -2207,9 +2223,9 @@ dependencies = [
[[package]]
name = "cxx"
-version = "1.0.95"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "109308c20e8445959c2792e81871054c6a17e6976489a93d2769641a2ba5839c"
+checksum = "e88abab2f5abbe4c56e8f1fb431b784d710b709888f35755a160e62e33fe38e8"
dependencies = [
"cc",
"cxxbridge-flags",
@@ -2219,9 +2235,9 @@ dependencies = [
[[package]]
name = "cxx-build"
-version = "1.0.95"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "daf4c6755cdf10798b97510e0e2b3edb9573032bd9379de8fffa59d68165494f"
+checksum = "5c0c11acd0e63bae27dcd2afced407063312771212b7a823b4fd72d633be30fb"
dependencies = [
"cc",
"codespan-reporting",
@@ -2234,15 +2250,15 @@ dependencies = [
[[package]]
name = "cxxbridge-flags"
-version = "1.0.95"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "882074421238e84fe3b4c65d0081de34e5b323bf64555d3e61991f76eb64a7bb"
+checksum = "8d3816ed957c008ccd4728485511e3d9aaf7db419aa321e3d2c5a2f3411e36c8"
[[package]]
name = "cxxbridge-macro"
-version = "1.0.95"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a076022ece33e7686fb76513518e219cca4fce5750a8ae6d1ce6c0f48fd1af9"
+checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d"
dependencies = [
"proc-macro2",
"quote",
@@ -3799,7 +3815,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d930750de5717d2dd0b8c0d42c076c0e884c81a73e6cab859bbd2339c71e3e40"
dependencies = [
"opaque-debug 0.3.0",
- "polyval 0.6.0",
+ "polyval 0.6.1",
]
[[package]]
@@ -3815,9 +3831,9 @@ dependencies = [
[[package]]
name = "gimli"
-version = "0.27.2"
+version = "0.27.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4"
+checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e"
[[package]]
name = "glob"
@@ -4437,7 +4453,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e70b4439a751a5de7dd5ed55eacff78ebf4ffe0fc009cb1ebb11417f5b536b"
dependencies = [
"anyhow",
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"async-lock",
"async-trait",
"beef",
@@ -4528,7 +4544,7 @@ dependencies = [
"cfg-if",
"ecdsa",
"elliptic-curve",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -4788,7 +4804,7 @@ dependencies = [
"rand 0.8.5",
"rw-stream-sink",
"sec1",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"smallvec",
"thiserror",
"unsigned-varint",
@@ -4872,7 +4888,7 @@ dependencies = [
"multihash 0.17.0",
"quick-protobuf",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"thiserror",
"zeroize",
]
@@ -4883,7 +4899,7 @@ version = "0.42.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2766dcd2be8c87d5e1f35487deb22d765f49c6ae1251b3633efe3b25698bd3d2"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"asynchronous-codec",
"bytes",
"either",
@@ -4897,7 +4913,7 @@ dependencies = [
"prost",
"prost-build",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"smallvec",
"thiserror",
"uint",
@@ -4972,7 +4988,7 @@ dependencies = [
"prost",
"prost-build",
"rand 0.8.5",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"snow",
"static_assertions",
"thiserror",
@@ -5305,6 +5321,7 @@ name = "local-runtime"
version = "5.11.0"
dependencies = [
"array-bytes 6.1.0",
+ "astar-primitives",
"fp-rpc",
"fp-self-contained",
"frame-benchmarking",
@@ -5941,7 +5958,7 @@ dependencies = [
"core2",
"digest 0.10.7",
"multihash-derive",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"sha3",
"unsigned-varint",
]
@@ -6187,7 +6204,7 @@ version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"itoa",
]
@@ -6444,7 +6461,7 @@ checksum = "51f44edd08f51e2ade572f141051021c5af22677e42b7dd28a88155151c33594"
dependencies = [
"ecdsa",
"elliptic-curve",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -6455,7 +6472,7 @@ checksum = "dfc8c5bf642dde52bb9e87c0ecd8ca5a76faac2eeed98dedb7c717997e1080aa"
dependencies = [
"ecdsa",
"elliptic-curve",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -6649,6 +6666,7 @@ dependencies = [
name = "pallet-block-reward"
version = "2.2.2"
dependencies = [
+ "astar-primitives",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -6907,6 +6925,7 @@ dependencies = [
name = "pallet-dapps-staking"
version = "3.9.0"
dependencies = [
+ "astar-primitives",
"frame-benchmarking",
"frame-support",
"frame-system",
@@ -8056,11 +8075,11 @@ dependencies = [
[[package]]
name = "parity-scale-codec"
-version = "3.5.0"
+version = "3.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5ddb756ca205bd108aee3c62c6d3c994e1df84a59b9d6d4a5ea42ee1fd5a9a28"
+checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967"
dependencies = [
- "arrayvec 0.7.3",
+ "arrayvec 0.7.4",
"bitvec",
"byte-slice-cast",
"bytes",
@@ -8071,9 +8090,9 @@ dependencies = [
[[package]]
name = "parity-scale-codec-derive"
-version = "3.1.4"
+version = "3.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b"
+checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -8203,9 +8222,9 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94"
[[package]]
name = "pest"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e68e84bfb01f0507134eac1e9b410a12ba379d064eab48c50ba4ce329a527b70"
+checksum = "f73935e4d55e2abf7f130186537b19e7a4abc886a0252380b59248af473a3fc9"
dependencies = [
"thiserror",
"ucd-trie",
@@ -8213,9 +8232,9 @@ dependencies = [
[[package]]
name = "pest_derive"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6b79d4c71c865a25a4322296122e3924d30bc8ee0834c8bfc8b95f7f054afbfb"
+checksum = "aef623c9bbfa0eedf5a0efba11a5ee83209c326653ca31ff019bec3a95bfff2b"
dependencies = [
"pest",
"pest_generator",
@@ -8223,9 +8242,9 @@ dependencies = [
[[package]]
name = "pest_generator"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c435bf1076437b851ebc8edc3a18442796b30f1728ffea6262d59bbe28b077e"
+checksum = "b3e8cba4ec22bada7fc55ffe51e2deb6a0e0db2d0b7ab0b103acc80d2510c190"
dependencies = [
"pest",
"pest_meta",
@@ -8236,13 +8255,13 @@ dependencies = [
[[package]]
name = "pest_meta"
-version = "2.6.0"
+version = "2.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "745a452f8eb71e39ffd8ee32b3c5f51d03845f99786fa9b68db6ff509c505411"
+checksum = "a01f71cb40bd8bb94232df14b946909e14660e33fc05db3e50ae2a82d7ea0ca0"
dependencies = [
"once_cell",
"pest",
- "sha2 0.10.6",
+ "sha2 0.10.7",
]
[[package]]
@@ -9507,9 +9526,9 @@ dependencies = [
[[package]]
name = "polyval"
-version = "0.6.0"
+version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ef234e08c11dfcb2e56f79fd70f6f2eb7f025c0ce2333e82f4f0518ecad30c6"
+checksum = "d52cff9d1d4dee5fe6d03729099f4a310a41179e0a10dbf542039873f2e826fb"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -10433,9 +10452,9 @@ dependencies = [
[[package]]
name = "rustls-native-certs"
-version = "0.6.2"
+version = "0.6.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50"
+checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00"
dependencies = [
"openssl-probe",
"rustls-pemfile",
@@ -11575,9 +11594,9 @@ dependencies = [
[[package]]
name = "scale-info"
-version = "2.7.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b569c32c806ec3abdf3b5869fb8bf1e0d275a7c1c9b0b05603d9464632649edf"
+checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731"
dependencies = [
"bitvec",
"cfg-if",
@@ -11589,9 +11608,9 @@ dependencies = [
[[package]]
name = "scale-info-derive"
-version = "2.6.0"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "53012eae69e5aa5c14671942a5dd47de59d4cdcff8532a6dd0e081faf1119482"
+checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b"
dependencies = [
"proc-macro-crate",
"proc-macro2",
@@ -11800,9 +11819,9 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.96"
+version = "1.0.97"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "057d394a50403bcac12672b2b18fb387ab6d289d957dab67dd201875391e52f1"
+checksum = "bdf3bf93142acad5821c99197022e170842cdbc1c30482b98750c688c640842a"
dependencies = [
"itoa",
"ryu",
@@ -11860,9 +11879,9 @@ dependencies = [
[[package]]
name = "sha2"
-version = "0.10.6"
+version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0"
+checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8"
dependencies = [
"cfg-if",
"cpufeatures",
@@ -11893,6 +11912,7 @@ name = "shibuya-runtime"
version = "5.11.0"
dependencies = [
"array-bytes 6.1.0",
+ "astar-primitives",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -11993,7 +12013,6 @@ dependencies = [
"xcm",
"xcm-builder",
"xcm-executor",
- "xcm-primitives",
]
[[package]]
@@ -12001,6 +12020,7 @@ name = "shiden-runtime"
version = "5.11.0"
dependencies = [
"array-bytes 6.1.0",
+ "astar-primitives",
"cumulus-pallet-aura-ext",
"cumulus-pallet-dmp-queue",
"cumulus-pallet-parachain-system",
@@ -12091,7 +12111,6 @@ dependencies = [
"xcm",
"xcm-builder",
"xcm-executor",
- "xcm-primitives",
]
[[package]]
@@ -12231,7 +12250,7 @@ dependencies = [
"rand_core 0.6.4",
"ring",
"rustc_version 0.4.0",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"subtle",
]
@@ -12526,7 +12545,7 @@ dependencies = [
"blake2",
"byteorder",
"digest 0.10.7",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"sha3",
"sp-std",
"twox-hash",
@@ -13319,9 +13338,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369"
[[package]]
name = "target-lexicon"
-version = "0.12.7"
+version = "0.12.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5"
+checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac"
[[package]]
name = "tempfile"
@@ -13481,7 +13500,7 @@ dependencies = [
"pbkdf2 0.11.0",
"rand 0.8.5",
"rustc-hash",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"thiserror",
"unicode-normalization",
"wasm-bindgen",
@@ -13672,9 +13691,9 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.24"
+version = "0.1.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0f57e3ca2a01450b1a921183a9c9cbfda207fd822cef4ccb00a65402cbba7a74"
+checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab"
dependencies = [
"proc-macro2",
"quote",
@@ -14104,11 +14123,10 @@ dependencies = [
[[package]]
name = "want"
-version = "0.3.0"
+version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
+checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e"
dependencies = [
- "log",
"try-lock",
]
@@ -14403,7 +14421,7 @@ dependencies = [
"log",
"rustix 0.36.14",
"serde",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"toml",
"windows-sys 0.42.0",
"zstd",
@@ -14593,7 +14611,7 @@ dependencies = [
"sdp",
"serde",
"serde_json",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"stun",
"thiserror",
"time 0.3.22",
@@ -14656,7 +14674,7 @@ dependencies = [
"sec1",
"serde",
"sha1",
- "sha2 0.10.6",
+ "sha2 0.10.7",
"signature",
"subtle",
"thiserror",
@@ -15144,9 +15162,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a"
[[package]]
name = "winnow"
-version = "0.4.6"
+version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699"
+checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448"
dependencies = [
"memchr",
]
@@ -15286,20 +15304,6 @@ dependencies = [
"xcm",
]
-[[package]]
-name = "xcm-primitives"
-version = "0.4.1"
-dependencies = [
- "frame-support",
- "log",
- "pallet-xc-asset-config",
- "sp-runtime",
- "sp-std",
- "xcm",
- "xcm-builder",
- "xcm-executor",
-]
-
[[package]]
name = "xcm-procedural"
version = "0.9.39-1"
@@ -15332,6 +15336,7 @@ dependencies = [
name = "xcm-simulator-tests"
version = "0.1.0"
dependencies = [
+ "astar-primitives",
"cumulus-pallet-xcm",
"frame-support",
"frame-system",
@@ -15365,7 +15370,6 @@ dependencies = [
"xcm",
"xcm-builder",
"xcm-executor",
- "xcm-primitives",
"xcm-simulator",
]
diff --git a/Cargo.toml b/Cargo.toml
index b3cf139cae..0b8f37ec0e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -12,6 +12,8 @@ members = [
"pallets/*",
"precompiles/*",
+ "primitives",
+
"chain-extensions/dapps-staking",
"chain-extensions/pallet-assets",
"chain-extensions/xvm",
@@ -272,7 +274,7 @@ pallet-xc-asset-config = { path = "./pallets/xc-asset-config", default-features
pallet-xvm = { path = "./pallets/pallet-xvm", default-features = false }
pallet-xcm = { path = "./pallets/pallet-xcm", default-features = false }
-xcm-primitives = { path = "./primitives/xcm", default-features = false }
+astar-primitives = { path = "./primitives", default-features = false }
pallet-evm-precompile-assets-erc20 = { path = "./precompiles/assets-erc20", default-features = false }
pallet-evm-precompile-sr25519 = { path = "./precompiles/sr25519", default-features = false }
diff --git a/bin/collator/Cargo.toml b/bin/collator/Cargo.toml
index d6a935ff5d..2edb552bd0 100644
--- a/bin/collator/Cargo.toml
+++ b/bin/collator/Cargo.toml
@@ -92,6 +92,7 @@ shibuya-runtime = { workspace = true, features = ["std"] }
shiden-runtime = { workspace = true, features = ["std"] }
# astar pallets dependencies
+astar-primitives = { workspace = true }
pallet-block-reward = { workspace = true }
# frame dependencies
@@ -161,6 +162,7 @@ runtime-benchmarks = [
"sp-keyring",
"cumulus-test-relay-sproof-builder",
"polkadot-runtime-common",
+ "astar-primitives/runtime-benchmarks",
]
cli = ["try-runtime-cli"]
try-runtime = ["local-runtime/try-runtime", "try-runtime-cli/try-runtime"]
diff --git a/bin/collator/src/benchmarking.rs b/bin/collator/src/benchmarking.rs
index 902b926143..434446c6f5 100644
--- a/bin/collator/src/benchmarking.rs
+++ b/bin/collator/src/benchmarking.rs
@@ -16,7 +16,7 @@
// You should have received a copy of the GNU General Public License
// along with Astar. If not, see .
-use crate::primitives::{AccountId, Balance, Block};
+use astar_primitives::{AccountId, Balance, Block};
use cumulus_primitives_core::PersistedValidationData;
use cumulus_primitives_parachain_inherent::{ParachainInherentData, INHERENT_IDENTIFIER};
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
diff --git a/bin/collator/src/command.rs b/bin/collator/src/command.rs
index 56df11a0d5..82bb9e168a 100644
--- a/bin/collator/src/command.rs
+++ b/bin/collator/src/command.rs
@@ -24,8 +24,8 @@ use crate::{
self, astar, chain_spec, service::AdditionalConfig, shibuya, shiden, start_astar_node,
start_shibuya_node, start_shiden_node,
},
- primitives::Block,
};
+use astar_primitives::*;
use cumulus_client_cli::generate_genesis_block;
use cumulus_primitives_core::ParaId;
use log::{error, info};
diff --git a/bin/collator/src/lib.rs b/bin/collator/src/lib.rs
index 0450d70683..73d5589333 100644
--- a/bin/collator/src/lib.rs
+++ b/bin/collator/src/lib.rs
@@ -32,7 +32,6 @@ mod benchmarking;
mod cli;
mod command;
mod evm_tracing_types;
-mod primitives;
mod rpc;
pub use cli::*;
diff --git a/bin/collator/src/local/service.rs b/bin/collator/src/local/service.rs
index d14510bc6d..ab883d5d97 100644
--- a/bin/collator/src/local/service.rs
+++ b/bin/collator/src/local/service.rs
@@ -32,7 +32,7 @@ use std::{collections::BTreeMap, sync::Arc, time::Duration};
pub use local_runtime::RuntimeApi;
-use crate::primitives::*;
+use astar_primitives::*;
/// Local runtime native executor.
pub struct Executor;
diff --git a/bin/collator/src/parachain/chain_spec/mod.rs b/bin/collator/src/parachain/chain_spec/mod.rs
index 6f9f7058a9..47916e7bdd 100644
--- a/bin/collator/src/parachain/chain_spec/mod.rs
+++ b/bin/collator/src/parachain/chain_spec/mod.rs
@@ -20,7 +20,7 @@ use sc_chain_spec::ChainSpecExtension;
use serde::{Deserialize, Serialize};
use sp_core::{Pair, Public};
-use crate::primitives::Block;
+use astar_primitives::Block;
pub mod astar;
pub mod shibuya;
diff --git a/bin/collator/src/parachain/service.rs b/bin/collator/src/parachain/service.rs
index 35fd141fd6..0285b53d27 100644
--- a/bin/collator/src/parachain/service.rs
+++ b/bin/collator/src/parachain/service.rs
@@ -17,6 +17,8 @@
// along with Astar. If not, see .
//! Parachain Service and ServiceFactory implementation.
+
+use astar_primitives::*;
use cumulus_client_cli::CollatorOptions;
use cumulus_client_consensus_aura::{AuraConsensus, BuildAuraConsensusParams, SlotProportion};
use cumulus_client_consensus_common::{ParachainBlockImport, ParachainConsensus};
@@ -51,7 +53,6 @@ use super::shell_upgrade::*;
#[cfg(feature = "evm-tracing")]
use crate::evm_tracing_types::{EthApi as EthApiCmd, EvmTracingConfig};
-use crate::primitives::*;
#[cfg(feature = "evm-tracing")]
use crate::rpc::tracing;
diff --git a/bin/collator/src/parachain/shell_upgrade.rs b/bin/collator/src/parachain/shell_upgrade.rs
index 8bb9427dc1..ee6f54ba11 100644
--- a/bin/collator/src/parachain/shell_upgrade.rs
+++ b/bin/collator/src/parachain/shell_upgrade.rs
@@ -18,6 +18,7 @@
///! Special [`ParachainConsensus`] implementation that waits for the upgrade from
///! shell to a parachain runtime that implements Aura.
+use astar_primitives::*;
use cumulus_client_consensus_common::{ParachainCandidate, ParachainConsensus};
use cumulus_primitives_core::relay_chain::{Hash as PHash, PersistedValidationData};
use futures::lock::Mutex;
@@ -28,8 +29,6 @@ use sp_consensus_aura::{sr25519::AuthorityId as AuraId, AuraApi};
use sp_runtime::traits::Header as HeaderT;
use std::sync::Arc;
-use crate::primitives::*;
-
pub enum BuildOnAccess {
Uninitialized(Option R + Send + Sync>>),
Initialized(R),
diff --git a/bin/collator/src/primitives.rs b/bin/collator/src/primitives.rs
deleted file mode 100644
index 6779805a1e..0000000000
--- a/bin/collator/src/primitives.rs
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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 .
-
-//! Astar opaque primitives for different runtimes.
-
-/// An index to a block.
-pub type BlockNumber = u32;
-
-/// Header type.
-pub type Header = sp_runtime::generic::Header;
-
-/// Block type.
-pub type Block = sp_runtime::generic::Block;
-
-/// A hash of some data used by the chain.
-pub type Hash = sp_core::H256;
-
-/// Balance of an account.
-pub type Balance = u128;
-
-/// Index of a transaction in the chain.
-pub type Nonce = u32;
-
-/// Some way of identifying an account on the chain.
-pub type AccountId = sp_runtime::AccountId32;
diff --git a/bin/collator/src/rpc.rs b/bin/collator/src/rpc.rs
index 6b7b302096..0865ea0219 100644
--- a/bin/collator/src/rpc.rs
+++ b/bin/collator/src/rpc.rs
@@ -47,7 +47,7 @@ use moonbeam_rpc_trace::{Trace, TraceServer};
#[cfg(feature = "evm-tracing")]
use moonbeam_rpc_txpool::{TxPool, TxPoolServer};
-use crate::primitives::*;
+use astar_primitives::*;
#[cfg(feature = "evm-tracing")]
pub mod tracing;
diff --git a/chain-extensions/dapps-staking/src/lib.rs b/chain-extensions/dapps-staking/src/lib.rs
index 4d5149eb4f..44910e3b0d 100644
--- a/chain-extensions/dapps-staking/src/lib.rs
+++ b/chain-extensions/dapps-staking/src/lib.rs
@@ -17,10 +17,7 @@
// along with Astar. If not, see .
#![cfg_attr(not(feature = "std"), no_std)]
-use sp_runtime::{
- traits::{Saturating, Zero},
- DispatchError,
-};
+use sp_runtime::{traits::Zero, DispatchError};
use dapps_staking_chain_extension_types::{
DSError, DappsStakingAccountInput, DappsStakingEraInput, DappsStakingNominationInput,
diff --git a/pallets/block-reward/Cargo.toml b/pallets/block-reward/Cargo.toml
index 4520a1afff..9097ecdbf9 100644
--- a/pallets/block-reward/Cargo.toml
+++ b/pallets/block-reward/Cargo.toml
@@ -12,6 +12,7 @@ repository.workspace = true
parity-scale-codec = { workspace = true }
serde = { workspace = true }
+astar-primitives = { workspace = true }
frame-support = { workspace = true }
frame-system = { workspace = true }
scale-info = { workspace = true }
@@ -38,11 +39,13 @@ std = [
"frame-system/std",
"pallet-timestamp/std",
"pallet-balances/std",
+ "astar-primitives/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "astar-primitives/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
diff --git a/pallets/block-reward/src/lib.rs b/pallets/block-reward/src/lib.rs
index dee213e114..8626bc65cd 100644
--- a/pallets/block-reward/src/lib.rs
+++ b/pallets/block-reward/src/lib.rs
@@ -77,6 +77,7 @@
pub use pallet::*;
+use astar_primitives::Balance;
use frame_support::pallet_prelude::*;
use frame_support::{
log,
@@ -107,10 +108,6 @@ pub mod pallet {
#[pallet::pallet]
pub struct Pallet(PhantomData);
- /// The balance type of this pallet.
- pub(crate) type BalanceOf =
- <::Currency as Currency<::AccountId>>::Balance;
-
// Negative imbalance type of this pallet.
pub(crate) type NegativeImbalanceOf = <::Currency as Currency<
::AccountId,
@@ -119,17 +116,17 @@ pub mod pallet {
#[pallet::config]
pub trait Config: frame_system::Config {
/// The currency trait.
- type Currency: Currency;
+ type Currency: Currency;
/// Provides information about how much value is locked by dapps staking
- type DappsStakingTvlProvider: Get>;
+ type DappsStakingTvlProvider: Get;
/// Used to payout rewards
type BeneficiaryPayout: BeneficiaryPayout>;
/// The amount of issuance for each block.
#[pallet::constant]
- type RewardAmount: Get>;
+ type RewardAmount: Get;
/// The overarching event type.
type RuntimeEvent: From> + IsType<::RuntimeEvent>;
diff --git a/pallets/block-reward/src/tests.rs b/pallets/block-reward/src/tests.rs
index 2669a74a28..956905250c 100644
--- a/pallets/block-reward/src/tests.rs
+++ b/pallets/block-reward/src/tests.rs
@@ -18,7 +18,7 @@
use super::{pallet::Error, Event, *};
use frame_support::{assert_noop, assert_ok, traits::OnTimestampSet};
-use mock::*;
+use mock::{Balance, *};
use sp_runtime::{
traits::{AccountIdConversion, BadOrigin, Zero},
Perbill,
diff --git a/pallets/dapps-staking/Cargo.toml b/pallets/dapps-staking/Cargo.toml
index 3290455e15..c06c1400bf 100644
--- a/pallets/dapps-staking/Cargo.toml
+++ b/pallets/dapps-staking/Cargo.toml
@@ -13,6 +13,7 @@ frame-system = { workspace = true }
num-traits = { workspace = true }
parity-scale-codec = { workspace = true }
+astar-primitives = { workspace = true }
scale-info = { workspace = true }
serde = { workspace = true, optional = true }
sp-arithmetic = { workspace = true }
@@ -48,11 +49,13 @@ std = [
"pallet-timestamp/std",
"sp-staking/std",
"frame-benchmarking?/std",
+ "astar-primitives/std",
]
runtime-benchmarks = [
"frame-benchmarking",
"frame-support/runtime-benchmarks",
"frame-system/runtime-benchmarks",
"sp-runtime/runtime-benchmarks",
+ "astar-primitives/runtime-benchmarks",
]
try-runtime = ["frame-support/try-runtime"]
diff --git a/pallets/dapps-staking/src/benchmarking.rs b/pallets/dapps-staking/src/benchmarking.rs
index 3ad2543ea4..aad7705064 100644
--- a/pallets/dapps-staking/src/benchmarking.rs
+++ b/pallets/dapps-staking/src/benchmarking.rs
@@ -24,7 +24,7 @@ use crate::Pallet as DappsStaking;
use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller};
use frame_support::traits::{Get, OnFinalize, OnInitialize};
use frame_system::{Pallet as System, RawOrigin};
-use sp_runtime::traits::{Bounded, One, TrailingZeroInput};
+use sp_runtime::traits::{One, TrailingZeroInput};
const SEED: u32 = 9000;
const STAKER_BLOCK_REWARD: u32 = 1234u32;
@@ -94,7 +94,7 @@ fn register_contract(
) -> Result<(T::AccountId, T::SmartContract), &'static str> {
let developer: T::AccountId = account("developer", index.into(), SEED);
let smart_contract = smart_contract::(index);
- T::Currency::make_free_balance_be(&developer, BalanceOf::::max_value());
+ T::Currency::make_free_balance_be(&developer, Balance::max_value());
DappsStaking::::register(
RawOrigin::Root.into(),
developer.clone(),
@@ -119,7 +119,7 @@ fn prepare_bond_and_stake(
for id in 0..number_of_stakers {
let staker_acc: T::AccountId = account("pre_staker", id, seed);
stakers.push(staker_acc.clone());
- T::Currency::make_free_balance_be(&staker_acc, BalanceOf::::max_value());
+ T::Currency::make_free_balance_be(&staker_acc, Balance::max_value());
DappsStaking::::bond_and_stake(
RawOrigin::Signed(staker_acc).into(),
@@ -137,7 +137,7 @@ benchmarks! {
initialize::();
let developer_id = whitelisted_caller();
let contract_id = T::SmartContract::default();
- T::Currency::make_free_balance_be(&developer_id, BalanceOf::::max_value());
+ T::Currency::make_free_balance_be(&developer_id, Balance::max_value());
}: _(RawOrigin::Root, developer_id.clone(), contract_id.clone())
verify {
assert_last_event::(Event::::NewContract(developer_id, contract_id).into());
@@ -158,7 +158,7 @@ benchmarks! {
let (developer, contract_id) = register_contract::(1)?;
let stakers = prepare_bond_and_stake::(1, &contract_id, SEED)?;
let staker = stakers[0].clone();
- let stake_amount = BalanceOf::::max_value() / 2u32.into();
+ let stake_amount = Balance::max_value() / 2u128;
DappsStaking::::bond_and_stake(RawOrigin::Signed(staker.clone()).into(), contract_id.clone(), stake_amount)?;
DappsStaking::::unregister(RawOrigin::Root.into(), contract_id.clone())?;
@@ -174,8 +174,8 @@ benchmarks! {
let (_, contract_id) = register_contract::(1)?;
let staker = whitelisted_caller();
- let _ = T::Currency::make_free_balance_be(&staker, BalanceOf::::max_value());
- let amount = BalanceOf::::max_value() / 2u32.into();
+ let _ = T::Currency::make_free_balance_be(&staker, Balance::max_value());
+ let amount = Balance::max_value() / 2u128;
}: _(RawOrigin::Signed(staker.clone()), contract_id.clone(), amount)
verify {
@@ -188,8 +188,8 @@ benchmarks! {
let (_, contract_id) = register_contract::(1)?;
let staker = whitelisted_caller();
- let _ = T::Currency::make_free_balance_be(&staker, BalanceOf::::max_value());
- let amount = BalanceOf::::max_value() / 2u32.into();
+ let _ = T::Currency::make_free_balance_be(&staker, Balance::max_value());
+ let amount = Balance::max_value() / 2u128;
DappsStaking::::bond_and_stake(RawOrigin::Signed(staker.clone()).into(), contract_id.clone(), amount)?;
@@ -204,9 +204,9 @@ benchmarks! {
let (_, contract_id) = register_contract::(1)?;
let staker = whitelisted_caller();
- let _ = T::Currency::make_free_balance_be(&staker, BalanceOf::::max_value());
- let stake_amount = BalanceOf::::max_value() / 2u32.into();
- let unstake_amount = stake_amount / 2u32.into();
+ let _ = T::Currency::make_free_balance_be(&staker, Balance::max_value());
+ let stake_amount = Balance::max_value() / 2u128;
+ let unstake_amount = stake_amount / 2u128;
DappsStaking::::bond_and_stake(RawOrigin::Signed(staker.clone()).into(), contract_id.clone(), stake_amount)?;
DappsStaking::::unbond_and_unstake(RawOrigin::Signed(staker.clone()).into(), contract_id, unstake_amount)?;
diff --git a/pallets/dapps-staking/src/lib.rs b/pallets/dapps-staking/src/lib.rs
index ec400687f4..1530ba5f24 100644
--- a/pallets/dapps-staking/src/lib.rs
+++ b/pallets/dapps-staking/src/lib.rs
@@ -66,16 +66,12 @@
//!
#![cfg_attr(not(feature = "std"), no_std)]
+use astar_primitives::Balance;
use frame_support::traits::Currency;
-use frame_system::{self as system};
-use parity_scale_codec::{Decode, Encode, HasCompact, MaxEncodedLen};
+use parity_scale_codec::{Decode, Encode, MaxEncodedLen};
use scale_info::TypeInfo;
-use sp_runtime::{
- traits::{AtLeast32BitUnsigned, Zero},
- RuntimeDebug,
-};
-use sp_std::{ops::Add, prelude::*};
-
+use sp_runtime::{traits::Zero, RuntimeDebug};
+use sp_std::prelude::*;
pub mod pallet;
pub mod weights;
@@ -93,9 +89,6 @@ mod tests_lib;
pub use pallet::pallet::*;
pub use weights::WeightInfo;
-pub type BalanceOf =
- <::Currency as Currency<::AccountId>>::Balance;
-
/// Counter for the number of eras that have passed.
pub type EraIndex = u32;
@@ -170,7 +163,7 @@ impl Default for Forcing {
/// A record of rewards allocated for stakers and dapps
#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
-pub struct RewardInfo {
+pub struct RewardInfo {
/// Total amount of rewards for stakers in an era
#[codec(compact)]
pub stakers: Balance,
@@ -181,9 +174,9 @@ pub struct RewardInfo {
/// A record for total rewards and total amount staked for an era
#[derive(PartialEq, Eq, Clone, Default, Encode, Decode, RuntimeDebug, TypeInfo, MaxEncodedLen)]
-pub struct EraInfo {
+pub struct EraInfo {
/// Total amount of earned rewards for an era
- pub rewards: RewardInfo,
+ pub rewards: RewardInfo,
/// Total staked amount in an era
#[codec(compact)]
pub staked: Balance,
@@ -196,7 +189,7 @@ pub struct EraInfo {
/// Each tuple (contract, era) has this structure.
/// This will be used to reward contracts developer and his stakers.
#[derive(Clone, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen)]
-pub struct ContractStakeInfo {
+pub struct ContractStakeInfo {
/// Total staked amount.
#[codec(compact)]
pub total: Balance,
@@ -226,7 +219,7 @@ impl Default for Version {
/// Used to represent how much was staked in a particular era.
/// E.g. `{staked: 1000, era: 5}` means that in era `5`, staked amount was 1000.
#[derive(Encode, Decode, Clone, Copy, PartialEq, Eq, RuntimeDebug, TypeInfo, MaxEncodedLen)]
-pub struct EraStake {
+pub struct EraStake {
/// Staked amount in era
#[codec(compact)]
staked: Balance,
@@ -235,7 +228,7 @@ pub struct EraStake {
era: EraIndex,
}
-impl EraStake {
+impl EraStake {
/// Create a new instance of `EraStake` with given values
fn new(staked: Balance, era: EraIndex) -> Self {
Self { staked, era }
@@ -270,24 +263,23 @@ impl EraStake {
/// **NOTE:** It is important to understand that staker **DID NOT** claim any rewards during this period.
///
#[derive(Encode, Decode, Clone, Default, PartialEq, Eq, RuntimeDebug, TypeInfo)]
-pub struct StakerInfo {
+pub struct StakerInfo {
// Size of this list would be limited by a configurable constant
- stakes: Vec>,
+ stakes: Vec,
}
-impl MaxEncodedLen for StakerInfo {
+impl MaxEncodedLen for StakerInfo {
// This is just an assumption, will be calculated properly in the future. See the comment for `MAX_ASSUMED_VEC_LEN`.
fn max_encoded_len() -> usize {
parity_scale_codec::Compact(MAX_ASSUMED_VEC_LEN)
.encoded_size()
.saturating_add(
- (MAX_ASSUMED_VEC_LEN as usize)
- .saturating_mul(EraStake::::max_encoded_len()),
+ (MAX_ASSUMED_VEC_LEN as usize).saturating_mul(EraStake::max_encoded_len()),
)
}
}
-impl StakerInfo {
+impl StakerInfo {
/// `true` if no active stakes and unclaimed eras exist, `false` otherwise
fn is_empty(&self) -> bool {
self.stakes.is_empty()
@@ -437,7 +429,7 @@ impl StakerInfo {
#[derive(
Clone, Copy, PartialEq, Encode, Decode, Default, RuntimeDebug, TypeInfo, MaxEncodedLen,
)]
-pub struct UnlockingChunk {
+pub struct UnlockingChunk {
/// Amount being unlocked
#[codec(compact)]
amount: Balance,
@@ -446,10 +438,7 @@ pub struct UnlockingChunk {
unlock_era: EraIndex,
}
-impl UnlockingChunk
-where
- Balance: Add