diff --git a/Cargo.lock b/Cargo.lock index 9f34bd86..2353cc44 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -197,7 +197,7 @@ checksum = "0fc5b45d93ef0529756f812ca52e44c221b35341892d3dcc34132ac02f3dd2af" dependencies = [ "async-lock", "autocfg", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "futures-lite", "log", @@ -228,7 +228,7 @@ dependencies = [ "async-lock", "autocfg", "blocking", - "cfg-if 1.0.0", + "cfg-if", "event-listener", "futures-lite", "rustix 0.37.20", @@ -306,19 +306,13 @@ checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", "rustc-demangle", ] -[[package]] -name = "base64" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" - [[package]] name = "base64" version = "0.13.0" @@ -379,28 +373,16 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" -[[package]] -name = "bitvec" -version = "0.20.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7774144344a4faa177370406a7ff5f1da24303817368584c6206c8303eb07848" -dependencies = [ - "funty 1.1.0", - "radium 0.6.2", - "tap", - "wyz 0.2.0", -] - [[package]] name = "bitvec" version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "funty 2.0.0", - "radium 0.7.0", + "funty", + "radium", "tap", - "wyz 0.5.0", + "wyz", ] [[package]] @@ -486,7 +468,7 @@ checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" dependencies = [ "borsh-derive-internal 0.9.3", "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", + "proc-macro-crate", "proc-macro2", "syn 1.0.99", ] @@ -499,7 +481,7 @@ checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" dependencies = [ "borsh-derive-internal 0.10.3", "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", + "proc-macro-crate", "proc-macro2", "syn 1.0.99", ] @@ -578,12 +560,6 @@ version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1ad822118d20d2c234f427000d5acc36eabe1e29a348c89b63dd60b13f28e5d" -[[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" - [[package]] name = "byteorder" version = "1.4.3" @@ -755,12 +731,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -979,7 +949,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -988,7 +958,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", ] @@ -998,7 +968,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "51887d4adc7b564537b15adcfb307936f8075dfcd5f00dde9a9f1d29383682bc" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -1270,7 +1240,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -1395,7 +1365,7 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1517,7 +1487,7 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e94a7bbaa59354bc20dd75b67f23e2797b4490e9d6928203fb105c79e448c86c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.2.16", "windows-sys 0.36.1", @@ -1529,9 +1499,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "byteorder", - "rand 0.8.5", - "rustc-hex", "static_assertions", ] @@ -1607,12 +1574,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "673464e1e314dd67a0fd9544abc99e8eb28d0c7e3b69b033bcff9b2d00b87333" -[[package]] -name = "funty" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" - [[package]] name = "funty" version = "2.0.0" @@ -1739,7 +1700,7 @@ version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.9.0+wasi-snapshot-preview1", ] @@ -1750,7 +1711,7 @@ version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -2030,26 +1991,6 @@ dependencies = [ "unicode-normalization", ] -[[package]] -name = "impl-codec" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" -dependencies = [ - "parity-scale-codec", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.99", -] - [[package]] name = "indent_write" version = "2.2.0" @@ -2119,7 +2060,7 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2136,7 +2077,7 @@ dependencies = [ [[package]] name = "interactive-clap" version = "0.2.4" -source = "git+https://github.com/near-cli-rs/interactive-clap#2cc575c8de3c8745f513f2f07261dd1ba437fdd0" +source = "git+https://github.com/near-cli-rs/interactive-clap#2df6182314bda4f228ec06fbc78bd47f87671cbb" dependencies = [ "interactive-clap-derive 0.2.4 (git+https://github.com/near-cli-rs/interactive-clap)", "strum", @@ -2158,7 +2099,7 @@ dependencies = [ [[package]] name = "interactive-clap-derive" version = "0.2.4" -source = "git+https://github.com/near-cli-rs/interactive-clap#2cc575c8de3c8745f513f2f07261dd1ba437fdd0" +source = "git+https://github.com/near-cli-rs/interactive-clap#2df6182314bda4f228ec06fbc78bd47f87671cbb" dependencies = [ "proc-macro-error", "proc-macro2", @@ -2307,7 +2248,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "45ba81a1f5f24396b37211478aff7fbcd605dd4544df8dbed07b9da3c2057aee" dependencies = [ "byteorder", - "cfg-if 1.0.0", + "cfg-if", "hex 0.4.3", "hidapi", "ledger-transport", @@ -2342,7 +2283,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efbc0f03f9a775e9f6aed295c6a1ba2253c5757a9e03d55c6caa46a681abcddd" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "winapi", ] @@ -2409,7 +2350,7 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2526,16 +2467,6 @@ dependencies = [ "serde", ] -[[package]] -name = "near-account-id" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d258582a1878e6db67400b0504a5099db85718d22c2e07f747fe1706ae7150" -dependencies = [ - "borsh 0.9.3", - "serde", -] - [[package]] name = "near-account-id" version = "0.15.0" @@ -2556,25 +2487,6 @@ dependencies = [ "serde", ] -[[package]] -name = "near-chain-configs" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3632a1c691603cb32dd9944c95d8eadbf2c09f45abd95350ea6848c649036a0b" -dependencies = [ - "anyhow", - "chrono", - "derive_more", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "num-rational", - "serde", - "serde_json", - "sha2 0.10.3", - "smart-default 0.6.0", - "tracing", -] - [[package]] name = "near-chain-configs" version = "0.15.0" @@ -2616,29 +2528,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-chain-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a734353027698b21633a49d478e564c61ae0171c32f6912bb8844add15d72ebe" -dependencies = [ - "chrono", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "thiserror", - "tracing", -] - -[[package]] -name = "near-chunks-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17f6f22f1ab710731dfba4101f12a99cac120d6af80b99899bd335bb8971477" -dependencies = [ - "near-chain-primitives", - "near-primitives 0.14.0", -] - [[package]] name = "near-cli-rs" version = "0.5.2" @@ -2687,26 +2576,6 @@ dependencies = [ "url", ] -[[package]] -name = "near-client-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1065d86012eeea838661434549f33bb6267c9950fd2aadd2af617fe773def38" -dependencies = [ - "actix", - "chrono", - "near-chain-configs 0.14.0", - "near-chain-primitives", - "near-chunks-primitives", - "near-crypto 0.14.0", - "near-network-primitives", - "near-primitives 0.14.0", - "serde", - "serde_json", - "strum", - "thiserror", -] - [[package]] name = "near-config-utils" version = "0.17.0" @@ -2719,32 +2588,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-crypto" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e75673d69fd7365508f3d32483669fe45b03bfb34e4d9363e90adae9dfb416c" -dependencies = [ - "arrayref", - "blake2", - "borsh 0.9.3", - "bs58 0.4.0", - "c2-chacha", - "curve25519-dalek", - "derive_more", - "ed25519-dalek", - "near-account-id 0.14.0", - "once_cell", - "parity-secp256k1", - "primitive-types", - "rand 0.7.3", - "rand_core 0.5.1", - "serde", - "serde_json", - "subtle", - "thiserror", -] - [[package]] name = "near-crypto" version = "0.15.0" @@ -2845,23 +2688,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "near-jsonrpc-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34a14ee8ca393c0140cb232789259ebc61b13b4cceb177267d0131f50d0eda6c" -dependencies = [ - "near-chain-configs 0.14.0", - "near-client-primitives", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "near-rpc-error-macro 0.14.0", - "serde", - "serde_json", - "thiserror", - "uuid 0.8.2", -] - [[package]] name = "near-jsonrpc-primitives" version = "0.15.0" @@ -2906,24 +2732,6 @@ dependencies = [ "slip10", ] -[[package]] -name = "near-network-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aa998a1e70ebf8cf3efa76c4562ef36038cc88b4aee60efb708d14273910357" -dependencies = [ - "actix", - "anyhow", - "borsh 0.9.3", - "chrono", - "near-crypto 0.14.0", - "near-primitives 0.14.0", - "serde", - "strum", - "tokio", - "tracing", -] - [[package]] name = "near-o11y" version = "0.17.0" @@ -2950,35 +2758,6 @@ dependencies = [ "tracing-subscriber", ] -[[package]] -name = "near-primitives" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ad1a9a1640539c81f065425c31bffcfbf6b31ef1aeaade59ce905f5df6ac860" -dependencies = [ - "borsh 0.9.3", - "byteorder", - "bytesize", - "chrono", - "derive_more", - "easy-ext 0.2.9", - "hex 0.4.3", - "near-crypto 0.14.0", - "near-primitives-core 0.14.0", - "near-rpc-error-macro 0.14.0", - "near-vm-errors 0.14.0", - "num-rational", - "once_cell", - "primitive-types", - "rand 0.7.3", - "reed-solomon-erasure", - "serde", - "serde_json", - "smart-default 0.6.0", - "strum", - "thiserror", -] - [[package]] name = "near-primitives" version = "0.15.0" @@ -2988,7 +2767,7 @@ dependencies = [ "borsh 0.9.3", "byteorder", "bytesize", - "cfg-if 1.0.0", + "cfg-if", "chrono", "derive_more", "easy-ext 0.2.9", @@ -3018,7 +2797,7 @@ dependencies = [ "arbitrary", "borsh 0.10.3", "bytesize", - "cfg-if 1.0.0", + "cfg-if", "chrono", "derive_more", "easy-ext 0.2.9", @@ -3046,23 +2825,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "near-primitives-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91d508f0fc340f6461e4e256417685720d3c4c00bb5a939b105160e49137caba" -dependencies = [ - "base64 0.11.0", - "borsh 0.9.3", - "bs58 0.4.0", - "derive_more", - "near-account-id 0.14.0", - "num-rational", - "serde", - "sha2 0.10.3", - "strum", -] - [[package]] name = "near-primitives-core" version = "0.15.0" @@ -3103,17 +2865,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "near-rpc-error-core" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ee0b41c75ef859c193a8ff1dadfa0c8207bc0ac447cc22259721ad769a1408" -dependencies = [ - "quote", - "serde", - "syn 1.0.99", -] - [[package]] name = "near-rpc-error-core" version = "0.15.0" @@ -3136,17 +2887,6 @@ dependencies = [ "syn 2.0.32", ] -[[package]] -name = "near-rpc-error-macro" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e837bd4bacd807073ec5ceb85708da7f721b46a4c2a978de86027fb0034ce31" -dependencies = [ - "near-rpc-error-core 0.14.0", - "serde", - "syn 1.0.99", -] - [[package]] name = "near-rpc-error-macro" version = "0.15.0" @@ -3172,14 +2912,15 @@ dependencies = [ [[package]] name = "near-sandbox-utils" -version = "0.4.1" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bafbc6e0f88ba3c4dd41d947d6ef86367dc2d9b5e0112bde1a5ae8251a71b4f7" +checksum = "7479b0a2c52890000d410c6e4ba4f851334280530fa7446b78bcaf4683fe69b0" dependencies = [ "anyhow", "async-process", "binary-install", "chrono", + "fs2", "hex 0.3.2", "home", ] @@ -3190,18 +2931,6 @@ version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6540152fba5e96fe5d575b79e8cd244cf2add747bb01362426bdc069bc3a23bc" -[[package]] -name = "near-vm-errors" -version = "0.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0da466a30f0446639cbd788c30865086fac3e8dcb07a79e51d2b0775ed4261e" -dependencies = [ - "borsh 0.9.3", - "near-account-id 0.14.0", - "near-rpc-error-macro 0.14.0", - "serde", -] - [[package]] name = "near-vm-errors" version = "0.15.0" @@ -3381,7 +3110,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "345df152bc43501c5eb9e4654ff05f794effb78d4efe3d53abc158baddc0703d" dependencies = [ "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3494,44 +3223,6 @@ version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" -[[package]] -name = "parity-scale-codec" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" -dependencies = [ - "arrayvec 0.7.2", - "bitvec 0.20.4", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1557010476e0595c9b568d16dcfb81b93cdeb157612726f5170d31aa707bed27" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.99", -] - -[[package]] -name = "parity-secp256k1" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fca4f82fccae37e8bbdaeb949a4a218a1bbc485d11598f193d2a908042e5fc1" -dependencies = [ - "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", - "rand 0.7.3", -] - [[package]] name = "parking" version = "2.1.0" @@ -3554,7 +3245,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "redox_syscall 0.2.16", "smallvec", @@ -3655,7 +3346,7 @@ checksum = "4b2d323e8ca7996b3e23126511a523f7e62924d93ecd5ae73b333815b0eb3dce" dependencies = [ "autocfg", "bitflags 1.3.2", - "cfg-if 1.0.0", + "cfg-if", "concurrent-queue", "libc", "log", @@ -3721,7 +3412,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", - "impl-codec", "uint", ] @@ -3734,16 +3424,6 @@ dependencies = [ "toml 0.5.9", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - [[package]] name = "proc-macro-error" version = "1.0.4" @@ -3783,7 +3463,7 @@ version = "0.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "449811d15fbdf5ceb5c1144416066429cf82316e2ec8ce0c1f6f8a02e7bbcf8c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fnv", "lazy_static", "memchr", @@ -3869,12 +3549,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" - [[package]] name = "radium" version = "0.7.0" @@ -4088,12 +3762,6 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" -[[package]] -name = "rustc-hex" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" - [[package]] name = "rustc_version" version = "0.4.0" @@ -4431,7 +4099,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" dependencies = [ "block-buffer 0.9.0", - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.9.0", "opaque-debug", @@ -4443,7 +4111,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "899bf02746a2c92bf1053d9327dadb252b01af1f81f90cdb902411f518bc7215" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.3", ] @@ -4684,7 +4352,7 @@ version = "8.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1165dabf9fc1d6bb6819c2c0e27c8dd0e3068d2c53cf186d319788e96517f0d6" dependencies = [ - "bitvec 1.0.1", + "bitvec", "dmsort", "elementtree", "fallible-iterator", @@ -4766,7 +4434,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31c0432476357e58790aaa47a8efb0c5138f137343f3b5f23bd36a27e3b0a6d6" dependencies = [ "autocfg", - "cfg-if 1.0.0", + "cfg-if", "fastrand", "redox_syscall 0.3.5", "rustix 0.37.20", @@ -4819,7 +4487,7 @@ version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdd6f064ccff2d6567adcb3873ca630700f00b5ad3f060c25b5dcfd9a4ce152" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", ] @@ -5101,7 +4769,7 @@ version = "0.1.36" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fce9567bd60a67d08a16488756721ba392f24f29006402881e43b19aac64307" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "log", "pin-project-lite", "tracing-attributes", @@ -5302,9 +4970,6 @@ name = "uuid" version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.7", -] [[package]] name = "uuid" @@ -5383,7 +5048,7 @@ version = "0.2.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc7652e3f6c4706c8d9cd54832c4a4ccb9b5336e2c3bd154d5cccfbf1c1f5f7d" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -5408,7 +5073,7 @@ version = "0.4.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fa76fb221a1f8acddf5b54ace85912606980ad661ac7a503b4570ffd3a624dad" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -5691,47 +5356,43 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] [[package]] name = "workspaces" -version = "0.4.1" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8b8e4bc0367196fe6386e2c2325c13ee36066392682142d485237e355350e26" +checksum = "73b13d249618f197811e3673decc81459730cf5cc09ee7246dc4bede1e9333bc" dependencies = [ - "anyhow", + "async-process", "async-trait", "base64 0.13.0", "borsh 0.9.3", + "bs58 0.4.0", "chrono", "dirs 3.0.2", "hex 0.4.3", "libc", - "near-account-id 0.14.0", - "near-crypto 0.14.0", + "near-account-id 0.15.0", + "near-crypto 0.15.0", "near-jsonrpc-client 0.4.1", - "near-jsonrpc-primitives 0.14.0", - "near-primitives 0.14.0", + "near-jsonrpc-primitives 0.15.0", + "near-primitives 0.15.0", "near-sandbox-utils", "portpicker", "rand 0.8.5", "reqwest", "serde", "serde_json", + "thiserror", "tokio", "tokio-retry", "tracing", "url", ] -[[package]] -name = "wyz" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" - [[package]] name = "wyz" version = "0.5.0" diff --git a/cargo-near/src/abi_command/abi.rs b/cargo-near/src/abi_command/abi.rs index 9a2cc161..f15b44d1 100644 --- a/cargo-near/src/abi_command/abi.rs +++ b/cargo-near/src/abi_command/abi.rs @@ -176,7 +176,7 @@ fn strip_docs(abi_root: &mut near_abi::AbiRoot) { } } -pub(crate) fn run(args: super::AbiCommand) -> near_cli_rs::CliResult { +pub fn run(args: super::AbiCommand) -> near_cli_rs::CliResult { let color = args.color.unwrap_or(ColorPreference::Auto); color.apply(); diff --git a/cargo-near/src/abi_command/mod.rs b/cargo-near/src/abi_command/mod.rs index 7f9ca8fc..edeb68a6 100644 --- a/cargo-near/src/abi_command/mod.rs +++ b/cargo-near/src/abi_command/mod.rs @@ -13,11 +13,11 @@ pub struct AbiCommand { /// Copy final artifacts to this directory #[interactive_clap(long)] #[interactive_clap(skip_default_input_arg)] - pub out_dir: Option, + pub out_dir: Option, /// Path to the `Cargo.toml` of the contract to build #[interactive_clap(long)] #[interactive_clap(skip_default_input_arg)] - pub manifest_path: Option, + pub manifest_path: Option, /// Coloring: auto, always, never #[interactive_clap(long)] #[interactive_clap(value_enum)] @@ -87,13 +87,13 @@ impl AbiCommand { fn input_out_dir( _context: &near_cli_rs::GlobalContext, - ) -> color_eyre::eyre::Result> { + ) -> color_eyre::eyre::Result> { Ok(None) } fn input_manifest_path( _context: &near_cli_rs::GlobalContext, - ) -> color_eyre::eyre::Result> { + ) -> color_eyre::eyre::Result> { Ok(None) } } diff --git a/cargo-near/src/build_command/mod.rs b/cargo-near/src/build_command/mod.rs index f7a5dca2..2aa25d24 100644 --- a/cargo-near/src/build_command/mod.rs +++ b/cargo-near/src/build_command/mod.rs @@ -1,4 +1,4 @@ -mod build; +pub mod build; #[derive(Debug, Clone, interactive_clap::InteractiveClap)] #[interactive_clap(context = near_cli_rs::GlobalContext)] @@ -20,11 +20,11 @@ pub struct BuildCommand { /// Copy final artifacts to this directory #[interactive_clap(long)] #[interactive_clap(skip_default_input_arg)] - pub out_dir: Option, + pub out_dir: Option, /// Path to the `Cargo.toml` of the contract to build #[interactive_clap(long)] #[interactive_clap(skip_default_input_arg)] - pub manifest_path: Option, + pub manifest_path: Option, /// Coloring: auto, always, never #[interactive_clap(long)] #[interactive_clap(value_enum)] @@ -98,13 +98,13 @@ impl BuildCommand { fn input_out_dir( _context: &near_cli_rs::GlobalContext, - ) -> color_eyre::eyre::Result> { + ) -> color_eyre::eyre::Result> { Ok(None) } fn input_manifest_path( _context: &near_cli_rs::GlobalContext, - ) -> color_eyre::eyre::Result> { + ) -> color_eyre::eyre::Result> { Ok(None) } } diff --git a/cargo-near/src/lib.rs b/cargo-near/src/lib.rs index 66b60d4a..df58210f 100644 --- a/cargo-near/src/lib.rs +++ b/cargo-near/src/lib.rs @@ -1,12 +1,19 @@ pub use near_cli_rs::CliResult; use strum::{EnumDiscriminants, EnumIter, EnumMessage}; -mod abi_command; -mod build_command; +pub mod abi_command; +pub mod build_command; mod common; -mod types; +pub mod types; mod util; +#[derive(Debug, Clone, interactive_clap::InteractiveClap)] +#[interactive_clap(context = near_cli_rs::GlobalContext)] +pub struct Cmd { + #[interactive_clap(subcommand)] + opts: Opts, +} + #[derive(Debug, EnumDiscriminants, Clone, interactive_clap::InteractiveClap)] #[interactive_clap(context = near_cli_rs::GlobalContext)] #[strum_discriminants(derive(EnumMessage, EnumIter))] diff --git a/cargo-near/src/main.rs b/cargo-near/src/main.rs index bb00306e..e4de431b 100644 --- a/cargo-near/src/main.rs +++ b/cargo-near/src/main.rs @@ -2,12 +2,7 @@ use interactive_clap::ToCliArgs; pub use near_cli_rs::CliResult; use std::env; -#[derive(Debug, Clone, interactive_clap::InteractiveClap)] -#[interactive_clap(context = near_cli_rs::GlobalContext)] -struct Cmd { - #[interactive_clap(subcommand)] - opts: cargo_near::Opts, -} +use cargo_near::Cmd; fn main() -> CliResult { env_logger::init(); diff --git a/cargo-near/src/types/utf8_path_buf.rs b/cargo-near/src/types/utf8_path_buf.rs index 2cb01d09..70c86fea 100644 --- a/cargo-near/src/types/utf8_path_buf.rs +++ b/cargo-near/src/types/utf8_path_buf.rs @@ -8,14 +8,14 @@ derive_more::FromStr, )] #[as_ref(forward)] -pub struct Utf8PathBuf(pub camino::Utf8PathBuf); +pub struct Utf8PathBufInner(pub camino::Utf8PathBuf); -impl std::fmt::Display for Utf8PathBuf { +impl std::fmt::Display for Utf8PathBufInner { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { self.0.fmt(f) } } -impl interactive_clap::ToCli for Utf8PathBuf { - type CliVariant = Utf8PathBuf; +impl interactive_clap::ToCli for Utf8PathBufInner { + type CliVariant = Utf8PathBufInner; } diff --git a/integration-tests/Cargo.toml b/integration-tests/Cargo.toml index 2b0122c2..27c71bbb 100644 --- a/integration-tests/Cargo.toml +++ b/integration-tests/Cargo.toml @@ -25,5 +25,5 @@ syn = "1.0" tempfile = "3.3" tokio = "1.0" quote = "1.0" -workspaces = "0.4.1" +workspaces = "0.7.0" zstd = "0.11" diff --git a/integration-tests/src/lib.rs b/integration-tests/src/lib.rs index 73961164..9b1c39a8 100644 --- a/integration-tests/src/lib.rs +++ b/integration-tests/src/lib.rs @@ -42,12 +42,34 @@ macro_rules! invoke_cargo_near { std::env::set_var("CARGO_TARGET_DIR", workspace_dir.join("target")); - let cargo_near::Opts::Near(mut args) = clap::Parser::try_parse_from($cli_opts.split(" "))?; - match &mut args.cmd { - cargo_near::NearCommand::Abi(cmd) => cmd.manifest_path = Some(cargo_path), - cargo_near::NearCommand::Build(cmd) => cmd.manifest_path = Some(cargo_path), + let cargo_near::CliOpts::Near(cli_args) = cargo_near::Opts::try_parse_from($cli_opts)?; + + match cli_args.cmd { + Some(cargo_near::CliNearCommand::Abi(cmd)) => { + let args = cargo_near::abi_command::AbiCommand { + doc: cmd.doc, + compact_abi: cmd.compact_abi, + out_dir: cmd.out_dir, + manifest_path: Some(cargo_near::types::utf8_path_buf::Utf8PathBufInner(cargo_path)), + color: cmd.color, + }; + cargo_near::abi_command::abi::run(args)?; + }, + Some(cargo_near::CliNearCommand::Build(cmd)) => { + let args = cargo_near::build_command::BuildCommand { + release: cmd.release, + embed_abi: cmd.embed_abi, + doc: cmd.doc, + no_abi: cmd.no_abi, + out_dir: cmd.out_dir, + manifest_path: Some(cargo_near::types::utf8_path_buf::Utf8PathBufInner(cargo_path)), + color: cmd.color, + }; + println!("### {args:?}"); + cargo_near::build_command::build::run(args)?; + }, + None => () } - cargo_near::exec(args.cmd)?; workspace_dir.join("target").join("near") }}; @@ -60,7 +82,7 @@ macro_rules! generate_abi_with { $(let opts = format!("cargo near abi {}", $cli_opts);)?; let result_dir = $crate::invoke_cargo_near! { $(Cargo: $cargo_path;)? $(Vars: $cargo_vars;)? - Opts: opts; + Opts: &opts; Code: $($code)* }; @@ -132,7 +154,7 @@ macro_rules! build_with { $(let opts = format!("cargo near build {}", $cli_opts);)?; let result_dir = $crate::invoke_cargo_near! { $(Cargo: $cargo_path;)? $(Vars: $cargo_vars;)? - Opts: opts; + Opts: &opts; Code: $($code)* }; diff --git a/integration-tests/tests/build/embed.rs b/integration-tests/tests/build/embed.rs index c42af6a9..15ad435a 100644 --- a/integration-tests/tests/build/embed.rs +++ b/integration-tests/tests/build/embed.rs @@ -1,7 +1,6 @@ use crate::util; use cargo_near_integration_tests::{build_fn, build_fn_with}; use function_name::named; -use workspaces::prelude::DevAccountDeployer; #[tokio::test] #[named] @@ -42,7 +41,7 @@ async fn test_build_no_embed_abi() -> cargo_near::CliResult { let worker = workspaces::sandbox().await?; let contract = worker.dev_deploy(&build_result.wasm).await?; - let outcome = contract.call(&worker, "__contract_abi").view().await; + let outcome = contract.call("__contract_abi").view().await; outcome.unwrap_err(); Ok(()) diff --git a/integration-tests/tests/util.rs b/integration-tests/tests/util.rs index 42048a90..d0873724 100644 --- a/integration-tests/tests/util.rs +++ b/integration-tests/tests/util.rs @@ -1,18 +1,17 @@ use near_abi::AbiRoot; use near_abi::{AbiBorshParameter, AbiJsonParameter, AbiParameters}; use serde_json::json; -use workspaces::prelude::DevAccountDeployer; /// Utility method to test that the `add` function is available and works as intended pub async fn test_add(wasm: &[u8]) -> cargo_near::CliResult { let worker = workspaces::sandbox().await?; let contract = worker.dev_deploy(wasm).await?; let outcome = contract - .call(&worker, "add") + .call("add") .args_json(json!({ "a": 2u32, "b": 3u32, - }))? + })) .view() .await?; assert_eq!(outcome.json::()?, 5); @@ -22,7 +21,7 @@ pub async fn test_add(wasm: &[u8]) -> cargo_near::CliResult { pub async fn fetch_contract_abi(wasm: &[u8]) -> color_eyre::eyre::Result { let worker = workspaces::sandbox().await?; let contract = worker.dev_deploy(wasm).await?; - let outcome = contract.call(&worker, "__contract_abi").view().await?; + let outcome = contract.call("__contract_abi").view().await?; let outcome_json = zstd::decode_all(outcome.result.as_slice())?; Ok(serde_json::from_slice::(&outcome_json)?) }