diff --git a/Cargo.lock b/Cargo.lock index 878edc46c9..69078898f0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -632,21 +632,21 @@ checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" dependencies = [ "concurrent-queue", "event-listener 5.2.0", - "event-listener-strategy 0.5.0", + "event-listener-strategy 0.5.1", "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "async-executor" -version = "1.8.0" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ae5ebefcc48e7452b4987947920dac9450be1110cadf34d1b8c116bdbaf97c" +checksum = "10b3e585719c2358d2660232671ca8ca4ddb4be4ce8a1842d6c2dc8685303316" dependencies = [ "async-lock 3.3.0", "async-task", "concurrent-queue", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-lite 2.3.0", "slab", ] @@ -695,7 +695,7 @@ dependencies = [ "futures-io", "futures-lite 2.3.0", "parking", - "polling 3.5.0", + "polling 3.6.0", "rustix 0.38.32", "slab", "tracing", @@ -719,7 +719,7 @@ checksum = "d034b430882f8381900d3fe6f0aaa3ad94f2cb4ac519b429692a1bc2dda4ae7b" dependencies = [ "event-listener 4.0.3", "event-listener-strategy 0.4.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -758,7 +758,7 @@ checksum = "30c5ef0ede93efbf733c1a727f3b6b5a1060bbedd5600183e66f6e4be4af0ec5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -787,13 +787,13 @@ checksum = "fbb36e985947064623dbd357f727af08ffd077f93d696782f3c56365fa2e2799" [[package]] name = "async-trait" -version = "0.1.78" +version = "0.1.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "461abc97219de0eaaf81fe3ef974a540158f3d079c2ab200f891f1a2ef201e85" +checksum = "a507401cad91ec6a857ed5513a2073c82a9b9048762b885bb98655b306964681" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -806,7 +806,7 @@ dependencies = [ "futures-sink", "futures-util", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -840,14 +840,14 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" [[package]] name = "axelar-gateway-precompile" @@ -874,9 +874,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.70" +version = "0.3.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95d8e92cac0961e91dbd517496b00f7e9b92363dbe6d42c3198268323798860c" +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" dependencies = [ "addr2line 0.21.0", "cc", @@ -978,13 +978,13 @@ dependencies = [ "lazy_static", "lazycell", "peeking_take_while", - "prettyplease 0.2.16", + "prettyplease 0.2.17", "proc-macro2", "quote", "regex", "rustc-hash", "shlex", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -1147,7 +1147,7 @@ dependencies = [ "async-channel 2.2.0", "async-lock 3.3.0", "async-task", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", "futures-lite 2.3.0", "piper", @@ -1241,9 +1241,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" [[package]] name = "bzip2-sys" @@ -1693,7 +1693,7 @@ dependencies = [ [[package]] name = "chainbridge" version = "0.0.2" -source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v1.1.0-latest-deps#6006515bfa90d7391ee25546b8cfa5bb78607bbe" +source = "git+https://github.com/centrifuge/chainbridge-substrate.git?branch=polkadot-v1.1.0-latest-deps#442ea02b0e3c2a1b8e7ac6e0014ba38b18e61faa" dependencies = [ "frame-benchmarking", "frame-support", @@ -1711,9 +1711,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.35" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eaf5903dcbc0a39312feb77df2ff4c76387d591b9fc7b04a238dcf8bb62639a" +checksum = "8a0d04d43504c61aa6c7531f1871dd0d418d91130162063b789da00fd7057a5e" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1769,9 +1769,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "949626d00e063efc93b6dca932419ceb5432f99769911c0b995f7e884c778813" +checksum = "90bc066a67923782aa8515dbaea16946c5bcc5addbd668bb80af688e53e548a0" dependencies = [ "clap_builder", "clap_derive", @@ -1791,14 +1791,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.3" +version = "4.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90239a040c80f5e14809ca132ddc4176ab33d5e17e49691793296e3fcb34d72f" +checksum = "528131438037fd55894f62d6e9f068b8f45ac57ffa77517819645d10aed04f64" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2469,7 +2469,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2788,7 +2788,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2806,9 +2806,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "635179be18797d7e10edb9cd06c859580237750c7351f39ed9b298bfc17544ad" +checksum = "ff4dc7287237dd438b926a81a1a5605dad33d286870e5eee2db17bf2bcd9e92a" dependencies = [ "cc", "cxxbridge-flags", @@ -2818,9 +2818,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9324397d262f63ef77eb795d900c0d682a34a43ac0932bec049ed73055d52f63" +checksum = "f47c6c8ad7c1a10d3ef0fe3ff6733f4db0d78f08ef0b13121543163ef327058b" dependencies = [ "cc", "codespan-reporting", @@ -2828,24 +2828,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "cxxbridge-flags" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a87ff7342ffaa54b7c61618e0ce2bbcf827eba6d55b923b83d82551acbbecfe5" +checksum = "701a1ac7a697e249cdd8dc026d7a7dafbfd0dbcd8bd24ec55889f2bc13dd6287" [[package]] name = "cxxbridge-macro" -version = "1.0.119" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70b5b86cf65fa0626d85720619d80b288013477a91a0389fa8bc716bf4903ad1" +checksum = "b404f596046b0bb2d903a9c786b875a126261b52b7c3a64bbb66382c41c771df" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -2876,9 +2876,9 @@ dependencies = [ [[package]] name = "der" -version = "0.7.8" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" dependencies = [ "const-oid", "zeroize", @@ -2929,6 +2929,17 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive-syn-parse" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d65d7ce8132b7c0e54497a4d9a55a1c2a0912a0d786cf894472ba818fba45762" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.57", +] + [[package]] name = "derive_more" version = "0.99.17" @@ -3150,7 +3161,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3172,26 +3183,26 @@ dependencies = [ [[package]] name = "docify" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cc4fd38aaa9fb98ac70794c82a00360d1e165a87fbf96a8a91f9dfc602aaee2" +checksum = "43a2f138ad521dc4a2ced1a4576148a6a610b4c5923933b062a263130a6802ce" dependencies = [ "docify_macros", ] [[package]] name = "docify_macros" -version = "0.2.7" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63fa215f3a0d40fb2a221b3aa90d8e1fbb8379785a990cb60d62ac71ebdc6460" +checksum = "1a081e51fb188742f5a7a1164ad752121abcb22874b21e2c3b0dd040c515fdad" dependencies = [ "common-path", - "derive-syn-parse", + "derive-syn-parse 0.2.0", "once_cell", "proc-macro2", "quote", "regex", - "syn 2.0.53", + "syn 2.0.57", "termcolor", "toml 0.8.2", "walkdir", @@ -3370,7 +3381,7 @@ checksum = "5c785274071b1b420972453b306eeca06acf4633829db4223b58a2a8c5953bc4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3381,7 +3392,7 @@ checksum = "6fd000fd6988e73bbe993ea3db9b1aa64906ab88766d654973924340c8cddb42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3531,7 +3542,7 @@ checksum = "d93877bcde0eb80ca09131a08d23f0a5c18a620b01db137dba666d18cd9b30c2" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3542,7 +3553,7 @@ checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3553,7 +3564,7 @@ checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" dependencies = [ "concurrent-queue", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3563,17 +3574,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "958e4d70b6d5e81971bebec42271ec641e7ff4e170a6fa605f2b8a8b65cb97d3" dependencies = [ "event-listener 4.0.3", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] name = "event-listener-strategy" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" +checksum = "332f51cb23d20b0de8458b86580878211da09bcd4503cb579c225b3d124cabb3" dependencies = [ "event-listener 5.2.0", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -3673,7 +3684,7 @@ dependencies = [ "fs-err", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -3705,9 +3716,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" [[package]] name = "fatality" @@ -4221,7 +4232,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4340,7 +4351,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "Inflector", "cfg-expr", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "expander 2.0.0", "frame-support-procedural-tools", "itertools 0.10.5", @@ -4348,7 +4359,7 @@ dependencies = [ "proc-macro-warning", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4360,7 +4371,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4370,7 +4381,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4457,6 +4468,94 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "fudge" +version = "0.0.10" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +dependencies = [ + "fudge-companion", + "fudge-core", + "polkadot-parachain-primitives", + "sc-executor", + "sc-service", + "sp-io", +] + +[[package]] +name = "fudge-companion" +version = "0.0.7" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "fudge-core" +version = "0.0.10" +source = "git+https://github.com/centrifuge/fudge?branch=polkadot-v1.1.0#043a7f77ab336acdf4208a7550b486947fb4c627" +dependencies = [ + "async-trait", + "bitvec 1.0.1", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-relay-chain-interface", + "frame-support", + "frame-system", + "fudge-companion", + "futures", + "futures-timer", + "lazy_static", + "node-primitives", + "pallet-babe", + "parity-scale-codec 3.6.9", + "parking_lot 0.12.1", + "polkadot-cli", + "polkadot-core-primitives", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime-parachains", + "polkadot-service", + "prioritized-metered-channel", + "sc-basic-authorship", + "sc-block-builder", + "sc-client-api", + "sc-client-db", + "sc-consensus", + "sc-consensus-aura", + "sc-executor", + "sc-offchain", + "sc-service", + "sc-transaction-pool", + "sc-transaction-pool-api", + "scale-info", + "sp-api", + "sp-block-builder", + "sp-blockchain", + "sp-consensus", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-grandpa", + "sp-core", + "sp-database", + "sp-externalities", + "sp-inherents", + "sp-io", + "sp-keystore", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-storage", + "sp-timestamp", + "sp-transaction-pool", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "funty" version = "1.1.0" @@ -4529,7 +4628,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "waker-fn", ] @@ -4539,11 +4638,11 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52527eb5074e35e9339c6b4e8d12600c7128b68fb25dcb9fa9dec18f7c25f3a5" dependencies = [ - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-core", "futures-io", "parking", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -4554,7 +4653,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -4599,7 +4698,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "pin-utils", "slab", ] @@ -4719,7 +4818,7 @@ dependencies = [ "bstr", "log", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -4745,7 +4844,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.5", + "indexmap 2.2.6", "slab", "tokio", "tokio-util", @@ -4949,7 +5048,7 @@ checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ "bytes", "http", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", ] [[package]] @@ -4992,7 +5091,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "socket2 0.5.6", "tokio", "tower-service", @@ -5169,9 +5268,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.5" +version = "2.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" dependencies = [ "equivalent", "hashbrown 0.14.3", @@ -5304,9 +5403,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" @@ -5982,13 +6081,12 @@ dependencies = [ [[package]] name = "libredox" -version = "0.0.1" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.5.0", "libc", - "redox_syscall 0.4.1", ] [[package]] @@ -6230,7 +6328,7 @@ dependencies = [ "macro_magic_core", "macro_magic_macros", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -6240,11 +6338,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7e766a20fd9c72bab3e1e64ed63f36bd08410e75803813df210d1ce297d7ad00" dependencies = [ "const-random", - "derive-syn-parse", + "derive-syn-parse 0.1.5", "macro_magic_core_macros", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -6255,7 +6353,7 @@ checksum = "d710e1214dffbab3b5dacb21475dde7d6ed84c69ff722b3a47a782668d44fbac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -6266,7 +6364,7 @@ checksum = "b8fb85ec1620619edf2984a7693497d4ec88a9665d8b87e942856884c92dbf2a" dependencies = [ "macro_magic_core", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -6308,9 +6406,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" [[package]] name = "memfd" @@ -6562,9 +6660,9 @@ dependencies = [ [[package]] name = "nalgebra" -version = "0.32.4" +version = "0.32.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4541eb06dce09c0241ebbaab7102f0a01a0c8994afed2e5d0d66775016e25ac2" +checksum = "3ea4908d4f23254adda3daa60ffef0f1ac7b8c3e9a864cf3cc154b251908a2ef" dependencies = [ "approx", "matrixmultiply", @@ -6685,6 +6783,15 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43794a0ace135be66a25d3ae77d41b91615fb68ae937f904090203e81f755b65" +[[package]] +name = "node-primitives" +version = "2.0.0" +source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot-v1.1.0#c8d2251cafadc108ba2f1f8a3208dc547ff38901" +dependencies = [ + "sp-core", + "sp-runtime", +] + [[package]] name = "nodrop" version = "0.1.14" @@ -6852,7 +6959,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -8614,7 +8721,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -9165,9 +9272,9 @@ checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "pest" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" +checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" dependencies = [ "memchr", "thiserror", @@ -9176,9 +9283,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0d24f72393fd16ab6ac5738bc33cdb6a9aa73f8b902e8fe29cf4e67d7dd1026" +checksum = "f73541b156d32197eecda1a4014d7f868fd2bcb3c550d5386087cfba442bf69c" dependencies = [ "pest", "pest_generator", @@ -9186,22 +9293,22 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdc17e2a6c7d0a492f0158d7a4bd66cc17280308bbaff78d5bef566dca35ab80" +checksum = "c35eeed0a3fab112f75165fdc026b3913f4183133f19b49be773ac9ea966e8bd" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "pest_meta" -version = "2.7.8" +version = "2.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "934cd7631c050f4674352a6e835d5f6711ffbfb9345c2fc0107155ac495ae293" +checksum = "2adbf29bb9776f28caece835398781ab24435585fe0d4dc1374a61db5accedca" dependencies = [ "once_cell", "pest", @@ -9215,7 +9322,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" dependencies = [ "fixedbitset", - "indexmap 2.2.5", + "indexmap 2.2.6", ] [[package]] @@ -9235,7 +9342,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -9246,9 +9353,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" [[package]] name = "pin-utils" @@ -9263,7 +9370,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "668d31b1c4eba19242f2088b2bf3316b82ca31082a8335764db4e083db7485d4" dependencies = [ "atomic-waker", - "fastrand 2.0.1", + "fastrand 2.0.2", "futures-io", ] @@ -9285,9 +9392,9 @@ checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "platforms" -version = "3.3.0" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626dec3cac7cc0e1577a2ec3fc496277ec2baa084bebad95bb6fdbfae235f84c" +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" [[package]] name = "polkadot-approval-distribution" @@ -10489,19 +10596,20 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "windows-sys 0.48.0", ] [[package]] name = "polling" -version = "3.5.0" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24f040dee2588b4963afb4e420540439d126f73fdacf4a9c486a96d840bac3c9" +checksum = "e0c976a60b2d7e99d6f229e414670a9b85d13ac305cc6d1e9c134de58c5aaaf6" dependencies = [ "cfg-if", "concurrent-queue", - "pin-project-lite 0.2.13", + "hermit-abi 0.3.9", + "pin-project-lite 0.2.14", "rustix 0.38.32", "tracing", "windows-sys 0.52.0", @@ -10631,12 +10739,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" +checksum = "8d3928fb5db768cb86f891ff014f0144589297e3c6a1aba6ed7cecfdace270c7" dependencies = [ "proc-macro2", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -10732,7 +10840,7 @@ checksum = "3d1eaa7fa0aa1929ffdf7eeb6eac234dde6268914a14ad44d23521ab6a9b258e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -10778,7 +10886,7 @@ checksum = "440f724eba9f6996b75d63681b0a92b06947f1457076d503a4d2e2c8f56442b8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -11020,9 +11128,9 @@ checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" [[package]] name = "rayon" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -11070,9 +11178,9 @@ dependencies = [ [[package]] name = "redox_users" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" +checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" dependencies = [ "getrandom 0.2.12", "libredox", @@ -11109,7 +11217,7 @@ checksum = "5fddb4f8d99b0a2ebafc65a87a69a7b9875e4b1ae1f00db265d300ef7f28bccc" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -11126,14 +11234,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick", "memchr", "regex-automata 0.4.6", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -11153,7 +11261,7 @@ checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.2", + "regex-syntax 0.8.3", ] [[package]] @@ -11164,9 +11272,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" [[package]] name = "resolv-conf" @@ -11526,6 +11634,140 @@ dependencies = [ "xcm-primitives", ] +[[package]] +name = "runtime-integration-tests" +version = "0.1.0" +dependencies = [ + "altair-runtime", + "axelar-gateway-precompile", + "centrifuge-runtime", + "cfg-primitives", + "cfg-traits", + "cfg-types", + "cfg-utils", + "chainbridge", + "cumulus-pallet-aura-ext", + "cumulus-pallet-dmp-queue", + "cumulus-pallet-parachain-system", + "cumulus-pallet-xcm", + "cumulus-pallet-xcmp-queue", + "cumulus-primitives-core", + "cumulus-primitives-parachain-inherent", + "cumulus-test-relay-sproof-builder", + "development-runtime", + "ethabi", + "ethereum", + "fp-self-contained", + "frame-support", + "frame-system", + "fudge", + "fudge-core", + "getrandom 0.2.12", + "hex", + "hex-literal 0.3.4", + "lazy_static", + "liquidity-pools-gateway-routers", + "orml-asset-registry", + "orml-tokens", + "orml-traits", + "orml-xcm", + "orml-xtokens", + "pallet-anchors", + "pallet-aura", + "pallet-authorship", + "pallet-babe", + "pallet-balances", + "pallet-base-fee", + "pallet-block-rewards", + "pallet-bridge", + "pallet-collator-allowlist", + "pallet-collator-selection", + "pallet-collective", + "pallet-crowdloan-claim", + "pallet-crowdloan-reward", + "pallet-democracy", + "pallet-elections-phragmen", + "pallet-ethereum", + "pallet-ethereum-transaction", + "pallet-evm", + "pallet-evm-chain-id", + "pallet-fees", + "pallet-foreign-investments", + "pallet-grandpa", + "pallet-identity", + "pallet-im-online", + "pallet-interest-accrual", + "pallet-investments", + "pallet-keystore", + "pallet-liquidity-pools", + "pallet-liquidity-pools-gateway", + "pallet-liquidity-rewards", + "pallet-loans", + "pallet-membership", + "pallet-multisig", + "pallet-oracle-collection", + "pallet-oracle-feed", + "pallet-order-book", + "pallet-permissions", + "pallet-pool-registry", + "pallet-pool-system", + "pallet-preimage", + "pallet-proxy", + "pallet-remarks", + "pallet-restricted-tokens", + "pallet-restricted-xtokens", + "pallet-rewards", + "pallet-scheduler", + "pallet-session", + "pallet-sudo", + "pallet-swaps", + "pallet-timestamp", + "pallet-transaction-payment", + "pallet-transfer-allowlist", + "pallet-treasury", + "pallet-uniques", + "pallet-utility", + "pallet-vesting", + "pallet-xcm", + "pallet-xcm-transactor", + "parachain-info", + "parity-scale-codec 3.6.9", + "polkadot-core-primitives", + "polkadot-node-primitives", + "polkadot-parachain-primitives", + "polkadot-primitives", + "polkadot-runtime", + "polkadot-runtime-common", + "polkadot-runtime-parachains", + "rococo-runtime", + "runtime-common", + "sc-block-builder", + "sc-client-api", + "sc-executor", + "sc-service", + "serde", + "sp-api", + "sp-block-builder", + "sp-consensus-aura", + "sp-consensus-babe", + "sp-consensus-beefy", + "sp-consensus-slots", + "sp-core", + "sp-inherents", + "sp-io", + "sp-runtime", + "sp-std", + "sp-timestamp", + "sp-tracing", + "sp-transaction-pool", + "staging-kusama-runtime", + "staging-xcm", + "staging-xcm-executor", + "thiserror", + "tokio", + "tracing-subscriber", +] + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -11814,7 +12056,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -12739,7 +12981,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -12801,9 +13043,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef2175c2907e7c8bc0a9c3f86aeb5ec1f3b275300ad58a44d0c3ae379a5e52e" +checksum = "788745a868b0e751750388f4e6546eb921ef714a4317fa6954f7cde114eb2eb7" dependencies = [ "bitvec 1.0.1", "cfg-if", @@ -12815,9 +13057,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b8eb8fd61c5cdd3390d9b2132300a7e7618955b98b8416f118c1b4e144f" +checksum = "7dc2f4e8bc344b9fc3d5f74f72c2e55bfc38d28dc2ebc69c194a3df424e4d9ac" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -12961,9 +13203,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.9.2" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" dependencies = [ "bitflags 1.3.2", "core-foundation", @@ -12974,9 +13216,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.9.1" +version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" +checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" dependencies = [ "core-foundation-sys", "libc", @@ -13023,14 +13265,14 @@ checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.115" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "12dc5c46daa8e9fdf4f5e71b6cf9a53f2487da0e86e55808e2d35539666497dd" dependencies = [ "itoa", "ryu", @@ -13423,7 +13665,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -13662,7 +13904,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "quote", "sp-core-hashing", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -13681,7 +13923,7 @@ source = "git+https://github.com/paritytech/polkadot-sdk?branch=release-polkadot dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -13898,7 +14140,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14090,7 +14332,7 @@ dependencies = [ "parity-scale-codec 3.6.9", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14418,7 +14660,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14556,9 +14798,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.53" +version = "2.0.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7383cd0e49fff4b6b90ca5670bfd3e9d6a733b3f90c686605aa7eec8c4996032" +checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" dependencies = [ "proc-macro2", "quote", @@ -14617,7 +14859,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", - "fastrand 2.0.1", + "fastrand 2.0.2", "rustix 0.38.32", "windows-sys 0.52.0", ] @@ -14663,7 +14905,7 @@ checksum = "e4c60d69f36615a077cc7663b9cb8e42275722d23e58a7fa3d2c7f2915d09d04" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14674,7 +14916,7 @@ checksum = "c61f3ba182994efc43764a46c018c347bc492c79f024e705f46567b418f6d4f7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14812,9 +15054,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.36.0" +version = "1.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" +checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" dependencies = [ "backtrace", "bytes", @@ -14822,7 +15064,7 @@ dependencies = [ "mio", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "signal-hook-registry", "socket2 0.5.6", "tokio-macros", @@ -14837,7 +15079,7 @@ checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -14868,7 +15110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ "futures-core", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tokio-util", ] @@ -14883,7 +15125,7 @@ dependencies = [ "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tokio", "tracing", ] @@ -14936,7 +15178,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -14949,7 +15191,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.2.5", + "indexmap 2.2.6", "serde", "serde_spanned", "toml_datetime", @@ -14980,7 +15222,7 @@ dependencies = [ "http", "http-body", "http-range-header", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tower-layer", "tower-service", ] @@ -15004,7 +15246,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ "log", - "pin-project-lite 0.2.13", + "pin-project-lite 0.2.14", "tracing-attributes", "tracing-core", ] @@ -15017,7 +15259,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -15061,7 +15303,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -15456,7 +15698,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", "wasm-bindgen-shared", ] @@ -15490,7 +15732,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -16354,7 +16596,7 @@ dependencies = [ "Inflector", "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -16397,7 +16639,7 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -16417,7 +16659,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.53", + "syn 2.0.57", ] [[package]] @@ -16460,9 +16702,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +version = "2.0.10+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index cf8c41c939..7a4c2c4183 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -44,7 +44,7 @@ members = [ "runtime/centrifuge", "runtime/development", "runtime/common", - #"runtime/integration-tests", + "runtime/integration-tests", ] [workspace.package] @@ -122,6 +122,7 @@ polkadot-runtime-common = { git = "https://github.com/paritytech/polkadot-sdk", polkadot-runtime-parachains = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } polkadot-parachain-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } polkadot-core-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } +polkadot-node-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } polkadot-primitives = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } polkadot-cli = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } polkadot-service = { git = "https://github.com/paritytech/polkadot-sdk", default-features = false, branch = "release-polkadot-v1.1.0" } @@ -219,8 +220,8 @@ orml-xcm-support = { git = "https://github.com/open-web3-stack/open-runtime-modu orml-xtokens = { git = "https://github.com/open-web3-stack/open-runtime-module-library", default-features = false, branch = "polkadot-v1.1.0" } # Centrifuge organization -#fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } -#fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } +fudge = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } +fudge-core = { git = "https://github.com/centrifuge/fudge", branch = "polkadot-v1.1.0" } chainbridge = { git = "https://github.com/centrifuge/chainbridge-substrate.git", default-features = false, branch = "polkadot-v1.1.0-latest-deps" } # Foss3 diff --git a/runtime/common/src/xcm.rs b/runtime/common/src/xcm.rs index 31cefcc725..dd838647b6 100644 --- a/runtime/common/src/xcm.rs +++ b/runtime/common/src/xcm.rs @@ -198,10 +198,9 @@ where } } -/* /// Convert an incoming `MultiLocation` into a `CurrencyId` through a /// reverse-lookup using the AssetRegistry. In the registry, we register CFG -/// using its absolute, non-anchored MultliLocation so we need to unanchor the +/// using its absolute, non-anchored MultiLocation so we need to unanchor the /// input location for Centrifuge-native assets for that to work. impl Convert> for CurrencyIdConvert where @@ -209,10 +208,9 @@ where + parachain_info::Config, { fn convert(location: MultiLocation) -> Option { - >::convert(location) + >::convert(&location) } } -*/ impl Convert> for CurrencyIdConvert where diff --git a/runtime/integration-tests/Cargo.toml b/runtime/integration-tests/Cargo.toml index f40d58a0e5..8168aaf253 100644 --- a/runtime/integration-tests/Cargo.toml +++ b/runtime/integration-tests/Cargo.toml @@ -23,7 +23,6 @@ thiserror = { workspace = true } tokio = { workspace = true } tracing-subscriber = { workspace = true } -node-primitives = { workspace = true, features = ["std"] } sc-block-builder = { workspace = true } sc-client-api = { workspace = true } sc-executor = { workspace = true, features = ["std"] } @@ -51,8 +50,9 @@ cumulus-primitives-core = { workspace = true, features = ["std"] } cumulus-primitives-parachain-inherent = { workspace = true, features = ["std"] } cumulus-test-relay-sproof-builder = { workspace = true, features = ["std"] } -kusama-runtime = { workspace = true, features = ["std"] } +staging-kusama-runtime = { workspace = true, features = ["std"] } polkadot-core-primitives = { workspace = true, features = ["std"] } +polkadot-node-primitives = { workspace = true } polkadot-parachain-primitives = { workspace = true, features = ["std"] } polkadot-primitives = { workspace = true, features = ["std"] } polkadot-runtime = { workspace = true, features = ["std"] } diff --git a/runtime/integration-tests/src/evm/precompile.rs b/runtime/integration-tests/src/evm/precompile.rs index 835130af9f..6390d474fd 100644 --- a/runtime/integration-tests/src/evm/precompile.rs +++ b/runtime/integration-tests/src/evm/precompile.rs @@ -22,7 +22,7 @@ use cfg_types::{ }; use ethabi::{Contract, Function, Param, ParamType, Token}; use ethereum::{LegacyTransaction, TransactionAction, TransactionSignature, TransactionV2}; -use frame_support::{assert_err, assert_ok, dispatch::RawOrigin}; +use frame_support::{assert_err, assert_ok, dispatch::RawOrigin, BoundedVec}; use fudge::primitives::Chain; use hex::ToHex; use orml_traits::{asset_registry::AssetMetadata, MultiCurrency}; @@ -32,8 +32,8 @@ use parity_scale_codec::Encode; use runtime_common::{account_conversion::AccountConverter, evm::precompile::LP_AXELAR_GATEWAY}; use sp_core::{Get, H160, H256, U256}; use sp_runtime::traits::{BlakeTwo256, Hash}; +use staging_xcm::{v3::MultiLocation, VersionedMultiLocation}; use tokio::runtime::Handle; -use xcm::{v3::MultiLocation, VersionedMultiLocation}; use crate::{ chain::centrifuge::{ @@ -91,8 +91,14 @@ async fn axelar_precompile_execute() { let currency_metadata = AssetMetadata { decimals: 18, - name: "Test".into(), - symbol: "TST".into(), + name: BoundedVec::::StringLimit>::try_from( + "Test".as_bytes().to_vec(), + ) + .expect("Can create BoundedVec for token name"), + symbol: BoundedVec::::StringLimit>::try_from( + "TST".as_bytes().to_vec(), + ) + .expect("Can create BoundedVec for token symbol"), existential_deposit: ED, location: Some(VersionedMultiLocation::V3(MultiLocation::here())), additional: CustomMetadata { diff --git a/runtime/integration-tests/src/generic/cases/account_derivation.rs b/runtime/integration-tests/src/generic/cases/account_derivation.rs index 378c13f209..3ad950f10f 100644 --- a/runtime/integration-tests/src/generic/cases/account_derivation.rs +++ b/runtime/integration-tests/src/generic/cases/account_derivation.rs @@ -14,8 +14,9 @@ use cfg_primitives::AccountId; use runtime_common::apis::runtime_decl_for_account_conversion_api::AccountConversionApi; +use sp_api::{BlockT, HeaderT}; use sp_runtime::traits::{Get, Zero}; -use xcm::v3::{ +use staging_xcm::v3::{ Junction::{AccountId32, AccountKey20, Parachain}, Junctions::{X1, X2}, MultiLocation, NetworkId, @@ -187,7 +188,7 @@ fn remote_account_on_relay() { AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( - frame_system::BlockHash::::get(T::BlockNumber::zero()).0, + frame_system::BlockHash::::get::(Zero::zero()).0, )), }, ), @@ -215,7 +216,10 @@ fn remote_account_on_sibling() { AccountId32 { id: KEY_32, network: Some(NetworkId::ByGenesis( - frame_system::BlockHash::::get(T::BlockNumber::zero()).0, + frame_system::BlockHash::::get( + <::Header as HeaderT>::Number::zero(), + ) + .0, )), }, ), diff --git a/runtime/integration-tests/src/generic/cases/investments.rs b/runtime/integration-tests/src/generic/cases/investments.rs index 83abfb1855..cacd0b53cc 100644 --- a/runtime/integration-tests/src/generic/cases/investments.rs +++ b/runtime/integration-tests/src/generic/cases/investments.rs @@ -39,10 +39,12 @@ mod common { pub fn initialize_state_for_investments, T: Runtime>() -> E { let mut env = E::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::assets(vec![Box::new(Usd6)])) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs index b6cfc907fa..d9b03ca415 100644 --- a/runtime/integration-tests/src/generic/cases/liquidity_pools.rs +++ b/runtime/integration-tests/src/generic/cases/liquidity_pools.rs @@ -15,14 +15,13 @@ use cfg_types::{ orders::FulfillmentWithPrice, permissions::{PermissionScope, PoolRole, Role}, pools::TrancheMetadata, - tokens::{CrossChainTransferability, CurrencyId, CustomMetadata}, + tokens::{AssetMetadata, CrossChainTransferability, CurrencyId, CustomMetadata}, xcm::XcmMetadata, }; use cfg_utils::vec_to_fixed_array; use frame_support::{ assert_noop, assert_ok, - dispatch::{RawOrigin, Weight}, - pallet_prelude::GenesisBuild, + dispatch::RawOrigin, traits::{ fungible::Mutate as FungibleMutate, fungibles::{Inspect, Mutate as FungiblesMutate}, @@ -33,30 +32,34 @@ use liquidity_pools_gateway_routers::{ AxelarEVMRouter, AxelarXCMRouter, DomainRouter, EVMDomain, EVMRouter, EthereumXCMRouter, FeeValues, XCMRouter, XcmDomain, DEFAULT_PROOF_SIZE, MAX_AXELAR_EVM_CHAIN_SIZE, }; -use orml_traits::{asset_registry::AssetMetadata, MultiCurrency}; +use orml_traits::MultiCurrency; use pallet_investments::CollectOutcome; use pallet_liquidity_pools::Message; use pallet_liquidity_pools_gateway::{Call as LiquidityPoolsGatewayCall, GatewayOrigin}; use pallet_pool_system::tranches::{TrancheInput, TrancheLoc, TrancheType}; use parity_scale_codec::Encode; use polkadot_core_primitives::BlakeTwo256; -use polkadot_parachain::primitives::{Id, ValidationCode}; +use polkadot_parachain_primitives::primitives::{Id, ValidationCode}; use polkadot_runtime_parachains::{ paras, paras::{ParaGenesisArgs, ParaKind}, }; use runtime_common::{ - account_conversion::AccountConverter, + account_conversion::{convert_evm_address, AccountConverter}, foreign_investments::IdentityPoolCurrencyConverter, xcm::general_key, xcm_fees::{default_per_second, ksm_per_second}, }; use sp_core::{Get, H160, U256}; use sp_runtime::{ - traits::{AccountIdConversion, BadOrigin, ConstU32, Convert as C2, EnsureAdd, Hash, One, Zero}, - BoundedVec, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, WeakBoundedVec, + traits::{ + AccountIdConversion, BadOrigin, ConstU32, Convert as C1, Convert as C2, EnsureAdd, Hash, + One, Zero, + }, + BoundedVec, BuildStorage, DispatchError, FixedPointNumber, Perquintill, SaturatedConversion, + WeakBoundedVec, }; -use xcm::{ +use staging_xcm::{ latest::NetworkId, prelude::XCM_VERSION, v3::{ @@ -65,7 +68,6 @@ use xcm::{ }, VersionedMultiAsset, VersionedMultiAssets, VersionedMultiLocation, }; -use xcm_executor::traits::Convert as C1; use crate::{ generic::{ @@ -81,7 +83,7 @@ pub mod utils { use super::*; pub fn parachain_account(id: u32) -> AccountId { - polkadot_parachain::primitives::Sibling::from(id).into_account_truncating() + polkadot_parachain_primitives::primitives::Sibling::from(id).into_account_truncating() } pub fn xcm_metadata(transferability: CrossChainTransferability) -> Option { @@ -184,10 +186,10 @@ pub mod utils { } pub fn register_ausd() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -263,8 +265,6 @@ type FudgeRelayRuntime = <::FudgeHandle as FudgeHandle> use utils::*; mod development { - use development_runtime::xcm::LocationToAccountId; - use super::*; pub const GLMR_CURRENCY_ID: CurrencyId = CurrencyId::ForeignAsset(4); @@ -285,6 +285,7 @@ mod development { mod utils { use cfg_types::oracles::OracleKey; + use frame_support::weights::Weight; use runtime_common::oracle::Feeder; use super::*; @@ -321,14 +322,14 @@ mod development { // liquidity pools AddTranche message. token_name: BoundedVec::< u8, - ::MaxTokenNameLength, + ::StringLimit, >::try_from("A highly advanced tranche".as_bytes().to_vec()) - .expect(""), + .expect("Can create BoundedVec for token name"), token_symbol: BoundedVec::< u8, - ::MaxTokenSymbolLength, + ::StringLimit, >::try_from("TrNcH".as_bytes().to_vec()) - .expect(""), + .expect("Can create BoundedVec for token symbol"), } }, TrancheInput { @@ -351,10 +352,10 @@ mod development { } pub fn register_glmr() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Glimmer".into(), - symbol: "GLMR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: GLMR_ED, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -739,9 +740,7 @@ mod development { assert_eq!( orml_tokens::Pallet::::balance( default_investment_id::().into(), - &AccountConverter::::convert( - DEFAULT_OTHER_DOMAIN_ADDRESS - ) + &AccountConverter::convert(DEFAULT_OTHER_DOMAIN_ADDRESS) ), 0 ); @@ -775,10 +774,10 @@ mod development { /// /// NOTE: Assumes to be executed within an externalities environment. fn register_usdt() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Tether USDT".into(), - symbol: "USDT".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: USDT_ED, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -1027,7 +1026,7 @@ mod development { // Whitelist destination as TrancheInvestor of this Pool crate::generic::utils::give_pool_role::( - AccountConverter::::convert(new_member.clone()), + AccountConverter::convert(new_member.clone()), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), DEFAULT_VALIDITY), ); @@ -1035,7 +1034,7 @@ mod development { // Verify the Investor role was set as expected in Permissions assert!(pallet_permissions::Pallet::::has( PermissionScope::Pool(pool_id), - AccountConverter::::convert(new_member.clone()), + AccountConverter::convert(new_member.clone()), Role::PoolRole(PoolRole::TrancheInvestor(tranche_id, DEFAULT_VALIDITY)), )); @@ -1218,8 +1217,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1393,8 +1392,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1586,8 +1585,8 @@ mod development { assert_ok!(orml_asset_registry::Pallet::::register_asset( ::RuntimeOrigin::root(), AssetMetadata { - name: "Test".into(), - symbol: "TEST".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), decimals: 12, location: None, existential_deposit: 1_000_000, @@ -1846,9 +1845,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1901,9 +1899,8 @@ mod development { let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount / 3; let final_amount = invest_amount - decrease_amount; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -1992,9 +1989,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -2092,9 +2088,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2244,9 +2239,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let invest_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2477,9 +2471,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; @@ -2537,9 +2530,8 @@ mod development { let redeem_amount = 10 * decimals(12); let decrease_amount = redeem_amount / 3; let final_amount = redeem_amount - decrease_amount; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2655,9 +2647,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let sending_domain_locator = @@ -2753,9 +2744,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -2908,9 +2898,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let redeem_amount = 10 * decimals(12); - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let pool_account = pallet_pool_system::pool_types::PoolLocator { pool_id } @@ -3137,10 +3126,7 @@ mod development { let invest_amount: u128 = 10 * decimals(12); let decrease_amount = invest_amount + 1; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3189,10 +3175,7 @@ mod development { let redeem_amount: u128 = 10 * decimals(12); let decrease_amount = redeem_amount + 1; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3246,10 +3229,7 @@ mod development { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3332,10 +3312,7 @@ mod development { let pool_id = POOL_ID; let amount: u128 = 10 * decimals(12); let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let currency_id: CurrencyId = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; create_currency_pool::( @@ -3431,10 +3408,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3513,10 +3487,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3599,10 +3570,7 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; let investor: AccountId = - AccountConverter::::convert(( - DOMAIN_MOONBEAM, - Keyring::Bob.into(), - )); + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency = AUSD_CURRENCY_ID; let currency_decimals = currency_decimals::AUSD; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -3681,9 +3649,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3799,9 +3766,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -3942,9 +3908,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let trader: AccountId = Keyring::Alice.into(); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; @@ -4061,9 +4026,8 @@ mod development { env.parachain_state_mut(|| { let pool_id = POOL_ID; - let investor: AccountId = AccountConverter::::convert( - (DOMAIN_MOONBEAM, Keyring::Bob.into()), - ); + let investor: AccountId = + AccountConverter::convert((DOMAIN_MOONBEAM, Keyring::Bob.into())); let pool_currency: CurrencyId = AUSD_CURRENCY_ID; let foreign_currency: CurrencyId = USDT_CURRENCY_ID; let pool_currency_decimals = currency_decimals::AUSD; @@ -4379,7 +4343,7 @@ mod development { let valid_until = u64::MAX; crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), pool_id, PoolRole::TrancheInvestor(default_tranche_id::(pool_id), valid_until), ); @@ -4556,12 +4520,12 @@ mod development { // Give Keyring::Bob investor role for (valid_pool_id, invalid_tranche_id) and // (invalid_pool_id, valid_tranche_id) crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), invalid_pool_id, PoolRole::TrancheInvestor(valid_tranche_id, valid_until), ); crate::generic::utils::give_pool_role::( - AccountConverter::::convert(dest_address.clone()), + AccountConverter::convert(dest_address.clone()), valid_pool_id, PoolRole::TrancheInvestor(invalid_tranche_id, valid_until), ); @@ -4594,10 +4558,10 @@ mod development { let cfg_in_sibling = CurrencyId::ForeignAsset(12); // CFG Metadata - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Development".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -4690,7 +4654,7 @@ mod development { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -4809,10 +4773,7 @@ mod development { ) { let chain_id = env.parachain_state(|| pallet_evm_chain_id::Pallet::::get()); - let derived_account = AccountConverter::::convert_evm_address( - chain_id, - address.to_fixed_bytes(), - ); + let derived_account = convert_evm_address(chain_id, address.to_fixed_bytes()); env.parachain_state_mut(|| { pallet_balances::Pallet::::mint_into(&derived_account.into(), balance) @@ -4825,9 +4786,9 @@ mod development { fn test_via_outbound_queue() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5157,9 +5118,9 @@ mod development { fn set_domain_router() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5228,9 +5189,9 @@ mod development { fn add_remove_instances() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5286,9 +5247,9 @@ mod development { fn process_msg() { let mut env = FudgeEnv::::from_parachain_storage( - Genesis::::default() + Genesis::default() .add(genesis::balances::(cfg(1_000))) - .add::(genesis::council_members::( + .add(genesis::council_members::( get_council_members(), )) .storage(), @@ -5358,10 +5319,10 @@ mod altair { use super::*; pub fn register_air() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5384,10 +5345,10 @@ mod altair { } pub fn register_ksm() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Kusama".into(), - symbol: "KSM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), additional: CustomMetadata { @@ -5448,10 +5409,10 @@ mod altair { ); // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5479,10 +5440,10 @@ mod altair { ); // Register AIR as foreign asset in the sibling parachain - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -5551,7 +5512,7 @@ mod altair { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -5730,7 +5691,7 @@ mod altair { env: &mut FudgeEnv, transfer_amount: Balance, currency_id: CurrencyId, - meta: AssetMetadata, + meta: AssetMetadata, ) { env.parachain_state_mut(|| { assert_ok!(orml_asset_registry::Pallet::::register_asset( @@ -5787,7 +5748,7 @@ mod altair { env.parachain_state(|| { assert_eq!( orml_tokens::Pallet::::free_balance(currency_id, &Keyring::Bob.into()), - transfer_amount - fee(meta.decimals) + 1991963000000 ); }); } @@ -5797,10 +5758,10 @@ mod altair { let transfer_amount: Balance = ksm(2); let currency_id = CurrencyId::ForeignAsset(3001); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Kusama".into(), - symbol: "KSM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new(1, Here))), additional: CustomMetadata { @@ -5870,10 +5831,10 @@ mod altair { 1, X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Sibling Native Token".into(), - symbol: "SBLNG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -5982,10 +5943,10 @@ mod altair { general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), ), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Wormhole USDC".into(), - symbol: "WUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -6061,7 +6022,7 @@ mod altair { orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11992961); + assert_eq!(bob_balance, 11993571); }); } @@ -6079,10 +6040,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Altair".into(), - symbol: "AIR".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6106,10 +6067,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6137,10 +6098,10 @@ mod altair { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Tranche Token 1".into(), - symbol: "TRNCH".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6189,7 +6150,7 @@ mod altair { assert_eq!( >::convert(air_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way AIR is represented out in the wild @@ -6231,7 +6192,7 @@ mod altair { env.parachain_state_mut(|| { assert_eq!( >::convert(tranche_multilocation), - Err(tranche_multilocation), + None, ); }); @@ -6261,7 +6222,7 @@ mod altair { assert_eq!( >::convert(ausd_location.clone()), - Ok(AUSD_CURRENCY_ID), + Some(AUSD_CURRENCY_ID), ); assert_eq!( @@ -6281,7 +6242,7 @@ mod altair { assert_eq!( >::convert(ksm_location), - Ok(KSM_ASSET_ID), + Some(KSM_ASSET_ID), ); assert_eq!( @@ -6300,7 +6261,7 @@ mod altair { ); env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_err()); + assert!(>::convert(unknown_location).is_none()); }); } @@ -6333,7 +6294,7 @@ mod centrifuge { use super::*; mod utils { - use xcm::v3::NetworkId; + use staging_xcm::v3::NetworkId; use super::*; @@ -6350,10 +6311,10 @@ mod centrifuge { /// Register DOT in the asset registry. /// It should be executed within an externalities environment. pub fn register_dot() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 10, - name: "Polkadot".into(), - symbol: "DOT".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 100_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::parent())), additional: CustomMetadata { @@ -6369,10 +6330,10 @@ mod centrifuge { } pub fn register_lp_eth_usdc() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "LP Ethereum Wrapped USDC".into(), - symbol: "LpEthUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6399,10 +6360,10 @@ mod centrifuge { } pub fn register_usdc() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "USD Circle".into(), - symbol: "USDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6427,10 +6388,10 @@ mod centrifuge { /// Register CFG in the asset registry. /// It should be executed within an externalities environment. pub fn register_cfg(para_id: u32) { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6456,23 +6417,25 @@ mod centrifuge { /// production. It should be executed within an externalities /// environment. pub fn register_cfg_v2() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, - location: Some(VersionedMultiLocation::V2(xcm::v2::MultiLocation::new( - 1, - xcm::v2::Junctions::X2( - xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), - xcm::v2::Junction::GeneralKey( - WeakBoundedVec::>::force_from( - parachains::polkadot::centrifuge::CFG_KEY.into(), - None, + location: Some(VersionedMultiLocation::V2( + staging_xcm::v2::MultiLocation::new( + 1, + staging_xcm::v2::Junctions::X2( + staging_xcm::v2::Junction::Parachain(T::FudgeHandle::PARA_ID), + staging_xcm::v2::Junction::GeneralKey( + WeakBoundedVec::>::force_from( + parachains::polkadot::centrifuge::CFG_KEY.into(), + None, + ), ), ), ), - ))), + )), additional: CustomMetadata { transferability: CrossChainTransferability::Xcm(Default::default()), ..CustomMetadata::default() @@ -6489,10 +6452,10 @@ mod centrifuge { /// Register a token whose `CrossChainTransferability` does NOT include /// XCM. pub fn register_no_xcm_token() { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "NO XCM".into(), - symbol: "NXCM".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: None, additional: CustomMetadata { @@ -6598,7 +6561,7 @@ mod centrifuge { env.parachain_state(|| { assert_eq!( orml_tokens::Pallet::::free_balance(DOT_ASSET_ID, &Keyring::Alice.into()), - transfer_amount - dot_fee() + 29919630000 ); }); } @@ -6613,10 +6576,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 0, @@ -6640,10 +6603,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Acala Dollar".into(), - symbol: "AUSD".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6671,10 +6634,10 @@ mod centrifuge { let mut env = FudgeEnv::::default(); env.parachain_state_mut(|| { - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 12, - name: "Tranche Token 1".into(), - symbol: "TRNCH".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -6724,7 +6687,7 @@ mod centrifuge { assert_eq!( >::convert(cfg_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way CFG is represented out in the wild @@ -6763,7 +6726,7 @@ mod centrifuge { assert_eq!( >::convert(cfg_location_inner), - Ok(CurrencyId::Native), + Some(CurrencyId::Native), ); // The canonical way CFG is represented out in the wild @@ -6807,7 +6770,7 @@ mod centrifuge { assert_eq!( >::convert(dot_location), - Ok(DOT_ASSET_ID), + Some(DOT_ASSET_ID), ); assert_eq!( @@ -6829,7 +6792,7 @@ mod centrifuge { ); env.parachain_state_mut(|| { - assert!(>::convert(unknown_location).is_err()); + assert!(>::convert(unknown_location).is_none()); }); } @@ -7348,18 +7311,18 @@ mod centrifuge { fn restrict_usdc_xcm_transfer() { let mut env = FudgeEnv::::from_storage( - >>::build_storage( - ¶s::GenesisConfig { - paras: vec![( - 1000.into(), - ParaGenesisArgs { - genesis_head: Default::default(), - validation_code: ValidationCode::from(vec![0, 1, 2, 3]), - para_kind: ParaKind::Parachain, - }, - )], - }, - ) + paras::GenesisConfig::> { + _config: Default::default(), + paras: vec![( + 1000.into(), + ParaGenesisArgs { + genesis_head: Default::default(), + validation_code: ValidationCode::from(vec![0, 1, 2, 3]), + para_kind: ParaKind::Parachain, + }, + )], + } + .build_storage() .unwrap(), Genesis::default() .add(genesis::balances::(cfg(10))) @@ -7653,10 +7616,10 @@ mod centrifuge { let cfg_in_sibling = CurrencyId::ForeignAsset(12); // CFG Metadata - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Centrifuge".into(), - symbol: "CFG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(MultiLocation::new( 1, @@ -7749,7 +7712,7 @@ mod centrifuge { assert_eq!(current_balance, transfer_amount - fee(18)); // Sanity check for the actual amount Keyring::Bob ends up with - assert_eq!(current_balance, 4992960800000000000); + assert_eq!(current_balance, 4993570400000000000); }); } @@ -7991,10 +7954,10 @@ mod centrifuge { 1, X2(Parachain(T::FudgeHandle::SIBLING_ID), general_key(&[0, 1])), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 18, - name: "Sibling Native Token".into(), - symbol: "SBLNG".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1_000_000_000_000, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -8104,10 +8067,10 @@ mod centrifuge { general_key("0x02f3a00dd12f644daec907013b16eb6d14bf1c4cb4".as_bytes()), ), ); - let meta: AssetMetadata = AssetMetadata { + let meta: AssetMetadata = AssetMetadata { decimals: 6, - name: "Wormhole USDC".into(), - symbol: "WUSDC".into(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 1, location: Some(VersionedMultiLocation::V3(asset_location)), additional: CustomMetadata { @@ -8181,7 +8144,7 @@ mod centrifuge { orml_tokens::Pallet::::free_balance(usdc_asset_id, &Keyring::Bob.into()); // Sanity check to ensure the calculated is what is expected - assert_eq!(bob_balance, 11992961); + assert_eq!(bob_balance, 11993571); }); } diff --git a/runtime/integration-tests/src/generic/cases/loans.rs b/runtime/integration-tests/src/generic/cases/loans.rs index e28a4224cd..1bc33b5d1b 100644 --- a/runtime/integration-tests/src/generic/cases/loans.rs +++ b/runtime/integration-tests/src/generic/cases/loans.rs @@ -71,10 +71,12 @@ mod common { pub fn initialize_state_for_loans, T: Runtime>() -> E { let mut env = E::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::assets(vec![Box::new(Usd6)])) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::assets::(vec![Box::new(Usd6)])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/cases/proxy.rs b/runtime/integration-tests/src/generic/cases/proxy.rs index fd0e301c08..a606944618 100644 --- a/runtime/integration-tests/src/generic/cases/proxy.rs +++ b/runtime/integration-tests/src/generic/cases/proxy.rs @@ -3,7 +3,7 @@ use cfg_types::{tokens::CrossChainTransferability, xcm::XcmMetadata}; use frame_support::{assert_err, assert_ok, traits::Get}; use frame_system::RawOrigin; use sp_runtime::{traits::StaticLookup, DispatchResult}; -use xcm::{ +use staging_xcm::{ prelude::Parachain, v3::{Junction, Junctions::*, MultiLocation, WeightLimit}, VersionedMultiLocation, @@ -36,9 +36,11 @@ const TRANSFER_AMOUNT: Balance = usd6(100); fn configure_proxy_and_transfer(proxy_type: T::ProxyType) -> DispatchResult { let env = RuntimeEnv::::from_parachain_storage( - Genesis::::default() - .add(genesis::balances(T::ExistentialDeposit::get() + FOR_FEES)) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + Genesis::default() + .add(genesis::balances::( + T::ExistentialDeposit::get() + FOR_FEES, + )) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); @@ -60,7 +62,7 @@ fn configure_proxy_and_x_transfer( .add(genesis::balances::( T::ExistentialDeposit::get() + FOR_FEES, )) - .add(genesis::tokens(vec![(Usd6.id(), Usd6.ed())])) + .add(genesis::tokens::(vec![(Usd6.id(), Usd6.ed())])) .storage(), ); diff --git a/runtime/integration-tests/src/generic/config.rs b/runtime/integration-tests/src/generic/config.rs index ff98123c3b..98a1c87cae 100644 --- a/runtime/integration-tests/src/generic/config.rs +++ b/runtime/integration-tests/src/generic/config.rs @@ -1,8 +1,8 @@ use std::fmt::Debug; use cfg_primitives::{ - AccountId, Address, AuraId, Balance, BlockNumber, CollectionId, CouncilCollective, Header, - IBalance, Index, ItemId, LoanId, OrderId, PoolId, Signature, TrancheId, + AccountId, Address, AuraId, Balance, CollectionId, CouncilCollective, Header, IBalance, ItemId, + LoanId, Nonce, OrderId, PoolId, Signature, TrancheId, }; use cfg_traits::Millis; use cfg_types::{ @@ -12,7 +12,7 @@ use cfg_types::{ locations::Location, oracles::OracleKey, permissions::{PermissionScope, Role}, - tokens::{CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, + tokens::{AssetStringLimit, CurrencyId, CustomMetadata, FilterCurrency, TrancheCurrency}, }; use fp_self_contained::{SelfContainedCall, UncheckedExtrinsic}; use frame_support::{ @@ -50,13 +50,13 @@ pub trait Runtime: Send + Sync + frame_system::Config< - Index = Index, + Nonce = Nonce, AccountId = AccountId, RuntimeCall = Self::RuntimeCallExt, RuntimeEvent = Self::RuntimeEventExt, - BlockNumber = BlockNumber, Lookup = AccountIdLookup, RuntimeOrigin = Self::RuntimeOriginExt, + Block = Self::BlockExt, Hash = H256, > + pallet_pool_system::Config< CurrencyId = CurrencyId, @@ -92,6 +92,7 @@ pub trait Runtime: AssetId = CurrencyId, CustomMetadata = CustomMetadata, Balance = Balance, + StringLimit = AssetStringLimit, > + pallet_uniques::Config + pallet_timestamp::Config + pallet_aura::Config @@ -236,7 +237,7 @@ pub trait Runtime: + From; /// Block used by the runtime - type Block: Block< + type BlockExt: Block< Hash = H256, Header = Header, Extrinsic = UncheckedExtrinsic< @@ -258,17 +259,17 @@ pub trait Runtime: >; /// You can extend this bounds to give extra API support - type Api: sp_api::runtime_decl_for_core::CoreV4 - + sp_block_builder::runtime_decl_for_block_builder::BlockBuilderV6 + type Api: sp_api::runtime_decl_for_core::CoreV4 + + sp_block_builder::runtime_decl_for_block_builder::BlockBuilderV6 + apis::runtime_decl_for_loans_api::LoansApiV2< - Self::Block, + Self::BlockExt, PoolId, LoanId, pallet_loans::entities::loans::ActiveLoanInfo, Balance, pallet_loans::entities::input::PriceCollectionInput, > + apis::runtime_decl_for_pools_api::PoolsApiV1< - Self::Block, + Self::BlockExt, PoolId, TrancheId, Balance, @@ -276,12 +277,12 @@ pub trait Runtime: Quantity, Self::MaxTranchesExt, > + apis::runtime_decl_for_investments_api::InvestmentsApiV1< - Self::Block, + Self::BlockExt, AccountId, TrancheCurrency, InvestmentPortfolio, > + apis::runtime_decl_for_account_conversion_api::AccountConversionApiV1< - Self::Block, + Self::BlockExt, AccountId, > + apis::runtime_decl_for_rewards_api::RewardsApiV1< Self::Block, diff --git a/runtime/integration-tests/src/generic/env.rs b/runtime/integration-tests/src/generic/env.rs index cf962fef68..9bc283c084 100644 --- a/runtime/integration-tests/src/generic/env.rs +++ b/runtime/integration-tests/src/generic/env.rs @@ -1,4 +1,4 @@ -use cfg_primitives::{Address, Balance, BlockNumber, Index}; +use cfg_primitives::{Address, Balance, BlockNumber, Nonce}; use cfg_traits::{IntoSeconds, Seconds}; use parity_scale_codec::Encode; use sp_runtime::{ @@ -166,7 +166,7 @@ pub mod utils { pub fn create_extrinsic( who: Keyring, call: impl Into, - nonce: Index, + nonce: Nonce, ) -> ::Extrinsic { let runtime_call = call.into(); let signed_extra = ( diff --git a/runtime/integration-tests/src/generic/envs/fudge_env.rs b/runtime/integration-tests/src/generic/envs/fudge_env.rs index ea0f6663ef..ad7dc3dd60 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env.rs @@ -2,7 +2,7 @@ pub mod handle; use std::collections::HashMap; -use cfg_primitives::{Balance, BlockNumber, Index}; +use cfg_primitives::{Balance, BlockNumber, Nonce}; use fudge::primitives::Chain; use handle::{FudgeHandle, ParachainClient}; use sc_client_api::HeaderBackend; @@ -27,7 +27,7 @@ pub trait FudgeSupport: Runtime { /// Evironment that uses fudge to interact with the runtime pub struct FudgeEnv { handle: T::FudgeHandle, - nonce_storage: HashMap, + nonce_storage: HashMap, } impl Default for FudgeEnv { @@ -119,9 +119,9 @@ impl Env for FudgeEnv { type ApiRefOf<'a, T> = ApiRef< 'a, ::Block, + ::BlockExt, <::FudgeHandle as FudgeHandle>::ParachainConstructApi, - > as sp_api::ProvideRuntimeApi<::Block>>::Api, + > as sp_api::ProvideRuntimeApi<::BlockExt>>::Api, >; /// Specialized fudge methods diff --git a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs index 9ad667a5da..4fc86e1b28 100644 --- a/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs +++ b/runtime/integration-tests/src/generic/envs/fudge_env/handle.rs @@ -1,8 +1,7 @@ use std::sync::Arc; -use cfg_primitives::{AuraId, Balance, BlockNumber, Header}; +use cfg_primitives::{AuraId, Balance, Header}; use cumulus_primitives_core::CollectCollationInfo; -use frame_support::traits::GenesisBuild; use fudge::{ digest::{DigestCreator as DigestCreatorT, DigestProvider, FudgeAuraDigest, FudgeBabeDigest}, inherent::{ @@ -14,18 +13,17 @@ use fudge::{ TWasmExecutor, }; use polkadot_core_primitives::{Block as RelayBlock, Header as RelayHeader}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_primitives::runtime_api::ParachainHost; use polkadot_runtime_parachains::configuration::HostConfiguration; use sc_block_builder::BlockBuilderApi; -use sc_client_api::Backend; use sc_service::{TFullBackend, TFullClient}; use sp_api::{ApiExt, ConstructRuntimeApi}; use sp_consensus_aura::{sr25519::AuthorityId, AuraApi}; use sp_consensus_babe::BabeApi; use sp_consensus_slots::SlotDuration; use sp_core::{crypto::AccountId32, ByteArray, H256}; -use sp_runtime::{traits::AccountIdLookup, Storage}; +use sp_runtime::{traits::AccountIdLookup, BuildStorage, Storage}; use sp_transaction_pool::runtime_api::TaggedTransactionQueue; use tokio::runtime::Handle; @@ -76,11 +74,8 @@ pub type RelayClient = TFullClient = TFullClient; pub trait FudgeHandle { - type RelayRuntime: frame_system::Config< - BlockNumber = BlockNumber, - AccountId = AccountId32, - Lookup = AccountIdLookup, - > + polkadot_runtime_parachains::paras::Config + type RelayRuntime: frame_system::Config> + + polkadot_runtime_parachains::paras::Config + polkadot_runtime_parachains::session_info::Config + polkadot_runtime_parachains::initializer::Config + polkadot_runtime_parachains::hrmp::Config @@ -99,7 +94,7 @@ pub trait FudgeHandle { type RelayApi: BlockBuilderApi + BabeApi + ParachainHost - + ApiExt as Backend>::State> + + ApiExt + TaggedTransactionQueue; type ParachainConstructApi: ConstructRuntimeApi< @@ -111,7 +106,7 @@ pub trait FudgeHandle { + 'static; type ParachainApi: BlockBuilderApi - + ApiExt as Backend>::State> + + ApiExt + AuraApi + TaggedTransactionQueue + CollectCollationInfo; @@ -160,7 +155,7 @@ pub trait FudgeHandle { Self::RelayRuntime, >::default(); - let mut host_config = HostConfiguration::::default(); + let mut host_config = HostConfiguration::default(); host_config.max_downward_message_size = 1024; host_config.hrmp_channel_max_capacity = 100; host_config.hrmp_channel_max_message_size = 1024; @@ -185,10 +180,11 @@ pub trait FudgeHandle { state .insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: code.to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); @@ -268,10 +264,11 @@ pub trait FudgeHandle { state .insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: code.to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); @@ -286,11 +283,11 @@ pub trait FudgeHandle { .expect("ESSENTIAL: Storage can be inserted"); state .insert_storage( - >::build_storage( - ¶chain_info::GenesisConfig { - parachain_id: para_id, - }, - ) + parachain_info::GenesisConfig:: { + _config: Default::default(), + parachain_id: para_id, + } + .build_storage() .expect("ESSENTIAL: Parachain Info GenesisBuild must not fail at this stage."), ) .expect("ESSENTIAL: Storage can be inserted"); diff --git a/runtime/integration-tests/src/generic/envs/runtime_env.rs b/runtime/integration-tests/src/generic/envs/runtime_env.rs index 88495d3205..d8cb7ca0a0 100644 --- a/runtime/integration-tests/src/generic/envs/runtime_env.rs +++ b/runtime/integration-tests/src/generic/envs/runtime_env.rs @@ -9,7 +9,6 @@ use frame_support::{ dispatch::GetDispatchInfo, inherent::{InherentData, ProvideInherent}, storage::{transactional, TransactionOutcome}, - traits::GenesisBuild, }; use frame_system::LastRuntimeUpgradeInfo; use parity_scale_codec::Encode; @@ -20,7 +19,7 @@ use sp_core::{sr25519::Public, Get, H256}; use sp_runtime::{ traits::Extrinsic, transaction_validity::{InvalidTransaction, TransactionValidityError}, - Digest, DigestItem, DispatchError, Storage, + BuildStorage, Digest, DigestItem, DispatchError, Storage, }; use sp_timestamp::Timestamp; @@ -287,6 +286,7 @@ impl RuntimeEnv { } } +#[cfg(test)] mod tests { use cfg_primitives::CFG; diff --git a/runtime/integration-tests/src/generic/impls.rs b/runtime/integration-tests/src/generic/impls.rs index 6b79a21938..274dc95082 100644 --- a/runtime/integration-tests/src/generic/impls.rs +++ b/runtime/integration-tests/src/generic/impls.rs @@ -9,7 +9,7 @@ macro_rules! impl_runtime { impl Runtime for $runtime_path::Runtime { type Api = Self; - type Block = $runtime_path::Block; + type BlockExt = $runtime_path::Block; type MaxTranchesExt = $runtime_path::MaxTranches; type RuntimeCallExt = $runtime_path::RuntimeCall; type RuntimeEventExt = $runtime_path::RuntimeEvent; @@ -28,13 +28,13 @@ impl_runtime!(centrifuge_runtime, Centrifuge); /// Implements fudge support for a runtime macro_rules! impl_fudge_support { ( - $fudge_companion_type:ident, - $relay_path:ident, + $fudge_companion_type:ident, + $relay_path:ident, $relay_session_keys:expr, - $parachain_path:ident, - $parachain_id:literal, - $sibling_id:literal - ) => { + $parachain_path:ident, + $parachain_id:literal, + $sibling_id:literal + ) => { const _: () = { use fudge::primitives::{Chain, ParaId}; use polkadot_core_primitives::Block as RelayBlock; @@ -175,7 +175,7 @@ impl_fudge_support!( impl_fudge_support!( FudgeAltair, - kusama_runtime, + staging_kusama_runtime, default_kusama_session_keys(), altair_runtime, 2088, @@ -200,12 +200,13 @@ pub fn default_rococo_session_keys() -> rococo_runtime::SessionKeys { para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), - beefy: sp_consensus_beefy::crypto::AuthorityId::from_slice([0u8; 33].as_slice()).unwrap(), + beefy: sp_consensus_beefy::ecdsa_crypto::AuthorityId::from_slice([0u8; 33].as_slice()) + .unwrap(), } } -pub fn default_kusama_session_keys() -> kusama_runtime::SessionKeys { - kusama_runtime::SessionKeys { +pub fn default_kusama_session_keys() -> staging_kusama_runtime::SessionKeys { + staging_kusama_runtime::SessionKeys { grandpa: pallet_grandpa::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), babe: pallet_babe::AuthorityId::from_slice([0u8; 32].as_slice()).unwrap(), im_online: pallet_im_online::sr25519::AuthorityId::from_slice([0u8; 32].as_slice()) @@ -213,6 +214,8 @@ pub fn default_kusama_session_keys() -> kusama_runtime::SessionKeys { para_validator: ValidatorId::from_slice([0u8; 32].as_slice()).unwrap(), para_assignment: AssignmentId::from_slice([0u8; 32].as_slice()).unwrap(), authority_discovery: AuthorityDiscoveryId::from_slice([0u8; 32].as_slice()).unwrap(), + beefy: sp_consensus_beefy::ecdsa_crypto::AuthorityId::from_slice([0u8; 33].as_slice()) + .unwrap(), } } diff --git a/runtime/integration-tests/src/generic/utils/currency.rs b/runtime/integration-tests/src/generic/utils/currency.rs index 5acd2786fa..4dff21775e 100644 --- a/runtime/integration-tests/src/generic/utils/currency.rs +++ b/runtime/integration-tests/src/generic/utils/currency.rs @@ -31,7 +31,7 @@ pub trait CurrencyInfo { &self.symbol() } - fn location(&self) -> Option { + fn location(&self) -> Option { None } @@ -41,11 +41,11 @@ pub trait CurrencyInfo { 0 } - fn metadata(&self) -> AssetMetadata { + fn metadata(&self) -> AssetMetadata { AssetMetadata { decimals: self.decimals(), - name: self.name().as_bytes().to_vec(), - symbol: self.symbol().as_bytes().to_vec(), + name: self.name().as_bytes().to_vec().try_into().unwrap(), + symbol: self.symbol().as_bytes().to_vec().try_into().unwrap(), existential_deposit: self.ed(), location: self.location(), additional: self.custom(), @@ -149,7 +149,7 @@ pub const fn usd18(amount: Balance) -> Balance { pub fn register_currency( currency: impl CurrencyInfo, - adaptor: impl FnOnce(&mut AssetMetadata), + adaptor: impl FnOnce(&mut AssetMetadata), ) { let mut meta = currency.metadata(); adaptor(&mut meta); diff --git a/runtime/integration-tests/src/generic/utils/democracy.rs b/runtime/integration-tests/src/generic/utils/democracy.rs index 8230f056d6..a5c234ada7 100644 --- a/runtime/integration-tests/src/generic/utils/democracy.rs +++ b/runtime/integration-tests/src/generic/utils/democracy.rs @@ -1,10 +1,7 @@ use std::ops::Add; use cfg_primitives::{Balance, BlockNumber, CouncilCollective}; -use frame_support::{ - dispatch::{GetDispatchInfo, Weight}, - traits::Bounded, -}; +use frame_support::{dispatch::GetDispatchInfo, traits::Bounded, weights::Weight}; use pallet_collective::{Call as CouncilCall, MemberCount, ProposalIndex}; use pallet_democracy::{ AccountVote, Call as DemocracyCall, Conviction, PropIndex, ReferendumIndex, ReferendumInfo, diff --git a/runtime/integration-tests/src/generic/utils/genesis.rs b/runtime/integration-tests/src/generic/utils/genesis.rs index 7792bc92ef..21b912fc16 100644 --- a/runtime/integration-tests/src/generic/utils/genesis.rs +++ b/runtime/integration-tests/src/generic/utils/genesis.rs @@ -1,36 +1,24 @@ //! PLEASE be as much generic as possible because no domain or use cases are //! considered at this level. -use std::marker::PhantomData; - use cfg_primitives::Balance; use cfg_types::tokens::CurrencyId; -use frame_support::traits::GenesisBuild; use parity_scale_codec::Encode; use sp_core::crypto::AccountId32; -use sp_runtime::Storage; +use sp_runtime::{BuildStorage, Storage}; use crate::{ generic::{config::Runtime, utils::currency::CurrencyInfo}, utils::accounts::{default_accounts, Keyring}, }; -pub struct Genesis { +#[derive(Default)] +pub struct Genesis { storage: Storage, - _config: PhantomData, -} - -impl Default for Genesis { - fn default() -> Self { - Self { - storage: Default::default(), - _config: Default::default(), - } - } } -impl Genesis { - pub fn add(mut self, builder: impl GenesisBuild) -> Self { +impl Genesis { + pub fn add(mut self, builder: impl BuildStorage) -> Self { builder.assimilate_storage(&mut self.storage).unwrap(); self } @@ -40,9 +28,9 @@ impl Genesis { } } -// Add GenesisBuild functions for pallet initialization. +// Add BuildStorage functions for pallet initialization. -pub fn balances(balance: Balance) -> impl GenesisBuild { +pub fn balances(balance: Balance) -> impl BuildStorage { pallet_balances::GenesisConfig:: { balances: default_accounts() .into_iter() @@ -51,7 +39,7 @@ pub fn balances(balance: Balance) -> impl GenesisBuild { } } -pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl GenesisBuild { +pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl BuildStorage { orml_tokens::GenesisConfig:: { balances: default_accounts() .into_iter() @@ -67,7 +55,7 @@ pub fn tokens(values: Vec<(CurrencyId, Balance)>) -> impl GenesisBui } } -pub fn assets(currency_ids: Vec>) -> impl GenesisBuild { +pub fn assets(currency_ids: Vec>) -> impl BuildStorage { orml_asset_registry::GenesisConfig:: { assets: currency_ids .into_iter() @@ -77,7 +65,7 @@ pub fn assets(currency_ids: Vec>) -> impl Gene } } -pub fn council_members(members: Vec) -> impl GenesisBuild +pub fn council_members(members: Vec) -> impl BuildStorage where I: 'static, T: pallet_collective::Config, diff --git a/runtime/integration-tests/src/utils/accounts.rs b/runtime/integration-tests/src/utils/accounts.rs index d4cc842c72..3a0f563486 100644 --- a/runtime/integration-tests/src/utils/accounts.rs +++ b/runtime/integration-tests/src/utils/accounts.rs @@ -14,9 +14,9 @@ use std::collections::HashMap; -use cfg_primitives::Index; +use cfg_primitives::Nonce; use fudge::primitives::Chain; -use node_primitives::{AccountId as RelayAccountId, Index as RelayIndex}; +use polkadot_core_primitives::{AccountId as RelayAccountId, Nonce as RelayNonce}; pub use sp_core::sr25519; use sp_core::{ sr25519::{Pair, Public, Signature}, @@ -31,7 +31,7 @@ use crate::{ /// Struct that takes care of handling nonces for accounts pub struct NonceManager { - nonces: HashMap>, + nonces: HashMap>, } impl NonceManager { @@ -47,7 +47,7 @@ impl NonceManager { /// map. /// /// MUST be executed in an externalites provided env. - pub fn nonce(&mut self, chain: Chain, who: Keyring) -> Index { + pub fn nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { self.nonces .entry(chain) .or_insert(HashMap::new()) @@ -56,13 +56,13 @@ impl NonceManager { .clone() } - fn nonce_from_chain(chain: Chain, who: Keyring) -> Index { + fn nonce_from_chain(chain: Chain, who: Keyring) -> Nonce { match chain { - Chain::Relay => nonce::( + Chain::Relay => nonce::( who.clone().to_account_id().into(), ), Chain::Para(id) => match id { - _ if id == PARA_ID => nonce::( + _ if id == PARA_ID => nonce::( who.clone().to_account_id().into() ), _ => unreachable!("Currently no nonces for chains differing from Relay and centrifuge are supported. Para ID {}", id) @@ -77,7 +77,7 @@ impl NonceManager { /// map. /// /// MUST be executed in an externalites provided env. - pub fn fetch_add(&mut self, chain: Chain, who: Keyring) -> Index { + pub fn fetch_add(&mut self, chain: Chain, who: Keyring) -> Nonce { let curr = self .nonces .entry(chain) @@ -105,10 +105,10 @@ impl NonceManager { /// Retrieves a nonce from the centrifuge state /// /// **NOTE: Usually one should use the TestEnv::nonce() api** -fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { +fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> Nonce { env.centrifuge .with_state(|| { - nonce::( + nonce::( who.clone().to_account_id().into(), ) }) @@ -118,19 +118,19 @@ fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { /// Retrieves a nonce from the relay state /// /// **NOTE: Usually one should use the TestEnv::nonce() api** -fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayIndex { +fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayNonce { env.relay .with_state(|| { - nonce::(who.clone().to_account_id().into()) + nonce::(who.clone().to_account_id().into()) }) .expect("ESSENTIAL: Nonce must be retrievable.") } -fn nonce(who: AccountId) -> Index +fn nonce(who: AccountId) -> Nonce where Runtime: frame_system::Config, AccountId: Into<::AccountId>, - Index: From<::Index>, + Nonce: From<::Nonce>, { frame_system::Pallet::::account_nonce(who.into()).into() } diff --git a/runtime/integration-tests/src/utils/env.rs b/runtime/integration-tests/src/utils/env.rs index 1159ecc156..59f89635dd 100644 --- a/runtime/integration-tests/src/utils/env.rs +++ b/runtime/integration-tests/src/utils/env.rs @@ -13,8 +13,7 @@ //! Utilities to create a relay-chain-parachain setup use std::collections::HashMap; -use cfg_primitives::{AuraId, BlockNumber, Index}; -use frame_support::traits::GenesisBuild; +use cfg_primitives::{AuraId, BlockNumber, Nonce}; use frame_system::EventRecord; use fudge::{ digest::{DigestCreator, DigestProvider, FudgeAuraDigest, FudgeBabeDigest}, @@ -31,7 +30,7 @@ use lazy_static::lazy_static; pub use macros::*; use parity_scale_codec::{Decode, Encode}; use polkadot_core_primitives::{Block as RelayBlock, Header as RelayHeader}; -use polkadot_parachain::primitives::Id as ParaId; +use polkadot_parachain_primitives::primitives::Id as ParaId; use polkadot_runtime_parachains::{configuration, configuration::HostConfiguration, dmp}; use sc_executor::{WasmExecutionMethod, WasmExecutor}; use sc_service::{TFullBackend, TFullClient, TaskManager}; @@ -41,7 +40,7 @@ use sp_core::H256; use sp_runtime::{ generic::BlockId, traits::{BlakeTwo256, Extrinsic}, - DigestItem, Storage, + BuildStorage, DigestItem, Storage, }; use tokio::runtime::Handle; @@ -548,7 +547,7 @@ impl TestEnv { /// Returns the next nonce to be used /// **WARN: Increases the nonce counter on `NonceManager** - fn fetch_add_nonce(&mut self, chain: Chain, who: Keyring) -> Index { + fn fetch_add_nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { let manager = self.nonce_manager.clone(); self.with_state(chain, || { manager @@ -561,7 +560,7 @@ impl TestEnv { /// Returns the next nonce to be used. Does NOT increase counter in /// `NonceManager` - fn nonce(&mut self, chain: Chain, who: Keyring) -> Index { + fn nonce(&mut self, chain: Chain, who: Keyring) -> Nonce { let manager = self.nonce_manager.clone(); self.with_state(chain, || { manager @@ -803,10 +802,11 @@ fn test_env( ); state.insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: RelayCode.expect("ESSENTIAL: Relay WASM is some.").to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: Frame System GenesisBuild must not fail at this stage."), ); @@ -893,8 +893,8 @@ fn test_env( fn get_parachain_builder( handle: Handle, inherent_builder: InherentBuilder< - TFullClient, TFullBackend, + TFullClient, >, para_id: u32, centrifuge_storage: Option, @@ -908,12 +908,13 @@ fn get_parachain_builder( .expect("ESSENTIAL: State provider can be created."); state.insert_storage( - frame_system::GenesisConfig { + frame_system::GenesisConfig:: { code: CentrifugeCode .expect("ESSENTIAL: Centrifuge WASM is some.") .to_vec(), + _config: Default::default(), } - .build_storage::() + .build_storage() .expect("ESSENTIAL: Frame System GenesisBuild must not fail at this stage."), ); state.insert_storage( @@ -924,11 +925,11 @@ fn get_parachain_builder( .expect("ESSENTIAL: Pallet Aura GenesisBuild must not fail at this stage."), ); state.insert_storage( - >::build_storage( - ¶chain_info::GenesisConfig { - parachain_id: ParaId::from(para_id), - }, - ) + parachain_info::GenesisConfig:: { + _config: Default::default(), + parachain_id: ParaId::from(para_id), + } + .build_storage() .expect("ESSENTIAL: Parachain Info GenesisBuild must not fail at this stage."), ); diff --git a/runtime/integration-tests/src/utils/evm.rs b/runtime/integration-tests/src/utils/evm.rs index 57bccefb0d..5300a234bd 100644 --- a/runtime/integration-tests/src/utils/evm.rs +++ b/runtime/integration-tests/src/utils/evm.rs @@ -13,7 +13,7 @@ use frame_support::{dispatch::RawOrigin, traits::fungible::Mutate}; use fudge::primitives::Chain; use pallet_evm::FeeCalculator; -use runtime_common::account_conversion::AccountConverter; +use runtime_common::account_conversion::{convert_evm_address, AccountConverter}; use sp_core::{Get, H160, U256}; use crate::{ @@ -28,8 +28,7 @@ pub fn mint_balance_into_derived_account(env: &mut TestEnv, address: H160, balan }) .unwrap(); - let derived_account = - AccountConverter::::convert_evm_address(chain_id, address.to_fixed_bytes()); + let derived_account = convert_evm_address(chain_id, address.to_fixed_bytes()); env.with_mut_state(Chain::Para(PARA_ID), || { Balances::mint_into(&derived_account.into(), balance).unwrap() @@ -44,8 +43,7 @@ pub fn deploy_contract(env: &mut TestEnv, address: H160, code: Vec) { }) .unwrap(); - let derived_address = - AccountConverter::::convert_evm_address(chain_id, address.to_fixed_bytes()); + let derived_address = convert_evm_address(chain_id, address.to_fixed_bytes()); let transaction_create_cost = env .with_state(Chain::Para(PARA_ID), || { diff --git a/runtime/integration-tests/src/utils/extrinsics.rs b/runtime/integration-tests/src/utils/extrinsics.rs index 1c84165317..5cf9c6a311 100644 --- a/runtime/integration-tests/src/utils/extrinsics.rs +++ b/runtime/integration-tests/src/utils/extrinsics.rs @@ -14,11 +14,12 @@ #![allow(unused)] use cfg_primitives::{ - AccountId as CentrifugeAccountId, Address as CentrifugeAddress, Index as CentrifugeIndex, + AccountId as CentrifugeAccountId, Address as CentrifugeAddress, Nonce as CentrifugeNonce, }; -use node_primitives::Index as RelayIndex; use parity_scale_codec::Encode; -use polkadot_core_primitives::{AccountId as RelayAccountId, BlockId as RelayBlockId}; +use polkadot_core_primitives::{ + AccountId as RelayAccountId, BlockId as RelayBlockId, Nonce as RelayNonce, +}; use sc_client_api::client::BlockBackend; use sp_core::H256; use sp_runtime::{ @@ -49,7 +50,7 @@ use crate::{ pub fn xt_centrifuge( env: &TestEnv, who: Keyring, - nonce: cfg_primitives::Index, + nonce: cfg_primitives::Nonce, call: centrifuge::RuntimeCall, ) -> Result> { let client = env.centrifuge.client(); @@ -77,7 +78,7 @@ pub fn xt_centrifuge( pub fn xt_relay( env: &TestEnv, who: Keyring, - nonce: RelayIndex, + nonce: RelayNonce, call: relay::RuntimeCall, ) -> Result> { let client = env.relay.client(); @@ -98,7 +99,7 @@ pub fn xt_relay( .map_err(|e| e.into()) } -fn signed_extra_centrifuge(nonce: cfg_primitives::Index) -> CentrifugeSignedExtra { +fn signed_extra_centrifuge(nonce: cfg_primitives::Nonce) -> CentrifugeSignedExtra { ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -114,7 +115,7 @@ fn signed_extra_centrifuge(nonce: cfg_primitives::Index) -> CentrifugeSignedExtr fn sign_centrifuge( who: Keyring, - nonce: cfg_primitives::Index, + nonce: cfg_primitives::Nonce, call: CentrifugeCall, spec_version: u32, tx_version: u32, @@ -143,7 +144,7 @@ fn sign_centrifuge( ) } -fn signed_extra_relay(nonce: RelayIndex) -> RelaySignedExtra { +fn signed_extra_relay(nonce: RelayNonce) -> RelaySignedExtra { ( frame_system::CheckNonZeroSender::::new(), frame_system::CheckSpecVersion::::new(), @@ -158,7 +159,7 @@ fn signed_extra_relay(nonce: RelayIndex) -> RelaySignedExtra { fn sign_relay( who: Keyring, - nonce: RelayIndex, + nonce: RelayNonce, call: RelayCall, spec_version: u32, tx_version: u32, @@ -190,10 +191,10 @@ fn sign_relay( /// /// **NOTE: Should not be used if the TesteEnv::sign_and_submit() interface is /// also used with the same `who` as the sender** -pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { +pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Nonce { env.centrifuge .with_state(|| { - nonce::( + nonce::( who.clone().to_account_id().into(), ) }) @@ -204,19 +205,19 @@ pub fn nonce_centrifuge(env: &TestEnv, who: Keyring) -> cfg_primitives::Index { /// /// **NOTE: Should not be used if the TesteEnv::sign_and_submit() interface is /// also used with the same `who` as the sender** -pub fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayIndex { +pub fn nonce_relay(env: &TestEnv, who: Keyring) -> RelayNonce { env.relay .with_state(|| { - nonce::(who.clone().to_account_id().into()) + nonce::(who.clone().to_account_id().into()) }) .expect("ESSENTIAL: Nonce must be retrievable.") } -fn nonce(who: AccountId) -> Index +fn nonce(who: AccountId) -> Nonce where Runtime: frame_system::Config, AccountId: Into<::AccountId>, - Index: From<::Index>, + Nonce: From<::Nonce>, { frame_system::Pallet::::account_nonce(who.into()).into() } diff --git a/runtime/integration-tests/src/utils/genesis.rs b/runtime/integration-tests/src/utils/genesis.rs index a2dc3d70fb..03d205c251 100644 --- a/runtime/integration-tests/src/utils/genesis.rs +++ b/runtime/integration-tests/src/utils/genesis.rs @@ -10,14 +10,14 @@ // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. -//! Utilitites around populating a genesis storage +//! Utilities around populating a genesis storage use cfg_types::{ fixed_point::Rate, tokens::{CurrencyId, CustomMetadata}, }; use frame_support::traits::GenesisBuild; use serde::{Deserialize, Serialize}; -use sp_runtime::{AccountId32, FixedPointNumber, Storage}; +use sp_runtime::{AccountId32, BoundedVec, BuildStorage, FixedPointNumber, Storage}; use crate::utils::{ accounts::{default_accounts, Keyring}, @@ -145,8 +145,8 @@ where orml_asset_registry::Pallet::::do_register_asset( orml_asset_registry::AssetMetadata { decimals: 18, - name: b"mock_name".to_vec(), - symbol: b"mock_symbol".to_vec(), + name: BoundedVec::default(), + symbol: BoundedVec::default(), existential_deposit: 0u128.into(), location: None, additional: CustomMetadata { diff --git a/rust-toolchain.toml b/rust-toolchain.toml index a187069911..669d2c3e87 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,5 +1,5 @@ [toolchain] -channel = "nightly-2023-10-26" # rustc 1.75.0 +channel = "nightly-2024-02-06" # 1.78.0-nightly components = [ "rustfmt", "clippy" ] targets = [ "wasm32-unknown-unknown" ] -profile = "minimal" \ No newline at end of file +profile = "minimal"