diff --git a/CHANGELOG.md b/CHANGELOG.md index 5a93ef18c..4f4cdd6d6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Updated the toolchain version used by `ink_linting` - [#1616](https://github.com/paritytech/cargo-contract/pull/1616) +- Bump the version of `subxt` and `subxt-signer` - [#1722](https://github.com/use-ink/cargo-contract/pull/1722) + +### Removed +- Remove support for `V11` metadata [#1722](https://github.com/use-ink/cargo-contract/pull/1722) ## [4.1.1] diff --git a/Cargo.lock b/Cargo.lock index a72a51481..fec2b141d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -762,7 +762,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" dependencies = [ "borsh-derive", - "cfg_aliases", + "cfg_aliases 0.1.1", ] [[package]] @@ -953,6 +953,12 @@ dependencies = [ "once_cell", ] +[[package]] +name = "cesu8" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" + [[package]] name = "cfg-if" version = "1.0.0" @@ -965,6 +971,12 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chacha20" version = "0.9.1" @@ -1074,6 +1086,16 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "combine" +version = "4.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba5a308b75df32fe02788e748662718f03fde005016435c444eea572398219fd" +dependencies = [ + "bytes", + "memchr", +] + [[package]] name = "comfy-table" version = "7.1.1" @@ -1328,9 +1350,9 @@ dependencies = [ [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] @@ -1346,9 +1368,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crossterm" @@ -1617,6 +1639,17 @@ dependencies = [ "syn 2.0.61", ] +[[package]] +name = "derive-where" +version = "1.2.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62d671cc41a825ebabc75757b62d3d168c577f9149b2d49ece1dad1f72119d25" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.61", +] + [[package]] name = "derive_arbitrary" version = "1.3.2" @@ -1676,9 +1709,9 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", @@ -1833,9 +1866,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "elliptic-curve" @@ -1983,6 +2016,16 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38793c55593b33412e3ae40c2c9781ffaa6f438f6f8c10f24e71846fbd7ae01e" +[[package]] +name = "finito" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2384245d85162258a14b43567a9ee3598f5ae746a1581fb5d3d2cb780f0dbf95" +dependencies = [ + "futures-timer", + "pin-project", +] + [[package]] name = "fixed-hash" version = "0.8.0" @@ -2866,9 +2909,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2938,6 +2981,26 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jni" +version = "0.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6df18c2e3db7e453d3c6ac5b3e9d5182664d28788126d39b91f2d1e22b017ec" +dependencies = [ + "cesu8", + "combine", + "jni-sys", + "log", + "thiserror", + "walkdir", +] + +[[package]] +name = "jni-sys" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" + [[package]] name = "jobserver" version = "0.1.31" @@ -2968,10 +3031,21 @@ version = "0.22.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfdb12a2381ea5b2e68c3469ec604a007b367778cdb14d09612c8069ebd616ad" dependencies = [ - "jsonrpsee-client-transport", - "jsonrpsee-core", + "jsonrpsee-client-transport 0.22.5", + "jsonrpsee-core 0.22.5", "jsonrpsee-http-client", - "jsonrpsee-types", + "jsonrpsee-types 0.22.5", +] + +[[package]] +name = "jsonrpsee" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b089779ad7f80768693755a031cc14a7766aba707cbe886674e3f79e9b7e47" +dependencies = [ + "jsonrpsee-core 0.23.2", + "jsonrpsee-types 0.23.2", + "jsonrpsee-ws-client", ] [[package]] @@ -2982,11 +3056,11 @@ checksum = "4978087a58c3ab02efc5b07c5e5e2803024536106fd5506f558db172c889b3aa" dependencies = [ "futures-util", "http 0.2.12", - "jsonrpsee-core", + "jsonrpsee-core 0.22.5", "pin-project", "rustls-native-certs 0.7.0", "rustls-pki-types", - "soketto", + "soketto 0.7.1", "thiserror", "tokio", "tokio-rustls 0.25.0", @@ -2995,6 +3069,29 @@ dependencies = [ "url", ] +[[package]] +name = "jsonrpsee-client-transport" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08163edd8bcc466c33d79e10f695cdc98c00d1e6ddfb95cec41b6b0279dd5432" +dependencies = [ + "base64 0.22.1", + "futures-util", + "http 1.1.0", + "jsonrpsee-core 0.23.2", + "pin-project", + "rustls 0.23.7", + "rustls-pki-types", + "rustls-platform-verifier", + "soketto 0.8.0", + "thiserror", + "tokio", + "tokio-rustls 0.26.0", + "tokio-util", + "tracing", + "url", +] + [[package]] name = "jsonrpsee-core" version = "0.22.5" @@ -3007,7 +3104,29 @@ dependencies = [ "futures-timer", "futures-util", "hyper 0.14.28", - "jsonrpsee-types", + "jsonrpsee-types 0.22.5", + "pin-project", + "rustc-hash", + "serde", + "serde_json", + "thiserror", + "tokio", + "tokio-stream", + "tracing", +] + +[[package]] +name = "jsonrpsee-core" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79712302e737d23ca0daa178e752c9334846b08321d439fd89af9a384f8c830b" +dependencies = [ + "anyhow", + "async-trait", + "beef", + "futures-timer", + "futures-util", + "jsonrpsee-types 0.23.2", "pin-project", "rustc-hash", "serde", @@ -3027,8 +3146,8 @@ dependencies = [ "async-trait", "hyper 0.14.28", "hyper-rustls", - "jsonrpsee-core", - "jsonrpsee-types", + "jsonrpsee-core 0.22.5", + "jsonrpsee-types 0.22.5", "serde", "serde_json", "thiserror", @@ -3051,6 +3170,32 @@ dependencies = [ "thiserror", ] +[[package]] +name = "jsonrpsee-types" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c465fbe385238e861fdc4d1c85e04ada6c1fd246161d26385c1b311724d2af" +dependencies = [ + "beef", + "http 1.1.0", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "jsonrpsee-ws-client" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c28759775f5cb2f1ea9667672d3fe2b0e701d1f4b7b67954e60afe7fd058b5e" +dependencies = [ + "http 1.1.0", + "jsonrpsee-client-transport 0.23.2", + "jsonrpsee-core 0.23.2", + "jsonrpsee-types 0.23.2", + "url", +] + [[package]] name = "jsonschema" version = "0.18.0" @@ -3271,9 +3416,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memfd" @@ -3986,9 +4131,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad3d49ab951a01fbaafe34f2ec74122942fe18a3f9814c3268f1bb72042131b" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -4073,6 +4218,22 @@ dependencies = [ "getrandom", ] +[[package]] +name = "reconnecting-jsonrpsee-ws-client" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06fa4f17e09edfc3131636082faaec633c7baa269396b4004040bc6c52f49f65" +dependencies = [ + "cfg_aliases 0.2.1", + "finito", + "futures", + "jsonrpsee 0.23.2", + "serde_json", + "thiserror", + "tokio", + "tracing", +] + [[package]] name = "redox_syscall" version = "0.5.1" @@ -4347,6 +4508,21 @@ dependencies = [ "zeroize", ] +[[package]] +name = "rustls" +version = "0.23.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebbbdb961df0ad3f2652da8f3fdc4b36122f568f968f45ad3316f26c025c677b" +dependencies = [ + "log", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki 0.102.3", + "subtle", + "zeroize", +] + [[package]] name = "rustls-native-certs" version = "0.6.3" @@ -4397,6 +4573,33 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "976295e77ce332211c0d24d92c0e83e50f5c5f046d11082cea19f3df13a3562d" +[[package]] +name = "rustls-platform-verifier" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93bda3f493b9abe5b93b3e7e3ecde0df292f2bd28c0296b90586ee0055ff5123" +dependencies = [ + "core-foundation", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls 0.23.7", + "rustls-native-certs 0.7.0", + "rustls-platform-verifier-android", + "rustls-webpki 0.102.3", + "security-framework", + "security-framework-sys", + "webpki-roots", + "winapi", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.101.7" @@ -4462,9 +4665,9 @@ dependencies = [ [[package]] name = "scale-bits" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662d10dcd57b1c2a3c41c9cf68f71fb09747ada1ea932ad961aca7e2ca28315f" +checksum = "e57b1e7f6b65ed1f04e79a85a57d755ad56d76fdf1e9bddcc9ae14f71fcdcf54" dependencies = [ "parity-scale-codec", "scale-info", @@ -4488,15 +4691,15 @@ dependencies = [ [[package]] name = "scale-decode" -version = "0.11.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc79ba56a1c742f5aeeed1f1801f3edf51f7e818f0a54582cac6f131364ea7b" +checksum = "e98f3262c250d90e700bb802eb704e1f841e03331c2eb815e46516c4edbf5b27" dependencies = [ "derive_more", "parity-scale-codec", "primitive-types", - "scale-bits 0.5.0", - "scale-decode-derive 0.11.1", + "scale-bits 0.6.0", + "scale-decode-derive 0.13.1", "scale-type-resolver", "smallvec", ] @@ -4516,9 +4719,9 @@ dependencies = [ [[package]] name = "scale-decode-derive" -version = "0.11.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5398fdb3c7bea3cb419bac4983aadacae93fe1a7b5f693f4ebd98c3821aad7a5" +checksum = "9bb22f574168103cdd3133b19281639ca65ad985e24612728f727339dcaf4021" dependencies = [ "darling 0.14.4", "proc-macro2", @@ -4541,15 +4744,15 @@ dependencies = [ [[package]] name = "scale-encode" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628800925a33794fb5387781b883b5e14d130fece9af5a63613867b8de07c5c7" +checksum = "4ba0b9c48dc0eb20c60b083c29447c0c4617cb7c4a4c9fef72aa5c5bc539e15e" dependencies = [ "derive_more", "parity-scale-codec", "primitive-types", - "scale-bits 0.5.0", - "scale-encode-derive 0.6.0", + "scale-bits 0.6.0", + "scale-encode-derive 0.7.1", "scale-type-resolver", "smallvec", ] @@ -4569,9 +4772,9 @@ dependencies = [ [[package]] name = "scale-encode-derive" -version = "0.6.0" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a304e1af7cdfbe7a24e08b012721456cc8cecdedadc14b3d10513eada63233c" +checksum = "82ab7e60e2d9c8d47105f44527b26f04418e5e624ffc034f6b4a86c0ba19c5bf" dependencies = [ "darling 0.14.4", "proc-macro-crate 1.3.1", @@ -4609,9 +4812,9 @@ dependencies = [ [[package]] name = "scale-type-resolver" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10b800069bfd43374e0f96f653e0d46882a2cb16d6d961ac43bea80f26c76843" +checksum = "f0cded6518aa0bd6c1be2b88ac81bf7044992f0f154bfbabd5ad34f43512abcb" dependencies = [ "scale-info", "smallvec", @@ -4619,9 +4822,9 @@ dependencies = [ [[package]] name = "scale-typegen" -version = "0.2.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d470fa75e71b12b3244a4113adc4bc49891f3daba2054703cacd06256066397e" +checksum = "498d1aecf2ea61325d4511787c115791639c0fd21ef4f8e11e49dd09eff2bbac" dependencies = [ "proc-macro2", "quote", @@ -4632,9 +4835,9 @@ dependencies = [ [[package]] name = "scale-value" -version = "0.14.1" +version = "0.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c07ccfee963104335c971aaf8b7b0e749be8569116322df23f1f75c4ca9e4a28" +checksum = "5ab68da501822d2769c4c5823535f6104a6d4cd15f0d3eba3e647e725294ae22" dependencies = [ "base58", "blake2", @@ -4642,9 +4845,9 @@ dependencies = [ "either", "frame-metadata 15.1.0", "parity-scale-codec", - "scale-bits 0.5.0", - "scale-decode 0.11.1", - "scale-encode 0.6.0", + "scale-bits 0.6.0", + "scale-decode 0.13.1", + "scale-encode 0.7.1", "scale-info", "scale-type-resolver", "serde", @@ -4794,6 +4997,7 @@ dependencies = [ "core-foundation", "core-foundation-sys", "libc", + "num-bigint", "security-framework-sys", ] @@ -4818,9 +5022,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226b61a0d411b2ba5ff6d7f73a476ac4f8bb900373459cd00fab8512828ba395" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] @@ -4836,9 +5040,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.202" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6048858004bcff69094cd972ed40a32500f153bd3be9f716b2eed2e8217c4838" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", @@ -4939,6 +5143,17 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.9.9" @@ -5130,7 +5345,7 @@ dependencies = [ "siphasher", "slab", "smallvec", - "soketto", + "soketto 0.7.1", "twox-hash", "wasmi", "x25519-dalek", @@ -5198,6 +5413,21 @@ dependencies = [ "sha-1", ] +[[package]] +name = "soketto" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37468c595637c10857701c990f93a40ce0e357cedb0953d1c26c8d8027f9bb53" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures", + "httparse", + "log", + "rand", + "sha1", +] + [[package]] name = "sp-application-crypto" version = "33.0.0" @@ -5667,33 +5897,31 @@ checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" [[package]] name = "subxt" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd68bef23f4de5e513ab4c29af69053e232b098f9c87ab552d7ea153b4a1fbc5" +checksum = "a160cba1edbf3ec4fbbeaea3f1a185f70448116a6bccc8276bb39adb3b3053bd" dependencies = [ "async-trait", - "base58", - "blake2", - "derivative", + "derive-where", "either", "frame-metadata 16.0.0", "futures", "hex", "impl-serde", "instant", - "jsonrpsee", + "jsonrpsee 0.22.5", "parity-scale-codec", "primitive-types", - "scale-bits 0.5.0", - "scale-decode 0.11.1", - "scale-encode 0.6.0", + "reconnecting-jsonrpsee-ws-client", + "scale-bits 0.6.0", + "scale-decode 0.13.1", + "scale-encode 0.7.1", "scale-info", "scale-value", "serde", "serde_json", - "sp-core", "sp-crypto-hashing", - "sp-runtime", + "subxt-core", "subxt-lightclient", "subxt-macro", "subxt-metadata", @@ -5705,14 +5933,14 @@ dependencies = [ [[package]] name = "subxt-codegen" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d9e2b256b71d31a2629e44eb9cbfd944eb7d577c9e0c8e9802cc3c3943af2d9" +checksum = "d703dca0905cc5272d7cc27a4ac5f37dcaae7671acc7fef0200057cc8c317786" dependencies = [ "frame-metadata 16.0.0", - "heck 0.4.1", + "heck 0.5.0", "hex", - "jsonrpsee", + "jsonrpsee 0.22.5", "parity-scale-codec", "proc-macro2", "quote", @@ -5724,11 +5952,40 @@ dependencies = [ "tokio", ] +[[package]] +name = "subxt-core" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59f41eb2e2eea6ed45649508cc735f92c27f1fcfb15229e75f8270ea73177345" +dependencies = [ + "base58", + "blake2", + "derive-where", + "frame-metadata 16.0.0", + "hashbrown 0.14.5", + "hex", + "impl-serde", + "parity-scale-codec", + "primitive-types", + "scale-bits 0.6.0", + "scale-decode 0.13.1", + "scale-encode 0.7.1", + "scale-info", + "scale-value", + "serde", + "serde_json", + "sp-core", + "sp-crypto-hashing", + "sp-runtime", + "subxt-metadata", + "tracing", +] + [[package]] name = "subxt-lightclient" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d51f1ac12e3be7aafea4d037730a57da4f22f2e9c73955666081ffa2697c6f1" +checksum = "9d9406fbdb9548c110803cb8afa750f8b911d51eefdf95474b11319591d225d9" dependencies = [ "futures", "futures-util", @@ -5743,9 +6000,9 @@ dependencies = [ [[package]] name = "subxt-macro" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98dc84d7e6a0abd7ed407cce0bf60d7d58004f699460cffb979640717d1ab506" +checksum = "1c195f803d70687e409aba9be6c87115b5da8952cd83c4d13f2e043239818fcd" dependencies = [ "darling 0.20.8", "parity-scale-codec", @@ -5758,11 +6015,10 @@ dependencies = [ [[package]] name = "subxt-metadata" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc10c54028d079a9f1be65188707cd29e5ffd8d0031a2b1346a0941d57b7ab7e" +checksum = "738be5890fdeff899bbffff4d9c0f244fe2a952fb861301b937e3aa40ebb55da" dependencies = [ - "derive_more", "frame-metadata 16.0.0", "hashbrown 0.14.5", "parity-scale-codec", @@ -5772,13 +6028,12 @@ dependencies = [ [[package]] name = "subxt-signer" -version = "0.35.3" +version = "0.37.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ccb59a38fe357fab55247756174435e8626b93929864e8a498635a15e779df8" +checksum = "f49888ae6ae90fe01b471193528eea5bd4ed52d8eecd2d13f4a2333b87388850" dependencies = [ "bip39", "cfg-if", - "derive_more", "hex", "hmac 0.12.1", "parity-scale-codec", @@ -5789,7 +6044,7 @@ dependencies = [ "secrecy", "sha2 0.10.8", "sp-crypto-hashing", - "subxt", + "subxt-core", "zeroize", ] @@ -5895,18 +6150,18 @@ checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "579e9083ca58dd9dcf91a9923bb9054071b9ebbd800b342194c9feb0ee89fc18" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.60" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2470041c06ec3ac1ab38d0356a6119054dedaea53e12fbefc0de730a1c08524" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", @@ -6018,6 +6273,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls 0.23.7", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.15" @@ -6809,6 +7075,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.26.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd7c23921eeb1713a4e851530e9b9756e4fb0e89978582942612524cf09f01cd" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "which" version = "6.0.1" @@ -7181,14 +7456,15 @@ dependencies = [ [[package]] name = "zip" -version = "1.2.3" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c700ea425e148de30c29c580c1f9508b93ca57ad31c9f4e96b83c194c37a7a8f" +checksum = "dc5e4288ea4057ae23afc69a4472434a87a2495cafce6632fd1c4ec9f5cf3494" dependencies = [ "arbitrary", "crc32fast", "crossbeam-utils", "displaydoc", "indexmap 2.2.6", + "memchr", "thiserror", ] diff --git a/README.md b/README.md index 498dd9cae..ecd28ab8c 100644 --- a/README.md +++ b/README.md @@ -176,6 +176,9 @@ Fetch and display the storage of a contract on chain. Invoke an RPC call to the node. See [rpc](docs/rpc.md). +## Compatibility +Metadata Version: This project only supports metadata versions starting from `V14` and onwards. + ## Publishing In order to publish a new version of `cargo-contract`: diff --git a/crates/build/Cargo.toml b/crates/build/Cargo.toml index 414bab48f..b496e3de0 100644 --- a/crates/build/Cargo.toml +++ b/crates/build/Cargo.toml @@ -25,7 +25,9 @@ heck = "0.5.0" hex = "0.4.3" impl-serde = "0.4.0" rustc_version = "0.4.0" -scale = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] } +scale = { package = "parity-scale-codec", version = "3.0.0", features = [ + "derive", +] } toml = "0.8.13" tracing = "0.1.40" wasm-encoder = { version = "0.207.0", features = ["wasmparser"] } @@ -38,7 +40,7 @@ term_size = "0.3.2" url = { version = "2.5.0", features = ["serde"] } wasm-opt = { version = "=0.116.1", default-features = false } which = "6.0.1" -zip = { version = "1.2.3", default-features = false } +zip = { version = "2.2.0", default-features = false } strum = { version = "0.26", features = ["derive"] } tokio = { version = "1", features = ["macros", "rt-multi-thread"] } tokio-stream = "0.1" @@ -53,7 +55,7 @@ uzers = "0.12" [build-dependencies] anyhow = "1.0.83" walkdir = "2.5.0" -zip = { version = "1.2.3", default-features = false } +zip = { version = "2.2.0", default-features = false } [dev-dependencies] pretty_assertions = "1.4.0" diff --git a/crates/build/src/docker.rs b/crates/build/src/docker.rs index 95219d669..84bc9bf31 100644 --- a/crates/build/src/docker.rs +++ b/crates/build/src/docker.rs @@ -26,12 +26,11 @@ //! The process of the build is following: //! 1. Pull the image from the registry or use the local copy if available //! 2. Parse other arguments that were passed to the host execution context -//! 3. Calculate the digest of the command and use it -//! to uniquely identify the container +//! 3. Calculate the digest of the command and use it to uniquely identify the container //! 4. If the container exists, we just start the build, if not, we create it -//! 5. After the build, the docker container produces metadata with -//! paths relative to its internal storage structure, we parse the file -//! and overwrite those paths relative to the host machine. +//! 5. After the build, the docker container produces metadata with paths relative to its +//! internal storage structure, we parse the file and overwrite those paths relative to +//! the host machine. use std::{ cmp::Ordering, diff --git a/crates/build/src/lib.rs b/crates/build/src/lib.rs index 6048f0248..24570ee19 100644 --- a/crates/build/src/lib.rs +++ b/crates/build/src/lib.rs @@ -727,13 +727,9 @@ pub fn execute(args: ExecuteArgs) -> Result { Some(opt_passes) => *opt_passes, None => { let mut manifest = Manifest::new(manifest_path.clone())?; - - match manifest.profile_optimization_passes() { - // if no setting is found, neither on the cli nor in the profile, - // then we use the default - None => OptimizationPasses::default(), - Some(opt_passes) => opt_passes, - } + // if no setting is found, neither on the cli nor in the profile, + // then we use the default + manifest.profile_optimization_passes().unwrap_or_default() } }; diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index ba52b0f21..5b3ef94ed 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -43,7 +43,7 @@ comfy-table = "7.1.1" # dependencies for extrinsics (deploying and calling a contract) tokio = { version = "1", features = ["macros", "rt-multi-thread"] } -subxt = { version = "0.35.3", features = ["substrate-compat"] } +subxt = { version = "0.37.0", features = ["substrate-compat"] } sp-core = "31.0.0" sp-weights = "30.0.0" hex = "0.4.3" diff --git a/crates/extrinsics/Cargo.toml b/crates/extrinsics/Cargo.toml index f7f0154fd..da5910acc 100644 --- a/crates/extrinsics/Cargo.toml +++ b/crates/extrinsics/Cargo.toml @@ -36,7 +36,7 @@ sp-runtime = "34.0.0" sp-weights = "30.0.0" pallet-contracts-uapi = { package = "pallet-contracts-uapi-next", version = "=6.0.3", features = ["scale"] } scale-info = "2.11.3" -subxt = "0.35.3" +subxt = "0.37.0" hex = "0.4.3" derivative = "2.2.0" ink_metadata = "5.0.0" @@ -49,7 +49,7 @@ regex = "1.10.4" predicates = "3.1.0" tempfile = "3.10.1" tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } -subxt-signer = { version = "0.35.3", features = ["subxt", "sr25519"] } +subxt-signer = { version = "0.37.0", features = ["subxt", "sr25519"] } [features] integration-tests = [] diff --git a/crates/extrinsics/src/contract_info.rs b/crates/extrinsics/src/contract_info.rs index b8aa2f9ea..f5717f576 100644 --- a/crates/extrinsics/src/contract_info.rs +++ b/crates/extrinsics/src/contract_info.rs @@ -406,74 +406,6 @@ mod tests { .ok_or(anyhow!("Type not found")) } - #[test] - fn contract_info_v11_decode_works() { - // This version of metadata includes the deposit_account field in ContractInfo - #[subxt::subxt(runtime_metadata_path = "src/test_runtime_api/metadata_v11.scale")] - mod api_v11 {} - - use api_v11::runtime_types::{ - bounded_collections::bounded_vec::BoundedVec, - pallet_contracts::storage::{ - ContractInfo as ContractInfoV11, - DepositAccount, - }, - }; - - let metadata_bytes = std::fs::read("src/test_runtime_api/metadata_v11.scale") - .expect("the metadata must be present"); - let metadata = - Metadata::decode(&mut &*metadata_bytes).expect("the metadata must decode"); - let contract_info_type_id = get_metadata_type_index( - "ContractInfo", - "pallet_contracts::storage", - &metadata, - ) - .expect("the contract info type must be present in the metadata"); - - let contract_info_v11 = ContractInfoV11 { - trie_id: BoundedVec(vec![]), - deposit_account: DepositAccount(AccountId32([7u8; 32])), - code_hash: Default::default(), - storage_bytes: 1, - storage_items: 1, - storage_byte_deposit: 1, - storage_item_deposit: 1, - storage_base_deposit: 1, - }; - - let contract_info_thunk = DecodedValueThunk::decode_with_metadata( - &mut &*contract_info_v11.encode(), - contract_info_type_id as u32, - &metadata.into(), - ) - .expect("the contract info must be decoded"); - - let contract = AccountId32([0u8; 32]); - let contract_info_raw = - ContractInfoRaw::::new( - contract, - contract_info_thunk, - ) - .expect("the conatract info raw must be created"); - let account_data = AccountData { - free: 1, - reserved: 10, - }; - - let contract_info = contract_info_raw.into_contract_info(account_data.clone()); - assert_eq!( - contract_info, - ContractInfo { - trie_id: contract_info_v11.trie_id.0.into(), - code_hash: contract_info_v11.code_hash, - storage_items: contract_info_v11.storage_items, - storage_items_deposit: contract_info_v11.storage_item_deposit, - storage_total_deposit: account_data.free, - } - ); - } - #[test] fn contract_info_v15_decode_works() { // This version of metadata does not include the deposit_account field in diff --git a/crates/extrinsics/src/events.rs b/crates/extrinsics/src/events.rs index 447fe5f75..48f0fb24f 100644 --- a/crates/extrinsics/src/events.rs +++ b/crates/extrinsics/src/events.rs @@ -184,12 +184,14 @@ pub struct Event { /// Events produced from invoking a contract extrinsic. #[derive(serde::Serialize)] +#[allow(dead_code)] pub struct Events(Vec); /// Displays events produced from invoking a contract extrinsic. #[derive(serde::Serialize)] pub struct DisplayEvents(Vec); +#[allow(clippy::needless_borrows_for_generic_args)] impl DisplayEvents { /// Parses events and returns an object which can be serialised pub fn from_events( @@ -331,6 +333,7 @@ impl DisplayEvents { /// Construct the contract event data field, attempting to decode the event using the /// [`ContractMessageTranscoder`] if available. +#[allow(clippy::needless_borrows_for_generic_args)] fn contract_event_data_field( transcoder: Option<&ContractMessageTranscoder>, field_metadata: &scale_info::Field, diff --git a/crates/extrinsics/src/extrinsic_calls.rs b/crates/extrinsics/src/extrinsic_calls.rs index 97c63433a..d30a8beef 100644 --- a/crates/extrinsics/src/extrinsic_calls.rs +++ b/crates/extrinsics/src/extrinsic_calls.rs @@ -69,8 +69,8 @@ impl RemoveCode { Self { code_hash } } - pub fn build(self) -> subxt::tx::Payload { - subxt::tx::Payload::new("Contracts", "remove_code", self) + pub fn build(self) -> subxt::tx::DefaultPayload { + subxt::tx::DefaultPayload::new("Contracts", "remove_code", self) } } @@ -96,8 +96,8 @@ impl UploadCode { } } - pub fn build(self) -> subxt::tx::Payload { - subxt::tx::Payload::new("Contracts", "upload_code", self) + pub fn build(self) -> subxt::tx::DefaultPayload { + subxt::tx::DefaultPayload::new("Contracts", "upload_code", self) } } @@ -133,8 +133,8 @@ impl InstantiateWithCode { } } - pub fn build(self) -> subxt::tx::Payload { - subxt::tx::Payload::new("Contracts", "instantiate_with_code", self) + pub fn build(self) -> subxt::tx::DefaultPayload { + subxt::tx::DefaultPayload::new("Contracts", "instantiate_with_code", self) } } @@ -176,8 +176,8 @@ where } } - pub fn build(self) -> subxt::tx::Payload { - subxt::tx::Payload::new("Contracts", "instantiate", self) + pub fn build(self) -> subxt::tx::DefaultPayload { + subxt::tx::DefaultPayload::new("Contracts", "instantiate", self) } } @@ -210,7 +210,7 @@ impl Call { } } - pub fn build(self) -> subxt::tx::Payload { - subxt::tx::Payload::new("Contracts", "call", self) + pub fn build(self) -> subxt::tx::DefaultPayload { + subxt::tx::DefaultPayload::new("Contracts", "call", self) } } diff --git a/crates/extrinsics/src/lib.rs b/crates/extrinsics/src/lib.rs index cd0610953..1bcf41f6b 100644 --- a/crates/extrinsics/src/lib.rs +++ b/crates/extrinsics/src/lib.rs @@ -148,7 +148,7 @@ async fn submit_extrinsic( ) -> core::result::Result, subxt::Error> where C: Config, - Call: tx::TxPayload, + Call: tx::Payload, Signer: tx::Signer, >::Params: From< as ExtrinsicParams>::Params>, diff --git a/crates/extrinsics/src/test_runtime_api/metadata_v11.scale b/crates/extrinsics/src/test_runtime_api/metadata_v11.scale deleted file mode 100644 index d61d093ba..000000000 Binary files a/crates/extrinsics/src/test_runtime_api/metadata_v11.scale and /dev/null differ diff --git a/crates/extrinsics/src/test_runtime_api/metadata_v15.scale b/crates/extrinsics/src/test_runtime_api/metadata_v15.scale index e8d100211..1be9128de 100644 Binary files a/crates/extrinsics/src/test_runtime_api/metadata_v15.scale and b/crates/extrinsics/src/test_runtime_api/metadata_v15.scale differ diff --git a/crates/transcode/src/lib.rs b/crates/transcode/src/lib.rs index 90710b7e1..fa7ab7083 100644 --- a/crates/transcode/src/lib.rs +++ b/crates/transcode/src/lib.rs @@ -513,7 +513,7 @@ mod tests { use crate::scon::Hex; - #[allow(clippy::extra_unused_lifetimes)] + #[allow(clippy::extra_unused_lifetimes, unexpected_cfgs, non_local_definitions)] #[ink::contract] pub mod transcode { #[ink(storage)] diff --git a/crates/transcode/src/transcoder.rs b/crates/transcode/src/transcoder.rs index 87a8f8c9f..d14e0304c 100644 --- a/crates/transcode/src/transcoder.rs +++ b/crates/transcode/src/transcoder.rs @@ -275,31 +275,28 @@ mod tests { #[test] fn transcode_integers() -> Result<()> { - transcode_roundtrip::("-128", Value::Int(i8::min_value().into()))?; - transcode_roundtrip::("127", Value::Int(i8::max_value().into()))?; + transcode_roundtrip::("-128", Value::Int(i8::MIN.into()))?; + transcode_roundtrip::("127", Value::Int(i8::MAX.into()))?; - transcode_roundtrip::("-32768", Value::Int(i16::min_value().into()))?; - transcode_roundtrip::("32767", Value::Int(i16::max_value().into()))?; + transcode_roundtrip::("-32768", Value::Int(i16::MIN.into()))?; + transcode_roundtrip::("32767", Value::Int(i16::MAX.into()))?; - transcode_roundtrip::("-2147483648", Value::Int(i32::min_value().into()))?; - transcode_roundtrip::("2147483647", Value::Int(i32::max_value().into()))?; + transcode_roundtrip::("-2147483648", Value::Int(i32::MIN.into()))?; + transcode_roundtrip::("2147483647", Value::Int(i32::MAX.into()))?; - transcode_roundtrip::( - "-9223372036854775808", - Value::Int(i64::min_value().into()), - )?; + transcode_roundtrip::("-9223372036854775808", Value::Int(i64::MIN.into()))?; transcode_roundtrip::( "\"9_223_372_036_854_775_807\"", - Value::Int(i64::max_value().into()), + Value::Int(i64::MAX.into()), )?; transcode_roundtrip::( "-170141183460469231731687303715884105728", - Value::Int(i128::min_value()), + Value::Int(i128::MIN), )?; transcode_roundtrip::( "\"170141183460469231731687303715884105727\"", - Value::Int(i128::max_value()), + Value::Int(i128::MAX), ) }