diff --git a/.rustfmt.toml b/.rustfmt.toml index 536703e6b38..3340762773e 100644 --- a/.rustfmt.toml +++ b/.rustfmt.toml @@ -34,7 +34,7 @@ struct_field_align_threshold = 0 enum_discrim_align_threshold = 0 match_arm_blocks = true force_multiline_blocks = true # changed -fn_args_layout = "Tall" +fn_params_layout = "Tall" brace_style = "SameLineWhere" control_brace_style = "AlwaysSameLine" trailing_semicolon = false # changed diff --git a/CHANGELOG.md b/CHANGELOG.md index 2b034dc3f7c..77f6ff70f12 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.27.0] - 2022-02-13 + +This is a fairly small release, primarily to bump substrate dependencies to their latest versions. + +The main breaking change is fairly small: [#804](https://github.com/paritytech/subxt/pull/804). Here, the `BlockNumber` associated type has been removed from `Config` entirely, since it wasn't actually needed anywhere in Subxt. Additionally, the constraints on each of those associated types in `Config` were made more precise, primarily to tidy things up (but this should result in types more easily being able to meet the requirements here). If you use custom `Config`, the fix is simply to remove the `BlockNumber` type. If you also use the `Config` trait in your own functions and depend on those constraints, you may be able to define a custom `MyConfig` type which builds off `Config` and adds back any additional bounds that you want. + +Note worthy PRs merged since the last release: + +## Added + +- Add find last function ([#821](https://github.com/paritytech/subxt/pull/821)) +- Doc: first item is current version comment ([#817](https://github.com/paritytech/subxt/pull/817)) + +## Changed + +- Remove unneeded Config bounds and BlockNumber associated type ([#804](https://github.com/paritytech/subxt/pull/804)) + ## [0.26.0] - 2022-01-24 This release adds a number of improvements, most notably: diff --git a/Cargo.lock b/Cargo.lock index 2ede39707ce..86a63687f30 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -47,6 +47,18 @@ dependencies = [ "version_check", ] +[[package]] +name = "ahash" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" +dependencies = [ + "cfg-if", + "getrandom 0.2.8", + "once_cell", + "version_check", +] + [[package]] name = "aho-corasick" version = "0.7.20" @@ -82,9 +94,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.68" +version = "1.0.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "224afbd727c3d6e4b90103ece64b8d1b67fbb1973b1046c2281eed3f3803f800" [[package]] name = "array-bytes" @@ -128,9 +140,9 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.63" +version = "0.1.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff18d764974428cf3a9328e23fc5c986f5fbed46e6cd4cdf42544df5d297ec1" +checksum = "1cd7fce9ba8c3c042128ce72d8b2ddbf3a05747efb67ea0313c635e10bda47a2" dependencies = [ "proc-macro2", "quote", @@ -187,6 +199,15 @@ version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +[[package]] +name = "basic-toml" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e819b667739967cd44d308b8c7b71305d8bb0729ac44a248aa08f33d01950b4" +dependencies = [ + "serde", +] + [[package]] name = "beef" version = "0.5.2" @@ -271,6 +292,18 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "bounded-collections" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de2aff4807e40f478132150d80b031f2461d88f061851afcab537d7600c24120" +dependencies = [ + "log", + "parity-scale-codec", + "scale-info", + "serde", +] + [[package]] name = "bumpalo" version = "3.12.0" @@ -297,9 +330,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.3.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" +checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" [[package]] name = "cast" @@ -309,9 +342,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.78" +version = "1.0.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" +checksum = "50d30906286121d95be3d479533b458f87493b30a4b5f79a607db8f5d11aa91f" [[package]] name = "cfg-if" @@ -372,9 +405,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.1.3" +version = "4.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d93d855ce6a0aa87b8473ef9169482f40abaa2e9e0993024c35c902cbd5920" +checksum = "f13b9c79b5d1dd500d20ef541215a6423c75829ef43117e1b4d17fd8af0b5d76" dependencies = [ "bitflags", "clap_derive", @@ -498,9 +531,9 @@ dependencies = [ [[package]] name = "cranelift-entity" -version = "0.88.2" +version = "0.92.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87a0f1b2fdc18776956370cf8d9b009ded3f855350c480c1c52142510961f352" +checksum = "dab984c94593f876090fae92e984bdcc74d9b1acf740ab5f79036001c65cba13" dependencies = [ "serde", ] @@ -667,9 +700,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b61a7545f753a88bcbe0a70de1fcc0221e10bfc752f576754fa91e663db1622e" +checksum = "90d59d9acd2a682b4e40605a242f6670eaa58c5957471cbf85e8aa6a0b97a5e8" dependencies = [ "cc", "cxxbridge-flags", @@ -679,9 +712,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f464457d494b5ed6905c63b0c4704842aba319084a0a3561cdc1359536b53200" +checksum = "ebfa40bda659dd5c864e65f4c9a2b0aff19bea56b017b9b77c73d3766a453a38" dependencies = [ "cc", "codespan-reporting", @@ -694,15 +727,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43c7119ce3a3701ed81aca8410b9acf6fc399d2629d057b87e2efa4e63a3aaea" +checksum = "457ce6757c5c70dc6ecdbda6925b958aae7f959bda7d8fb9bde889e34a09dc03" [[package]] name = "cxxbridge-macro" -version = "1.0.87" +version = "1.0.90" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65e07508b90551e610910fa648a1878991d367064997a596135b86df30daf07e" +checksum = "ebf883b7aacd7b2aeb2a7b338648ee19f57c140d4ee8e52c68979c6b2f7f2263" dependencies = [ "proc-macro2", "quote", @@ -711,9 +744,9 @@ dependencies = [ [[package]] name = "darling" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0dd3cd20dc6b5a876612a6e5accfe7f3dd883db6d07acfbf14c128f61550dfa" +checksum = "c0808e1bd8671fb44a113a14e13497557533369847788fa2ae912b6ebfce9fa8" dependencies = [ "darling_core", "darling_macro", @@ -721,9 +754,9 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a784d2ccaf7c98501746bf0be29b2022ba41fd62a2e622af997a03e9f972859f" +checksum = "001d80444f28e193f30c2f293455da62dcf9a6b29918a4253152ae2b1de592cb" dependencies = [ "fnv", "ident_case", @@ -735,9 +768,9 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.14.2" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7618812407e9402654622dd402b0a89dff9ba93badd6540781526117b92aab7e" +checksum = "b36230598a2d5de7ec1c6f51f72d8a99a9208daff41de2084d06e3fd3ea56685" dependencies = [ "darling_core", "quote", @@ -862,7 +895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c24f403d068ad0b359e577a77f92392118be3f3c927538f2bb544a5ecd828c6" dependencies = [ "curve25519-dalek 3.2.0", - "hashbrown", + "hashbrown 0.12.3", "hex", "rand_core 0.6.4", "sha2 0.9.9", @@ -871,9 +904,9 @@ dependencies = [ [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "environmental" @@ -957,6 +990,15 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "form_urlencoded" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" +dependencies = [ + "percent-encoding", +] + [[package]] name = "frame-metadata" version = "15.0.0" @@ -977,9 +1019,9 @@ checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" [[package]] name = "futures" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +checksum = "13e2792b0ff0340399d58445b88fd9770e3489eff258a4cbc1523418f12abf84" dependencies = [ "futures-channel", "futures-core", @@ -992,9 +1034,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" +checksum = "2e5317663a9089767a1ec00a487df42e0ca174b61b4483213ac24448e4664df5" dependencies = [ "futures-core", "futures-sink", @@ -1002,15 +1044,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" +checksum = "ec90ff4d0fe1f57d600049061dc6bb68ed03c7d2fbd697274c41805dcb3f8608" [[package]] name = "futures-executor" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +checksum = "e8de0a35a6ab97ec8869e32a2473f4b1324459e14c29275d14b10cb1fd19b50e" dependencies = [ "futures-core", "futures-task", @@ -1020,9 +1062,9 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" +checksum = "bfb8371b6fb2aeb2d280374607aeabfc99d95c72edfe51692e42d3d7f0d08531" [[package]] name = "futures-lite" @@ -1041,9 +1083,9 @@ dependencies = [ [[package]] name = "futures-macro" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d" +checksum = "95a73af87da33b5acf53acfebdc339fe592ecf5357ac7c0a7734ab9d8c876a70" dependencies = [ "proc-macro2", "quote", @@ -1052,15 +1094,15 @@ dependencies = [ [[package]] name = "futures-sink" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" +checksum = "f310820bb3e8cfd46c80db4d7fb8353e15dfff853a127158425f31e0be6c8364" [[package]] name = "futures-task" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" +checksum = "dcf79a1bf610b10f42aea489289c5a2c478a786509693b80cd39c44ccd936366" [[package]] name = "futures-timer" @@ -1074,9 +1116,9 @@ dependencies = [ [[package]] name = "futures-util" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" +checksum = "9c1d6de3acfef38d2be4b1f543f553131788603495be83da675e180c8d6b7bd1" dependencies = [ "futures-channel", "futures-core", @@ -1252,14 +1294,20 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "ahash", + "ahash 0.7.6", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + [[package]] name = "heck" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] name = "hermit-abi" @@ -1279,6 +1327,12 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fed44880c466736ef9a5c5b5facefb5ed0785676d0c02d612db14e54f0d84286" + [[package]] name = "hex" version = "0.4.3" @@ -1361,9 +1415,9 @@ checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" [[package]] name = "hyper" -version = "0.14.23" +version = "0.14.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" +checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" dependencies = [ "bytes", "futures-channel", @@ -1429,6 +1483,16 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "impl-codec" version = "0.6.0" @@ -1471,7 +1535,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", "serde", ] @@ -1495,7 +1559,7 @@ dependencies = [ [[package]] name = "integration-tests" -version = "0.26.0" +version = "0.27.0" dependencies = [ "assert_matches", "frame-metadata", @@ -1520,30 +1584,24 @@ dependencies = [ [[package]] name = "io-lifetimes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ce5ef949d49ee85593fc4d3f3f95ad61657076395cbbce23e2121fc5542074" - -[[package]] -name = "io-lifetimes" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7d6c6f8c91b4b9ed43484ad1a938e393caf35960fce7f82a040497207bd8e9e" +checksum = "1abeb7a0dd0f8181267ff8adc397075586500b81b28a73e8a0208b00fc170fb3" dependencies = [ "libc", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] name = "is-terminal" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28dfb6c8100ccc63462345b67d1bbc3679177c75ee4bf59bf29c8b1d110b8189" +checksum = "22e18b0a45d56fe973d6db23972bf5bc46f988a4a2385deac9cc29572f09daef" dependencies = [ - "hermit-abi 0.2.6", - "io-lifetimes 1.0.4", - "rustix 0.36.7", - "windows-sys 0.42.0", + "hermit-abi 0.3.1", + "io-lifetimes", + "rustix", + "windows-sys 0.45.0", ] [[package]] @@ -1563,9 +1621,9 @@ checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "js-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" dependencies = [ "wasm-bindgen", ] @@ -1748,12 +1806,6 @@ dependencies = [ "cc", ] -[[package]] -name = "linux-raw-sys" -version = "0.0.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4d2456c373231a208ad294c33dc5bff30051eafd954cd4caae83a712b12854d" - [[package]] name = "linux-raw-sys" version = "0.1.4" @@ -1779,15 +1831,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "lru" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6e8aaa3f231bb4bd57b84b2d5dc3ae7f350265df8aa96492e0bc394a1571909" -dependencies = [ - "hashbrown", -] - [[package]] name = "mach" version = "0.3.2" @@ -1812,6 +1855,15 @@ version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +[[package]] +name = "memfd" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +dependencies = [ + "rustix", +] + [[package]] name = "memoffset" version = "0.6.5" @@ -1837,7 +1889,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e0c7cba9ce19ac7ffd2053ac9f49843bbd3f4318feedfd74e85c19d5fb0ba66" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.3", ] [[package]] @@ -1973,7 +2025,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "crc32fast", - "hashbrown", + "hashbrown 0.12.3", "indexmap", "memchr", ] @@ -2046,9 +2098,9 @@ checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" [[package]] name = "parity-scale-codec" -version = "3.2.2" +version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ab01d0f889e957861bc65888d5ccbe82c158d0270136ba46820d43837cdf72" +checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" dependencies = [ "arrayvec 0.7.2", "bitvec", @@ -2095,15 +2147,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys 0.45.0", ] [[package]] @@ -2130,6 +2182,12 @@ dependencies = [ "digest 0.10.6", ] +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + [[package]] name = "pin-project" version = "1.0.12" @@ -2257,9 +2315,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.50" +version = "1.0.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" +checksum = "5d727cae5b39d21da60fa540906919ad737832fe0b1c165da3a34d6548c849d6" dependencies = [ "unicode-ident", ] @@ -2471,30 +2529,16 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustix" -version = "0.35.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "727a1a6d65f786ec22df8a81ca3121107f235970dc1705ed681d3e6e8b9cd5f9" -dependencies = [ - "bitflags", - "errno", - "io-lifetimes 0.7.5", - "libc", - "linux-raw-sys 0.0.46", - "windows-sys 0.42.0", -] - -[[package]] -name = "rustix" -version = "0.36.7" +version = "0.36.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fdebc4b395b7fbb9ab11e462e20ed9051e7b16e42d24042c776eca0ac81b03" +checksum = "f43abb88211988493c1abb44a70efa56ff0ce98f233b7b276146f1f3f7ba9644" dependencies = [ "bitflags", "errno", - "io-lifetimes 1.0.4", + "io-lifetimes", "libc", - "linux-raw-sys 0.1.4", - "windows-sys 0.42.0", + "linux-raw-sys", + "windows-sys 0.45.0", ] [[package]] @@ -2626,6 +2670,17 @@ dependencies = [ "windows-sys 0.42.0", ] +[[package]] +name = "schnellru" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "772575a524feeb803e5b0fcbc6dd9f367e579488197c94c6e4023aad2305774d" +dependencies = [ + "ahash 0.8.3", + "cfg-if", + "hashbrown 0.13.2", +] + [[package]] name = "schnorrkel" version = "0.9.1" @@ -2695,9 +2750,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.0" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645926f31b250a2dca3c232496c2d898d91036e45ca0e97e0e2390c54e11be36" +checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" dependencies = [ "bitflags", "core-foundation", @@ -2744,9 +2799,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.91" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" +checksum = "cad406b69c91885b5107daf2c29572f6c8cdb3c66826821e286c533490c0bc76" dependencies = [ "itoa", "ryu", @@ -2869,9 +2924,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "12.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a72575f160b1b134ee277a2ab46af4361c072a3fe661c48e474255406cb01c97" +checksum = "2f08604ba4bd856311946722958711a08bded5c929e1227f7a697c58deb09468" dependencies = [ "parity-scale-codec", "scale-info", @@ -2883,9 +2938,9 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "9.0.0" +version = "12.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2038010f7514d50775dcbd3edb569e17fa9bda63128580a9e172abb1795f2c1d" +checksum = "7796939f2e3b68a3b9410ea17a2063b78038cd366f57fa772dd3be0798bd3412" dependencies = [ "integer-sqrt", "num-traits", @@ -2898,14 +2953,15 @@ dependencies = [ [[package]] name = "sp-core" -version = "11.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d99984f57c9eb858d29fbe0e4cf44092eec484b2ff72176d5afa4ab7bf1dc8b1" +checksum = "9c96dc3debbe5c22ebf18f99e6a53199efe748e6e584a1902adb88cbad66ae7c" dependencies = [ "array-bytes", "base58", "bitflags", "blake2", + "bounded-collections", "dyn-clonable", "ed25519-zebra", "futures", @@ -2979,9 +3035,9 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.15.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc754e1cec66b93df0b48a8986d019c1a2a90431c42cf2614cc35a291597c329" +checksum = "57052935c9c9b070ea6b339ef0da3bf241b7e065fc37f9c551669ee83ecfc3c1" dependencies = [ "environmental", "parity-scale-codec", @@ -2991,9 +3047,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "12.0.0" +version = "17.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ac917b37c7733e3778e7ffc3958f1181a151ac3b14116d65fb10fe7b08db10e" +checksum = "578959f9a7e44fd2dd96e8b8bc893cea04fcd7c00a4ffbb0b91c5013899dd02b" dependencies = [ "bytes", "ed25519", @@ -3017,9 +3073,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "12.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a392505294f3f2a15d568fe155372c269c97cff4fe3f9fa0c1f12fce6b03805" +checksum = "cc13a168cdc15e185db5cbe8644e3eaafa534e229593768b3044b60bea00fc8c" dependencies = [ "lazy_static", "sp-core", @@ -3029,9 +3085,9 @@ dependencies = [ [[package]] name = "sp-keystore" -version = "0.17.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ada8b7a72404bda58b3353830bc42f027ec764e13a28b4cd4386cf34fb1ae7c" +checksum = "480dbd54b281c638209fbcfce69902b82a0a1af0e22219d46825eadced3136b6" dependencies = [ "async-trait", "futures", @@ -3057,9 +3113,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "12.0.0" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c86578c67b060a6ecab52af64f1cf18b3892fca7fba5ffc5c49934b2e76b1929" +checksum = "b8ab2fd44668d3e8674e2253a43852857a47d49be7db737e98bf157e4bcebefd" dependencies = [ "either", "hash256-std-hasher", @@ -3080,9 +3136,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "10.0.0" +version = "13.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3858935567385728ea45f6d159f9970b0b278eb22a8e77625bbf4a63e43a85a" +checksum = "cdb7707246cee4967a8cc71e3ef0e82f562e8b1020606447a6a12b99c7c1b443" dependencies = [ "bytes", "impl-trait-for-tuples", @@ -3099,9 +3155,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "7.0.0" +version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00083a77e938c4f35d0bde7ca0b6e5f616158ebe11af6063795aa664d92a238b" +checksum = "2773c90e5765847c5e8b4a24b553d38a9ca52ded47c142cfcfb7948f42827af9" dependencies = [ "Inflector", "proc-macro-crate", @@ -3112,9 +3168,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.17.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fd4c600df0b5abf26c19b6c61d928b64e0c2b8a709a3dbef872be0507cd1ca" +checksum = "4c957b8b4c252507c12674948db427c5e34fd1760ce256922f1ec5f89f781a4f" dependencies = [ "hash-db", "log", @@ -3139,9 +3195,9 @@ checksum = "af0ee286f98455272f64ac5bb1384ff21ac029fbb669afbaf48477faff12760e" [[package]] name = "sp-storage" -version = "9.0.0" +version = "11.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9acb4059eb0ae4fa8cf9ca9119b0178ad312a592d4c6054bd17b411034f233e9" +checksum = "3c20cb0c562d1a159ecb2c7ca786828c81e432c535474967d2df3a484977cea4" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3153,9 +3209,9 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b22d28a0bc2365dfb86644d14f2682a79da35891d4656d4896fb09fb05ff1e6c" +checksum = "e46bd547da89a9cda69b4ce4c91a5b7e1f86915190d83cd407b715d0c6bac042" dependencies = [ "parity-scale-codec", "sp-std", @@ -3166,20 +3222,20 @@ dependencies = [ [[package]] name = "sp-trie" -version = "11.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db085f134cb444e52ca569a442d12c84bd17667532613d78dd6f568942632da4" +checksum = "8efbe5b6d29a18fea7c2f52e0098135f2f864b31d335d5105b40a349866ba874" dependencies = [ - "ahash", + "ahash 0.8.3", "hash-db", - "hashbrown", + "hashbrown 0.12.3", "lazy_static", - "lru", "memory-db", "nohash-hasher", "parity-scale-codec", "parking_lot", "scale-info", + "schnellru", "sp-core", "sp-std", "thiserror", @@ -3190,9 +3246,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "10.0.0" +version = "16.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cd5ddc34360c0497480ddb134d93c2adcfdaa344f30a0db601f05c2af2a6eae" +checksum = "01f705c5c6c6dad760355df0b870dd8e510f720ae6adde3eeba069c116248024" dependencies = [ "impl-serde", "parity-scale-codec", @@ -3208,9 +3264,9 @@ dependencies = [ [[package]] name = "sp-version-proc-macro" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97bbeece15266afc30881ecae586fd28e6c123810b9ced1b8706daa081fe9c2e" +checksum = "d61fa10e7a0453c9eb2bfd49067585fe54d530f020e3bfa94bf0a9ce547aa5b3" dependencies = [ "parity-scale-codec", "proc-macro2", @@ -3220,10 +3276,11 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "8.0.0" +version = "10.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ebc377987d42f8fc20e3f4ec4fd1147dd098fe90bcb4269e1eddb04e920f889" +checksum = "bbbc05650b6338808892a7b04f0c56bb1f7f928bfa9ac58e0af2c1e5bef33229" dependencies = [ + "anyhow", "impl-trait-for-tuples", "log", "parity-scale-codec", @@ -3234,9 +3291,9 @@ dependencies = [ [[package]] name = "sp-weights" -version = "8.0.0" +version = "14.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90eca2a19f48978e9cd605e23905d0602419f7880a9360ac717b03412e9c7916" +checksum = "9ebab7696f915aa548494aef3ca8d15217baf10458fe6edb87e60587a47de358" dependencies = [ "parity-scale-codec", "scale-info", @@ -3330,7 +3387,7 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "subxt" -version = "0.26.0" +version = "0.27.0" dependencies = [ "base58", "bitvec", @@ -3365,9 +3422,9 @@ dependencies = [ [[package]] name = "subxt-cli" -version = "0.26.0" +version = "0.27.0" dependencies = [ - "clap 4.1.3", + "clap 4.1.4", "color-eyre", "frame-metadata", "hex", @@ -3383,7 +3440,7 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.26.0" +version = "0.27.0" dependencies = [ "bitvec", "darling", @@ -3404,7 +3461,7 @@ dependencies = [ [[package]] name = "subxt-examples" -version = "0.26.0" +version = "0.27.0" dependencies = [ "futures", "hex", @@ -3419,7 +3476,7 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.26.0" +version = "0.27.0" dependencies = [ "darling", "proc-macro-error", @@ -3429,7 +3486,7 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.26.0" +version = "0.27.0" dependencies = [ "bitvec", "criterion", @@ -3470,9 +3527,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9410d0f6853b1d94f0e519fb95df60f29d2c1eff2d921ffdf01a4c8a3b54f12d" +checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" [[package]] name = "termcolor" @@ -3485,7 +3542,7 @@ dependencies = [ [[package]] name = "test-runtime" -version = "0.26.0" +version = "0.27.0" dependencies = [ "jsonrpsee", "parity-scale-codec", @@ -3523,10 +3580,11 @@ dependencies = [ [[package]] name = "thread_local" -version = "1.1.4" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5516c27b78311c50bf42c071425c560ac799b11c30b31f87e3081965fe5e0180" +checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ + "cfg-if", "once_cell", ] @@ -3570,15 +3628,15 @@ dependencies = [ [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.24.2" +version = "1.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" +checksum = "c8e00990ebabbe4c14c08aca901caed183ecd5c09562a12c824bb53d3c3fd3af" dependencies = [ "autocfg", "bytes", @@ -3616,9 +3674,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" +checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" dependencies = [ "bytes", "futures-core", @@ -3629,15 +3687,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - [[package]] name = "toml_datetime" version = "0.5.1" @@ -3646,9 +3695,9 @@ checksum = "4553f467ac8e3d374bc9a177a26801e5d0f9b211aa1673fb137a403afd1c9cf5" [[package]] name = "toml_edit" -version = "0.18.0" +version = "0.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729bfd096e40da9c001f778f5cdecbd2957929a24e10e5883d9392220a751581" +checksum = "56c59d8dd7d0dcbc6428bf7aa2f0e823e26e43b3c9aca15bbc9475d23e5fa12b" dependencies = [ "indexmap", "nom8", @@ -3768,7 +3817,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "004e1e8f92535694b4cb1444dc5a8073ecf0815e3357f729638b9f8fc4062908" dependencies = [ "hash-db", - "hashbrown", + "hashbrown 0.12.3", "log", "rustc-hex", "smallvec", @@ -3791,17 +3840,17 @@ checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "trybuild" -version = "1.0.76" +version = "1.0.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed2c57956f91546d4d33614265a85d55c8e1ab91484853a10335894786d7db6" +checksum = "a44da5a6f2164c8e14d3bbc0657d69c5966af9f5f6930d4f600b1f5c4a673413" dependencies = [ + "basic-toml", "glob 0.3.1", "once_cell", "serde", "serde_derive", "serde_json", "termcolor", - "toml", ] [[package]] @@ -3824,7 +3873,7 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "ui-tests" -version = "0.26.0" +version = "0.27.0" dependencies = [ "frame-metadata", "parity-scale-codec", @@ -3845,6 +3894,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unicode-bidi" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" + [[package]] name = "unicode-ident" version = "1.0.6" @@ -3878,6 +3933,17 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" +[[package]] +name = "url" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + [[package]] name = "valuable" version = "0.1.0" @@ -3954,9 +4020,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -3964,9 +4030,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" dependencies = [ "bumpalo", "log", @@ -3979,9 +4045,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" dependencies = [ "cfg-if", "js-sys", @@ -3991,9 +4057,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4001,9 +4067,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" dependencies = [ "proc-macro2", "quote", @@ -4014,9 +4080,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.83" +version = "0.2.84" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" +checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" [[package]] name = "wasmi" @@ -4053,18 +4119,19 @@ dependencies = [ [[package]] name = "wasmparser" -version = "0.89.1" +version = "0.96.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5d3e08b13876f96dd55608d03cd4883a0545884932d5adf11925876c96daef" +checksum = "adde01ade41ab9a5d10ec8ed0bb954238cf8625b5cd5a13093d6de2ad9c2be1a" dependencies = [ "indexmap", + "url", ] [[package]] name = "wasmtime" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ad5af6ba38311282f2a21670d96e78266e8c8e2f38cbcd52c254df6ccbc7731" +checksum = "4e5b183a159484980138cc05231419c536d395a7b25c1802091310ea2f74276a" dependencies = [ "anyhow", "bincode", @@ -4082,23 +4149,23 @@ dependencies = [ "wasmtime-environ", "wasmtime-jit", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-asm-macros" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45de63ddfc8b9223d1adc8f7b2ee5f35d1f6d112833934ad7ea66e4f4339e597" +checksum = "c0aeb1cb256d76cf07b20264c808351c8b525ece56de1ef4d93f87a0aaf342db" dependencies = [ "cfg-if", ] [[package]] name = "wasmtime-environ" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebb881c61f4f627b5d45c54e629724974f8a8890d455bcbe634330cc27309644" +checksum = "e5a2a5f0fb93aa837a727a48dd1076e8a9f882cc2fee20b433c04a18740ff63b" dependencies = [ "anyhow", "cranelift-entity", @@ -4115,9 +4182,9 @@ dependencies = [ [[package]] name = "wasmtime-jit" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1985c628011fe26adf5e23a5301bdc79b245e0e338f14bb58b39e4e25e4d8681" +checksum = "01c78f9fb2922dbb5a95f009539d4badb44866caeeb53d156bf2cf4d683c3afd" dependencies = [ "addr2line 0.17.0", "anyhow", @@ -4128,29 +4195,39 @@ dependencies = [ "log", "object 0.29.0", "rustc-demangle", - "rustix 0.35.13", "serde", "target-lexicon", - "thiserror", "wasmtime-environ", + "wasmtime-jit-icache-coherence", "wasmtime-runtime", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-jit-debug" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f671b588486f5ccec8c5a3dba6b4c07eac2e66ab8c60e6f4e53717c77f709731" +checksum = "67cacdb52a77b8c8e744e510beeabf0bd698b1c94c59eed33c52b3fbd19639b0" dependencies = [ "once_cell", ] +[[package]] +name = "wasmtime-jit-icache-coherence" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08fcba5ebd96da2a9f0747ab6337fe9788adfb3f63fa2c180520d665562d257e" +dependencies = [ + "cfg-if", + "libc", + "windows-sys 0.42.0", +] + [[package]] name = "wasmtime-runtime" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee8f92ad4b61736339c29361da85769ebc200f184361959d1792832e592a1afd" +checksum = "0793210acf50d4c69182c916abaee1d423dc5d172cdfde6acfea2f9446725940" dependencies = [ "anyhow", "cc", @@ -4159,22 +4236,22 @@ dependencies = [ "libc", "log", "mach", + "memfd", "memoffset 0.6.5", "paste", "rand 0.8.5", - "rustix 0.35.13", - "thiserror", + "rustix", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", - "windows-sys 0.36.1", + "windows-sys 0.42.0", ] [[package]] name = "wasmtime-types" -version = "1.0.2" +version = "5.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d23d61cb4c46e837b431196dd06abb11731541021916d03476a178b54dc07aeb" +checksum = "50d015ba8b231248a811e323cf7a525cd3f982d4be0b9e62d27685102e5f12b1" dependencies = [ "cranelift-entity", "serde", @@ -4184,9 +4261,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.61" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" dependencies = [ "js-sys", "wasm-bindgen", @@ -4255,30 +4332,41 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-sys" -version = "0.36.1" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.1", - "windows_i686_gnu 0.42.1", - "windows_i686_msvc 0.42.1", - "windows_x86_64_gnu 0.42.1", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.1", + "windows_x86_64_msvc", ] [[package]] @@ -4287,48 +4375,24 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" -[[package]] -name = "windows_aarch64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - [[package]] name = "windows_aarch64_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" -[[package]] -name = "windows_i686_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - [[package]] name = "windows_i686_gnu" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" - [[package]] name = "windows_i686_msvc" version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" -[[package]] -name = "windows_x86_64_gnu" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - [[package]] name = "windows_x86_64_gnu" version = "0.42.1" @@ -4341,12 +4405,6 @@ version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" -[[package]] -name = "windows_x86_64_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - [[package]] name = "windows_x86_64_msvc" version = "0.42.1" diff --git a/RELEASING.md b/RELEASING.md index 1ec6d489ffc..b13cecbd4d0 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -75,11 +75,8 @@ We also assume that ongoing work done is being merged directly to the `master` b ``` (cd metadata && cargo publish) && \ (cd codegen && cargo publish) && \ - sleep 10 && \ (cd macro && cargo publish) && \ - sleep 10 && \ (cd subxt && cargo publish) && \ - sleep 10 && \ (cd cli && cargo publish); ``` diff --git a/cli/Cargo.toml b/cli/Cargo.toml index e2fcea8633a..5cef3111ae8 100644 --- a/cli/Cargo.toml +++ b/cli/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-cli" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = true @@ -17,17 +17,17 @@ path = "src/main.rs" [dependencies] # perform subxt codegen -subxt-codegen = { version = "0.26.0", path = "../codegen" } +subxt-codegen = { version = "0.27.0", path = "../codegen" } # perform node compatibility -subxt-metadata = { version = "0.26.0", path = "../metadata" } +subxt-metadata = { version = "0.27.0", path = "../metadata" } # parse command line args -clap = { version = "4.0.8", features = ["derive", "cargo"] } +clap = { version = "4.1.4", features = ["derive", "cargo"] } # colourful error reports color-eyre = "0.6.1" # serialize the metadata serde = { version = "1.0.130", features = ["derive"] } # serialize as json -serde_json = "1.0.68" +serde_json = "1.0.93" # hex encoded metadata to bytes hex = "0.4.3" # actual metadata types @@ -39,4 +39,4 @@ syn = "1.0.80" # communicate with the substrate nodes jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport", "http-client"] } # async runtime -tokio = { version = "1.8", features = ["rt-multi-thread", "macros", "time"] } +tokio = { version = "1.25", features = ["rt-multi-thread", "macros", "time"] } diff --git a/cli/build.rs b/cli/build.rs index 0e4f3e26148..934108807cb 100644 --- a/cli/build.rs +++ b/cli/build.rs @@ -23,12 +23,12 @@ fn output_git_short_hash() { Cow::from("unknown") } Err(err) => { - println!("cargo:warning=Failed to execute git command: {}", err); + println!("cargo:warning=Failed to execute git command: {err}"); Cow::from("unknown") } }; - println!("cargo:rustc-env=GIT_HASH={}", git_hash); + println!("cargo:rustc-env=GIT_HASH={git_hash}"); println!("cargo:rerun-if-changed=../.git/HEAD"); println!("cargo:rerun-if-changed=../.git/refs"); println!("cargo:rerun-if-changed=build.rs"); diff --git a/cli/src/commands/codegen.rs b/cli/src/commands/codegen.rs index 391a23eceb8..127b370aab7 100644 --- a/cli/src/commands/codegen.rs +++ b/cli/src/commands/codegen.rs @@ -107,6 +107,6 @@ fn codegen( type_substitutes, crate_path, ); - println!("{}", runtime_api); + println!("{runtime_api}"); Ok(()) } diff --git a/cli/src/commands/compatibility.rs b/cli/src/commands/compatibility.rs index 3071c5b2f55..d7ba6299e43 100644 --- a/cli/src/commands/compatibility.rs +++ b/cli/src/commands/compatibility.rs @@ -64,7 +64,7 @@ async fn handle_pallet_metadata(nodes: &[Uri], name: &str) -> color_eyre::Result Some(pallet_metadata) => { let hash = get_pallet_hash(&metadata.types, pallet_metadata); let hex_hash = hex::encode(hash); - println!("Node {:?} has pallet metadata hash {:?}", node, hex_hash); + println!("Node {node:?} has pallet metadata hash {hex_hash:?}"); compatibility .pallet_present @@ -93,7 +93,7 @@ async fn handle_full_metadata(nodes: &[Uri]) -> color_eyre::Result<()> { let metadata = fetch_runtime_metadata(node).await?; let hash = get_metadata_hash(&metadata); let hex_hash = hex::encode(hash); - println!("Node {:?} has metadata hash {:?}", node, hex_hash,); + println!("Node {node:?} has metadata hash {hex_hash:?}",); compatibility_map .entry(hex_hash) diff --git a/cli/src/commands/metadata.rs b/cli/src/commands/metadata.rs index b403e2edb95..4fe5ddc743a 100644 --- a/cli/src/commands/metadata.rs +++ b/cli/src/commands/metadata.rs @@ -37,11 +37,11 @@ pub async fn run(opts: Opts) -> color_eyre::Result<()> { let bytes = hex::decode(hex_data.trim_start_matches("0x"))?; let metadata = ::decode(&mut &bytes[..])?; let json = serde_json::to_string_pretty(&metadata)?; - println!("{}", json); + println!("{json}"); Ok(()) } "hex" => { - println!("{}", hex_data); + println!("{hex_data}"); Ok(()) } "bytes" => { diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 685430d5215..ced120d85b1 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-codegen" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = true @@ -13,18 +13,18 @@ description = "Generate an API for interacting with a substrate node from FRAME [dependencies] codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full"] } -darling = "0.14.0" +darling = "0.14.3" frame-metadata = "15.0.0" -heck = "0.4.0" -proc-macro2 = "1.0.24" +heck = "0.4.1" +proc-macro2 = "1.0.51" proc-macro-error = "1.0.4" quote = "1.0.8" syn = "1.0.58" scale-info = "2.0.0" -subxt-metadata = { version = "0.26.0", path = "../metadata" } +subxt-metadata = { version = "0.27.0", path = "../metadata" } jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport", "http-client"] } hex = "0.4.3" -tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.25", features = ["macros", "rt-multi-thread"] } [dev-dependencies] bitvec = { version = "1.0.0", default-features = false, features = ["alloc"] } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index b0a3314d8df..b3df7a37621 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -370,8 +370,8 @@ impl RuntimeGenerator { } /// Return a vector of tuples of variant names and corresponding struct definitions. -pub fn generate_structs_from_variants<'a, F>( - type_gen: &'a TypeGenerator, +pub fn generate_structs_from_variants( + type_gen: &TypeGenerator, type_id: u32, variant_to_struct_name: F, error_message_type_name: &str, diff --git a/codegen/src/types/mod.rs b/codegen/src/types/mod.rs index 5b652a852d7..9829ce94d4c 100644 --- a/codegen/src/types/mod.rs +++ b/codegen/src/types/mod.rs @@ -131,7 +131,7 @@ impl<'a> TypeGenerator<'a> { pub fn resolve_type(&self, id: u32) -> Type { self.type_registry .resolve(id) - .unwrap_or_else(|| panic!("No type with id {} found", id)) + .unwrap_or_else(|| panic!("No type with id {id} found")) .clone() } @@ -403,10 +403,7 @@ impl ToTokens for CratePath { impl From<&str> for CratePath { fn from(crate_path: &str) -> Self { Self(syn::Path::from_string(crate_path).unwrap_or_else(|err| { - panic!( - "failed converting {:?} to `syn::Path`: {:?}", - crate_path, err - ); + panic!("failed converting {crate_path:?} to `syn::Path`: {err:?}"); })) } } diff --git a/codegen/src/types/type_path.rs b/codegen/src/types/type_path.rs index 2391783243c..9c3df5d7485 100644 --- a/codegen/src/types/type_path.rs +++ b/codegen/src/types/type_path.rs @@ -127,7 +127,7 @@ impl TypePathType { "BTreeSet" => parse_quote!(::std::collections::BTreeSet), "Range" => parse_quote!(::core::ops::Range), "RangeInclusive" => parse_quote!(::core::ops::RangeInclusive), - ident => panic!("Unknown prelude type '{}'", ident), + ident => panic!("Unknown prelude type '{ident}'"), } } _ => { diff --git a/examples/Cargo.toml b/examples/Cargo.toml index a4e2d82540e..a7ffe47dc1f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-examples" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = false @@ -13,11 +13,11 @@ description = "Subxt example usage" [dev-dependencies] subxt = { path = "../subxt" } -tokio = { version = "1.8", features = ["rt-multi-thread", "macros", "time"] } -sp-keyring = "12.0.0" -futures = "0.3.13" +tokio = { version = "1.25", features = ["rt-multi-thread", "macros", "time"] } +sp-keyring = "18.0.0" +futures = "0.3.26" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } hex = "0.4.3" tracing-subscriber = "0.3.11" -sp-core = { version = "11.0.0", default-features = false } -sp-runtime = { version = "12.0.0" } +sp-core = { version = "16.0.0", default-features = false } +sp-runtime = "18.0.0" diff --git a/examples/examples/balance_transfer.rs b/examples/examples/balance_transfer.rs index 744ace1e905..b297c9776ab 100644 --- a/examples/examples/balance_transfer.rs +++ b/examples/examples/balance_transfer.rs @@ -38,7 +38,7 @@ async fn main() -> Result<(), Box> { // Submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/balance_transfer_with_params.rs b/examples/examples/balance_transfer_with_params.rs index 98a1812dcec..be53272d231 100644 --- a/examples/examples/balance_transfer_with_params.rs +++ b/examples/examples/balance_transfer_with_params.rs @@ -50,7 +50,7 @@ async fn main() -> Result<(), Box> { // submit the transaction: let hash = api.tx().sign_and_submit(&tx, &signer, tx_params).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/custom_config.rs b/examples/examples/custom_config.rs index b3626faefa0..0b4f80da3db 100644 --- a/examples/examples/custom_config.rs +++ b/examples/examples/custom_config.rs @@ -30,7 +30,6 @@ impl Config for MyConfig { // polkadot runtime used, so some operations will fail. Normally when using a custom `Config` // impl types MUST match exactly those used in the actual runtime. type Index = u64; - type BlockNumber = ::BlockNumber; type Hash = ::Hash; type Hasher = ::Hasher; type Header = ::Header; @@ -58,7 +57,7 @@ async fn main() -> Result<(), Box> { // submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); Ok(()) } diff --git a/examples/examples/dynamic_queries.rs b/examples/examples/dynamic_queries.rs index e0f652f588c..5607f5a2eef 100644 --- a/examples/examples/dynamic_queries.rs +++ b/examples/examples/dynamic_queries.rs @@ -46,13 +46,13 @@ async fn main() -> Result<(), Box> { // submit the transaction with default params: let hash = api.tx().sign_and_submit_default(&tx, &signer).await?; - println!("Balance transfer extrinsic submitted: {}", hash); + println!("Balance transfer extrinsic submitted: {hash}"); // 2. Dynamic constant access (the dynamic equivalent to the fetch_constants example). let constant_address = subxt::dynamic::constant("Balances", "ExistentialDeposit"); let existential_deposit = api.constants().at(&constant_address)?.to_value()?; - println!("Existential Deposit: {}", existential_deposit); + println!("Existential Deposit: {existential_deposit}"); // 3. Dynamic storage access diff --git a/examples/examples/fetch_constants.rs b/examples/examples/fetch_constants.rs index 369c924ecd0..f8c2a117976 100644 --- a/examples/examples/fetch_constants.rs +++ b/examples/examples/fetch_constants.rs @@ -32,7 +32,7 @@ async fn main() -> Result<(), Box> { // Look it up: let existential_deposit = api.constants().at(&address)?; - println!("Existential Deposit: {}", existential_deposit); + println!("Existential Deposit: {existential_deposit}"); Ok(()) } diff --git a/examples/examples/fetch_staking_details.rs b/examples/examples/fetch_staking_details.rs index 8da45696d68..ce678cfa468 100644 --- a/examples/examples/fetch_staking_details.rs +++ b/examples/examples/fetch_staking_details.rs @@ -45,14 +45,14 @@ async fn main() -> Result<(), Box> { ); let alice_id = AccountKeyring::Alice.to_account_id(); - println!(" Alice account id: {:?}", alice_id); + println!(" Alice account id: {alice_id:?}"); // Get Alice' Stash account ID let alice_stash_id: AccountId32 = sr25519::Pair::from_string("//Alice//stash", None) .expect("Could not obtain stash signer pair") .public() .into(); - println!(" Alice//stash account id: {:?}", alice_stash_id); + println!(" Alice//stash account id: {alice_stash_id:?}"); // Map from all locked "stash" accounts to the controller account. let controller_acc_addr = polkadot::storage().staking().bonded(&alice_stash_id); @@ -63,7 +63,7 @@ async fn main() -> Result<(), Box> { .fetch(&controller_acc_addr) .await? .unwrap(); - println!(" account controlled by: {:?}", controller_acc); + println!(" account controlled by: {controller_acc:?}"); let era_reward_addr = polkadot::storage().staking().eras_reward_points(era.index); let era_result = api @@ -72,7 +72,7 @@ async fn main() -> Result<(), Box> { .await? .fetch(&era_reward_addr) .await?; - println!("Era reward points: {:?}", era_result); + println!("Era reward points: {era_result:?}"); Ok(()) } diff --git a/examples/examples/storage_iterating.rs b/examples/examples/storage_iterating.rs index 16fd6b185a5..718373e3213 100644 --- a/examples/examples/storage_iterating.rs +++ b/examples/examples/storage_iterating.rs @@ -40,7 +40,7 @@ async fn main() -> Result<(), Box> { println!("\nExample 1. Obtained keys:"); while let Some((key, value)) = iter.next().await? { println!("Key: 0x{}", hex::encode(key)); - println!(" Value: {}", value); + println!(" Value: {value}"); } } @@ -69,7 +69,7 @@ async fn main() -> Result<(), Box> { // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format let value = u64::decode(&mut &*storage_data)?; - println!(" Value: {}", value); + println!(" Value: {value}"); } } } @@ -109,7 +109,7 @@ async fn main() -> Result<(), Box> { // - polkadot.rs generated file under `version_notifiers()` fn // - metadata in json format let value = u64::decode(&mut &storage_data[..])?; - println!(" Value: {}", value); + println!(" Value: {value}"); } } } diff --git a/examples/examples/submit_and_watch.rs b/examples/examples/submit_and_watch.rs index fba15707e7b..67761460692 100644 --- a/examples/examples/submit_and_watch.rs +++ b/examples/examples/submit_and_watch.rs @@ -169,7 +169,7 @@ async fn handle_transfer_events() -> Result<(), Box> { } // Report other statuses we see. else { - println!("Current transaction status: {:?}", ev); + println!("Current transaction status: {ev:?}"); } } diff --git a/examples/examples/subscribe_runtime_updates.rs b/examples/examples/subscribe_runtime_updates.rs index 27a9830d8cc..641f4449440 100644 --- a/examples/examples/subscribe_runtime_updates.rs +++ b/examples/examples/subscribe_runtime_updates.rs @@ -28,7 +28,7 @@ async fn main() -> Result<(), Box> { let update_client = api.updater(); tokio::spawn(async move { let result = update_client.perform_runtime_updates().await; - println!("Runtime update failed with result={:?}", result); + println!("Runtime update failed with result={result:?}"); }); // If this client is kept in use a while, it'll update its metadata and such diff --git a/macro/Cargo.toml b/macro/Cargo.toml index e9afcab0e74..bba97f657f9 100644 --- a/macro/Cargo.toml +++ b/macro/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-macro" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = true @@ -16,8 +16,8 @@ description = "Generate types and helpers for interacting with Substrate runtime proc-macro = true [dependencies] -darling = "0.14.0" +darling = "0.14.3" proc-macro-error = "1.0.4" syn = "1.0.58" -subxt-codegen = { path = "../codegen", version = "0.26.0" } +subxt-codegen = { path = "../codegen", version = "0.27.0" } diff --git a/metadata/Cargo.toml b/metadata/Cargo.toml index 9f77f1046b3..5d9eb2c6517 100644 --- a/metadata/Cargo.toml +++ b/metadata/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt-metadata" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = true diff --git a/subxt/Cargo.toml b/subxt/Cargo.toml index 5c9321cad5c..169c756cc72 100644 --- a/subxt/Cargo.toml +++ b/subxt/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "subxt" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = true @@ -39,19 +39,19 @@ scale-info = "2.0.0" scale-value = "0.6.0" scale-bits = "0.3" scale-decode = "0.4.0" -futures = { version = "0.3.13", default-features = false, features = ["std"] } +futures = { version = "0.3.26", default-features = false, features = ["std"] } hex = "0.4.3" jsonrpsee = { version = "0.16", optional = true, features = ["jsonrpsee-types"] } serde = { version = "1.0.124", features = ["derive"] } -serde_json = { version = "1.0.64", features = ["raw_value"] } +serde_json = { version = "1.0.93", features = ["raw_value"] } thiserror = "1.0.24" tracing = "0.1.34" parking_lot = "0.12.0" frame-metadata = "15.0.0" derivative = "2.2.0" -subxt-macro = { version = "0.26.0", path = "../macro" } -subxt-metadata = { version = "0.26.0", path = "../metadata" } +subxt-macro = { version = "0.27.0", path = "../macro" } +subxt-metadata = { version = "0.27.0", path = "../metadata" } # Provides some deserialization, types like U256/H256 and hashing impls like twox/blake256: impl-serde = { version = "0.4.0" } @@ -63,8 +63,8 @@ base58 = { version = "0.2.0" } blake2 = { version = "0.10.4", default-features = false } # These are only included is "substrate-compat" is enabled. -sp-core = { version = "11.0.0", default-features = false, optional = true } -sp-runtime = { version = "12.0.0", optional = true } +sp-core = { version = "16.0.0", default-features = false, optional = true } +sp-runtime = { version = "18.0.0", optional = true } [target.wasm32-unknown-unknown.dependencies] getrandom = { version = "0.2", features = ["js"] } @@ -73,8 +73,8 @@ getrandom = { version = "0.2", features = ["js"] } bitvec = "1" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } scale-info = { version = "2.0.0", features = ["bit-vec"] } -tokio = { version = "1.8", features = ["macros", "time", "rt-multi-thread"] } -sp-core = { version = "11.0.0", default-features = false } -sp-runtime = { version = "12.0.0" } -sp-keyring = "12.0.0" -sp-version = "10.0.0" +tokio = { version = "1.25", features = ["macros", "time", "rt-multi-thread"] } +sp-core = { version = "16.0.0", default-features = false } +sp-runtime = "18.0.0" +sp-keyring = "18.0.0" +sp-version = "16.0.0" diff --git a/subxt/src/blocks/block_types.rs b/subxt/src/blocks/block_types.rs index e58afc21f9e..0105f428c7b 100644 --- a/subxt/src/blocks/block_types.rs +++ b/subxt/src/blocks/block_types.rs @@ -57,7 +57,7 @@ where } /// Return the block number. - pub fn number(&self) -> T::BlockNumber { + pub fn number(&self) -> ::Number { self.header().number() } diff --git a/subxt/src/config/mod.rs b/subxt/src/config/mod.rs index b7a2fbada63..ce75b4664e7 100644 --- a/subxt/src/config/mod.rs +++ b/subxt/src/config/mod.rs @@ -13,12 +13,14 @@ pub mod polkadot; pub mod substrate; use codec::{ - Codec, + Decode, Encode, - EncodeLike, }; use core::fmt::Debug; -use serde::Serialize; +use serde::{ + de::DeserializeOwned, + Serialize, +}; pub use extrinsic_params::ExtrinsicParams; pub use polkadot::PolkadotConfig; @@ -31,66 +33,39 @@ pub use substrate::SubstrateConfig; pub trait Config: 'static { /// Account index (aka nonce) type. This stores the number of previous /// transactions associated with a sender account. - type Index: Parameter - + Member - + serde::de::DeserializeOwned - + Default - + Copy - + scale_info::TypeInfo - + Into; - - /// The block number type used by the runtime. - type BlockNumber: Parameter - + Member - + Default - + Copy - + std::hash::Hash - + std::str::FromStr - + Into; + type Index: Debug + Copy + DeserializeOwned + Into; /// The output of the `Hashing` function. - type Hash: Parameter - + Member - + serde::Serialize - + serde::de::DeserializeOwned - + Ord - + Default + type Hash: Debug + Copy - + std::hash::Hash + + Send + + Sync + + Decode + AsRef<[u8]> - + AsMut<[u8]> - + scale_info::TypeInfo; + + Serialize + + DeserializeOwned + + Encode + + PartialEq; /// The account ID type. - type AccountId: Clone + Serialize; + type AccountId: Debug + Clone + Serialize; /// The address type. - type Address: Encode + From; + type Address: Debug + Encode + From; /// The signature type. - type Signature: Encode; + type Signature: Debug + Encode; /// The hashing system (algorithm) being used in the runtime (e.g. Blake2). - type Hasher: Hasher; + type Hasher: Debug + Hasher; /// The block header. - type Header: Parameter - + Header - + Member - + serde::de::DeserializeOwned; + type Header: Debug + Header + Send + DeserializeOwned; /// This type defines the extrinsic extra and additional parameters. type ExtrinsicParams: extrinsic_params::ExtrinsicParams; } -/// Parameter trait copied from `substrate::frame_support`. -pub trait Parameter: Codec + EncodeLike + Clone + Eq + Debug {} -impl Parameter for T where T: Codec + EncodeLike + Clone + Eq + Debug {} - -/// A type that can be used in runtime structures. Copied from `sp_runtime::traits`. -pub trait Member: Send + Sync + Sized + Debug + Eq + PartialEq + Clone + 'static {} -impl Member for T {} - /// This represents the hasher used by a node to hash things like block headers /// and extrinsics. pub trait Hasher { @@ -110,7 +85,7 @@ pub trait Hasher { /// This represents the block header type used by a node. pub trait Header: Sized + Encode { /// The block number type for this header. - type Number; + type Number: Into; /// The hasher used to hash this header. type Hasher: Hasher; @@ -146,7 +121,6 @@ impl> Config for WithExtrinsicParams { type Index = T::Index; - type BlockNumber = T::BlockNumber; type Hash = T::Hash; type AccountId = T::AccountId; type Address = T::Address; diff --git a/subxt/src/config/substrate.rs b/subxt/src/config/substrate.rs index e9c559addd0..b51046b56d6 100644 --- a/subxt/src/config/substrate.rs +++ b/subxt/src/config/substrate.rs @@ -39,13 +39,12 @@ pub enum SubstrateConfig {} impl Config for SubstrateConfig { type Index = u32; - type BlockNumber = u32; type Hash = H256; type AccountId = AccountId32; type Address = MultiAddress; type Signature = MultiSignature; type Hasher = BlakeTwo256; - type Header = SubstrateHeader; + type Header = SubstrateHeader; type ExtrinsicParams = SubstrateExtrinsicParams; } @@ -124,10 +123,9 @@ pub struct SubstrateHeader + TryFrom, H: Hasher> { pub digest: Digest, } -impl + TryFrom + Encode, H: Hasher + Encode> Header - for SubstrateHeader +impl Header for SubstrateHeader where - N: Copy + Into + TryFrom + Encode, + N: Copy + Into + Into + TryFrom + Encode, H: Hasher + Encode, SubstrateHeader: Encode, { @@ -268,14 +266,11 @@ impl<'a> serde::Deserialize<'a> for DigestItem { { let r = impl_serde::serialize::deserialize(de)?; Decode::decode(&mut &r[..]) - .map_err(|e| serde::de::Error::custom(format!("Decode error: {}", e))) + .map_err(|e| serde::de::Error::custom(format!("Decode error: {e}"))) } } -fn serialize_number + TryFrom>( - val: &T, - s: S, -) -> Result +fn serialize_number>(val: &T, s: S) -> Result where S: serde::Serializer, { @@ -283,9 +278,7 @@ where serde::Serialize::serialize(&u256, s) } -fn deserialize_number<'a, D, T: Copy + Into + TryFrom>( - d: D, -) -> Result +fn deserialize_number<'a, D, T: TryFrom>(d: D) -> Result where D: serde::Deserializer<'a>, { diff --git a/subxt/src/events/events_type.rs b/subxt/src/events/events_type.rs index 7efc7d93d40..aa07e4214a4 100644 --- a/subxt/src/events/events_type.rs +++ b/subxt/src/events/events_type.rs @@ -187,6 +187,12 @@ impl Events { self.find::().next().transpose() } + /// Iterate through the events using metadata to dynamically decode and skip + /// them, and return the last event found which decodes to the provided `Ev` type. + pub fn find_last(&self) -> Result, Error> { + self.find::().last().transpose() + } + /// Find an event that decodes to the type provided. Returns true if it was found. pub fn has(&self) -> Result { Ok(self.find::().next().transpose()?.is_some()) diff --git a/subxt/src/rpc/rpc.rs b/subxt/src/rpc/rpc.rs index 48b7ce5b661..ff8c7145138 100644 --- a/subxt/src/rpc/rpc.rs +++ b/subxt/src/rpc/rpc.rs @@ -366,6 +366,7 @@ impl Rpc { } /// Subscribe to runtime version updates that produce changes in the metadata. + /// The first item emitted by the stream is the current runtime version. pub async fn subscribe_runtime_version( &self, ) -> Result, Error> { diff --git a/subxt/src/rpc/types.rs b/subxt/src/rpc/types.rs index 97723636712..a1a333f29bd 100644 --- a/subxt/src/rpc/types.rs +++ b/subxt/src/rpc/types.rs @@ -124,7 +124,7 @@ impl<'a> ::serde::Deserialize<'a> for ChainBlockExtrinsic { { let r = impl_serde::serialize::deserialize(de)?; let bytes = Decode::decode(&mut &r[..]) - .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {}", e)))?; + .map_err(|e| ::serde::de::Error::custom(format!("Decode error: {e}")))?; Ok(ChainBlockExtrinsic(bytes)) } } @@ -778,7 +778,7 @@ mod as_string { ) -> Result { String::deserialize(deserializer)? .parse() - .map_err(|e| serde::de::Error::custom(format!("Parsing failed: {}", e))) + .map_err(|e| serde::de::Error::custom(format!("Parsing failed: {e}"))) } } diff --git a/subxt/src/tx/tx_payload.rs b/subxt/src/tx/tx_payload.rs index 1abb7ae340d..d06d0289545 100644 --- a/subxt/src/tx/tx_payload.rs +++ b/subxt/src/tx/tx_payload.rs @@ -58,6 +58,7 @@ pub struct ValidationDetails<'a> { } /// This represents a statically generated transaction payload. +#[derive(Clone, Debug)] pub struct StaticTxPayload { pallet_name: &'static str, call_name: &'static str, @@ -123,6 +124,7 @@ impl TxPayload for StaticTxPayload { } /// This represents a dynamically generated transaction payload. +#[derive(Clone, Debug)] pub struct DynamicTxPayload<'a> { pallet_name: Cow<'a, str>, call_name: Cow<'a, str>, diff --git a/subxt/src/utils/account_id.rs b/subxt/src/utils/account_id.rs index 2c8ae354c1f..537460a8b55 100644 --- a/subxt/src/utils/account_id.rs +++ b/subxt/src/utils/account_id.rs @@ -136,7 +136,7 @@ impl<'de> Deserialize<'de> for AccountId32 { D: serde::Deserializer<'de>, { AccountId32::from_ss58check(&String::deserialize(deserializer)?) - .map_err(|e| serde::de::Error::custom(format!("{:?}", e))) + .map_err(|e| serde::de::Error::custom(format!("{e:?}"))) } } diff --git a/testing/integration-tests/Cargo.toml b/testing/integration-tests/Cargo.toml index 78762700aa5..4feb2351312 100644 --- a/testing/integration-tests/Cargo.toml +++ b/testing/integration-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "integration-tests" -version = "0.26.0" +version = "0.27.0" authors = ["Parity Technologies "] edition = "2021" publish = false @@ -19,18 +19,18 @@ default = ["subxt/integration-tests"] assert_matches = "1.5.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } frame-metadata = "15.0.0" -futures = "0.3.13" +futures = "0.3.26" hex = "0.4.3" regex = "1.5.0" scale-info = { version = "2.0.0", features = ["bit-vec"] } -sp-core = { version = "11.0.0", default-features = false } -sp-keyring = "12.0.0" -sp-runtime = "12.0.0" +sp-core = { version = "16.0.0", default-features = false } +sp-keyring = "18.0.0" +sp-runtime = "18.0.0" syn = "1.0.0" -subxt = { version = "0.26.0", path = "../../subxt" } -subxt-codegen = { version = "0.26.0", path = "../../codegen" } +subxt = { version = "0.27.0", path = "../../subxt" } +subxt-codegen = { version = "0.27.0", path = "../../codegen" } test-runtime = { path = "../test-runtime" } -tokio = { version = "1.8", features = ["macros", "time"] } +tokio = { version = "1.25", features = ["macros", "time"] } tracing = "0.1.34" tracing-subscriber = "0.3.11" wabt = "0.10.0" diff --git a/testing/integration-tests/src/codegen/codegen_documentation.rs b/testing/integration-tests/src/codegen/codegen_documentation.rs index 236e53c8b34..9299ecef508 100644 --- a/testing/integration-tests/src/codegen/codegen_documentation.rs +++ b/testing/integration-tests/src/codegen/codegen_documentation.rs @@ -106,8 +106,7 @@ fn check_documentation() { for raw in raw_docs.iter() { assert!( runtime_docs.contains(raw), - "Documentation not present in runtime API: {}", - raw + "Documentation not present in runtime API: {raw}" ); } } diff --git a/testing/integration-tests/src/frame/contracts.rs b/testing/integration-tests/src/frame/contracts.rs index 0340c3882f4..97403c34563 100644 --- a/testing/integration-tests/src/frame/contracts.rs +++ b/testing/integration-tests/src/frame/contracts.rs @@ -194,8 +194,7 @@ async fn tx_instantiate_with_code() { assert!( result.is_ok(), - "Error calling instantiate_with_code and receiving CodeStored and Instantiated Events: {:?}", - result + "Error calling instantiate_with_code and receiving CodeStored and Instantiated Events: {result:?}" ); } @@ -208,8 +207,7 @@ async fn tx_instantiate() { assert!( instantiated.is_ok(), - "Error instantiating contract: {:?}", - instantiated + "Error instantiating contract: {instantiated:?}" ); } @@ -244,9 +242,9 @@ async fn tx_call() { .iter() .map(|key| hex::encode(&key.0)) .collect::>(); - println!("keys post: {:?}", keys); + println!("keys post: {keys:?}"); let executed = cxt.call(contract, vec![]).await; - assert!(executed.is_ok(), "Error calling contract: {:?}", executed); + assert!(executed.is_ok(), "Error calling contract: {executed:?}"); } diff --git a/testing/integration-tests/src/frame/staking.rs b/testing/integration-tests/src/frame/staking.rs index be6adc20c21..7345ab25f9f 100644 --- a/testing/integration-tests/src/frame/staking.rs +++ b/testing/integration-tests/src/frame/staking.rs @@ -27,7 +27,7 @@ use subxt::error::{ /// Helper function to generate a crypto pair from seed fn get_from_seed(seed: &str) -> sr25519::Pair { - sr25519::Pair::from_string(&format!("//{}", seed), None) + sr25519::Pair::from_string(&format!("//{seed}"), None) .expect("static values are valid; qed") } diff --git a/testing/integration-tests/src/utils/node_proc.rs b/testing/integration-tests/src/utils/node_proc.rs index 1f18fe04346..4133f2faefb 100644 --- a/testing/integration-tests/src/utils/node_proc.rs +++ b/testing/integration-tests/src/utils/node_proc.rs @@ -103,7 +103,7 @@ impl TestNodeProcessBuilder { .arg("--ws-port=0"); if let Some(authority) = self.authority { - let authority = format!("{:?}", authority); + let authority = format!("{authority:?}"); let arg = format!("--{}", authority.as_str().to_lowercase()); cmd.arg(arg); } @@ -119,14 +119,14 @@ impl TestNodeProcessBuilder { // Wait for RPC port to be logged (it's logged to stderr): let stderr = proc.stderr.take().unwrap(); let ws_port = find_substrate_port_from_output(stderr); - let ws_url = format!("ws://127.0.0.1:{}", ws_port); + let ws_url = format!("ws://127.0.0.1:{ws_port}"); // Connect to the node with a subxt client: let client = OnlineClient::from_url(ws_url.clone()).await; match client { Ok(client) => Ok(TestNodeProcess { proc, client }), Err(err) => { - let err = format!("Failed to connect to node rpc at {}: {}", ws_url, err); + let err = format!("Failed to connect to node rpc at {ws_url}: {err}"); tracing::error!("{}", err); proc.kill().map_err(|e| { format!("Error killing substrate process '{}': {}", proc.id(), e) diff --git a/testing/test-runtime/Cargo.toml b/testing/test-runtime/Cargo.toml index dc03300a9f4..85553f2c666 100644 --- a/testing/test-runtime/Cargo.toml +++ b/testing/test-runtime/Cargo.toml @@ -1,16 +1,16 @@ [package] name = "test-runtime" -version = "0.26.0" +version = "0.27.0" edition = "2021" publish = false [dependencies] subxt = { path = "../../subxt" } -sp-runtime = "12.0.0" +sp-runtime = "18.0.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] } [build-dependencies] subxt = { path = "../../subxt" } -tokio = { version = "1.8", features = ["macros", "rt-multi-thread"] } +tokio = { version = "1.25", features = ["macros", "rt-multi-thread"] } which = "4.4.0" jsonrpsee = { version = "0.16.0", features = ["async-client", "client-ws-transport"] } diff --git a/testing/test-runtime/build.rs b/testing/test-runtime/build.rs index 1d7738afd7a..5084936e933 100644 --- a/testing/test-runtime/build.rs +++ b/testing/test-runtime/build.rs @@ -33,7 +33,7 @@ async fn run() { let cmd = Command::new(&substrate_bin) .arg("--dev") .arg("--tmp") - .arg(format!("--ws-port={}", port)) + .arg(format!("--ws-port={port}")) .spawn(); let mut cmd = match cmd { Ok(cmd) => KillOnDrop(cmd), @@ -42,7 +42,7 @@ async fn run() { See https://github.com/paritytech/subxt/tree/master#integration-testing") } Err(e) => { - panic!("Cannot spawn substrate command '{}': {}", substrate_bin, e) + panic!("Cannot spawn substrate command '{substrate_bin}': {e}") } }; @@ -53,13 +53,13 @@ async fn run() { loop { if retries >= MAX_RETRIES { - panic!("Cannot connect to substrate node after {} retries", retries); + panic!("Cannot connect to substrate node after {retries} retries"); } // It might take a while for substrate node that spin up the RPC server. // Thus, the connection might get rejected a few times. use client::ClientT; - let res = match client::build(&format!("ws://localhost:{}", port)).await { + let res = match client::build(&format!("ws://localhost:{port}")).await { Ok(c) => c.request("state_getMetadata", client::rpc_params![]).await, Err(e) => Err(e), }; @@ -114,7 +114,7 @@ async fn run() { substrate_path.to_string_lossy() ); // Re-build if we point to a different substrate binary: - println!("cargo:rerun-if-env-changed={}", SUBSTRATE_BIN_ENV_VAR); + println!("cargo:rerun-if-env-changed={SUBSTRATE_BIN_ENV_VAR}"); // Re-build if this file changes: println!("cargo:rerun-if-changed=build.rs"); } diff --git a/testing/ui-tests/Cargo.toml b/testing/ui-tests/Cargo.toml index 4ade0a04c43..aaa9d841bb9 100644 --- a/testing/ui-tests/Cargo.toml +++ b/testing/ui-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ui-tests" -version = "0.26.0" +version = "0.27.0" edition = "2021" publish = false @@ -9,7 +9,7 @@ publish = false [dependencies] [dev-dependencies] -trybuild = "1.0.76" +trybuild = "1.0.77" scale-info = { version = "2.3.0", features = ["bit-vec"] } frame-metadata = "15.0.0" codec = { package = "parity-scale-codec", version = "3.0.0", default-features = false, features = ["derive", "full", "bit-vec"] }