From 8023d54b6692ab4f59fa4f6c21ce77827c48c687 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Wed, 24 Jun 2020 12:59:48 +0100 Subject: [PATCH 1/3] Use latest subxt release --- Cargo.lock | 652 ++++++++++++++++++++++++++++++++++------- Cargo.toml | 7 +- src/cmd/deploy.rs | 3 +- src/cmd/instantiate.rs | 6 +- src/main.rs | 9 +- 5 files changed, 558 insertions(+), 119 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 48d96c82..65cd2a0a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -79,6 +79,25 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +[[package]] +name = "asn1_der" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fce6b6a0ffdafebd82c87e79e3f40e8d2c523e5fea5566ff6b90509bf98d638" +dependencies = [ + "asn1_der_derive", +] + +[[package]] +name = "asn1_der_derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d0864d84b8e07b145449be9a8537db86bf9de5ce03b913214694643b4743502" +dependencies = [ + "quote", + "syn", +] + [[package]] name = "assert_matches" version = "1.3.0" @@ -92,6 +111,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "538ecb01eb64eecd772087e5b6f7540cbc917f047727339a472dafed2185b267" dependencies = [ "async-task", + "broadcaster", "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", @@ -221,6 +241,28 @@ dependencies = [ "constant_time_eq", ] +[[package]] +name = "blake2b_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8fb2d74254a3a0b5cac33ac9f8ed0e44aa50378d9dbb2e5d83bd21ed1dc2c8a" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", +] + +[[package]] +name = "blake2s_simd" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ab9e07352b829279624ceb7c64adb4f585dacdb81d35cafae81139ccd617cf44" +dependencies = [ + "arrayref", + "arrayvec 0.5.1", + "constant_time_eq", +] + [[package]] name = "block-buffer" version = "0.7.3" @@ -242,6 +284,20 @@ dependencies = [ "byte-tools", ] +[[package]] +name = "broadcaster" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c972e21e0d055a36cf73e4daae870941fe7a8abcd5ac3396aab9e4c126bd87" +dependencies = [ + "futures-channel", + "futures-core", + "futures-sink", + "futures-util", + "parking_lot 0.10.2", + "slab", +] + [[package]] name = "bs58" version = "0.3.1" @@ -537,6 +593,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "data-encoding" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72aa14c04dfae8dd7d8a2b1cb7ca2152618cd01336dbfe704b8dcbf8d41dbd69" + [[package]] name = "derive_more" version = "0.99.5" @@ -649,6 +711,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" + [[package]] name = "fnv" version = "1.0.6" @@ -657,9 +725,9 @@ checksum = "2fad85553e09a6f881f739c29f0b00b0f01357c743266d478b68951ce23285f3" [[package]] name = "frame-metadata" -version = "11.0.0-alpha.7" +version = "11.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4ed1031c3ab5fd338d4922380ecaa1784d96c4670b5e329838c1be9821f1596" +checksum = "b74a0a1b4db65b4b9c9502510d366bc17a448cda844f7d8cf4118bce8bea1323" dependencies = [ "parity-scale-codec", "serde", @@ -669,9 +737,9 @@ dependencies = [ [[package]] name = "frame-support" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdd5a22a0c3e66a82b4ca1965e21373d3e0d29266313130d04a5045906c81dc4" +checksum = "0eb3c2ce745b9f474d0b4c85a24ebebcdd8a4f30696dfd72e3b4f4aec6d7ab1d" dependencies = [ "bitmask", "frame-metadata", @@ -682,6 +750,7 @@ dependencies = [ "parity-scale-codec", "paste", "serde", + "smallvec 1.4.0", "sp-arithmetic", "sp-core", "sp-inherents", @@ -694,9 +763,9 @@ dependencies = [ [[package]] name = "frame-support-procedural" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a6b4279196725ff56647d12a285328a79685a7d05be6c507f55a11e00f492c0" +checksum = "3f99f5f76ea54066dfdb5c0a7ceb31d669e148a6404a2d5df48596e2ab653af2" dependencies = [ "frame-support-procedural-tools", "proc-macro2", @@ -706,9 +775,9 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9135714a5cd9e01b9839c16433d5f075706ef87f8f2fc412944ff826fc8ccd1" +checksum = "563a469ca69e96b26303bade133d731df9eda33fe0a7d25a5a3cee45226994e6" dependencies = [ "frame-support-procedural-tools-derive", "proc-macro-crate", @@ -719,9 +788,9 @@ dependencies = [ [[package]] name = "frame-support-procedural-tools-derive" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab73d20fca63196489400b98b71aa96a8709968d83dc26e7c99aa135ba1eaf4f" +checksum = "687e00073999f0add0c18f84c8b65e2be414c7cc89120472a06cf4e3ea2cf4c0" dependencies = [ "proc-macro2", "quote", @@ -730,9 +799,9 @@ dependencies = [ [[package]] name = "frame-system" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb202b187ce580c0414d9c7608478377bd2fe90bb15a5777e8c6b746d4c9519a" +checksum = "b8d3f46329f3d994321bbd44fa03b28d243608dbab2f53da94b0fd9d7d8d30c4" dependencies = [ "frame-support", "impl-trait-for-tuples", @@ -1180,6 +1249,15 @@ dependencies = [ "libc", ] +[[package]] +name = "itertools" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "0.4.5" @@ -1197,9 +1275,9 @@ dependencies = [ [[package]] name = "jsonrpc-client-transports" -version = "14.1.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2307a7e78cf969759e390a8a2151ea12e783849a45bb00aa871b468ba58ea79e" +checksum = "ecbdaacc17243168d9d1fa6b2bd7556a27e1e60a621d8a2a6e590ae2b145d158" dependencies = [ "failure", "futures 0.1.29", @@ -1213,9 +1291,9 @@ dependencies = [ [[package]] name = "jsonrpc-core" -version = "14.1.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25525f6002338fb4debb5167a89a0b47f727a5a48418417545ad3429758b7fec" +checksum = "a0747307121ffb9703afd93afbd0fb4f854c38fb873f2c8b90e0e902f27c7b62" dependencies = [ "futures 0.1.29", "log", @@ -1226,18 +1304,18 @@ dependencies = [ [[package]] name = "jsonrpc-core-client" -version = "14.1.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f9382e831a6d630c658df103aac3f971da096deb57c136ea2b760d3b4e3f9f" +checksum = "34221123bc79b66279a3fde2d3363553835b43092d629b34f2e760c44dc94713" dependencies = [ "jsonrpc-client-transports", ] [[package]] name = "jsonrpc-derive" -version = "14.0.5" +version = "14.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8609af8f63b626e8e211f52441fcdb6ec54f1a446606b10d5c89ae9bf8a20058" +checksum = "0fadf6945e227246825a583514534d864554e9f23d80b3c77d034b10983db5ef" dependencies = [ "proc-macro-crate", "proc-macro2", @@ -1247,13 +1325,14 @@ dependencies = [ [[package]] name = "jsonrpc-pubsub" -version = "14.1.0" +version = "14.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ca5e391d6c6a2261d4adca029f427fe63ea546ad6cef2957c654c08495ec16" +checksum = "2d44f5602a11d657946aac09357956d2841299ed422035edf140c552cb057986" dependencies = [ "jsonrpc-core", "log", "parking_lot 0.10.2", + "rand 0.7.3", "serde", ] @@ -1339,6 +1418,85 @@ version = "0.2.70" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3baa92041a6fec78c687fa0cc2b3fae8884f743d672cf551bed1d6dac6988d0f" +[[package]] +name = "libp2p" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "057eba5432d3e740e313c6e13c9153d0cb76b4f71bfc2e5242ae5bdb7d41af67" +dependencies = [ + "bytes", + "futures 0.3.5", + "lazy_static", + "libp2p-core", + "libp2p-core-derive", + "libp2p-swarm", + "multihash", + "parity-multiaddr", + "parking_lot 0.10.2", + "pin-project", + "smallvec 1.4.0", + "wasm-timer", +] + +[[package]] +name = "libp2p-core" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a0387b930c3d4c2533dc4893c1e0394185ddcc019846121b1b27491e45a2c08" +dependencies = [ + "asn1_der", + "bs58", + "ed25519-dalek", + "either", + "fnv", + "futures 0.3.5", + "futures-timer 3.0.2", + "lazy_static", + "libsecp256k1", + "log", + "multihash", + "multistream-select", + "parity-multiaddr", + "parking_lot 0.10.2", + "pin-project", + "prost", + "prost-build", + "rand 0.7.3", + "ring", + "rw-stream-sink", + "sha2", + "smallvec 1.4.0", + "thiserror", + "unsigned-varint 0.4.0", + "void", + "zeroize", +] + +[[package]] +name = "libp2p-core-derive" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f09548626b737ed64080fde595e06ce1117795b8b9fc4d2629fa36561c583171" +dependencies = [ + "quote", + "syn", +] + +[[package]] +name = "libp2p-swarm" +version = "0.19.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce53ff4d127cf8b39adf84dbd381ca32d49bd85788cee08e6669da2495993930" +dependencies = [ + "futures 0.3.5", + "libp2p-core", + "log", + "rand 0.7.3", + "smallvec 1.4.0", + "void", + "wasm-timer", +] + [[package]] name = "libsecp256k1" version = "0.3.5" @@ -1373,6 +1531,15 @@ dependencies = [ "cfg-if", ] +[[package]] +name = "lru" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" +dependencies = [ + "hashbrown 0.6.3", +] + [[package]] name = "matches" version = "0.1.8" @@ -1472,6 +1639,41 @@ dependencies = [ "ws2_32-sys", ] +[[package]] +name = "multihash" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f75db05d738947aa5389863aadafbcf2e509d7ba099dc2ddcdf4fc66bf7a9e03" +dependencies = [ + "blake2b_simd", + "blake2s_simd", + "digest", + "sha-1", + "sha2", + "sha3", + "unsigned-varint 0.3.3", +] + +[[package]] +name = "multimap" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8883adfde9756c1d30b0f519c9b8c502a94b41ac62f696453c37c7fc0a958ce" + +[[package]] +name = "multistream-select" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9157e87afbc2ef0d84cc0345423d715f445edde00141c93721c162de35a05e5" +dependencies = [ + "bytes", + "futures 0.3.5", + "log", + "pin-project", + "smallvec 1.4.0", + "unsigned-varint 0.4.0", +] + [[package]] name = "net2" version = "0.2.34" @@ -1524,9 +1726,9 @@ dependencies = [ [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +checksum = "ac267bcc07f48ee5f8935ab0d24f316fb722d7a1292e2913f0cc196b29ffd611" dependencies = [ "autocfg 1.0.0", ] @@ -1573,9 +1775,9 @@ dependencies = [ [[package]] name = "pallet-indices" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6941e40c29068970666b5737cc274d1a05ba9cabdb5b02059f585c69c4f96b4c" +checksum = "cbde5c8a49e0c28a009a37b270ec674a6a04399dd78be2de59c661ec54b2ddbd" dependencies = [ "frame-support", "frame-system", @@ -1588,6 +1790,24 @@ dependencies = [ "sp-std", ] +[[package]] +name = "parity-multiaddr" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc20af3143a62c16e7c9e92ea5c6ae49f7d271d97d4d8fe73afc28f0514a3d0f" +dependencies = [ + "arrayref", + "bs58", + "byteorder", + "data-encoding", + "multihash", + "percent-encoding 2.1.0", + "serde", + "static_assertions", + "unsigned-varint 0.4.0", + "url 2.1.1", +] + [[package]] name = "parity-scale-codec" version = "1.3.0" @@ -1738,20 +1958,30 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "petgraph" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +dependencies = [ + "fixedbitset", + "indexmap", +] + [[package]] name = "pin-project" -version = "0.4.16" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81d480cb4e89522ccda96d0eed9af94180b7a5f93fb28f66e1fd7d68431663d1" +checksum = "12e3a6cdbfe94a5e4572812a0201f8c0ed98c1c452c7b8563ce2276988ef9c17" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.16" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82996f11efccb19b685b14b5df818de31c1edcee3daa256ab5775dd98e72feb" +checksum = "6a0ffd45cf79d88737d7cc85bfd5d2894bee1139b356e616fe85dc389c61aaf7" dependencies = [ "proc-macro2", "quote", @@ -1855,9 +2085,9 @@ checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" [[package]] name = "proc-macro2" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8872cf6f48eee44265156c111456a700ab3483686b3f96df4cf5481c89157319" +checksum = "beae6331a816b1f65d04c45b078fd8e6c93e8071771f41b8163255bbd8d7c8fa" dependencies = [ "unicode-xid", ] @@ -1876,6 +2106,57 @@ dependencies = [ "thiserror", ] +[[package]] +name = "prost" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce49aefe0a6144a45de32927c77bd2859a5f7677b55f220ae5b744e87389c212" +dependencies = [ + "bytes", + "prost-derive", +] + +[[package]] +name = "prost-build" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02b10678c913ecbd69350e8535c3aef91a8676c0773fc1d7b95cdd196d7f2f26" +dependencies = [ + "bytes", + "heck", + "itertools", + "log", + "multimap", + "petgraph", + "prost", + "prost-types", + "tempfile", + "which", +] + +[[package]] +name = "prost-derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "537aa19b95acde10a12fec4301466386f757403de4cd4e5b4fa78fb5ecb18f72" +dependencies = [ + "anyhow", + "itertools", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "prost-types" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1834f67c0697c001304b75be76f67add9c89742eda3a085ad8ee0bb38c3417aa" +dependencies = [ + "bytes", + "prost", +] + [[package]] name = "protobuf" version = "2.14.0" @@ -1901,9 +2182,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.4" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c1f4b0efa5fc5e8ceb705136bfee52cfdb6a4e3509f770b478cd6ed434232a7" +checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37" dependencies = [ "proc-macro2", ] @@ -2110,6 +2391,17 @@ dependencies = [ "webpki", ] +[[package]] +name = "rw-stream-sink" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4da5fcb054c46f5a5dff833b129285a93d3f0179531735e6c866e8cc307d2020" +dependencies = [ + "futures 0.3.5", + "pin-project", + "static_assertions", +] + [[package]] name = "ryu" version = "1.0.4" @@ -2127,9 +2419,9 @@ dependencies = [ [[package]] name = "sc-rpc-api" -version = "0.8.0-alpha.7" +version = "0.8.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27aa7d70aec2be0967110b5df9a11ac3aa76fe4c8576455c266d3135d8fe63a" +checksum = "79394cef2853a8d208cf075d45c0eda0e3d674217d63793a0e636a976f4489a6" dependencies = [ "derive_more", "futures 0.3.5", @@ -2200,20 +2492,26 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "send_wrapper" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0eddf2e8f50ced781f288c19f18621fa72a3779e3cb58dbf23b07469b0abeb4" + [[package]] name = "serde" -version = "1.0.110" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99e7b308464d16b56eba9964e4972a3eee817760ab60d88c3f86e1fecb08204c" +checksum = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.110" +version = "1.0.114" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "818fbf6bfa9a42d3bfcaca148547aa00c7b915bec71d1757aa2d44ca68771984" +checksum = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e" dependencies = [ "proc-macro2", "quote", @@ -2222,15 +2520,27 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.53" +version = "1.0.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" +checksum = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" dependencies = [ "itoa", "ryu", "serde", ] +[[package]] +name = "sha-1" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" +dependencies = [ + "block-buffer", + "digest", + "fake-simd", + "opaque-debug", +] + [[package]] name = "sha1" version = "0.6.0" @@ -2249,6 +2559,19 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha3" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd26bc0e7a2e3a7c959bc494caf58b72ee0c71d67704e9520f736ca7e4853ecf" +dependencies = [ + "block-buffer", + "byte-tools", + "digest", + "keccak", + "opaque-debug", +] + [[package]] name = "slab" version = "0.4.2" @@ -2291,9 +2614,9 @@ dependencies = [ [[package]] name = "sp-api" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e34c770de3ada5729a094ed0e594a94fe03f4d6bfffd5d27f40e00778d20998" +checksum = "77948b822c0baff24c6d2c8c0f01f1cd65b1643b3bd21d2425c51ae651f37ced" dependencies = [ "hash-db", "parity-scale-codec", @@ -2307,9 +2630,9 @@ dependencies = [ [[package]] name = "sp-api-proc-macro" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53f6276132fc841a61e38d6eaa3a89acd10ccec1d8167cedf453c2fff0513b93" +checksum = "a02323ecb28788598e81312edf74b46fca41cfdfe9b815e8326e3b4f1eae80e4" dependencies = [ "blake2-rfc", "proc-macro-crate", @@ -2320,9 +2643,9 @@ dependencies = [ [[package]] name = "sp-application-crypto" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2997e5072ef4fa6ac54658b0e79149095ececd89e3bd693f8fed90ad69862e8" +checksum = "4c191ca6ee330879623c8a310f95da239d81c90188ae13d6aff8f48a68ec3e04" dependencies = [ "parity-scale-codec", "serde", @@ -2333,38 +2656,92 @@ dependencies = [ [[package]] name = "sp-arithmetic" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35ee0e06a6d46a3d6fb8706dfa2ca593b60a06c248fbd5173ab56070c209612e" +checksum = "c8c2a24eb54c2b656e8534a1e420d9ab097c60bab82376d89e9cffe305780573" dependencies = [ "integer-sqrt", "num-traits", "parity-scale-codec", - "primitive-types", "serde", "sp-debug-derive", "sp-std", ] +[[package]] +name = "sp-block-builder" +version = "2.0.0-rc3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24509719d0d421e182eb04e9794402169aaa50aac206c870efd9f96c00f624e9" +dependencies = [ + "parity-scale-codec", + "sp-api", + "sp-inherents", + "sp-runtime", + "sp-std", +] + +[[package]] +name = "sp-blockchain" +version = "2.0.0-rc3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "effd0f0207090e2bf7501822e6dbdb6a8267bf2ab7907d8a6593bc347d4efa90" +dependencies = [ + "derive_more", + "log", + "lru", + "parity-scale-codec", + "parking_lot 0.10.2", + "sp-block-builder", + "sp-consensus", + "sp-runtime", + "sp-state-machine", +] + [[package]] name = "sp-chain-spec" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2997456fa5b605fec06c5f2267a0e7cb44708b210548b1a557ce89b07bc04211" +checksum = "e93b0903cb7968392e7c0eaf068022dea106f878c52b9bad2b4e3b0ec21f3a36" dependencies = [ "serde", "serde_json", ] +[[package]] +name = "sp-consensus" +version = "0.8.0-rc3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81e5a5c71be2fd452b9ffea96226308fe2efa0c6ee5123decfc56ef300f6a4ff" +dependencies = [ + "derive_more", + "futures 0.3.5", + "futures-timer 3.0.2", + "libp2p", + "log", + "parity-scale-codec", + "parking_lot 0.10.2", + "serde", + "sp-core", + "sp-inherents", + "sp-runtime", + "sp-state-machine", + "sp-std", + "sp-utils", + "sp-version", + "substrate-prometheus-endpoint", +] + [[package]] name = "sp-core" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4d4e7309949c9ce65a0347b20bbc89cc09efee55b1918c3253392286dab0df9" +checksum = "f976ad8d53924d6210e34af085558fb896a312f101654a7c9e51e8117923bc0d" dependencies = [ "base58", "blake2-rfc", "byteorder", + "derive_more", "ed25519-dalek", "futures 0.3.5", "hash-db", @@ -2400,9 +2777,9 @@ dependencies = [ [[package]] name = "sp-debug-derive" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2c4cb00ba7694df96793cf024418e6a75d5f224716460961b5c9dbfa621c0e8" +checksum = "aae7a9b433cd2629ef8bc7bf331bcda041fe99097f24034e99b12d916acda4ef" dependencies = [ "proc-macro2", "quote", @@ -2411,9 +2788,9 @@ dependencies = [ [[package]] name = "sp-externalities" -version = "0.8.0-alpha.7" +version = "0.8.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a826d5f8f0085804f5e7174885958611955a904ff184ae0ad289d6b83d8a3e" +checksum = "877bf85f4a361b3a654da14d48a3a5daf25a4ddf5e2cb9354ec90ad10c3aba59" dependencies = [ "environmental", "parity-scale-codec", @@ -2423,9 +2800,9 @@ dependencies = [ [[package]] name = "sp-inherents" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8367b0e285f8c3ab00400a5f5b53ff0dba263005d2458fdc3e9652f824205f0b" +checksum = "8803e8d6961ba629cbfa1034f7f0109a9a37f9db16eb941693d07b6d79576d83" dependencies = [ "derive_more", "parity-scale-codec", @@ -2436,9 +2813,9 @@ dependencies = [ [[package]] name = "sp-io" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ede88516c08b2070ad2b49f5e4ebff896910b11c0a63184eb5c20b0b604b8655" +checksum = "f0962dd6d6dabd2c9dda1f128b1dfa324811e753abc250c174e91965f80fea8b" dependencies = [ "futures 0.3.5", "hash-db", @@ -2457,9 +2834,9 @@ dependencies = [ [[package]] name = "sp-keyring" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "509e39a8b8c8c6532fcbea3140e3f92ec6712ee028bdc968f4ccb90181205c24" +checksum = "a966f87bcd69e4c8fcedd0b43f017079dcb31f248ced815c711e5e888fa20692" dependencies = [ "lazy_static", "sp-core", @@ -2469,9 +2846,9 @@ dependencies = [ [[package]] name = "sp-panic-handler" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acec634cd613519673edad420f56d5bbd087da9923c05aa66708882ee9676d20" +checksum = "48327f6f9617180513cf20db80af8151b32d965937810c8d4464503a78e77070" dependencies = [ "backtrace", "log", @@ -2479,9 +2856,9 @@ dependencies = [ [[package]] name = "sp-rpc" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd0ae1f6a934590356ce844ce9d0ef71993cab223f6c9371c2fdea98b23c334" +checksum = "c1bdeee9562023c0e4bc6189bc3b5050f3e80bc98f2202f2d1b4c18e8ea54651" dependencies = [ "serde", "sp-core", @@ -2489,9 +2866,9 @@ dependencies = [ [[package]] name = "sp-runtime" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d37f6a2e111dd82dd194fa9ef77ba49b17e70162afc237f99e7c5dc6f95834f" +checksum = "9578b261bff85f93b03bc0445bee257fea8d68c5cd1b6817506da306fd13e063" dependencies = [ "hash256-std-hasher", "impl-trait-for-tuples", @@ -2511,9 +2888,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc743ea280556cbaf82203ec63ade39f4167402cb571aaf012c6c43f092ccf33" +checksum = "8bee7f5ae328516154f16f6875d19ec70abb643fa16e12d731289f64594939c8" dependencies = [ "parity-scale-codec", "primitive-types", @@ -2527,9 +2904,9 @@ dependencies = [ [[package]] name = "sp-runtime-interface-proc-macro" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be673dffcf1084e6a0da85712866afde7bbdefa152e9e3e5dbf4a04f1994a673" +checksum = "ccd2541e8b1d05e71e71ee6308116e8e77e5ffff6c6c7bed03336c19497470db" dependencies = [ "Inflector", "proc-macro-crate", @@ -2540,9 +2917,9 @@ dependencies = [ [[package]] name = "sp-state-machine" -version = "0.8.0-alpha.7" +version = "0.8.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd342d0b85891ea0e69c34483651df4e05420989b6fa74eb1982994118482985" +checksum = "466231f9032ee44b3974c1789edc7e473234aeb6d92aac506d5011cfb049bd2e" dependencies = [ "hash-db", "log", @@ -2560,15 +2937,15 @@ dependencies = [ [[package]] name = "sp-std" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e32241a20350ba20f445c73fec53b4c904559756b922ca2c3dda87ab2c1be9e" +checksum = "b3dc3b71646e5b94bd6c9ff73d42d86bcbd55a257709ac0b3bcde90d42a16b45" [[package]] name = "sp-storage" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645dcf4a75d63a5494eabdc076d19a834c3cc46df65d84506fc40e67bd0bdd40" +checksum = "474d5c349670c57704e03404766df3a2dad48e6ec885cf39d695e4b9075a34a8" dependencies = [ "impl-serde 0.2.3", "ref-cast", @@ -2579,18 +2956,18 @@ dependencies = [ [[package]] name = "sp-tracing" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a4caabab12ba64d7e5d3ff6d2d5a698425227eb8c697f8b3dcac67813a192b" +checksum = "757b4b4ae036e63b8cb2e04a99aa8f7f2c0e4d65b20a8ca4055b91da7a4da086" dependencies = [ "tracing", ] [[package]] name = "sp-transaction-pool" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "008ceb7db9fe134ced1e67226edb36db783e5f9434ca3544efcc94d8db9e1c99" +checksum = "969f4254d1eeb6229109ec4110c482bbdfb5299f7f9b683698c70a3eebbd7743" dependencies = [ "derive_more", "futures 0.3.5", @@ -2598,15 +2975,16 @@ dependencies = [ "parity-scale-codec", "serde", "sp-api", + "sp-blockchain", "sp-runtime", "sp-utils", ] [[package]] name = "sp-trie" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1620f438771be44e7aee5445c348623c40bc32a15c875689ac9f2e3aecdc3aa3" +checksum = "863800d1b759e71697f5c0f149320198f08cd2de8b9ea2de09809d337183da20" dependencies = [ "hash-db", "memory-db", @@ -2619,9 +2997,9 @@ dependencies = [ [[package]] name = "sp-utils" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3aa5acc361bb7ccab3940584d9c032a587b8b4414cd949a92a7b391e6f39384" +checksum = "23027131236da370e7e74a0c2c38a774f1c7865d15d771b36f5d4cadfa059a53" dependencies = [ "futures 0.3.5", "futures-core", @@ -2631,9 +3009,9 @@ dependencies = [ [[package]] name = "sp-version" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d032c1e5c3b484c0e88486a1a6e9bfb736cbe6cb68b074cf0436b2935d38372a" +checksum = "cd13d876f1e98e4323d55cdafa44ae0116ca7ace1f0abb7f09c53e51be6b90b6" dependencies = [ "impl-serde 0.2.3", "parity-scale-codec", @@ -2644,9 +3022,9 @@ dependencies = [ [[package]] name = "sp-wasm-interface" -version = "2.0.0-alpha.7" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0154beac23726c550f7fd68b9aad2fd97369221d5aa4b4e18d937e2eddc4246b" +checksum = "cd42500c3a67a99a4a45bf3ca66b41a63e882a4a9e4f632b63218b57b75a929b" dependencies = [ "impl-trait-for-tuples", "parity-scale-codec", @@ -2730,10 +3108,24 @@ dependencies = [ ] [[package]] -name = "substrate-subxt" -version = "0.7.0" +name = "substrate-prometheus-endpoint" +version = "0.8.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3536f9a71476d53d824008f9c546d9bdbc6eae89abdababa201f0f309d435261" +checksum = "eee147593521af9eef3f90344ba5c3180dc27225e758bd8f081d8fe519318fa7" +dependencies = [ + "async-std", + "derive_more", + "futures-util", + "hyper", + "log", + "prometheus", + "tokio", +] + +[[package]] +name = "substrate-subxt" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate-subxt#3080ec91a686a81e6a260969d4a17f22cfcae35f" dependencies = [ "frame-metadata", "frame-support", @@ -2759,12 +3151,12 @@ dependencies = [ [[package]] name = "substrate-subxt-proc-macro" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e322605091419009a2d2cad6313d397624574690d670b7600654078b5dbf99ef" +version = "0.8.0" +source = "git+https://github.com/paritytech/substrate-subxt#3080ec91a686a81e6a260969d4a17f22cfcae35f" dependencies = [ "heck", "proc-macro-crate", + "proc-macro-error", "proc-macro2", "quote", "syn", @@ -2785,9 +3177,9 @@ checksum = "7c65d530b10ccaeac294f349038a597e435b18fb456aadd0840a623f83b9e941" [[package]] name = "syn" -version = "1.0.20" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd1b5e337360b1fae433c59fcafa0c6b77c605e92540afa5221a7b81a9eca91d" +checksum = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd" dependencies = [ "proc-macro2", "quote", @@ -2807,9 +3199,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.3" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ "proc-macro2", "quote", @@ -2861,18 +3253,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d12a1dae4add0f0d568eebc7bf142f145ba1aa2544cafb195c76f0f409091b60" +checksum = "7dfdd070ccd8ccb78f4ad66bf1982dc37f620ef696c6b5028fe2ed83dd3d0d08" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.16" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f34e0c1caaa462fd840ec6b768946ea1e7842620d94fe29d5b847138f521269" +checksum = "bd80fc12f73063ac132ac92aceea36734f04a1d93c1240c6944e23a3b8841793" dependencies = [ "proc-macro2", "quote", @@ -3099,6 +3491,18 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +[[package]] +name = "unsigned-varint" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f67332660eb59a6f1eb24ff1220c9e8d01738a8503c6002e30bcfe4bd9f2b4a9" + +[[package]] +name = "unsigned-varint" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "669d776983b692a906c881fcd0cfb34271a48e197e4d6cb8df32b05bfc3d3fa5" + [[package]] name = "untrusted" version = "0.7.1" @@ -3139,6 +3543,12 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "078775d0255232fb988e6fccf26ddc9d1ac274299aaedcedce21c6f72cc533ce" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + [[package]] name = "wabt" version = "0.9.2" @@ -3214,6 +3624,18 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a369c5e1dfb7569e14d62af4da642a3cbc2f9a3652fe586e26ac22222aa4b04" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.62" @@ -3243,6 +3665,22 @@ version = "0.2.62" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a91c2916119c17a8e316507afaaa2dd94b47646048014bbdf6bef098c1bb58ad" +[[package]] +name = "wasm-timer" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "324c5e65a08699c9c4334ba136597ab22b85dccd4b65dd1e36ccf8f723a95b54" +dependencies = [ + "futures 0.3.5", + "js-sys", + "parking_lot 0.9.0", + "pin-utils", + "send_wrapper", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "wasmi" version = "0.6.2" diff --git a/Cargo.toml b/Cargo.toml index 6b81e4b0..ec6b5524 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -35,9 +35,10 @@ serde_json = "1.0" tempfile = "3.1.0" # dependencies for optional extrinsics feature -async-std = { version = "1.5.0", optional = true } -sp-core = { version = "2.0.0-alpha.3", optional = true } -subxt = { version = "0.7.0", package = "substrate-subxt", optional = true } +async-std = { version = "=1.5.0", optional = true } +sp-core = { version = "2.0.0-rc3", optional = true } +#subxt = { version = "0.9.0", package = "substrate-subxt", optional = true } +subxt = { git = "https://github.com/paritytech/substrate-subxt", package = "substrate-subxt", optional = true } futures = { version = "0.3.2", optional = true } hex = { version = "0.4.0", optional = true } url = { version = "2.1.1", optional = true } diff --git a/src/cmd/deploy.rs b/src/cmd/deploy.rs index 53ba61dc..56fcfaa7 100644 --- a/src/cmd/deploy.rs +++ b/src/cmd/deploy.rs @@ -59,9 +59,8 @@ pub(crate) fn execute_deploy( .build() .await?; let signer = extrinsic_opts.signer()?; - let xt = cli.xt(signer, None).await?; - let events = xt.watch().put_code(&code).await?; + let events = cli.put_code_and_watch(&signer, &code).await?; let code_stored = events .code_stored()? .ok_or(anyhow::anyhow!("Failed to find CodeStored event"))?; diff --git a/src/cmd/instantiate.rs b/src/cmd/instantiate.rs index 29fc4d50..ce770ff1 100644 --- a/src/cmd/instantiate.rs +++ b/src/cmd/instantiate.rs @@ -37,11 +37,9 @@ pub(crate) fn execute_instantiate( .build() .await?; let signer = extrinsic_opts.signer()?; - let xt = cli.xt(signer, None).await?; - let events = xt - .watch() - .instantiate(endowment, gas_limit, &code_hash, &data.0) + let events = cli + .instantiate_and_watch(&signer, endowment, gas_limit, &code_hash, &data.0) .await?; let instantiated = events .instantiated()? diff --git a/src/main.rs b/src/main.rs index 3a9429c6..6409d5f0 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,6 +20,8 @@ mod workspace; #[cfg(feature = "extrinsics")] use sp_core::{crypto::Pair, sr25519, H256}; +#[cfg(feature = "extrinsics")] +use subxt::PairSigner; use std::{ convert::{TryFrom, TryInto}, path::PathBuf, @@ -80,9 +82,10 @@ pub(crate) struct ExtrinsicOpts { #[cfg(feature = "extrinsics")] impl ExtrinsicOpts { - pub fn signer(&self) -> Result { - sr25519::Pair::from_string(&self.suri, self.password.as_ref().map(String::as_ref)) - .map_err(|_| anyhow::anyhow!("Secret string error")) + pub fn signer(&self) -> Result> { + let pair = sr25519::Pair::from_string(&self.suri, self.password.as_ref().map(String::as_ref)) + .map_err(|_| anyhow::anyhow!("Secret string error"))?; + Ok(PairSigner::new(pair)) } } -- GitLab From 170998768bc684598a4619bd949571f3fbe25d04 Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 25 Jun 2020 09:28:30 +0100 Subject: [PATCH 2/3] Use subxt 0.9.0 --- Cargo.lock | 10 ++++++---- Cargo.toml | 3 +-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65cd2a0a..0f1f638f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3124,8 +3124,9 @@ dependencies = [ [[package]] name = "substrate-subxt" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate-subxt#3080ec91a686a81e6a260969d4a17f22cfcae35f" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c26c2f596f7bf0a1d7ab1d43bcf9b03c5d8595cda175b032b58435755bb54d2" dependencies = [ "frame-metadata", "frame-support", @@ -3151,8 +3152,9 @@ dependencies = [ [[package]] name = "substrate-subxt-proc-macro" -version = "0.8.0" -source = "git+https://github.com/paritytech/substrate-subxt#3080ec91a686a81e6a260969d4a17f22cfcae35f" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4866e68aa6eafb2d37c57552f18d205ccad5d77b7d71c8fbe63c9c58eee2f5fd" dependencies = [ "heck", "proc-macro-crate", diff --git a/Cargo.toml b/Cargo.toml index ec6b5524..93267864 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -37,8 +37,7 @@ tempfile = "3.1.0" # dependencies for optional extrinsics feature async-std = { version = "=1.5.0", optional = true } sp-core = { version = "2.0.0-rc3", optional = true } -#subxt = { version = "0.9.0", package = "substrate-subxt", optional = true } -subxt = { git = "https://github.com/paritytech/substrate-subxt", package = "substrate-subxt", optional = true } +subxt = { version = "0.9.0", package = "substrate-subxt", optional = true } futures = { version = "0.3.2", optional = true } hex = { version = "0.4.0", optional = true } url = { version = "2.1.1", optional = true } -- GitLab From 185521d7987c513d120c534a087bb57f059c6b4f Mon Sep 17 00:00:00 2001 From: Andrew Jones Date: Thu, 25 Jun 2020 09:37:09 +0100 Subject: [PATCH 3/3] Fmt --- src/main.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.rs b/src/main.rs index 6409d5f0..787a6f8d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -20,12 +20,12 @@ mod workspace; #[cfg(feature = "extrinsics")] use sp_core::{crypto::Pair, sr25519, H256}; -#[cfg(feature = "extrinsics")] -use subxt::PairSigner; use std::{ convert::{TryFrom, TryInto}, path::PathBuf, }; +#[cfg(feature = "extrinsics")] +use subxt::PairSigner; use anyhow::{Error, Result}; use colored::Colorize; @@ -83,8 +83,9 @@ pub(crate) struct ExtrinsicOpts { #[cfg(feature = "extrinsics")] impl ExtrinsicOpts { pub fn signer(&self) -> Result> { - let pair = sr25519::Pair::from_string(&self.suri, self.password.as_ref().map(String::as_ref)) - .map_err(|_| anyhow::anyhow!("Secret string error"))?; + let pair = + sr25519::Pair::from_string(&self.suri, self.password.as_ref().map(String::as_ref)) + .map_err(|_| anyhow::anyhow!("Secret string error"))?; Ok(PairSigner::new(pair)) } } -- GitLab