From 9f709e5467c9c3aa66e4a2d123314f12b6588557 Mon Sep 17 00:00:00 2001 From: Tarek Date: Tue, 27 Jun 2023 16:59:43 +0300 Subject: [PATCH 1/5] feat: expose extrinsics operations as a library This commit introduces a library that exposes extrinsics operations as a reusable component. This makes it easier to integrate and reuse these operations in various projects. Signed-off-by: Tarek --- Cargo.lock | 816 ++++++++++-------- README.md | 8 +- crates/build/Cargo.toml | 2 +- crates/cargo-contract/Cargo.toml | 12 +- crates/cargo-contract/src/cmd/encode.rs | 6 +- crates/cargo-contract/src/cmd/info.rs | 28 +- crates/cargo-contract/src/cmd/mod.rs | 14 +- crates/extrinsics/Cargo.toml | 38 + crates/extrinsics/LICENSE | 202 +++++ .../extrinsics/README.md | 15 +- .../extrinsics => extrinsics/src}/balance.rs | 10 +- .../cmd/extrinsics => extrinsics/src}/call.rs | 22 +- .../extrinsics => extrinsics/src}/error.rs | 2 +- .../extrinsics => extrinsics/src}/events.rs | 8 +- .../src}/instantiate.rs | 26 +- .../src}/integration_tests.rs | 2 +- .../mod.rs => extrinsics/src/lib.rs} | 17 +- .../extrinsics => extrinsics/src}/remove.rs | 26 +- .../src}/runtime_api/contracts_runtime.scale | Bin .../cmd => extrinsics/src}/runtime_api/mod.rs | 4 +- .../extrinsics => extrinsics/src}/upload.rs | 32 +- crates/transcode/src/lib.rs | 2 +- 22 files changed, 801 insertions(+), 491 deletions(-) create mode 100644 crates/extrinsics/Cargo.toml create mode 100644 crates/extrinsics/LICENSE rename docs/extrinsics.md => crates/extrinsics/README.md (94%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/balance.rs (99%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/call.rs (97%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/error.rs (98%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/events.rs (97%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/instantiate.rs (97%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/integration_tests.rs (99%) rename crates/{cargo-contract/src/cmd/extrinsics/mod.rs => extrinsics/src/lib.rs} (98%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/remove.rs (93%) rename crates/{cargo-contract/src/cmd => extrinsics/src}/runtime_api/contracts_runtime.scale (100%) rename crates/{cargo-contract/src/cmd => extrinsics/src}/runtime_api/mod.rs (87%) rename crates/{cargo-contract/src/cmd/extrinsics => extrinsics/src}/upload.rs (93%) diff --git a/Cargo.lock b/Cargo.lock index de7b4efbe..a5bee635a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,7 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli", + "gimli 0.27.3", ] [[package]] @@ -33,7 +33,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.10", "once_cell", "version_check", ] @@ -45,20 +45,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2c99f64d1e06488f620f932677e24bc6e2897582980441ae90a671415bd7ec2f" dependencies = [ "cfg-if", - "getrandom 0.2.8", + "getrandom 0.2.10", "once_cell", "version_check", ] [[package]] name = "aho-corasick" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67fc08ce920c31afb70f013dcce1bfc3a3195de6a228474e45e1f145b36f8d04" +checksum = "43f6cb1bf222025340178f382c426f13757b2960e89779dfcb319c32542a5a41" dependencies = [ "memchr", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + [[package]] name = "android_system_properties" version = "0.1.5" @@ -79,9 +85,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.0" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e579a7752471abc2a8268df8b20005e3eadd975f585398f17efcfd8d4927371" +checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" dependencies = [ "anstyle", "anstyle-parse", @@ -94,15 +100,15 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41ed9a86bf92ae6580e0a31281f65a1b1d867c0cc68d5346e2ae128dddfa6a7d" +checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" [[package]] name = "anstyle-parse" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e765fd216e48e067936442276d1d57399e37bce53c264d6fefbe298080cb57ee" +checksum = "938874ff5980b03a87c5524b3ae5b59cf99b1d6bc836848df7bc5ada9643c333" dependencies = [ "utf8parse", ] @@ -118,9 +124,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bcd8291a340dd8ac70e18878bc4501dd7b4ff970cfa21c207d36ece51ea88fd" +checksum = "180abfa45703aebe0093f79badacc01b8fd4ea2e35118747e5811127f926e188" dependencies = [ "anstyle", "windows-sys 0.48.0", @@ -146,9 +152,9 @@ checksum = "3d62b7694a562cdf5a74227903507c56ab2cc8bdd1f781ed5cb4cf9c9f810bfc" [[package]] name = "arrayref" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" [[package]] name = "arrayvec" @@ -158,9 +164,9 @@ checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] name = "assert_cmd" @@ -206,9 +212,9 @@ dependencies = [ [[package]] name = "async-executor" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17adb73da160dfb475c183343c8cccd80721ea5a605d3eb57125f0a7b7a92d0b" +checksum = "6fa3dc5f2a8564f07759c008b9109dc0d39de92a88d5588b8a5036d286383afb" dependencies = [ "async-lock", "async-task", @@ -236,22 +242,22 @@ dependencies = [ [[package]] name = "async-io" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c374dda1ed3e7d8f0d9ba58715f924862c63eae6849c92d3a18e7fbde9e2794" +checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", + "cfg-if", "concurrent-queue", "futures-lite", - "libc", "log", "parking", "polling", + "rustix 0.37.20", "slab", "socket2", "waker-fn", - "windows-sys 0.42.0", ] [[package]] @@ -292,26 +298,26 @@ dependencies = [ [[package]] name = "async-task" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a40729d2133846d9ed0ea60a8b9541bccddab49cd30f0715a1da672fe9a2524" +checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.66" +version = "0.1.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b84f9ebcc6c1f5b8cb160f6990096a5c127f423fcb6e1ccc46c370cbdfb75dfc" +checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] name = "atomic-waker" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "debc29dde2e69f9e47506b525f639ed42300fc014a3e007832592448fa8e4599" +checksum = "1181e1e0d1fce796a03db1ae795d67167da795f9cf4a39c37589e85ef57f26d3" [[package]] name = "atty" @@ -341,7 +347,11 @@ dependencies = [ "cfg-if", "libc", "miniz_oxide", +<<<<<<< HEAD "object", +======= + "object 0.30.4", +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "rustc-demangle", ] @@ -359,9 +369,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" +checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" [[package]] name = "beef" @@ -405,7 +415,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -415,7 +425,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c2f0dc9a68c6317d884f97cc36cf5a3d20ba14ce404227df55e1af708ab04bc" dependencies = [ "arrayref", - "arrayvec 0.7.2", + "arrayvec 0.7.4", "constant_time_eq", ] @@ -437,7 +447,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -446,7 +456,7 @@ version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] @@ -460,9 +470,9 @@ dependencies = [ [[package]] name = "blocking" -version = "1.3.0" +version = "1.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c67b173a56acffd6d2326fb7ab938ba0b00a71480e14902b2591c87bc5741e8" +checksum = "77231a1c8f801696fc0123ec6150ce92cffb8e164a02afb9c8ddee0e9b65ad65" dependencies = [ "async-channel", "async-lock", @@ -470,13 +480,14 @@ dependencies = [ "atomic-waker", "fastrand", "futures-lite", + "log", ] [[package]] name = "borsh" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40f9ca3698b2e4cb7c15571db0abc5551dca417a21ae8140460b50309bb2cc62" +checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" dependencies = [ "borsh-derive", "hashbrown 0.13.2", @@ -484,9 +495,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598b3eacc6db9c3ee57b22707ad8f6a8d2f6d442bfe24ffeb8cbb70ca59e6a35" +checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", @@ -497,9 +508,9 @@ dependencies = [ [[package]] name = "borsh-derive-internal" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186b734fa1c9f6743e90c95d7233c9faab6360d1a96d4ffa19d9cfd1e9350f8a" +checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ "proc-macro2", "quote", @@ -508,9 +519,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99b7ff1008316626f485991b960ade129253d4034014616b94f309a15366cc49" +checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ "proc-macro2", "quote", @@ -535,7 +546,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "030ea61398f34f1395ccbeb046fb68c87b631d1f34567fed0f0f11fa35d18d8d" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", ] [[package]] @@ -546,9 +557,9 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bstr" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdb39cb703212f3c11973452c2861b972f757b021158f3516ba10f2fa8b2c1" +checksum = "a246e68bb43f6cd9db24bea052a53e40405417c5fb372e3d1a8a7f770a564ef5" dependencies = [ "memchr", "once_cell", @@ -558,9 +569,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.12.0" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" +checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" [[package]] name = "byte-slice-cast" @@ -576,9 +587,9 @@ checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" [[package]] name = "bytecheck" -version = "0.6.10" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13fe11640a23eb24562225322cd3e452b93a3d4091d62fab69c70542fcd17d1f" +checksum = "8b6372023ac861f6e6dc89c8344a8f398fb42aaba2b5dbc649ca0c0e9dbcb627" dependencies = [ "bytecheck_derive", "ptr_meta", @@ -587,9 +598,9 @@ dependencies = [ [[package]] name = "bytecheck_derive" -version = "0.6.10" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e31225543cb46f81a7e224762764f4a6a0f097b1db0b175f69e8065efaa42de5" +checksum = "a7ec4c6f261935ad534c0c22dbef2201b45918860eb1c574b972bd213a76af61" dependencies = [ "proc-macro2", "quote", @@ -627,22 +638,20 @@ dependencies = [ "clap", "colored", "contract-build", - "contract-metadata", + "contract-extrinsics", "contract-transcode", "current_platform", "hex", - "jsonrpsee 0.18.2", - "pallet-contracts-primitives", - "parity-scale-codec", "predicates", "regex", - "rust_decimal", - "scale-info", "serde", "serde_json", +<<<<<<< HEAD "sp-core", "sp-runtime", "sp-weights", +======= +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "substrate-build-script-utils", "subxt", "tempfile", @@ -692,12 +701,12 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.23" +version = "0.4.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" dependencies = [ + "android-tzdata", "iana-time-zone", - "num-integer", "num-traits", "winapi", ] @@ -745,9 +754,9 @@ checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" [[package]] name = "cmake" -version = "0.1.49" +version = "0.1.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db34956e100b30725f2eb215f90d4871051239535632f84fea3bc92722c66b7c" +checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" dependencies = [ "cc", ] @@ -781,18 +790,18 @@ dependencies = [ [[package]] name = "concurrent-queue" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c278839b831783b70278b14df4d45e1beb1aad306c07bb796637de9a0e323e8e" +checksum = "62ec6771ecfa0762d24683ee5a32ad78487a3d3afdc0fb8cae19d2c5deb50b7c" dependencies = [ "crossbeam-utils", ] [[package]] name = "constant_time_eq" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13418e745008f7349ec7e449155f419a61b92b58a99cc3616942b926825ec76b" +checksum = "21a53c0a4d288377e7415b53dcfc3c04da5cdc2cc95c8d5ac178b58f0b861ad6" [[package]] name = "contract-build" @@ -828,6 +837,33 @@ dependencies = [ "zip", ] +[[package]] +name = "contract-extrinsics" +version = "3.0.1" +dependencies = [ + "anyhow", + "async-std", + "clap", + "colored", + "contract-build", + "contract-metadata", + "contract-transcode", + "hex", + "jsonrpsee 0.18.2", + "pallet-contracts-primitives", + "parity-scale-codec", + "rust_decimal", + "scale-info", + "serde", + "serde_json", + "sp-core 21.0.0", + "sp-runtime 24.0.0", + "sp-weights 20.0.0", + "subxt", + "tracing", + "url", +] + [[package]] name = "contract-metadata" version = "3.0.1" @@ -883,9 +919,9 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +checksum = "e496a50fda8aacccc86d7529e2c1e0892dbd0f898a6b5645b5561b89c3210efa" [[package]] name = "cpp_demangle" @@ -898,9 +934,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.5" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +checksum = "03e69e28e9f7f77debdedbaafa2866e1de9ba56df55a8bd7cfc724c25a09987c" dependencies = [ "libc", ] @@ -925,9 +961,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c063cd8cc95f5c377ed0d4b49a4b21f632396ff690e8470c29b3359b346984b" +checksum = "5a22b2d63d4d1dc0b7f1b6b2747dd0088008a9be28b6ddf0b1e7d335e3037294" dependencies = [ "cfg-if", ] @@ -944,7 +980,7 @@ version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "typenum", ] @@ -954,7 +990,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -964,7 +1000,7 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", "subtle", ] @@ -1012,9 +1048,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.92" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a140f260e6f3f79013b8bfc65e7ce630c9ab4388c6a89c71e07226f49487b72" +checksum = "e88abab2f5abbe4c56e8f1fb431b784d710b709888f35755a160e62e33fe38e8" dependencies = [ "cc", "cxxbridge-flags", @@ -1024,9 +1060,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.92" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6383f459341ea689374bf0a42979739dc421874f112ff26f829b8040b8e613" +checksum = "5c0c11acd0e63bae27dcd2afced407063312771212b7a823b4fd72d633be30fb" dependencies = [ "cc", "codespan-reporting", @@ -1034,24 +1070,24 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] name = "cxxbridge-flags" -version = "1.0.92" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90201c1a650e95ccff1c8c0bb5a343213bdd317c6e600a93075bca2eff54ec97" +checksum = "8d3816ed957c008ccd4728485511e3d9aaf7db419aa321e3d2c5a2f3411e36c8" [[package]] name = "cxxbridge-macro" -version = "1.0.92" +version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b75aed41bb2e6367cae39e6326ef817a851db13c13e4f3263714ca3cfb8de56" +checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] @@ -1173,14 +1209,14 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "generic-array 0.14.6", + "generic-array 0.14.7", ] [[package]] name = "digest" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ "block-buffer 0.10.4", "crypto-common", @@ -1298,17 +1334,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88bffebc5d80432c9b140ee17875ff173a8ab62faad5b257da912bd2f6c1c0a1" -[[package]] -name = "errno" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f639046355ee4f37944e44f60642c6f3a7efa3cf6b78c78a0d989a8ce6c396a1" -dependencies = [ - "errno-dragonfly", - "libc", - "winapi", -] - [[package]] name = "errno" version = "0.3.1" @@ -1471,9 +1496,9 @@ checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964" [[package]] name = "futures-lite" -version = "1.12.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" +checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce" dependencies = [ "fastrand", "futures-core", @@ -1542,9 +1567,9 @@ dependencies = [ [[package]] name = "generic-array" -version = "0.14.6" +version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ "typenum", "version_check", @@ -1563,9 +1588,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" +checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", "js-sys", @@ -1576,9 +1601,23 @@ dependencies = [ [[package]] name = "gimli" +<<<<<<< HEAD version = "0.27.2" +======= +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0a93d233ebf96623465aad4046a8d3aa4da22d4f4beba5388838c8a434bbb4" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +dependencies = [ + "fallible-iterator", + "stable_deref_trait", +] + +[[package]] +name = "gimli" +version = "0.27.3" +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ "fallible-iterator", "indexmap 1.9.3", @@ -1605,9 +1644,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.18" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17f8a914c2987b688368b5138aa05321db91f4090cf26118185672ad588bce21" +checksum = "97ec8491ebaf99c8eaa73058b045fe58073cd6be7f596ac993ced0b0a0c01049" dependencies = [ "bytes", "fnv", @@ -1723,7 +1762,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -1733,7 +1772,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", - "generic-array 0.14.6", + "generic-array 0.14.7", "hmac 0.8.1", ] @@ -1779,9 +1818,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.24" +version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e011372fa0b68db8350aa7a248930ecc7839bf46d8485577d69f117a75f164c" +checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ "bytes", "futures-channel", @@ -1819,26 +1858,25 @@ dependencies = [ [[package]] name = "iana-time-zone" -version = "0.1.53" +version = "0.1.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +checksum = "2fad5b825842d2b38bd206f3e81d6957625fd7f0a361e345c30e01a0ae2dd613" dependencies = [ "android_system_properties", "core-foundation-sys", "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi", + "windows", ] [[package]] name = "iana-time-zone-haiku" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "cxx", - "cxx-build", + "cc", ] [[package]] @@ -1915,9 +1953,9 @@ dependencies = [ [[package]] name = "ink" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b374fcb3c9b91f8293bdc93d69292e2ec6ea19e97e00725806d79bf563fa5e55" +checksum = "311a988dada2242dc748834b86f330bb37ff25482ceef8767104f512a3c465a7" dependencies = [ "derive_more", "ink_env", @@ -1931,18 +1969,18 @@ dependencies = [ [[package]] name = "ink_allocator" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cdc9dbbc38d0e0cd7b053068112ca8ab8140b8ece33b9e197af5544ed3d97e1" +checksum = "5cb3178f207f6a37c3512142c8c6c2561a2aac61d60baa934d08d1e55a67d4a8" dependencies = [ "cfg-if", ] [[package]] name = "ink_codegen" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "251e64f2dd74e98329a05812f067f34e2b494a7b1325e538165e481378a72747" +checksum = "f0b22c0517e5c249d7997cb20e7bd6fbf2076708d39e7b114465c2cb9c1d5c9c" dependencies = [ "blake2", "derive_more", @@ -1964,24 +2002,24 @@ dependencies = [ [[package]] name = "ink_engine" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c4af49e092a93e65d1161ce31d23c2e57d724462c96a8944acd647a52787f0" +checksum = "3c9abc50b932893113e782761ac719c46214ecd10c423a3f626dce30a0c61b45" dependencies = [ "blake2", "derive_more", "ink_primitives", "parity-scale-codec", "secp256k1 0.27.0", - "sha2 0.10.6", + "sha2 0.10.7", "sha3", ] [[package]] name = "ink_env" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d5e1505c5deb7280743e4d7df72a91f52bbf4cb063f464c73f89dce00c70f92" +checksum = "aef653137381ff5f37ce2ff9130d11dd1b25f6e9734d97d687c3b953dee4d14f" dependencies = [ "arrayref", "blake2", @@ -2000,16 +2038,16 @@ dependencies = [ "scale-encode 0.1.2", "scale-info", "secp256k1 0.27.0", - "sha2 0.10.6", + "sha2 0.10.7", "sha3", "static_assertions", ] [[package]] name = "ink_ir" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c0e2d96fc6e5b5cb1696b8057e72958315076dbe3f427e8f7722a346344f27a" +checksum = "1bb9a2826cae9617d8ed2d547ed6e595deb334c1b69ff0a579abd86a76e48c30" dependencies = [ "blake2", "either", @@ -2021,9 +2059,9 @@ dependencies = [ [[package]] name = "ink_macro" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15abf802e89909c65b6c15d0c655beb3c7ab86309626effb5d9b330d97308114" +checksum = "c0399b6423e892efb4d39eb76ed9286e4e93fab8141f89b4f4348ee77065b81d" dependencies = [ "ink_codegen", "ink_ir", @@ -2032,14 +2070,14 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.22", - "synstructure 0.13.0", + "synstructure", ] [[package]] name = "ink_metadata" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4af082b4c2eb246d27b358411ef950811f851c1099aa507ba4bcdd7214d40ccd" +checksum = "d5fb2b5ad83f725a6d0c8886ca737964d0013a193ca2d21c7e514fd427672416" dependencies = [ "derive_more", "impl-serde", @@ -2051,18 +2089,18 @@ dependencies = [ [[package]] name = "ink_prelude" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0662ba1d4aa26f0fea36ce6ef9ef1e510e24c900597d703b148c8c23b675b9" +checksum = "6a6f174d742ff929abe66716ad8159f324441b4ff5161a3b0e282f416afbbac1" dependencies = [ "cfg-if", ] [[package]] name = "ink_primitives" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52693c5e74600f5bd4c0f6d447ba9c4e491e4edf685eaf9f9f347a3cb1cde66b" +checksum = "14b4e4772e1b9384233103c1f488df9854d24b3c16168bcf23613b7d98fb363f" dependencies = [ "derive_more", "ink_prelude", @@ -2075,9 +2113,9 @@ dependencies = [ [[package]] name = "ink_storage" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e02d898d2ff85c88126d284854e1198771be94282d44a5d77fdc8a9bce43e398" +checksum = "9a0f0858c90d5660dc6ec76d31388919a9609aab74723262ccf893d81aafd06c" dependencies = [ "array-init", "cfg-if", @@ -2093,9 +2131,9 @@ dependencies = [ [[package]] name = "ink_storage_traits" -version = "4.2.0" +version = "4.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec58d70937c1e1490a00b84e2eb9a799f1a5331dd0e5cc68d550de1dbf6a8f4" +checksum = "a4179f00b052e5955ab7535c1a69042a468771217e9db6a12de2cdbfcb03c861" dependencies = [ "ink_metadata", "ink_prelude", @@ -2135,14 +2173,14 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b6b32576413a8e69b90e952e4a026476040d81017b80445deda5f2d3921857" +checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" dependencies = [ "hermit-abi 0.3.1", "io-lifetimes", - "rustix 0.36.9", - "windows-sys 0.45.0", + "rustix 0.37.20", + "windows-sys 0.48.0", ] [[package]] @@ -2186,9 +2224,9 @@ checksum = "72167d68f5fce3b8655487b8038691a3c9984ee769590f93f2a631f4ad64e4f5" [[package]] name = "js-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445dde2150c55e483f3d8416706b97ec8e8237c307e5b7b4b8dd15e6af2a0730" +checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" dependencies = [ "wasm-bindgen", ] @@ -2251,7 +2289,7 @@ dependencies = [ "soketto", "thiserror", "tokio", - "tokio-rustls 0.24.0", + "tokio-rustls 0.24.1", "tokio-util", "tracing", ] @@ -2362,9 +2400,9 @@ dependencies = [ [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ "cpufeatures", ] @@ -2386,11 +2424,20 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.146" +version = "0.2.147" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + +[[package]] +<<<<<<< HEAD +======= +name = "libm" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f92be4933c13fd498862a9e02a3055f8a8d9c039ce33db97306fd5a6caa7f29b" +checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" [[package]] +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) name = "libsecp256k1" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2461,9 +2508,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "c1cc9717a20b1bb222f333e6a92fd32f7d8a18ddc5a3191a11af45dcbf4dcd16" dependencies = [ "autocfg", "scopeguard", @@ -2471,11 +2518,10 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" +checksum = "b06a4cde4c0f271a446782e3eff8de789548ce57dbc8eca9292c27f4a42004b4" dependencies = [ - "cfg-if", "value-bag", ] @@ -2514,11 +2560,11 @@ checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memfd" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b20a59d985586e4a5aef64564ac77299f8586d8be6cf9106a5a40207e8908efb" +checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.36.9", + "rustix 0.37.20", ] [[package]] @@ -2568,14 +2614,13 @@ dependencies = [ [[package]] name = "mio" -version = "0.8.6" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b9d9a46eff5b4ff64b45a9e316a6d1e0bc719ef429cbec4dc630684212bfdf9" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" dependencies = [ "libc", - "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2629,7 +2674,7 @@ version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "itoa", ] @@ -2664,9 +2709,25 @@ dependencies = [ [[package]] name = "object" +<<<<<<< HEAD version = "0.30.3" +======= +version = "0.29.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +dependencies = [ + "crc32fast", + "hashbrown 0.12.3", + "indexmap 1.9.3", + "memchr", +] + +[[package]] +name = "object" +version = "0.30.4" +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", "hashbrown 0.13.2", @@ -2676,9 +2737,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.17.1" +version = "1.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7e5500299e16ebb147ae15a00a942af264cf3688f47923b8fc2cd5858f23ad3" +checksum = "dd8b5dd2ae5ed71462c540258bedcb51965123ad7e7ccf4b9a8cafaa4a63576d" [[package]] name = "opaque-debug" @@ -2739,11 +2800,11 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.4.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "637935964ff85a605d114591d4d2c13c5d1ba2806dae97cea6bf180238a749ac" +checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "bitvec", "byte-slice-cast", "bytes", @@ -2754,9 +2815,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.1.4" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b26a931f824dd4eca30b3e43bb4f31cd5f0d3a403c5f5ff27106b805bfde7b" +checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -2772,9 +2833,9 @@ checksum = "e1ad0aff30c1da14b1254fcb2af73e1fa9a28670e584a626f53a369d0e157304" [[package]] name = "parking" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" +checksum = "14f2252c834a40ed9bb5422029649578e63aa341ac401f74e719dd1afda8394e" [[package]] name = "parking_lot" @@ -2788,15 +2849,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.7" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9069cbb9f99e3a5083476ccb29ceb1de18b9118cafa53e90c9551235de2b9521" +checksum = "93f00c865fe7cabf650081affecd3871070f26767e7b2070a3ffae14c654b447" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "smallvec", - "windows-sys 0.45.0", + "windows-targets 0.48.0", ] [[package]] @@ -2820,7 +2881,7 @@ version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", ] [[package]] @@ -2831,22 +2892,22 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad29a609b6bcd67fee905812e544992d216af9d755757c05ed2d0e15a74c6ecc" +checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.0.12" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "069bdb1e05adc7a8990dce9cc75370895fbe4e3d58b9b73bf1aee56359344a55" +checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] @@ -2869,9 +2930,9 @@ checksum = "e8d0eef3571242013a0d5dc84861c3ae4a652e56e12adf8bdc26ff5f8cb34c94" [[package]] name = "polling" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e1f879b2998099c2d69ab9605d145d5b661195627eccc680002c4918a7fb6fa" +checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags", @@ -2880,7 +2941,7 @@ dependencies = [ "libc", "log", "pin-project-lite", - "windows-sys 0.45.0", + "windows-sys 0.48.0", ] [[package]] @@ -2912,9 +2973,9 @@ checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" [[package]] name = "predicates-tree" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" +checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" dependencies = [ "predicates-core", "termtree", @@ -3100,7 +3161,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.8", + "getrandom 0.2.10", ] [[package]] @@ -3112,15 +3173,6 @@ dependencies = [ "rand_core 0.5.1", ] -[[package]] -name = "redox_syscall" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" -dependencies = [ - "bitflags", -] - [[package]] name = "redox_syscall" version = "0.3.5" @@ -3132,22 +3184,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9af2cf09ef80e610097515e80095b7f76660a92743c4185aff5406cd5ce3dd5" +checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c501201393982e275433bc55de7d6ae6f00e7699cd5572c5b57581cd69c881b" +checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] @@ -3208,23 +3260,26 @@ dependencies = [ [[package]] name = "rkyv" -version = "0.7.40" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c30f1d45d9aa61cbc8cd1eb87705470892289bb2d01943e7803b873a57404dc3" +checksum = "0200c8230b013893c0b2d6213d6ec64ed2b9be2e0e016682b7224ff82cff5c58" dependencies = [ + "bitvec", "bytecheck", "hashbrown 0.12.3", "ptr_meta", "rend", "rkyv_derive", "seahash", + "tinyvec", + "uuid", ] [[package]] name = "rkyv_derive" -version = "0.7.40" +version = "0.7.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff26ed6c7c4dfc2aa9480b86a60e3c7233543a270a680e10758a507c5a4ce476" +checksum = "b2e06b915b5c230a17d7a736d1e2e63ee753c256a8614ef3f5147b13a4f5541d" dependencies = [ "proc-macro2", "quote", @@ -3243,7 +3298,7 @@ version = "1.30.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0446843641c69436765a35a5a77088e28c2e6a12da93e84aa3ab1cd4aa5a042" dependencies = [ - "arrayvec 0.7.2", + "arrayvec 0.7.4", "borsh", "bytecheck", "byteorder", @@ -3257,9 +3312,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.21" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" +checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" [[package]] name = "rustc-hash" @@ -3284,12 +3339,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.36.9" +version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd5c6ff11fecd55b40746d1995a02f2eb375bf8c00d192d521ee09f42bef37bc" +checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ "bitflags", - "errno 0.2.8", + "errno", "io-lifetimes", "libc", "linux-raw-sys 0.1.4", @@ -3298,12 +3353,12 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.19" +version = "0.37.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acf8729d8542766f1b2cf77eb034d52f40d375bb8b615d0b147089946e16613d" +checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" dependencies = [ "bitflags", - "errno 0.3.1", + "errno", "io-lifetimes", "libc", "linux-raw-sys 0.3.8", @@ -3324,9 +3379,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.0" +version = "0.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07180898a28ed6a7f7ba2311594308f595e3dd2e3c3812fa0a80a47b45f17e5d" +checksum = "e32ca28af694bc1bbf399c33a516dbdf1c90090b8ab23c2bc24f834aa2247f5f" dependencies = [ "log", "ring", @@ -3336,9 +3391,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.6.2" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0167bac7a9f490495f3c33013e7722b53cb087ecbe082fb0c6387c96f634ea50" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" dependencies = [ "openssl-probe", "rustls-pemfile", @@ -3352,7 +3407,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" dependencies = [ - "base64 0.21.0", + "base64 0.21.2", ] [[package]] @@ -3663,9 +3718,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.8.2" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a332be01508d814fed64bf28f798a146d73792121129962fdf335bb3c49a4254" +checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ "bitflags", "core-foundation", @@ -3676,9 +3731,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" +checksum = "f51d0c0d83bec45f16480d0ce0058397a69e48fcdc52d1dc8855fb68acbd31a7" dependencies = [ "core-foundation-sys", "libc", @@ -3773,22 +3828,22 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.6" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +checksum = "479fb9d862239e610720565ca91403019f2f00410f1864c5aa7479b950a76ed8" dependencies = [ "cfg-if", "cpufeatures", - "digest 0.10.6", + "digest 0.10.7", ] [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest 0.10.6", + "digest 0.10.7", "keccak", ] @@ -3939,14 +3994,32 @@ dependencies = [ [[package]] name = "sp-core-hashing" +<<<<<<< HEAD +======= +version = "8.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" +dependencies = [ + "blake2b_simd", + "byteorder", + "digest 0.10.7", + "sha2 0.10.7", + "sha3", + "sp-std 7.0.0", + "twox-hash", +] + +[[package]] +name = "sp-core-hashing" +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68" dependencies = [ "blake2b_simd", "byteorder", - "digest 0.10.6", - "sha2 0.10.6", + "digest 0.10.7", + "sha2 0.10.7", "sha3", "sp-std", "twox-hash", @@ -4210,9 +4283,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.39.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecf0bd63593ef78eca595a7fc25e9a443ca46fe69fd472f8f09f5245cdcd769d" +checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" dependencies = [ "Inflector", "num-format", @@ -4325,7 +4398,7 @@ dependencies = [ "either", "frame-metadata", "futures", - "getrandom 0.2.8", + "getrandom 0.2.10", "hex", "impl-serde", "jsonrpsee 0.16.2", @@ -4414,18 +4487,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - [[package]] name = "synstructure" version = "0.13.0" @@ -4446,9 +4507,9 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "target-lexicon" -version = "0.12.6" +version = "0.12.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae9980cab1db3fceee2f6c6f643d5d8de2997c58ee8d25fb0cc8a9e9e7348e5" +checksum = "1b1c7f239eb94671427157bd93b3694320f3668d4e1eff08c7285366fd777fac" [[package]] name = "tempfile" @@ -4459,8 +4520,8 @@ dependencies = [ "autocfg", "cfg-if", "fastrand", - "redox_syscall 0.3.5", - "rustix 0.37.19", + "redox_syscall", + "rustix 0.37.20", "windows-sys 0.48.0", ] @@ -4485,9 +4546,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" [[package]] name = "thiserror" @@ -4531,7 +4592,7 @@ dependencies = [ "pbkdf2 0.11.0", "rand 0.8.5", "rustc-hash", - "sha2 0.10.6", + "sha2 0.10.7", "thiserror", "unicode-normalization", "wasm-bindgen", @@ -4594,19 +4655,19 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.24.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0d409377ff5b1e3ca6437aa86c1eb7d40c134bfec254e44c830defa92669db5" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ - "rustls 0.21.0", + "rustls 0.21.2", "tokio", ] [[package]] name = "tokio-stream" -version = "0.1.12" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb52b74f05dbf495a8fba459fdc331812b96aa086d9eb78101fa0d4569c3313" +checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", "pin-project-lite", @@ -4615,9 +4676,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.7" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5427d89453009325de0d8f342c9490009f76e999cb7672d77e46267448f7e6b2" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ "bytes", "futures-core", @@ -4691,20 +4752,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.23" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4017f8f45139870ca7e672686113917c71c7a6e02d4924eda67186083c03081a" +checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", ] [[package]] name = "tracing-core" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" +checksum = "0955b8137a1df6f1a2e9a37d8a6656291ff0297c1a97c24e0d8425fe2312f79a" dependencies = [ "once_cell", "valuable", @@ -4806,7 +4867,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" dependencies = [ "cfg-if", - "digest 0.10.6", + "digest 0.10.7", "rand 0.8.5", "static_assertions", ] @@ -4831,15 +4892,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.11" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524b68aca1d05e03fdf03fcdce2c6c94b6daf6d16861ddaa7e4f2b6638a9052c" +checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5464a87b239f13a63a501f2701565754bae92d243d4bb7eb12f6d57d2269bf4" +checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" [[package]] name = "unicode-normalization" @@ -4886,6 +4947,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" +[[package]] +name = "uuid" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d023da39d1fde5a8a3fe1f3e01ca9632ada0a63e9797de55a879d6e2236277be" + [[package]] name = "valuable" version = "0.1.0" @@ -4894,13 +4961,9 @@ checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] name = "value-bag" -version = "1.0.0-alpha.9" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2209b78d1249f7e6f3293657c9779fe31ced465df091bbd433a1cf88e916ec55" -dependencies = [ - "ctor", - "version_check", -] +checksum = "d92ccd67fb88503048c01b59152a04effd0782d035a83a6d256ce6085f08f4a3" [[package]] name = "version_check" @@ -4958,11 +5021,10 @@ dependencies = [ [[package]] name = "want" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" dependencies = [ - "log", "try-lock", ] @@ -4980,9 +5042,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31f8dcbc21f30d9b8f2ea926ecb58f6b91192c17e9d33594b3df58b2007ca53b" +checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -4990,24 +5052,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ce90fd5bcc06af55a641a86428ee4229e44e07033963a2290a8e241607ccb9" +checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.34" +version = "0.4.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f219e0d211ba40266969f6dbdd90636da12f75bee4fc9d6c23d1260dadb51454" +checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" dependencies = [ "cfg-if", "js-sys", @@ -5017,9 +5079,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c21f77c0bedc37fd5dc21f897894a5ca01e7bb159884559461862ae90c0b4c5" +checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5027,22 +5089,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aff81306fcac3c7515ad4e177f521b5c9a15f2b08f4e32d823066102f35a5f6" +checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.22", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.84" +version = "0.2.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0046fef7e28c3804e5e38bfa31ea2a0f73905319b677e57ebe37e49358989b5d" +checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-opt" @@ -5106,7 +5168,11 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", +<<<<<<< HEAD "object", +======= + "object 0.30.4", +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "once_cell", "paste", "psm", @@ -5135,11 +5201,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", +<<<<<<< HEAD "cranelift-entity", "gimli", "indexmap 1.9.3", "log", "object", +======= + "cranelift-entity 0.95.1", + "gimli 0.27.3", + "indexmap 1.9.3", + "log", + "object 0.30.4", +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "serde", "target-lexicon", "thiserror", @@ -5158,9 +5232,15 @@ dependencies = [ "bincode", "cfg-if", "cpp_demangle", +<<<<<<< HEAD "gimli", "log", "object", +======= + "gimli 0.27.3", + "log", + "object 0.30.4", +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "rustc-demangle", "serde", "target-lexicon", @@ -5192,6 +5272,33 @@ dependencies = [ [[package]] name = "wasmtime-runtime" +<<<<<<< HEAD +======= +version = "6.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" +dependencies = [ + "anyhow", + "cc", + "cfg-if", + "indexmap 1.9.3", + "libc", + "log", + "mach", + "memfd", + "memoffset 0.6.5", + "paste", + "rand 0.8.5", + "rustix 0.36.14", + "wasmtime-asm-macros 6.0.2", + "wasmtime-environ 6.0.2", + "wasmtime-jit-debug 6.0.2", + "windows-sys 0.42.0", +] + +[[package]] +name = "wasmtime-runtime" +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" @@ -5207,10 +5314,17 @@ dependencies = [ "memoffset", "paste", "rand 0.8.5", +<<<<<<< HEAD "rustix 0.36.9", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", +======= + "rustix 0.36.14", + "wasmtime-asm-macros 8.0.1", + "wasmtime-environ 8.0.1", + "wasmtime-jit-debug 8.0.1", +>>>>>>> 46405ad (feat: expose extrinsics operations as a library) "windows-sys 0.45.0", ] @@ -5228,9 +5342,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.61" +version = "0.3.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33b99f4b23ba3eec1a53ac264e35a755f00e966e0065077d6027c0f575b0b97" +checksum = "9b85cbef8c220a6abc02aefd892dfc0fc23afb1c6a426316ec33253a3877249b" dependencies = [ "js-sys", "wasm-bindgen", @@ -5297,19 +5411,28 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" +dependencies = [ + "windows-targets 0.48.0", +] + [[package]] name = "windows-sys" version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "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_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -5318,7 +5441,7 @@ version = "0.45.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75283be5efb2831d37ea142365f009c02ec203cd29a3ebecbc093d52315b66d0" dependencies = [ - "windows-targets 0.42.1", + "windows-targets 0.42.2", ] [[package]] @@ -5332,17 +5455,17 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2522491fbfcd58cc84d47aeb2958948c4b8982e9a2d8a2a35bbaed431390e7" +checksum = "8e5180c00cd44c9b1c88adb3693291f1cd93605ded80c250a75d472756b4d071" dependencies = [ - "windows_aarch64_gnullvm 0.42.1", - "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_x86_64_gnullvm 0.42.1", - "windows_x86_64_msvc 0.42.1", + "windows_aarch64_gnullvm 0.42.2", + "windows_aarch64_msvc 0.42.2", + "windows_i686_gnu 0.42.2", + "windows_i686_msvc 0.42.2", + "windows_x86_64_gnu 0.42.2", + "windows_x86_64_gnullvm 0.42.2", + "windows_x86_64_msvc 0.42.2", ] [[package]] @@ -5362,9 +5485,9 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "597a5118570b68bc08d8d59125332c54f1ba9d9adeedeef5b99b02ba2b0698f8" [[package]] name = "windows_aarch64_gnullvm" @@ -5374,9 +5497,9 @@ checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "e08e8864a60f06ef0d0ff4ba04124db8b0fb3be5776a5cd47641e942e58c4d43" [[package]] name = "windows_aarch64_msvc" @@ -5386,9 +5509,9 @@ checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "c61d927d8da41da96a81f029489353e68739737d3beca43145c8afec9a31a84f" [[package]] name = "windows_i686_gnu" @@ -5398,9 +5521,9 @@ checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "44d840b6ec649f480a41c8d80f9c65108b92d89345dd94027bfe06ac444d1060" [[package]] name = "windows_i686_msvc" @@ -5410,9 +5533,9 @@ checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "8de912b8b8feb55c064867cf047dda097f92d51efad5b491dfb98f6bbb70cb36" [[package]] name = "windows_x86_64_gnu" @@ -5422,9 +5545,9 @@ checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "26d41b46a36d453748aedef1486d5c7a85db22e56aff34643984ea85514e94a3" [[package]] name = "windows_x86_64_gnullvm" @@ -5434,9 +5557,9 @@ checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.42.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "9aec5da331524158c6d1a4ac0ab1541149c0b9505fde06423b02f5ef0106b9f0" [[package]] name = "windows_x86_64_msvc" @@ -5446,9 +5569,9 @@ checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" [[package]] name = "winnow" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61de7bac303dc551fe038e2b3cef0f571087a47571ea6e79a87692ac99b99699" +checksum = "ca0ace3845f0d96209f0375e6d367e3eb87eb65d27d445bdc9f1843a26f39448" dependencies = [ "memchr", ] @@ -5482,23 +5605,22 @@ checksum = "e2a7eb6d82a11e4d0b8e6bda8347169aff4ccd8235d039bba7c47482d977dcf7" [[package]] name = "zeroize" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" +checksum = "2a0956f1ba7c7909bfb66c2e9e4124ab6f6482560f6628b5aaeba39207c9aad9" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", - "synstructure 0.12.6", + "syn 2.0.22", ] [[package]] diff --git a/README.md b/README.md index 4f81d3386..a793c74d2 100644 --- a/README.md +++ b/README.md @@ -106,15 +106,15 @@ artifact to the `target/` directory. ##### `cargo contract upload` -Upload a contract to a `pallet-contracts` enabled chain. See [extrinsics](docs/extrinsics.md). +Upload a contract to a `pallet-contracts` enabled chain. See [extrinsics](crates/extrinsics/README.md). ##### `cargo contract instantiate` -Create an instance of a contract on chain. See [extrinsics](docs/extrinsics.md). +Create an instance of a contract on chain. See [extrinsics](crates/extrinsics/README.md). ##### `cargo contract call` -Invoke a message on an existing contract on chain. See [extrinsics](docs/extrinsics.md). +Invoke a message on an existing contract on chain. See [extrinsics](crates/extrinsics/README.md). ##### `cargo contract decode` @@ -126,7 +126,7 @@ The argument has to be given as hex-encoding, starting with `0x`. ##### `cargo contract remove` -Remove a contract from a `pallet-contracts` enabled chain. See [extrinsics](docs/extrinsics.md). +Remove a contract from a `pallet-contracts` enabled chain. See [extrinsics](crates/extrinsics/README.md). ##### `cargo contract info` diff --git a/crates/build/Cargo.toml b/crates/build/Cargo.toml index 206a371b6..8e6af74e0 100644 --- a/crates/build/Cargo.toml +++ b/crates/build/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" license = "Apache-2.0" readme = "README.md" repository = "https://github.com/paritytech/cargo-contract" -documentation = "https://docs.rs/contract-metadata" +documentation = "https://docs.rs/contract-build" homepage = "https://www.substrate.io/" description = "Library for building ink! smart contracts" keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index cd6e1f9ef..e6d4400be 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -19,31 +19,21 @@ include = [ [dependencies] contract-build = { version = "3.0.1", path = "../build" } -contract-metadata = { version = "3.0.1", path = "../metadata" } +contract-extrinsics = { version = "3.0.1", path = "../extrinsics" } contract-transcode = { version = "3.0.1", path = "../transcode" } anyhow = "1.0.71" clap = { version = "4.3.10", features = ["derive", "env"] } tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } -scale = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] } which = "4.4.0" colored = "2.0.1" serde = { version = "1.0.165", default-features = false, features = ["derive"] } serde_json = "1.0.99" url = { version = "2.4.0", features = ["serde"] } -rust_decimal = "1.30" - -# dependencies for extrinsics (deploying and calling a contract) async-std = { version = "1.12.0", features = ["attributes", "tokio1"] } -sp-core = "21.0.0" -sp-runtime = "24.0.0" -sp-weights = "20.0.0" -pallet-contracts-primitives = "24.0.0" -scale-info = "2.8.0" subxt = "0.29.0" hex = "0.4.3" -jsonrpsee = { version = "0.18.2", features = ["ws-client"] } [build-dependencies] anyhow = "1.0.71" diff --git a/crates/cargo-contract/src/cmd/encode.rs b/crates/cargo-contract/src/cmd/encode.rs index 7d6420851..715e4aaf7 100644 --- a/crates/cargo-contract/src/cmd/encode.rs +++ b/crates/cargo-contract/src/cmd/encode.rs @@ -16,12 +16,10 @@ use std::path::PathBuf; -use crate::{ - cmd::extrinsics::ContractArtifacts, - DEFAULT_KEY_COL_WIDTH, -}; +use crate::DEFAULT_KEY_COL_WIDTH; use anyhow::Result; use colored::Colorize as _; +use contract_extrinsics::ContractArtifacts; #[derive(Debug, Clone, clap::Args)] #[clap( diff --git a/crates/cargo-contract/src/cmd/info.rs b/crates/cargo-contract/src/cmd/info.rs index b682bd962..157cdc7db 100644 --- a/crates/cargo-contract/src/cmd/info.rs +++ b/crates/cargo-contract/src/cmd/info.rs @@ -14,25 +14,23 @@ // You should have received a copy of the GNU General Public License // along with cargo-contract. If not, see . -use super::{ - runtime_api::api::{self,}, - Client, - DefaultConfig, -}; -use crate::{ - cmd::{ - extrinsics::MAX_KEY_COL_WIDTH, - runtime_api::api::runtime_types::pallet_contracts::storage::ContractInfo, - Balance, - CodeHash, - ErrorVariant, - }, - name_value_println, -}; +use super::DefaultConfig; +use crate::name_value_println; use anyhow::{ anyhow, Result, }; +use contract_extrinsics::{ + runtime_api::api::{ + runtime_types::pallet_contracts::storage::ContractInfo, + {self,}, + }, + Balance, + Client, + CodeHash, + ErrorVariant, + MAX_KEY_COL_WIDTH, +}; use std::fmt::Debug; use subxt::{ Config, diff --git a/crates/cargo-contract/src/cmd/mod.rs b/crates/cargo-contract/src/cmd/mod.rs index cf2fc0594..11ca62dbf 100644 --- a/crates/cargo-contract/src/cmd/mod.rs +++ b/crates/cargo-contract/src/cmd/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -18,7 +18,6 @@ pub mod build; pub mod decode; pub mod encode; pub mod info; -pub mod runtime_api; pub(crate) use self::{ build::{ @@ -28,9 +27,8 @@ pub(crate) use self::{ decode::DecodeCommand, info::InfoCommand, }; -mod extrinsics; -pub(crate) use self::extrinsics::{ +pub(crate) use contract_extrinsics::{ CallCommand, ErrorVariant, InstantiateCommand, @@ -38,12 +36,4 @@ pub(crate) use self::extrinsics::{ UploadCommand, }; -use subxt::{ - Config, - OnlineClient, -}; - pub use subxt::PolkadotConfig as DefaultConfig; -type Client = OnlineClient; -type Balance = u128; -type CodeHash = ::Hash; diff --git a/crates/extrinsics/Cargo.toml b/crates/extrinsics/Cargo.toml new file mode 100644 index 000000000..9d165d68b --- /dev/null +++ b/crates/extrinsics/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "contract-extrinsics" +version = "3.0.1" +authors = ["Parity Technologies "] +edition = "2021" + +license = "Apache-2.0" +readme = "README.md" +repository = "https://github.com/paritytech/cargo-contract" +documentation = "https://docs.rs/contract-extrinsics" +homepage = "https://www.substrate.io/" +description = "Library defining extrinsics for smart contracts on substrate" +keywords = ["wasm", "parity", "webassembly", "blockchain", "edsl"] +include = ["Cargo.toml", "*.rs", "LICENSE"] + +[dependencies] +contract-build = { version = "3.0.1", path = "../build" } +contract-metadata = { version = "3.0.1", path = "../metadata" } +contract-transcode = { version = "3.0.1", path = "../transcode" } + +anyhow = "1.0.71" +clap = { version = "4.3.5", features = ["derive", "env"] } +tracing = "0.1.37" +scale = { package = "parity-scale-codec", version = "3.0.0", features = ["derive"] } +colored = "2.0.0" +serde = { version = "1.0.164", default-features = false, features = ["derive"] } +serde_json = "1.0.97" +url = { version = "2.4.0", features = ["serde"] } +rust_decimal = "1.30" +async-std = { version = "1.12.0", features = ["attributes", "tokio1"] } +sp-core = "21.0.0" +sp-runtime = "24.0.0" +sp-weights = "20.0.0" +pallet-contracts-primitives = "24.0.0" +scale-info = "2.8.0" +subxt = "0.29.0" +hex = "0.4.3" +jsonrpsee = { version = "0.18.2", features = ["ws-client"] } diff --git a/crates/extrinsics/LICENSE b/crates/extrinsics/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/crates/extrinsics/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/docs/extrinsics.md b/crates/extrinsics/README.md similarity index 94% rename from docs/extrinsics.md rename to crates/extrinsics/README.md index 90b736a1d..fff127e68 100644 --- a/docs/extrinsics.md +++ b/crates/extrinsics/README.md @@ -1,6 +1,10 @@ -# Extrinsics -`cargo-contract` provides CLI support for uploading, instantiating, calling and removing your contracts directly from the command -line. +# Contract Extrinsics + +Defines the extrinsics for smart contracts targeting [substrate](https://github.com/paritytech/substrate). + +Currently part of [`cargo-contract`](https://github.com/paritytech/cargo-contract), the build tool for smart + contracts written in [ink!](https://github.com/paritytech/ink). + ## Common arguments @@ -125,8 +129,3 @@ argument to each of the extrinsic commands which allows specifying the contract - `cargo upload ../path/to/mycontract.wasm` - `cargo instantiate ../path/to/mycontract.contract` - `cargo call ..path/to/mycontract.json` - - - - - diff --git a/crates/cargo-contract/src/cmd/extrinsics/balance.rs b/crates/extrinsics/src/balance.rs similarity index 99% rename from crates/cargo-contract/src/cmd/extrinsics/balance.rs rename to crates/extrinsics/src/balance.rs index f7fbdf90f..1c25865f7 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/balance.rs +++ b/crates/extrinsics/src/balance.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -26,8 +26,10 @@ use rust_decimal::{ }; use serde_json::json; -use super::Client; -use crate::cmd::Balance; +use super::{ + Balance, + Client, +}; use anyhow::{ anyhow, @@ -239,7 +241,7 @@ impl BalanceVariant { /// by manipulating the token_decimals. /// /// If the number is divisible by 10^(`token_decimals` + `unit_zeros`), - /// It sets the [UnitPrefix] and divides the `value` into `Decimal` + /// It sets the `UnitPrefix` and divides the `value` into `Decimal` /// /// If no [TokenMetadata] was present, than that means /// that [Balance] is to be displayed in *normal* format diff --git a/crates/cargo-contract/src/cmd/extrinsics/call.rs b/crates/extrinsics/src/call.rs similarity index 97% rename from crates/cargo-contract/src/cmd/extrinsics/call.rs rename to crates/extrinsics/src/call.rs index 3f956cb04..d06fac2a6 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/call.rs +++ b/crates/extrinsics/src/call.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -16,13 +16,19 @@ use super::{ display_contract_exec_result, + display_contract_exec_result_debug, + display_dry_run_result_warning, + events::DisplayEvents, prompt_confirm_tx, + runtime_api::api, state_call, submit_extrinsic, + Balance, BalanceVariant, Client, ContractMessageTranscoder, DefaultConfig, + ErrorVariant, ExtrinsicOpts, PairSigner, StorageDeposit, @@ -30,19 +36,7 @@ use super::{ MAX_KEY_COL_WIDTH, }; -use crate::{ - cmd::{ - extrinsics::{ - display_contract_exec_result_debug, - display_dry_run_result_warning, - events::DisplayEvents, - ErrorVariant, - }, - runtime_api::api, - Balance, - }, - DEFAULT_KEY_COL_WIDTH, -}; +use crate::DEFAULT_KEY_COL_WIDTH; use contract_build::name_value_println; use anyhow::{ diff --git a/crates/cargo-contract/src/cmd/extrinsics/error.rs b/crates/extrinsics/src/error.rs similarity index 98% rename from crates/cargo-contract/src/cmd/extrinsics/error.rs rename to crates/extrinsics/src/error.rs index b960c643f..ace0c208d 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/error.rs +++ b/crates/extrinsics/src/error.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify diff --git a/crates/cargo-contract/src/cmd/extrinsics/events.rs b/crates/extrinsics/src/events.rs similarity index 97% rename from crates/cargo-contract/src/cmd/extrinsics/events.rs rename to crates/extrinsics/src/events.rs index df8b9ec44..91f60a4dc 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/events.rs +++ b/crates/extrinsics/src/events.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -15,14 +15,12 @@ // along with cargo-contract. If not, see . use super::{ + runtime_api::api::contracts::events::ContractEmitted, BalanceVariant, DefaultConfig, TokenMetadata, }; -use crate::{ - cmd::runtime_api::api::contracts::events::ContractEmitted, - DEFAULT_KEY_COL_WIDTH, -}; +use crate::DEFAULT_KEY_COL_WIDTH; use colored::Colorize as _; use contract_build::Verbosity; use contract_transcode::{ diff --git a/crates/cargo-contract/src/cmd/extrinsics/instantiate.rs b/crates/extrinsics/src/instantiate.rs similarity index 97% rename from crates/cargo-contract/src/cmd/extrinsics/instantiate.rs rename to crates/extrinsics/src/instantiate.rs index f81cd400b..40a2e99df 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/instantiate.rs +++ b/crates/extrinsics/src/instantiate.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -16,33 +16,27 @@ use super::{ display_contract_exec_result, + display_contract_exec_result_debug, + display_dry_run_result_warning, + events::DisplayEvents, prompt_confirm_tx, + runtime_api::api, state_call, submit_extrinsic, + Balance, BalanceVariant, Client, + CodeHash, ContractMessageTranscoder, DefaultConfig, + ErrorVariant, ExtrinsicOpts, PairSigner, StorageDeposit, + TokenMetadata, MAX_KEY_COL_WIDTH, }; -use crate::{ - cmd::{ - extrinsics::{ - display_contract_exec_result_debug, - display_dry_run_result_warning, - events::DisplayEvents, - ErrorVariant, - TokenMetadata, - }, - runtime_api::api, - Balance, - CodeHash, - }, - DEFAULT_KEY_COL_WIDTH, -}; +use crate::DEFAULT_KEY_COL_WIDTH; use anyhow::{ anyhow, Context, diff --git a/crates/cargo-contract/src/cmd/extrinsics/integration_tests.rs b/crates/extrinsics/src/integration_tests.rs similarity index 99% rename from crates/cargo-contract/src/cmd/extrinsics/integration_tests.rs rename to crates/extrinsics/src/integration_tests.rs index bf0a8e328..44a3b29f4 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/integration_tests.rs +++ b/crates/extrinsics/src/integration_tests.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify diff --git a/crates/cargo-contract/src/cmd/extrinsics/mod.rs b/crates/extrinsics/src/lib.rs similarity index 98% rename from crates/cargo-contract/src/cmd/extrinsics/mod.rs rename to crates/extrinsics/src/lib.rs index 411960f43..319fe7134 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/mod.rs +++ b/crates/extrinsics/src/lib.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -20,6 +20,7 @@ mod error; mod events; mod instantiate; mod remove; +pub mod runtime_api; mod upload; #[cfg(test)] @@ -46,19 +47,12 @@ use std::{ path::PathBuf, }; -use crate::{ - cmd::{ - Balance, - Client, - }, - DEFAULT_KEY_COL_WIDTH, -}; - use contract_build::{ name_value_println, CrateMetadata, Verbosity, VerbosityFlags, + DEFAULT_KEY_COL_WIDTH, }; use pallet_contracts_primitives::ContractResult; use scale::{ @@ -98,6 +92,9 @@ pub use subxt::PolkadotConfig as DefaultConfig; pub use upload::UploadCommand; type PairSigner = tx::PairSigner; +pub type Client = OnlineClient; +pub type Balance = u128; +pub type CodeHash = ::Hash; /// Arguments required for creating and sending an extrinsic to a substrate node. #[derive(Clone, Debug, clap::Args)] @@ -317,7 +314,7 @@ impl WasmCode { } } -/// Create a new [`PairSigner`] from the given [`sr25519::Pair`]. +/// Create a new `PairSigner` from the given [`sr25519::Pair`]. pub fn pair_signer(pair: sr25519::Pair) -> PairSigner { PairSigner::new(pair) } diff --git a/crates/cargo-contract/src/cmd/extrinsics/remove.rs b/crates/extrinsics/src/remove.rs similarity index 93% rename from crates/cargo-contract/src/cmd/extrinsics/remove.rs rename to crates/extrinsics/src/remove.rs index ae61a315d..451565a77 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/remove.rs +++ b/crates/extrinsics/src/remove.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2022 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -15,29 +15,23 @@ // along with cargo-contract. If not, see . use super::{ + events::DisplayEvents, + name_value_println, + parse_code_hash, + runtime_api::api::{ + self, + contracts::events::CodeRemoved, + }, submit_extrinsic, Client, + CodeHash, ContractMessageTranscoder, DefaultConfig, + ErrorVariant, ExtrinsicOpts, PairSigner, TokenMetadata, }; -use crate::{ - cmd::{ - extrinsics::{ - events::DisplayEvents, - parse_code_hash, - ErrorVariant, - }, - runtime_api::api::{ - self, - contracts::events::CodeRemoved, - }, - CodeHash, - }, - name_value_println, -}; use anyhow::Result; use std::fmt::Debug; use subxt::{ diff --git a/crates/cargo-contract/src/cmd/runtime_api/contracts_runtime.scale b/crates/extrinsics/src/runtime_api/contracts_runtime.scale similarity index 100% rename from crates/cargo-contract/src/cmd/runtime_api/contracts_runtime.scale rename to crates/extrinsics/src/runtime_api/contracts_runtime.scale diff --git a/crates/cargo-contract/src/cmd/runtime_api/mod.rs b/crates/extrinsics/src/runtime_api/mod.rs similarity index 87% rename from crates/cargo-contract/src/cmd/runtime_api/mod.rs rename to crates/extrinsics/src/runtime_api/mod.rs index 3a2c34ccb..5c94b7317 100644 --- a/crates/cargo-contract/src/cmd/runtime_api/mod.rs +++ b/crates/extrinsics/src/runtime_api/mod.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -17,7 +17,7 @@ #![allow(clippy::too_many_arguments)] #[subxt::subxt( - runtime_metadata_path = "src/cmd/runtime_api/contracts_runtime.scale", + runtime_metadata_path = "src/runtime_api/contracts_runtime.scale", substitute_type( path = "sp_weights::weight_v2::Weight", with = "::subxt::utils::Static<::sp_weights::Weight>" diff --git a/crates/cargo-contract/src/cmd/extrinsics/upload.rs b/crates/extrinsics/src/upload.rs similarity index 93% rename from crates/cargo-contract/src/cmd/extrinsics/upload.rs rename to crates/extrinsics/src/upload.rs index 0fa31db90..d2dceb5c5 100644 --- a/crates/cargo-contract/src/cmd/extrinsics/upload.rs +++ b/crates/extrinsics/src/upload.rs @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Parity Technologies (UK) Ltd. +// Copyright 2018-2023 Parity Technologies (UK) Ltd. // This file is part of cargo-contract. // // cargo-contract is free software: you can redistribute it and/or modify @@ -16,29 +16,23 @@ use super::{ display_dry_run_result_warning, + events::DisplayEvents, + name_value_println, + runtime_api::api::{ + self, + runtime_types::pallet_contracts::wasm::Determinism, + }, state_call, submit_extrinsic, + Balance, Client, + CodeHash, DefaultConfig, + ErrorVariant, ExtrinsicOpts, PairSigner, TokenMetadata, -}; -use crate::{ - cmd::{ - extrinsics::{ - events::DisplayEvents, - ErrorVariant, - WasmCode, - }, - runtime_api::api::{ - self, - runtime_types::pallet_contracts::wasm::Determinism, - }, - Balance, - CodeHash, - }, - name_value_println, + WasmCode, }; use anyhow::Result; use pallet_contracts_primitives::CodeUploadResult; @@ -122,7 +116,7 @@ impl UploadCommand { return Err(anyhow::anyhow!( "This contract has already been uploaded with code hash: 0x{code_hash}" ) - .into()) + .into()); } Ok(()) }) @@ -160,7 +154,7 @@ impl UploadCommand { let token_metadata = TokenMetadata::query(client).await?; let storage_deposit_limit = self.extrinsic_opts.storage_deposit_limit(&token_metadata)?; - let call = crate::cmd::runtime_api::api::tx().contracts().upload_code( + let call = crate::runtime_api::api::tx().contracts().upload_code( code.0, storage_deposit_limit, Determinism::Enforced, diff --git a/crates/transcode/src/lib.rs b/crates/transcode/src/lib.rs index 81735058f..61906699a 100644 --- a/crates/transcode/src/lib.rs +++ b/crates/transcode/src/lib.rs @@ -417,7 +417,7 @@ impl ContractMessageTranscoder { data.len(), arg_list_string, encoded_bytes - )) + )); } Ok(()) } From c29f060553203d99234a0ee157cc5bf46003dc92 Mon Sep 17 00:00:00 2001 From: Tarek Date: Wed, 28 Jun 2023 14:58:23 +0300 Subject: [PATCH 2/5] fix: move to the extrinsics crate This commit refines the code to avoid exposing the entire module Signed-off-by: Tarek --- Cargo.lock | 1 - crates/cargo-contract/src/cmd/info.rs | 70 +-------- crates/cargo-contract/src/main.rs | 1 - crates/extrinsics/LICENSE | 203 +------------------------- crates/extrinsics/src/call.rs | 2 +- crates/extrinsics/src/instantiate.rs | 2 +- crates/extrinsics/src/lib.rs | 68 ++++++++- 7 files changed, 73 insertions(+), 274 deletions(-) mode change 100644 => 120000 crates/extrinsics/LICENSE diff --git a/Cargo.lock b/Cargo.lock index a5bee635a..09717b291 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -644,7 +644,6 @@ dependencies = [ "hex", "predicates", "regex", - "serde", "serde_json", <<<<<<< HEAD "sp-core", diff --git a/crates/cargo-contract/src/cmd/info.rs b/crates/cargo-contract/src/cmd/info.rs index 157cdc7db..3486344bd 100644 --- a/crates/cargo-contract/src/cmd/info.rs +++ b/crates/cargo-contract/src/cmd/info.rs @@ -15,21 +15,13 @@ // along with cargo-contract. If not, see . use super::DefaultConfig; -use crate::name_value_println; use anyhow::{ anyhow, Result, }; use contract_extrinsics::{ - runtime_api::api::{ - runtime_types::pallet_contracts::storage::ContractInfo, - {self,}, - }, - Balance, - Client, - CodeHash, + fetch_contract_info, ErrorVariant, - MAX_KEY_COL_WIDTH, }; use std::fmt::Debug; use subxt::{ @@ -67,17 +59,10 @@ impl InfoCommand { let url = self.url.clone(); let client = OnlineClient::::from_url(url).await?; - let info_result = self.fetch_contract_info(&client).await?; + let info_result = fetch_contract_info(&self.contract, &client).await?; match info_result { - Some(info_result) => { - let convert_trie_id = hex::encode(info_result.trie_id.0); - let info_to_json = InfoToJson { - trie_id: convert_trie_id, - code_hash: info_result.code_hash, - storage_items: info_result.storage_items, - storage_item_deposit: info_result.storage_item_deposit, - }; + Some(info_to_json) => { if self.output_json { println!("{}", info_to_json.to_json()?); } else { @@ -95,53 +80,4 @@ impl InfoCommand { } }) } - - async fn fetch_contract_info(&self, client: &Client) -> Result> { - let info_contract_call = - api::storage().contracts().contract_info_of(&self.contract); - - let contract_info_of = client - .storage() - .at_latest() - .await? - .fetch(&info_contract_call) - .await?; - - Ok(contract_info_of) - } -} - -#[derive(serde::Serialize)] -struct InfoToJson { - trie_id: String, - code_hash: CodeHash, - storage_items: u32, - storage_item_deposit: Balance, -} - -impl InfoToJson { - /// Convert and return contract info in JSON format. - pub fn to_json(&self) -> Result { - Ok(serde_json::to_string_pretty(self)?) - } - - /// Display contract information in a formatted way - pub fn basic_display_format_contract_info(&self) { - name_value_println!("TrieId", format!("{}", self.trie_id), MAX_KEY_COL_WIDTH); - name_value_println!( - "Code Hash", - format!("{:?}", self.code_hash), - MAX_KEY_COL_WIDTH - ); - name_value_println!( - "Storage Items", - format!("{:?}", self.storage_items), - MAX_KEY_COL_WIDTH - ); - name_value_println!( - "Storage Deposit", - format!("{:?}", self.storage_item_deposit), - MAX_KEY_COL_WIDTH - ); - } } diff --git a/crates/cargo-contract/src/main.rs b/crates/cargo-contract/src/main.rs index f6c766ae4..42ff3c498 100644 --- a/crates/cargo-contract/src/main.rs +++ b/crates/cargo-contract/src/main.rs @@ -31,7 +31,6 @@ use self::cmd::{ }; use cmd::encode::EncodeCommand; use contract_build::{ - name_value_println, util::DEFAULT_KEY_COL_WIDTH, OutputType, }; diff --git a/crates/extrinsics/LICENSE b/crates/extrinsics/LICENSE deleted file mode 100644 index d64569567..000000000 --- a/crates/extrinsics/LICENSE +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/crates/extrinsics/LICENSE b/crates/extrinsics/LICENSE new file mode 120000 index 000000000..30cff7403 --- /dev/null +++ b/crates/extrinsics/LICENSE @@ -0,0 +1 @@ +../../LICENSE \ No newline at end of file diff --git a/crates/extrinsics/src/call.rs b/crates/extrinsics/src/call.rs index d06fac2a6..29b94d232 100644 --- a/crates/extrinsics/src/call.rs +++ b/crates/extrinsics/src/call.rs @@ -33,10 +33,10 @@ use super::{ PairSigner, StorageDeposit, TokenMetadata, + DEFAULT_KEY_COL_WIDTH, MAX_KEY_COL_WIDTH, }; -use crate::DEFAULT_KEY_COL_WIDTH; use contract_build::name_value_println; use anyhow::{ diff --git a/crates/extrinsics/src/instantiate.rs b/crates/extrinsics/src/instantiate.rs index 40a2e99df..71182f153 100644 --- a/crates/extrinsics/src/instantiate.rs +++ b/crates/extrinsics/src/instantiate.rs @@ -34,9 +34,9 @@ use super::{ PairSigner, StorageDeposit, TokenMetadata, + DEFAULT_KEY_COL_WIDTH, MAX_KEY_COL_WIDTH, }; -use crate::DEFAULT_KEY_COL_WIDTH; use anyhow::{ anyhow, Context, diff --git a/crates/extrinsics/src/lib.rs b/crates/extrinsics/src/lib.rs index 319fe7134..90763433d 100644 --- a/crates/extrinsics/src/lib.rs +++ b/crates/extrinsics/src/lib.rs @@ -20,13 +20,15 @@ mod error; mod events; mod instantiate; mod remove; -pub mod runtime_api; +mod runtime_api; mod upload; #[cfg(test)] #[cfg(feature = "integration-tests")] mod integration_tests; +use subxt::utils::AccountId32; + use anyhow::{ anyhow, Context, @@ -47,6 +49,7 @@ use std::{ path::PathBuf, }; +use crate::runtime_api::api::{self,}; use contract_build::{ name_value_println, CrateMetadata, @@ -466,6 +469,69 @@ pub fn parse_code_hash(input: &str) -> Result<::Hash> { Ok(arr.into()) } +/// Fetch the contract info from the storage using the provided client. +pub async fn fetch_contract_info( + contract: &AccountId32, + client: &Client, +) -> Result> { + let info_contract_call = api::storage().contracts().contract_info_of(contract); + + let contract_info_of = client + .storage() + .at_latest() + .await? + .fetch(&info_contract_call) + .await?; + + match contract_info_of { + Some(info_result) => { + let convert_trie_id = hex::encode(info_result.trie_id.0); + Ok(Some(ContractInfo { + trie_id: convert_trie_id, + code_hash: info_result.code_hash, + storage_items: info_result.storage_items, + storage_item_deposit: info_result.storage_item_deposit, + })) + } + None => Ok(None), + } +} + +#[derive(serde::Serialize)] +pub struct ContractInfo { + trie_id: String, + code_hash: CodeHash, + storage_items: u32, + storage_item_deposit: Balance, +} + +impl ContractInfo { + /// Convert and return contract info in JSON format. + pub fn to_json(&self) -> Result { + Ok(serde_json::to_string_pretty(self)?) + } + + /// Display contract information in a formatted way + pub fn basic_display_format_contract_info(&self) { + name_value_println!("TrieId", format!("{}", self.trie_id), MAX_KEY_COL_WIDTH); + name_value_println!( + "Code Hash", + format!("{:?}", self.code_hash), + MAX_KEY_COL_WIDTH + ); + name_value_println!( + "Storage Items", + format!("{:?}", self.storage_items), + MAX_KEY_COL_WIDTH + ); + name_value_println!( + "Storage Deposit", + format!("{:?}", self.storage_item_deposit), + MAX_KEY_COL_WIDTH + ); + } +} + /// Copy of `pallet_contracts_primitives::StorageDeposit` which implements `Serialize`, /// required for json output. #[derive(Eq, PartialEq, Ord, PartialOrd, Clone, serde::Serialize)] From aaf2c9c32f717ffba577f83ff340404cfffe99b6 Mon Sep 17 00:00:00 2001 From: Tarek Date: Tue, 4 Jul 2023 03:03:49 +0300 Subject: [PATCH 3/5] fix(extrinsics): update docs to initialize BalanceVariant from string This commit exposes DenominatedBalance and UnitPrefix. This commit also refactors 3 docs examples to initialize BalanceVariant from string because its fields are private Signed-off-by: Tarek --- crates/extrinsics/src/balance.rs | 52 ++++++++++++++------------------ crates/extrinsics/src/lib.rs | 2 ++ 2 files changed, 24 insertions(+), 30 deletions(-) diff --git a/crates/extrinsics/src/balance.rs b/crates/extrinsics/src/balance.rs index 1c25865f7..cae7ced0e 100644 --- a/crates/extrinsics/src/balance.rs +++ b/crates/extrinsics/src/balance.rs @@ -164,39 +164,34 @@ impl BalanceVariant { /// Throws Error if `value` is of nigher precision that allowed. /// /// ```rust - /// use anyhow::{ - /// Ok, - /// Result, + /// use contract_extrinsics::{ + /// BalanceVariant, + /// TokenMetadata, /// }; /// let decimals = 6; /// let tm = TokenMetadata { /// token_decimals: decimals, /// symbol: String::from("DOT"), /// }; - /// let sample_den_balance = Balance::Denominated(DenominatedBalance { - /// value: Decimal::new(4, 1), - /// unit: UnitPrefix::Micro, - /// symbol: String::new("DOT"), - /// }); - /// let result = sample_den_balance.denominate_balance(tm); + /// let sample_den_balance: BalanceVariant = "0.4\u{3bc}DOT".parse().unwrap(); + /// let result = sample_den_balance.denominate_balance(&tm); /// assert!(result.is_err()); /// ``` /// /// Otherwise, [Balance] is returned: /// ```rust - /// use anyhow::{Result, Ok}; - /// let decimals = 6; - /// let tm = TokenMetadata { - /// token_decimals: decimals, - /// symbol: String::from("DOT"), + /// use contract_extrinsics::{ + /// BalanceVariant, + /// TokenMetadata, /// }; - /// let sample_den_balance = Balance::Denominated(DenominatedBalance { - /// value: Decimal::new(4123, 0), - /// unit: UnitPrefix::Micro, - /// symbol: String::new("DOT") - /// }); + /// let decimals = 6; + /// let tm = TokenMetadata { + /// token_decimals: decimals, + /// symbol: String::from("DOT"), + /// }; + /// let sample_den_balance: BalanceVariant = "4123\u{3bc}DOT".parse().unwrap(); /// let balance = 4123; - /// let result = sample_den_balance.denominate_balance(tm).unwrap() + /// let result = sample_den_balance.denominate_balance(&tm).unwrap(); /// assert_eq!(balance, result); /// ``` pub fn denominate_balance(&self, token_metadata: &TokenMetadata) -> Result { @@ -249,23 +244,20 @@ impl BalanceVariant { /// /// # Examples /// ```rust - /// use anyhow::{ - /// Ok, - /// Result, + /// use contract_extrinsics::{ + /// Balance, + /// BalanceVariant, + /// TokenMetadata, /// }; /// let decimals = 10; /// let tm = TokenMetadata { /// token_decimals: decimals, /// symbol: String::from("DOT"), /// }; - /// let sample_den_balance = BalanceVariant::Denominated(DenominatedBalance { - /// value: Decimal::new(5005, 1), - /// unit: UnitPrefix::Mega, - /// symbol: String::from("DOT"), - /// }); + /// let sample_den_balance: BalanceVariant = "500.5MDOT".parse().unwrap(); /// let balance: Balance = 5_005_000_000_000_000_000; - /// let den_balance = BalanceVariant::from(balance, Some(tm)); - /// assert_eq!(Ok(sample_den_balance), Ok(den_balance)); + /// let den_balance = BalanceVariant::from(balance, Some(&tm)).unwrap(); + /// assert_eq!(sample_den_balance, den_balance); /// ``` pub fn from>( value: T, diff --git a/crates/extrinsics/src/lib.rs b/crates/extrinsics/src/lib.rs index 90763433d..615ab2498 100644 --- a/crates/extrinsics/src/lib.rs +++ b/crates/extrinsics/src/lib.rs @@ -83,7 +83,9 @@ use std::{ pub use balance::{ BalanceVariant, + DenominatedBalance, TokenMetadata, + UnitPrefix, }; pub use call::CallCommand; use contract_metadata::ContractMetadata; From c0a6d00a2edd82cc33681f1f373950a2444c95d5 Mon Sep 17 00:00:00 2001 From: Tarek Date: Tue, 4 Jul 2023 03:21:35 +0300 Subject: [PATCH 4/5] fix(extrinsics): update cargo.toml file and run cargo build Signed-off-by: Tarek --- Cargo.lock | 414 ++++++++++++------------------- crates/cargo-contract/Cargo.toml | 1 - 2 files changed, 152 insertions(+), 263 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 09717b291..89a4a797a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -18,7 +18,16 @@ version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ - "gimli 0.27.3", + "gimli", +] + +[[package]] +name = "addr2line" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +dependencies = [ + "gimli", ] [[package]] @@ -254,7 +263,7 @@ dependencies = [ "log", "parking", "polling", - "rustix 0.37.20", + "rustix 0.37.22", "slab", "socket2", "waker-fn", @@ -304,13 +313,13 @@ checksum = "ecc7ab41815b3c653ccd2978ec3255c81349336702dfdf62ee6f7069b12a3aae" [[package]] name = "async-trait" -version = "0.1.68" +version = "0.1.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ccdd8f2a161be9bd5c023df56f1b2a0bd1d83872ae53b71a84a12c9bf6e842" +checksum = "7b2d0f03b3640e3a630367e40c468cb7f309529c708ed1d88597047b0e7c6ef7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -338,20 +347,16 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.67" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" +checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" dependencies = [ - "addr2line", + "addr2line 0.20.0", "cc", "cfg-if", "libc", "miniz_oxide", -<<<<<<< HEAD - "object", -======= - "object 0.30.4", ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) + "object 0.31.1", "rustc-demangle", ] @@ -397,6 +402,12 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[package]] +name = "bitflags" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "630be753d4e58660abd17930c71b647fe46c27ea6b63cc59e1e3851406972e42" + [[package]] name = "bitvec" version = "1.0.1" @@ -645,12 +656,6 @@ dependencies = [ "predicates", "regex", "serde_json", -<<<<<<< HEAD - "sp-core", - "sp-runtime", - "sp-weights", -======= ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) "substrate-build-script-utils", "subxt", "tempfile", @@ -742,7 +747,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -855,9 +860,9 @@ dependencies = [ "scale-info", "serde", "serde_json", - "sp-core 21.0.0", - "sp-runtime 24.0.0", - "sp-weights 20.0.0", + "sp-core", + "sp-runtime", + "sp-weights", "subxt", "tracing", "url", @@ -1069,7 +1074,7 @@ dependencies = [ "proc-macro2", "quote", "scratch", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1086,7 +1091,7 @@ checksum = "a26acccf6f445af85ea056362561a24ef56cdc15fcc685f03aec50b9c702cb6d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1134,7 +1139,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1156,7 +1161,7 @@ checksum = "29a358ff9f12ec09c3e61fef9b5a9902623a695a46a917b07f269bff1445611a" dependencies = [ "darling_core 0.20.1", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1516,7 +1521,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -1598,23 +1603,9 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "gimli" -<<<<<<< HEAD -version = "0.27.2" -======= -version = "0.26.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" -dependencies = [ - "fallible-iterator", - "stable_deref_trait", -] - [[package]] name = "gimli" version = "0.27.3" ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" dependencies = [ @@ -1714,15 +1705,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - [[package]] name = "hermit-abi" version = "0.3.1" @@ -1996,7 +1978,7 @@ dependencies = [ "quote", "serde", "serde_json", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -2053,7 +2035,7 @@ dependencies = [ "itertools 0.10.5", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -2068,7 +2050,7 @@ dependencies = [ "parity-scale-codec", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", "synstructure", ] @@ -2172,13 +2154,12 @@ dependencies = [ [[package]] name = "is-terminal" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adcf93614601c8129ddf72e2d5633df827ba6551541c6d8c59520a371475be1f" +checksum = "24fddda5af7e54bf7da53067d6e802dbcc381d0a8eef629df528e3ebf68755cb" dependencies = [ "hermit-abi 0.3.1", - "io-lifetimes", - "rustix 0.37.20", + "rustix 0.38.2", "windows-sys 0.48.0", ] @@ -2202,9 +2183,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "453ad9f582a441959e5f0d088b02ce04cfe8d51a8eaf077f12ac6d3e94164ca6" +checksum = "62b02a5381cc465bd3041d84623d0fa3b66738b52b8e2fc3bab8ad63ab032f4a" [[package]] name = "jobserver" @@ -2428,15 +2409,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" [[package]] -<<<<<<< HEAD -======= -name = "libm" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4" - -[[package]] ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) name = "libsecp256k1" version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -2486,9 +2458,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" +checksum = "9d240c6f7e1ba3a28b0249f774e6a9dd0175054b52dfbb61b16eb8505c3785c9" dependencies = [ "cc", ] @@ -2505,6 +2477,12 @@ version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" +[[package]] +name = "linux-raw-sys" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09fc20d2ca12cb9f044c93e3bd6d32d523e6e2ec3db4f7b2939cd99026ecd3f0" + [[package]] name = "lock_api" version = "0.4.10" @@ -2563,7 +2541,7 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffc89ccdc6e10d6907450f753537ebc5c5d3460d2e4e62ea74bd571db62c0f9e" dependencies = [ - "rustix 0.37.20", + "rustix 0.37.22", ] [[package]] @@ -2604,9 +2582,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.6.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" +checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" dependencies = [ "adler", ] @@ -2677,16 +2655,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "num-integer" -version = "0.1.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] - [[package]] name = "num-traits" version = "0.2.15" @@ -2698,39 +2666,32 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" dependencies = [ - "hermit-abi 0.2.6", + "hermit-abi 0.3.1", "libc", ] [[package]] name = "object" -<<<<<<< HEAD -version = "0.30.3" -======= -version = "0.29.0" +version = "0.30.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" dependencies = [ "crc32fast", - "hashbrown 0.12.3", + "hashbrown 0.13.2", "indexmap 1.9.3", "memchr", ] [[package]] name = "object" -version = "0.30.4" ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03b4680b86d9cfafba8fc491dc9b6df26b68cf40e9e6cd73909194759a63c385" +checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" dependencies = [ - "crc32fast", - "hashbrown 0.13.2", - "indexmap 1.9.3", "memchr", ] @@ -2789,7 +2750,7 @@ version = "24.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6fdf0acfe33532b58fe2d8859585c0e8b323ec0687eba26292c826333b366e82" dependencies = [ - "bitflags", + "bitflags 1.3.2", "parity-scale-codec", "scale-info", "sp-runtime", @@ -2799,9 +2760,9 @@ dependencies = [ [[package]] name = "parity-scale-codec" -version = "3.6.1" +version = "3.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2287753623c76f953acd29d15d8100bcab84d29db78fb6f352adb3c53e83b967" +checksum = "756d439303e94fae44f288ba881ad29670c65b0c4b0e05674ca81061bb65f2c5" dependencies = [ "arrayvec 0.7.4", "bitvec", @@ -2814,9 +2775,9 @@ dependencies = [ [[package]] name = "parity-scale-codec-derive" -version = "3.6.1" +version = "3.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6937b5e67bfba3351b87b040d48352a2fcb6ad72f81855412ce97b45c8f110" +checksum = "9d884d78fcf214d70b1e239fcd1c6e5e95aa3be1881918da2e488cc946c7a476" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -2856,14 +2817,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] name = "paste" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f746c4065a8fa3fe23974dd82f15431cc8d40779821001404d10d2e79ca7d79" +checksum = "b4b27ab7be369122c218afc2079489cdcb4b517c0a3fc386ff11e1fedfcc2b35" [[package]] name = "pbkdf2" @@ -2891,29 +2852,29 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pin-project" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c95a7476719eab1e366eaf73d0260af3021184f18177925b07f54b30089ceead" +checksum = "030ad2bc4db10a8944cb0d837f158bdfec4d4a4873ab701a95046770d11f8842" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.0" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39407670928234ebc5e6e580247dd567ad73a3578460c5990f9503df207e8f07" +checksum = "ec2e072ecce94ec471b13398d5402c188e76ac03cf74dd1a975161b23a3f6d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] name = "pin-project-lite" -version = "0.2.9" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" +checksum = "4c40d25201921e5ff0c862a505c6557ea88568a4e3ace775ab55e93f2f4f9d57" [[package]] name = "pin-utils" @@ -2934,7 +2895,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", - "bitflags", + "bitflags 1.3.2", "cfg-if", "concurrent-queue", "libc", @@ -3088,9 +3049,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.28" +version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ab9c7eadfd8df19006f1cf1a4aed13540ed5cbc047010ece5826e10825488" +checksum = "573015e8ab27661678357f27dc26460738fd2b6c86e46f386fde94cb5d913105" dependencies = [ "proc-macro2", ] @@ -3178,27 +3139,27 @@ version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "567664f262709473930a4bf9e51bf2ebf3348f2e748ccc50dea20646858f8f29" dependencies = [ - "bitflags", + "bitflags 1.3.2", ] [[package]] name = "ref-cast" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f43faa91b1c8b36841ee70e97188a869d37ae21759da6846d4be66de5bf7b12c" +checksum = "85d07b1a5f16b5548f4255a978c94259971aff73f39e8d67e8250e8b2f6667c3" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.16" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2275aab483050ab2a7364c1a46604865ee7d6906684e08db0f090acf74f9e7" +checksum = "a930b010d9effee5834317bb7ff406b76af7724348fd572b38705b4bd099fa92" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -3342,7 +3303,7 @@ version = "0.36.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14e4d67015953998ad0eb82887a0eb0129e18a7e2f3b7b0f6c422fddcd503d62" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -3352,11 +3313,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.37.20" +version = "0.37.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b96e891d04aa506a6d1f318d2771bcb1c7dfda84e126660ace067c9b474bb2c0" +checksum = "8818fa822adcc98b18fedbb3632a6a33213c070556b5aa7c4c8cc21cff565c4c" dependencies = [ - "bitflags", + "bitflags 1.3.2", "errno", "io-lifetimes", "libc", @@ -3364,6 +3325,19 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "rustix" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabcb0461ebd01d6b79945797c27f8529082226cb630a9865a71870ff63532a4" +dependencies = [ + "bitflags 2.3.3", + "errno", + "libc", + "linux-raw-sys 0.4.3", + "windows-sys 0.48.0", +] + [[package]] name = "rustls" version = "0.20.8" @@ -3402,9 +3376,9 @@ dependencies = [ [[package]] name = "rustls-pemfile" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d194b56d58803a43635bdc398cd17e383d6f71f9182b9a192c127ca42494a59b" +checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ "base64 0.21.2", ] @@ -3421,15 +3395,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.12" +version = "1.0.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f3208ce4d8448b3f3e7d168a73f5e0c43a61e32930de3bceeccedb388b6bf06" +checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f" [[package]] name = "ryu" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91339c0467de62360649f8d3e185ca8de4224ff281f66000de5eb2a77a79041" +checksum = "fe232bdf6be8c8de797b22184ee71118d63780ea42ac85b61d1baa6d3b782ae9" [[package]] name = "same-file" @@ -3560,9 +3534,9 @@ dependencies = [ [[package]] name = "scale-info" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad560913365790f17cbf12479491169f01b9d46d29cfc7422bf8c64bdc61b731" +checksum = "35c0a159d0c45c12b20c5a844feb1fe4bea86e28f17b92a5f0c42193634d3782" dependencies = [ "bitvec", "cfg-if", @@ -3574,9 +3548,9 @@ dependencies = [ [[package]] name = "scale-info-derive" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19df9bd9ace6cc2fe19387c96ce677e823e07d017ceed253e7bb3d1d1bd9c73b" +checksum = "912e55f6d20e0e80d63733872b40e1227c0bce1e1ab81ba67d696339bfd7fd29" dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", @@ -3606,11 +3580,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.21" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" +checksum = "0c3733bf4cf7ea0880754e19cb5a462007c4a8c1914bff372ccc95b464f1df88" dependencies = [ - "windows-sys 0.42.0", + "windows-sys 0.48.0", ] [[package]] @@ -3721,7 +3695,7 @@ version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fc758eb7bffce5b308734e9b0c1468893cae9ff70ebf13e7090be8dcbcc83a8" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "core-foundation-sys", "libc", @@ -3749,22 +3723,22 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.165" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c939f902bb7d0ccc5bce4f03297e161543c2dcb30914faf032c2bd0b7a0d48fc" +checksum = "d01b7404f9d441d3ad40e6a636a7782c377d2abdbe4fa2440e2edcc2f4f10db8" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.165" +version = "1.0.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6eaae920e25fffe4019b75ff65e7660e72091e59dd204cb5849bbd6a3fd343d7" +checksum = "5dd83d6dde2b6b2d466e14d9d1acce8816dedee94f735eac6395808b3483c6d6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -3953,7 +3927,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f18d9e2f67d8661f9729f35347069ac29d92758b59135176799db966947a7336" dependencies = [ "array-bytes", - "bitflags", + "bitflags 1.3.2", "blake2", "bounded-collections", "bs58", @@ -3993,24 +3967,6 @@ dependencies = [ [[package]] name = "sp-core-hashing" -<<<<<<< HEAD -======= -version = "8.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27449abdfbe41b473e625bce8113745e81d65777dd1d5a8462cf24137930dad8" -dependencies = [ - "blake2b_simd", - "byteorder", - "digest 0.10.7", - "sha2 0.10.7", - "sha3", - "sp-std 7.0.0", - "twox-hash", -] - -[[package]] -name = "sp-core-hashing" ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) version = "9.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2ee599a8399448e65197f9a6cee338ad192e9023e35e31f22382964c3c174c68" @@ -4032,7 +3988,7 @@ checksum = "c7f531814d2f16995144c74428830ccf7d94ff4a7749632b83ad8199b181140c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4163,7 +4119,7 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4282,9 +4238,9 @@ checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] name = "ss58-registry" -version = "1.40.0" +version = "1.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb47a8ad42e5fc72d5b1eb104a5546937eaf39843499948bb666d6e93c62423b" +checksum = "bfc443bad666016e012538782d9e3006213a7db43e9fb1dda91657dc06a6fa08" dependencies = [ "Inflector", "num-format", @@ -4328,7 +4284,7 @@ version = "0.25.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" dependencies = [ - "strum_macros 0.25.0", + "strum_macros 0.25.1", ] [[package]] @@ -4346,15 +4302,15 @@ dependencies = [ [[package]] name = "strum_macros" -version = "0.25.0" +version = "0.25.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9f3bd7d2e45dcc5e265fbb88d6513e4747d8ef9444cf01a533119bce28a157" +checksum = "6069ca09d878a33f883cc06aaa9718ede171841d3832450354410b718b097232" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4434,7 +4390,7 @@ dependencies = [ "quote", "scale-info", "subxt-metadata", - "syn 2.0.22", + "syn 2.0.23", "thiserror", "tokio", ] @@ -4448,7 +4404,7 @@ dependencies = [ "darling 0.20.1", "proc-macro-error", "subxt-codegen", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4477,9 +4433,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.22" +version = "2.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2efbeae7acf4eabd6bcdcbd11c92f45231ddda7539edc7806bd1a04a03b24616" +checksum = "59fb7d6d8281a51045d62b8eb3a7d1ce347b76f312af50cd3dc0af39c87c1737" dependencies = [ "proc-macro2", "quote", @@ -4494,7 +4450,7 @@ checksum = "285ba80e733fac80aa4270fbcdf83772a79b80aa35c97075320abfee4a915b06" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", "unicode-xid", ] @@ -4520,7 +4476,7 @@ dependencies = [ "cfg-if", "fastrand", "redox_syscall", - "rustix 0.37.20", + "rustix 0.37.22", "windows-sys 0.48.0", ] @@ -4566,7 +4522,7 @@ checksum = "f9456a42c5b0d803c8cd86e73dd7cc9edd429499f37a3550d286d5e86720569f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4615,11 +4571,12 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.28.2" +version = "1.29.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94d7b1cfd2aa4011f2de74c2c4c63665e27a71006b0a192dcd2710272e73dfa2" +checksum = "532826ff75199d5833b9d2c5fe410f29235e25704ee5f0ef599fb51c21f4a4da" dependencies = [ "autocfg", + "backtrace", "bytes", "libc", "mio", @@ -4638,7 +4595,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4757,7 +4714,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] @@ -4897,9 +4854,9 @@ checksum = "92888ba5573ff080736b3648696b70cafad7d250551175acbaa4e0385b3e1460" [[package]] name = "unicode-ident" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15811caf2415fb889178633e7724bad2509101cde276048e013b9def5e51fa0" +checksum = "22049a19f4a68748a168c0fc439f9516686aa045927ff767eca0a85101fb6e73" [[package]] name = "unicode-normalization" @@ -5060,7 +5017,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", "wasm-bindgen-shared", ] @@ -5094,7 +5051,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5167,11 +5124,7 @@ dependencies = [ "indexmap 1.9.3", "libc", "log", -<<<<<<< HEAD - "object", -======= "object 0.30.4", ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) "once_cell", "paste", "psm", @@ -5200,19 +5153,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a990198cee4197423045235bf89d3359e69bd2ea031005f4c2d901125955c949" dependencies = [ "anyhow", -<<<<<<< HEAD "cranelift-entity", "gimli", "indexmap 1.9.3", "log", - "object", -======= - "cranelift-entity 0.95.1", - "gimli 0.27.3", - "indexmap 1.9.3", - "log", "object 0.30.4", ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) "serde", "target-lexicon", "thiserror", @@ -5226,20 +5171,14 @@ version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0de48df552cfca1c9b750002d3e07b45772dd033b0b206d5c0968496abf31244" dependencies = [ - "addr2line", + "addr2line 0.19.0", "anyhow", "bincode", "cfg-if", "cpp_demangle", -<<<<<<< HEAD "gimli", "log", - "object", -======= - "gimli 0.27.3", - "log", "object 0.30.4", ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) "rustc-demangle", "serde", "target-lexicon", @@ -5271,33 +5210,6 @@ dependencies = [ [[package]] name = "wasmtime-runtime" -<<<<<<< HEAD -======= -version = "6.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e704b126e4252788ccfc3526d4d4511d4b23c521bf123e447ac726c14545217b" -dependencies = [ - "anyhow", - "cc", - "cfg-if", - "indexmap 1.9.3", - "libc", - "log", - "mach", - "memfd", - "memoffset 0.6.5", - "paste", - "rand 0.8.5", - "rustix 0.36.14", - "wasmtime-asm-macros 6.0.2", - "wasmtime-environ 6.0.2", - "wasmtime-jit-debug 6.0.2", - "windows-sys 0.42.0", -] - -[[package]] -name = "wasmtime-runtime" ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "658cf6f325232b6760e202e5255d823da5e348fdea827eff0a2a22319000b441" @@ -5313,17 +5225,10 @@ dependencies = [ "memoffset", "paste", "rand 0.8.5", -<<<<<<< HEAD - "rustix 0.36.9", + "rustix 0.36.14", "wasmtime-asm-macros", "wasmtime-environ", "wasmtime-jit-debug", -======= - "rustix 0.36.14", - "wasmtime-asm-macros 8.0.1", - "wasmtime-environ 8.0.1", - "wasmtime-jit-debug 8.0.1", ->>>>>>> 46405ad (feat: expose extrinsics operations as a library) "windows-sys 0.45.0", ] @@ -5416,22 +5321,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e686886bc078bc1b0b600cac0147aadb815089b6e4da64016cbd754b6342700f" dependencies = [ - "windows-targets 0.48.0", -] - -[[package]] -name = "windows-sys" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" -dependencies = [ - "windows_aarch64_gnullvm 0.42.2", - "windows_aarch64_msvc 0.42.2", - "windows_i686_gnu 0.42.2", - "windows_i686_msvc 0.42.2", - "windows_x86_64_gnu 0.42.2", - "windows_x86_64_gnullvm 0.42.2", - "windows_x86_64_msvc 0.42.2", + "windows-targets 0.48.1", ] [[package]] @@ -5449,7 +5339,7 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" dependencies = [ - "windows-targets 0.48.0", + "windows-targets 0.48.1", ] [[package]] @@ -5469,9 +5359,9 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.48.0" +version = "0.48.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b1eb6f0cd7c80c79759c929114ef071b87354ce476d9d94271031c0497adfd5" +checksum = "05d4b17490f70499f20b9e791dcf6a299785ce8af4d709018206dc5b4953e95f" dependencies = [ "windows_aarch64_gnullvm 0.48.0", "windows_aarch64_msvc 0.48.0", @@ -5619,7 +5509,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.22", + "syn 2.0.23", ] [[package]] diff --git a/crates/cargo-contract/Cargo.toml b/crates/cargo-contract/Cargo.toml index e6d4400be..72be3ea18 100644 --- a/crates/cargo-contract/Cargo.toml +++ b/crates/cargo-contract/Cargo.toml @@ -28,7 +28,6 @@ tracing = "0.1.37" tracing-subscriber = { version = "0.3.17", features = ["env-filter"] } which = "4.4.0" colored = "2.0.1" -serde = { version = "1.0.165", default-features = false, features = ["derive"] } serde_json = "1.0.99" url = { version = "2.4.0", features = ["serde"] } async-std = { version = "1.12.0", features = ["attributes", "tokio1"] } From c71a164a0295b8c87c9d89cdb0f1cdc927c9c5c0 Mon Sep 17 00:00:00 2001 From: Tarek Date: Tue, 4 Jul 2023 03:45:58 +0300 Subject: [PATCH 5/5] fix(extrinsics): avoid exposing DonomindatedBalance and UnitPrefix Signed-off-by: Tarek --- crates/extrinsics/src/lib.rs | 2 -- 1 file changed, 2 deletions(-) diff --git a/crates/extrinsics/src/lib.rs b/crates/extrinsics/src/lib.rs index 615ab2498..90763433d 100644 --- a/crates/extrinsics/src/lib.rs +++ b/crates/extrinsics/src/lib.rs @@ -83,9 +83,7 @@ use std::{ pub use balance::{ BalanceVariant, - DenominatedBalance, TokenMetadata, - UnitPrefix, }; pub use call::CallCommand; use contract_metadata::ContractMetadata;