diff --git a/.gitignore b/.gitignore index 1827cc56..269a2486 100644 --- a/.gitignore +++ b/.gitignore @@ -14,5 +14,6 @@ target # Key pairs generated by the NEAR shell neardev +**/.near-credentials .DS_Store diff --git a/w-near/Cargo.lock b/w-near/Cargo.lock index e62509d3..36aa01de 100644 --- a/w-near/Cargo.lock +++ b/w-near/Cargo.lock @@ -1,18 +1,64 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. +version = 3 + [[package]] name = "Inflector" version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +[[package]] +name = "actix" +version = "0.11.0-beta.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8eb78f9871feb3519e06b947c2becbf2cc7f67ce786e510e6bd3f9a27da3dbf1" +dependencies = [ + "actix-rt", + "actix_derive", + "bitflags", + "bytes", + "crossbeam-channel", + "futures-core", + "futures-sink", + "futures-task", + "log", + "once_cell", + "parking_lot", + "pin-project-lite", + "smallvec", + "tokio", + "tokio-util", +] + +[[package]] +name = "actix-rt" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdf3f2183be1241ed4dd22611850b85d38de0b08a09f1f7bcccbd0809084b359" +dependencies = [ + "futures-core", + "tokio", +] + +[[package]] +name = "actix_derive" +version = "0.6.0-beta.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae749cf2582eb83efd288edd4e9704600fdce1bc4f69aa0c86ca1368a3e4c13f" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "addr2line" version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ - "gimli 0.23.0", + "gimli", ] [[package]] @@ -23,24 +69,29 @@ checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "ahash" -version = "0.4.7" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" +checksum = "43bb833f0bf979d8475d38fbf09ed3b8a55e1885fe93ad3f93239fc6a4f17b98" +dependencies = [ + "getrandom 0.2.2", + "once_cell", + "version_check", +] [[package]] name = "aho-corasick" -version = "0.7.15" +version = "0.7.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" +checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" dependencies = [ "memchr", ] [[package]] name = "anyhow" -version = "1.0.40" +version = "1.0.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28b2cd92db5cbd74e8e5028f7e27dd7aa3090e89e4f2a197cc7c8dfb69c7063b" +checksum = "94a45b455c14666b85fc40a019e8ab9eb75e3a124e05494f5397122bc9eb06e0" [[package]] name = "arrayref" @@ -48,6 +99,15 @@ version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" +[[package]] +name = "arrayvec" +version = "0.4.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +dependencies = [ + "nodrop", +] + [[package]] name = "arrayvec" version = "0.5.2" @@ -60,15 +120,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a2f58b0bb10c380af2b26e57212856b8c9a59e0925b4c20f4a174a49734eaf7" -[[package]] -name = "async-mutex" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" -dependencies = [ - "event-listener", -] - [[package]] name = "async-trait" version = "0.1.42" @@ -96,42 +147,37 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide", - "object 0.23.0", + "object", "rustc-demangle", ] [[package]] name = "base64" -version = "0.13.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "b41b7ea54a0c9d92199de89e20e58d49f02f8e699814ef3fdf266f6f748d15c7" [[package]] -name = "bincode" -version = "1.3.3" +name = "base64" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] -name = "bindgen" -version = "0.57.0" +name = "binary-install" +version = "0.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd4865004a46a0aafb2a0a5eb19d3c9fc46ee5f063a6cfc605c69ac9ecf5263d" +checksum = "7b5bc5f8c50dd6a80d0b303ddab79f42ddcb52fd43d68107ecf622c551fd4cd4" dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "lazy_static", - "lazycell", - "peeking_take_while", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", + "curl", + "dirs 1.0.5", + "failure", + "flate2", + "hex 0.3.2", + "is_executable", + "siphasher", + "tar", + "zip", ] [[package]] @@ -164,18 +210,14 @@ dependencies = [ ] [[package]] -name = "blake3" -version = "0.3.7" +name = "blake2b_simd" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9ff35b701f3914bdb8fad3368d822c766ef2858b2583198e41639b936f09d3f" +checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" dependencies = [ "arrayref", "arrayvec 0.5.2", - "cc", - "cfg-if 0.1.10", "constant_time_eq", - "crypto-mac", - "digest 0.9.0", ] [[package]] @@ -210,32 +252,32 @@ dependencies = [ [[package]] name = "borsh" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5a26c53ddf60281f18e7a29b20db7ba3db82a9d81b9650bfaa02d646f50d364" +checksum = "4c9d0958efb8301e1626692ea879cbff622ef45cf731807ec8d488b34be98cb8" dependencies = [ "borsh-derive", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] name = "borsh-derive" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b637a47728b78a78cd7f4b85bf06d71ef4221840e059a38f048be2422bf673b2" +checksum = "325164710ad57bae6d32455ce3bd384f95768464a927ce145626dc3390a7f9fe" dependencies = [ "borsh-derive-internal", "borsh-schema-derive-internal", - "proc-macro-crate", + "proc-macro-crate 0.1.5", "proc-macro2", "syn", ] [[package]] name = "borsh-derive-internal" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d813fa25eb0bed78c36492cff4415f38c760d6de833d255ba9095bd8ebb7d725" +checksum = "f74159f43b231f4af8c4ce4967fef76e4e59725acf51706ddb9268c94348d15c" dependencies = [ "proc-macro2", "quote", @@ -244,9 +286,9 @@ dependencies = [ [[package]] name = "borsh-schema-derive-internal" -version = "0.8.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf78ee4a98c8cb9eba1bac3d3e2a1ea3d7673c719ce691e67b5cbafc472d3b7" +checksum = "99b2a77771907a820a860d200d193a0787c79a7890c8e253c462fa0f51ad58b6" dependencies = [ "proc-macro2", "quote", @@ -259,6 +301,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +[[package]] +name = "bumpalo" +version = "3.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" + [[package]] name = "byte-slice-cast" version = "1.0.0" @@ -284,66 +332,47 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] -name = "c2-chacha" -version = "0.3.0" +name = "bytesize" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" -dependencies = [ - "cipher", - "ppv-lite86", -] +checksum = "6c58ec36aac5066d5ca17df51b3e70279f5670a72102f5752cb7e7c856adfc70" [[package]] -name = "cached" -version = "0.23.0" +name = "bzip2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e2afe73808fbaac302e39c9754bfc3c4b4d0f99c9c240b9f4e4efc841ad1b74" +checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" dependencies = [ - "async-mutex", - "async-trait", - "cached_proc_macro", - "cached_proc_macro_types", - "futures", - "hashbrown", - "once_cell", + "bzip2-sys", + "libc", ] [[package]] -name = "cached_proc_macro" -version = "0.6.0" +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf857ae42d910aede5c5186e62684b0d7a597ce2fe3bd14448ab8f7ef439848c" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" dependencies = [ - "async-mutex", - "cached_proc_macro_types", - "darling 0.10.2", - "quote", - "syn", + "cc", + "libc", + "pkg-config", ] [[package]] -name = "cached_proc_macro_types" -version = "0.1.0" +name = "c2-chacha" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a4f925191b4367301851c6d99b09890311d74b0d43f274c0b34c86d308a3663" +checksum = "fb6b83fa00a7c53f420893670940c8fdfaa89f9dd9adb52062cca39482a31ab6" +dependencies = [ + "cipher", + "ppv-lite86", +] [[package]] name = "cc" version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" -dependencies = [ - "jobserver", -] - -[[package]] -name = "cexpr" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4aedb84272dbe89af497cf81375129abda4fc0a9e7c5d317498c15cc30c0d27" -dependencies = [ - "nom", -] [[package]] name = "cfg-if" @@ -381,36 +410,26 @@ dependencies = [ ] [[package]] -name = "clang-sys" -version = "1.2.0" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "853eda514c284c2287f4bf20ae614f8781f40a81d32ecda6e91449304dfe077c" -dependencies = [ - "glob", - "libc", - "libloading 0.7.0", -] +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] -name = "cloudabi" -version = "0.0.3" +name = "core-foundation" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ - "bitflags", + "core-foundation-sys", + "libc", ] [[package]] -name = "concat-with" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ae45936bbf9bddd6a0268c0ea5d3814a72403f4b69a1c318aae2ce90444ad55" - -[[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "core-foundation-sys" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "cpuid-bool" @@ -419,516 +438,274 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" [[package]] -name = "cranelift-bforest" -version = "0.67.0" +name = "crc32fast" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f065f6889758f817f61a230220d1811ba99a9762af2fb69ae23048314f75ff2" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cranelift-entity 0.67.0", + "cfg-if 1.0.0", ] [[package]] -name = "cranelift-bforest" -version = "0.68.0" +name = "crossbeam-channel" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9221545c0507dc08a62b2d8b5ffe8e17ac580b0a74d1813b496b8d70b070fbd0" +checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" dependencies = [ - "cranelift-entity 0.68.0", + "cfg-if 1.0.0", + "crossbeam-utils", ] [[package]] -name = "cranelift-codegen" -version = "0.67.0" +name = "crossbeam-utils" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "510aa2ab4307644100682b94e449940a0ea15c5887f1d4b9678b8dd5ef31e736" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ - "byteorder", - "cranelift-bforest 0.67.0", - "cranelift-codegen-meta 0.67.0", - "cranelift-codegen-shared 0.67.0", - "cranelift-entity 0.67.0", - "gimli 0.21.0", - "log", - "regalloc 0.0.30", - "serde", - "smallvec", - "target-lexicon 0.11.2", - "thiserror", + "autocfg", + "cfg-if 1.0.0", + "lazy_static", ] [[package]] -name = "cranelift-codegen" -version = "0.68.0" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9936ea608b6cd176f107037f6adbb4deac933466fc7231154f96598b2d3ab1" -dependencies = [ - "byteorder", - "cranelift-bforest 0.68.0", - "cranelift-codegen-meta 0.68.0", - "cranelift-codegen-shared 0.68.0", - "cranelift-entity 0.68.0", - "gimli 0.22.0", - "log", - "regalloc 0.0.31", - "smallvec", - "target-lexicon 0.11.2", - "thiserror", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "cranelift-codegen-meta" -version = "0.67.0" +name = "crypto-mac" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4cb0c7e87c60d63b35f9670c15479ee4a5e557dd127efab88b2f9b2ca83c9a0" +checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" dependencies = [ - "cranelift-codegen-shared 0.67.0", - "cranelift-entity 0.67.0", + "generic-array 0.14.4", + "subtle", ] [[package]] -name = "cranelift-codegen-meta" -version = "0.68.0" +name = "curl" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ef2b2768568306540f4c8db3acce9105534d34c4a1e440529c1e702d7f8c8d7" +checksum = "7de97b894edd5b5bcceef8b78d7da9b75b1d2f2f9a910569d0bde3dd31d84939" dependencies = [ - "cranelift-codegen-shared 0.68.0", - "cranelift-entity 0.68.0", + "curl-sys", + "libc", + "openssl-probe", + "openssl-sys", + "schannel", + "socket2", + "winapi", ] [[package]] -name = "cranelift-codegen-shared" -version = "0.67.0" +name = "curl-sys" +version = "0.4.52+curl-7.81.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60636227098693e06de8d6d88beea2a7d32ecf8a8030dacdb57c68e06f381826" +checksum = "14b8c2d1023ea5fded5b7b892e4b8e95f70038a421126a056761a84246a28971" +dependencies = [ + "cc", + "libc", + "libz-sys", + "openssl-sys", + "pkg-config", + "vcpkg", + "winapi", +] [[package]] -name = "cranelift-codegen-shared" -version = "0.68.0" +name = "curve25519-dalek" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6759012d6d19c4caec95793f052613e9d4113e925e7f14154defbac0f1d4c938" +checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" +dependencies = [ + "byteorder", + "digest 0.9.0", + "rand_core 0.5.1", + "subtle", + "zeroize", +] [[package]] -name = "cranelift-entity" -version = "0.67.0" +name = "derive_more" +version = "0.99.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6156db73e0c9f65f80c512988d63ec736be0dee3dd66bf951e3e28aed9dc02d3" +checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" dependencies = [ - "serde", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "cranelift-entity" -version = "0.68.0" +name = "digest" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86badbce14e15f52a45b666b38abe47b204969dd7f8fb7488cb55dd46b361fa6" +checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" dependencies = [ - "serde", + "generic-array 0.12.3", ] [[package]] -name = "cranelift-frontend" -version = "0.67.0" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e09cd158c9a820a4cc14a34076811da225cce1d31dc6d03c5ef85b91aef560b9" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "cranelift-codegen 0.67.0", - "log", - "smallvec", - "target-lexicon 0.11.2", + "generic-array 0.14.4", ] [[package]] -name = "cranelift-frontend" -version = "0.68.0" +name = "dirs" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b608bb7656c554d0a4cf8f50c7a10b857e80306f6ff829ad6d468a7e2323c8d8" +checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" dependencies = [ - "cranelift-codegen 0.68.0", - "log", - "smallvec", - "target-lexicon 0.11.2", + "libc", + "redox_users 0.3.5", + "winapi", ] [[package]] -name = "cranelift-native" -version = "0.67.0" +name = "dirs" +version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7054533ae1fc2048c1a6110bdf8f4314b77c60329ec6a7df79d2cfb84e3dcc1c" +checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" dependencies = [ - "cranelift-codegen 0.67.0", - "raw-cpuid", - "target-lexicon 0.11.2", + "dirs-sys", ] [[package]] -name = "cranelift-wasm" -version = "0.67.0" +name = "dirs-sys" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aee0e0b68eba99f99a4923212d97aca9e44655ca8246f07fffe11236109b0d0" +checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" dependencies = [ - "cranelift-codegen 0.67.0", - "cranelift-entity 0.67.0", - "cranelift-frontend 0.67.0", - "log", - "serde", - "thiserror", - "wasmparser 0.59.0", + "libc", + "redox_users 0.4.0", + "winapi", ] [[package]] -name = "crc32fast" -version = "1.2.1" +name = "easy-ext" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "62473f23f4a15690bd64ea37269266ba7b273e7c26b302aef68d3968ae9262a0" dependencies = [ - "cfg-if 1.0.0", + "quote", + "syn", ] [[package]] -name = "crossbeam-channel" -version = "0.5.1" +name = "ed25519" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ed27e177f16d65f0f0c22a213e17c696ace5dd64b14258b52f9417ccb52db4" +checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-utils", + "signature", ] [[package]] -name = "crossbeam-deque" -version = "0.8.0" +name = "ed25519-dalek" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" +checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" dependencies = [ - "cfg-if 1.0.0", - "crossbeam-epoch", - "crossbeam-utils", + "curve25519-dalek", + "ed25519", + "rand 0.7.3", + "serde", + "sha2", + "zeroize", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.3" +name = "encoding_rs" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" +checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ "cfg-if 1.0.0", - "crossbeam-utils", - "lazy_static", - "memoffset 0.6.3", - "scopeguard", ] [[package]] -name = "crossbeam-utils" -version = "0.8.3" +name = "failure" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" +checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" dependencies = [ - "autocfg", - "cfg-if 1.0.0", - "lazy_static", + "backtrace", + "failure_derive", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "failure_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array 0.14.4", - "subtle", -] - -[[package]] -name = "curve25519-dalek" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "639891fde0dbea823fc3d798a0fdf9d2f9440a42d64a78ab3488b0ca025117b3" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "subtle", - "zeroize", -] - -[[package]] -name = "darling" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" -dependencies = [ - "darling_core 0.10.2", - "darling_macro 0.10.2", -] - -[[package]] -name = "darling" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f2c43f534ea4b0b049015d00269734195e6d3f0f6635cb692251aca6f9f8b3c" -dependencies = [ - "darling_core 0.12.4", - "darling_macro 0.12.4", -] - -[[package]] -name = "darling_core" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.9.3", - "syn", -] - -[[package]] -name = "darling_core" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e91455b86830a1c21799d94524df0845183fa55bafd9aa137b01c7d1065fa36" +checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" -dependencies = [ - "darling_core 0.10.2", - "quote", - "syn", -] - -[[package]] -name = "darling_macro" -version = "0.12.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29b5acf0dea37a7f66f7b25d2c5e93fd46f8f6968b1a5d7a3e02e97768afc95a" -dependencies = [ - "darling_core 0.12.4", - "quote", - "syn", -] - -[[package]] -name = "derive_more" -version = "0.99.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "digest" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" -dependencies = [ - "generic-array 0.12.3", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array 0.14.4", -] - -[[package]] -name = "dynasm" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d7d1242462849390bb2ad38aeed769499f1afc7383affa2ab0c1baa894c0200" -dependencies = [ - "bitflags", - "byteorder", - "lazy_static", - "proc-macro-error", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "dynasmrt" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dd4d1d5ca12258cef339a57a7643e8b233a42dea9bb849630ddd9dd7726aa9" -dependencies = [ - "byteorder", - "dynasm", - "memmap2", -] - -[[package]] -name = "easy-ext" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62473f23f4a15690bd64ea37269266ba7b273e7c26b302aef68d3968ae9262a0" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "ed25519" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37c66a534cbb46ab4ea03477eae19d5c22c01da8258030280b7bd9d8433fb6ef" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2", - "zeroize", -] - -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - -[[package]] -name = "elastic-array" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d63720ea2bc2e1b79f7aa044d9dc0b825f9ccb6930b32120f8fb9e873aa84bc" -dependencies = [ - "heapsize", -] - -[[package]] -name = "enumset" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbd795df6708a599abf1ee10eacc72efd052b7a5f70fdf0715e4d5151a6db9c3" -dependencies = [ - "enumset_derive", -] - -[[package]] -name = "enumset_derive" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e19c52f9ec503c8a68dc04daf71a04b07e690c32ab1a8b68e33897f255269d47" -dependencies = [ - "darling 0.12.4", "proc-macro2", "quote", "syn", + "synstructure", ] [[package]] -name = "errno" -version = "0.2.7" +name = "filetime" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa68f2fb9cae9d37c9b2b3584aba698a2e97f72d7aef7b9f7aa71d8b54ce46fe" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ - "errno-dragonfly", + "cfg-if 1.0.0", "libc", + "redox_syscall 0.2.6", "winapi", ] [[package]] -name = "errno-dragonfly" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14ca354e36190500e1e1fb267c647932382b54053c50b14970856c0b00a35067" -dependencies = [ - "gcc", - "libc", -] - -[[package]] -name = "ethbloom" -version = "0.11.0" +name = "fixed-hash" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "779864b9c7f7ead1f092972c3257496c6a84b46dba2ce131dd8a282cb2cc5972" +checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", + "byteorder", + "rand 0.8.4", + "rustc-hex", + "static_assertions", ] [[package]] -name = "ethereum-types" -version = "0.11.0" +name = "flate2" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f64b5df66a228d85e4b17e5d6c6aa43b0310898ffe8a85988c4c032357aaabfd" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", + "cfg-if 1.0.0", + "crc32fast", + "libc", + "miniz_oxide", ] [[package]] -name = "event-listener" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7531096570974c3a9dcf9e4b8e1cede1ec26cf5046219fb3b9d897503b9be59" - -[[package]] -name = "fallible-iterator" -version = "0.2.0" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "fixed-hash" -version = "0.7.0" +name = "foreign-types" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcf0ed7fe52a17a03854ec54a9f76d6d84508d1c0e66bc1793301c73fc8493c" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "byteorder", - "rand 0.8.3", - "rustc-hex", - "static_assertions", + "foreign-types-shared", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" @@ -940,33 +717,12 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs_extra" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2022715d62ab30faffd124d40b76f4134a550a87792276512b18d63272333394" - [[package]] name = "funty" version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fed34cd105917e91daa4da6b3728c47b068749d6a62c59811f06ed2ac71d9da7" -[[package]] -name = "futures" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9d5813545e459ad3ca1bff9915e9ad7f1a47dc6a91b627ce321d5863b7dd253" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - [[package]] name = "futures-channel" version = "0.3.14" @@ -974,7 +730,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce79c6a52a299137a6013061e0cf0e688fce5d7f1bc60125f520912fdb29ec25" dependencies = [ "futures-core", - "futures-sink", ] [[package]] @@ -983,35 +738,6 @@ version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "098cd1c6dda6ca01650f1a37a794245eb73181d0d4d4e955e2f3c37db7af1815" -[[package]] -name = "futures-executor" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10f6cb7042eda00f0049b1d2080aa4b93442997ee507eb3828e8bd7577f94c9d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "365a1a1fb30ea1c03a830fdb2158f5236833ac81fa0ad12fe35b29cddc35cb04" - -[[package]] -name = "futures-macro" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668c6733a182cd7deb4f1de7ba3bf2120823835b3bcfbeacf7d2c4a773c1bb8b" -dependencies = [ - "proc-macro-hack", - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "futures-sink" version = "0.3.14" @@ -1030,26 +756,12 @@ version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c144ad54d60f23927f0a6b6d816e4271278b64f005ad65e4e35291d2de9c025" dependencies = [ - "futures-channel", "futures-core", - "futures-io", - "futures-macro", - "futures-sink", "futures-task", - "memchr", "pin-project-lite", "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", ] -[[package]] -name = "gcc" -version = "0.3.55" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2" - [[package]] name = "generic-array" version = "0.12.3" @@ -1093,54 +805,42 @@ dependencies = [ [[package]] name = "gimli" -version = "0.21.0" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" -dependencies = [ - "fallible-iterator", - "indexmap", - "stable_deref_trait", -] +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" [[package]] -name = "gimli" -version = "0.22.0" +name = "h2" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" +checksum = "d9f1f717ddc7b2ba36df7e871fd88db79326551d3d6f1fc406fbfd28b582ff8e" dependencies = [ - "fallible-iterator", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", "indexmap", - "stable_deref_trait", + "slab", + "tokio", + "tokio-util", + "tracing", ] -[[package]] -name = "gimli" -version = "0.23.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" - -[[package]] -name = "glob" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" - [[package]] name = "hashbrown" version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" -dependencies = [ - "ahash", -] [[package]] -name = "heapsize" -version = "0.4.2" +name = "hashbrown" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1679e6ea370dee694f91f1dc469bf94cf8f52051d147aec3e1f9497c6fc22461" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "winapi", + "ahash", ] [[package]] @@ -1163,190 +863,210 @@ dependencies = [ [[package]] name = "hex" -version = "0.4.2" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" +checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" [[package]] -name = "ident_case" -version = "1.0.1" +name = "hex" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "644f9158b2f133fd50f5fb3242878846d9eb792e445c893805ff0e3824006e35" [[package]] -name = "idna" -version = "0.2.3" +name = "home" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" +checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654" dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", + "winapi", ] [[package]] -name = "impl-codec" -version = "0.5.0" +name = "http" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df170efa359aebdd5cb7fe78edcc67107748e4737bdca8a8fb40d15ea7a877ed" +checksum = "31f4c6746584866f0feabcc69893c5b51beef3831656a968ed7ae254cdc4fd03" dependencies = [ - "parity-scale-codec", + "bytes", + "fnv", + "itoa 1.0.1", ] [[package]] -name = "impl-rlp" -version = "0.3.0" +name = "http-body" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" dependencies = [ - "rlp", + "bytes", + "http", + "pin-project-lite", ] [[package]] -name = "impl-serde" -version = "0.3.1" +name = "httparse" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" + +[[package]] +name = "httpdate" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b47ca4d2b6931707a55fce5cf66aff80e2178c8b63bbb4ecb5695cbc870ddf6f" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + +[[package]] +name = "hyper" +version = "0.14.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7ec3e62bdc98a2f0393a5048e4c30ef659440ea6e0e572965103e72bd836f55" dependencies = [ - "serde", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 0.4.6", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] -name = "indexmap" -version = "1.6.0" +name = "hyper-tls" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "autocfg", - "hashbrown", - "serde", + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", ] [[package]] -name = "instant" -version = "0.1.9" +name = "idna" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" +checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" dependencies = [ - "cfg-if 1.0.0", + "matches", + "unicode-bidi", + "unicode-normalization", ] [[package]] -name = "itoa" -version = "0.4.6" +name = "impl-codec" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" +checksum = "161ebdfec3c8e3b52bf61c4f3550a1eea4f9579d10dc1b936f3171ebdcd6c443" +dependencies = [ + "parity-scale-codec", +] [[package]] -name = "jemalloc-sys" -version = "0.3.2" +name = "impl-trait-for-tuples" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d3b9f3f5c9b31aa0f5ed3260385ac205db665baa41d49bb8338008ae94ede45" +checksum = "d5dacb10c5b3bb92d46ba347505a9041e676bb20ad220101326bffb0c93031ee" dependencies = [ - "cc", - "fs_extra", - "libc", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "jemallocator" -version = "0.3.2" +name = "indexmap" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43ae63fcfc45e99ab3d1b29a46782ad679e98436c3169d15a167a1108a724b69" +checksum = "55e2e4c765aa53a0424761bf9f41aa7a6ac1efa87238f59560640e27fca028f2" dependencies = [ - "jemalloc-sys", - "libc", + "autocfg", + "hashbrown 0.9.1", ] [[package]] -name = "jobserver" -version = "0.1.22" +name = "instant" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "972f5ae5d1cb9c6ae417789196c803205313edde988685da5e3aae0827b9e7fd" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "libc", + "cfg-if 1.0.0", ] [[package]] -name = "keccak" -version = "0.1.0" +name = "ipnet" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" +checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] -name = "lazy-static-include" -version = "3.0.5" +name = "is_executable" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c942ea960c2d8678d32cb14aa56d5c37f21107b54aa281c944e4d03690c55d1" +checksum = "302d553b8abc8187beb7d663e34c065ac4570b273bc9511a50e940e99409c577" dependencies = [ - "lazy_static", - "slash-formatter", - "syn", + "winapi", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "itoa" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "dc6f3ad7b9d11a0c00842ff8de1b60ee58661048eb8049ed33c73594f359d7e6" [[package]] -name = "lazycell" -version = "1.3.0" +name = "itoa" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] -name = "leb128" -version = "0.2.4" +name = "js-sys" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" +checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" +dependencies = [ + "wasm-bindgen", +] [[package]] -name = "libc" -version = "0.2.93" +name = "keccak" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9385f66bf6105b241aa65a61cb923ef20efc665cb9f9bb50ac2f0c4b7f378d41" +checksum = "67c21572b4949434e4fc1e1978b99c5f77064153c59d998bf13ecd96fb5ecba7" [[package]] -name = "libloading" -version = "0.6.7" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "libloading" -version = "0.7.0" +name = "libc" +version = "0.2.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f84d96438c15fcd6c3f244c8fce01d1e2b9c6b5623e9c711dc9286d8fc92d6a" -dependencies = [ - "cfg-if 1.0.0", - "winapi", -] +checksum = "565dbd88872dbe4cc8a46e527f26483c1d1f7afa6b884a3bd6cd893d4f98da74" [[package]] -name = "librocksdb-sys" -version = "6.17.3" +name = "libz-sys" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5da125e1c0f22c7cae785982115523a0738728498547f415c9054cb17c7e89f9" +checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" dependencies = [ - "bindgen", "cc", - "glob", "libc", -] - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", + "pkg-config", + "vcpkg", ] [[package]] @@ -1367,15 +1087,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "mach" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" -dependencies = [ - "libc", -] - [[package]] name = "matches" version = "0.1.8" @@ -1384,83 +1095,169 @@ checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] name = "memchr" -version = "2.3.4" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" +checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" [[package]] -name = "memmap" -version = "0.7.0" +name = "memory_units" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" + +[[package]] +name = "mime" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" + +[[package]] +name = "miniz_oxide" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +dependencies = [ + "adler", + "autocfg", +] + +[[package]] +name = "mio" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b" +checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" dependencies = [ "libc", + "log", + "miow", + "ntapi", "winapi", ] [[package]] -name = "memmap2" -version = "0.2.2" +name = "miow" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" +dependencies = [ + "winapi", +] + +[[package]] +name = "native-tls" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397d1a6d6d0563c0f5462bbdae662cf6c784edf5e828e40c7257f85d82bf56dd" +checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" dependencies = [ + "lazy_static", "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", ] [[package]] -name = "memoffset" -version = "0.5.6" +name = "near-account-id" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" +checksum = "f5fbe33ba04b086e082aabe4167f03d8e7f5af2db4fffb5e6061226e46e7f5ff" dependencies = [ - "autocfg", + "borsh", + "serde", ] [[package]] -name = "memoffset" -version = "0.6.3" +name = "near-account-id" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f83fb6581e8ed1f85fd45c116db8405483899489e38406156c25eb743554361d" +checksum = "4cd61f43cedc1bb7a7c097ef3adbab0092a51185dca0e48d5851b37818e13978" dependencies = [ - "autocfg", + "borsh", + "serde", ] [[package]] -name = "memory_units" -version = "0.4.0" +name = "near-chain-configs" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8452105ba047068f40ff7093dd1d9da90898e63dd61736462e9cdda6a90ad3c3" +checksum = "e4c229496a676c08440e3566e09d05f472dd9b3bd5885cc24b5634ffac145842" +dependencies = [ + "chrono", + "derive_more", + "near-crypto 0.5.0", + "near-primitives 0.5.0", + "num-rational", + "serde", + "serde_json", + "sha2", + "smart-default", + "tracing", +] [[package]] -name = "miniz_oxide" -version = "0.4.4" +name = "near-chain-primitives" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "f9ff481b515b4399b74d18f63c34f9860a843d904ebf77cd7b86f9a8323737d4" dependencies = [ - "adler", - "autocfg", + "chrono", + "failure", + "failure_derive", + "log", + "near-crypto 0.5.0", + "near-primitives 0.5.0", + "thiserror", ] [[package]] -name = "more-asserts" -version = "0.2.1" +name = "near-chunks-primitives" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbdf2e3c24a5092b58aa114120c4d533811d595461196a2e6ec05dfdedcc179d" +dependencies = [ + "near-chain-primitives", +] + +[[package]] +name = "near-client-primitives" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" +checksum = "8e37fedeee10f1da6d3ab854705346b7f0ad6d142c2049a4a14e76d349ad6f6a" +dependencies = [ + "actix", + "chrono", + "near-chain-configs", + "near-chain-primitives", + "near-chunks-primitives", + "near-crypto 0.5.0", + "near-network-primitives", + "near-primitives 0.5.0", + "serde", + "strum", + "thiserror", +] [[package]] name = "near-contract-standards" -version = "3.1.0" +version = "4.0.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5837ffd278eeedc4f97104586b3851ed9e7c32449de8b54e8d752f22498588e" +checksum = "52c4f636adbffbd9399610cb6445894c64c6c8fcf9ea4e607021f252a1e0459f" dependencies = [ "near-sdk", + "serde", + "serde_json", ] [[package]] name = "near-crypto" -version = "0.1.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb14bec070cfd808438712cda5d54703001b9cf1196c8afaeadc9514e06d00a3" +checksum = "7e44231c19aa95e0ff3b1a46209a8edb44f5e02fca8a60a19386ba38b2ee1942" dependencies = [ "arrayref", "blake2", @@ -1472,7 +1269,9 @@ dependencies = [ "ed25519-dalek", "lazy_static", "libc", + "near-account-id 0.5.0", "parity-secp256k1", + "primitive-types", "rand 0.7.3", "rand_core 0.5.1", "serde", @@ -1482,10 +1281,77 @@ dependencies = [ ] [[package]] -name = "near-metrics" +name = "near-crypto" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f68d8d55bd2a457eba5956d8c1255e288c47f394ca6fffe6184d19664bf0bc4c" +dependencies = [ + "arrayref", + "blake2", + "borsh", + "bs58", + "c2-chacha", + "curve25519-dalek", + "derive_more", + "ed25519-dalek", + "lazy_static", + "libc", + "near-account-id 0.10.0", + "parity-secp256k1", + "primitive-types", + "rand 0.7.3", + "rand_core 0.5.1", + "serde", + "serde_json", + "subtle", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-client" version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7b9dcbc960db15fcec85bcb29a78b57e4005b7b1a0afc70a26a97453862528e" +checksum = "daacff85a890d04b05851fcbc29feff0645634dc247a7842157aedbe377a8074" +dependencies = [ + "borsh", + "lazy_static", + "near-chain-configs", + "near-client-primitives", + "near-jsonrpc-primitives", + "near-primitives 0.5.0", + "reqwest", + "serde", + "serde_json", + "thiserror", +] + +[[package]] +name = "near-jsonrpc-primitives" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e47ebf93ecb3d5b2a5e4a7e7986d2772dd6d98712ec6844efd8948c25673f06f" +dependencies = [ + "actix", + "lazy_static", + "near-chain-configs", + "near-client-primitives", + "near-crypto 0.5.0", + "near-metrics", + "near-primitives 0.5.0", + "near-primitives-core 0.5.0", + "near-rpc-error-macro 0.5.0", + "serde", + "serde_json", + "thiserror", + "tracing", + "uuid", +] + +[[package]] +name = "near-metrics" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e833372067545d0bb84015f283ad05f13f5a2cdd4ec2d9bbbce76915bf9d0502" dependencies = [ "lazy_static", "log", @@ -1493,37 +1359,72 @@ dependencies = [ ] [[package]] -name = "near-pool" -version = "0.1.0-pre.1" +name = "near-network-primitives" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1629497107e6b2e003e8b90ae1ddda9f661c9030baf5c2a3d58bc589a525d752" +dependencies = [ + "actix", + "borsh", + "chrono", + "near-crypto 0.5.0", + "near-primitives 0.5.0", + "serde", + "strum", + "tokio", + "tracing", +] + +[[package]] +name = "near-primitives" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bde79472f7cfc0675733b65f79f9e50c20bfbb9806298ab2872916869a45dccd" +checksum = "78f106c7bbf2a12228daf4af2a976122b030745683ede24b5dc4514e8faaa36c" dependencies = [ + "base64 0.13.0", "borsh", - "near-crypto", - "near-primitives", + "bs58", + "byteorder", + "bytesize", + "chrono", + "derive_more", + "easy-ext", + "hex 0.4.2", + "near-crypto 0.5.0", + "near-primitives-core 0.5.0", + "near-rpc-error-macro 0.5.0", + "near-vm-errors 3.1.0", + "num-rational", + "primitive-types", "rand 0.7.3", + "reed-solomon-erasure", + "regex", + "serde", + "serde_json", + "sha2", + "smart-default", + "validator", ] [[package]] name = "near-primitives" -version = "0.1.0-pre.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75ed2263518ca67a3c158c144813832fd96f48ab239494bb9d7793d315f31417" +checksum = "04d93aaf84ad4f5ccf780d8a0029c6fb636a2e6c1ddb3c772dee4686529e30a8" dependencies = [ - "base64", + "base64 0.13.0", "borsh", "bs58", "byteorder", + "bytesize", "chrono", "derive_more", "easy-ext", - "hex", - "jemallocator", - "lazy_static", - "near-crypto", - "near-primitives-core", - "near-rpc-error-macro", - "near-vm-errors", + "hex 0.4.2", + "near-crypto 0.10.0", + "near-primitives-core 0.10.0", + "near-rpc-error-macro 0.10.0", + "near-vm-errors 0.10.0", "num-rational", "primitive-types", "rand 0.7.3", @@ -1538,16 +1439,36 @@ dependencies = [ [[package]] name = "near-primitives-core" -version = "0.4.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "108d06655885c1174823e41941fd44a82e13e850b12fa068a95194c96e247c68" +dependencies = [ + "base64 0.11.0", + "borsh", + "bs58", + "derive_more", + "hex 0.4.2", + "lazy_static", + "near-account-id 0.5.0", + "num-rational", + "serde", + "serde_json", + "sha2", +] + +[[package]] +name = "near-primitives-core" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2b3fb5acf3a494aed4e848446ef2d6ebb47dbe91c681105d4d1786c2ee63e52" +checksum = "4d88b2b0f418c1174214fb51106c90251f61ecfe4c7063f149c2e199ec2850fd" dependencies = [ - "base64", + "base64 0.11.0", "borsh", "bs58", "derive_more", - "hex", + "hex 0.4.2", "lazy_static", + "near-account-id 0.10.0", "num-rational", "serde", "serde_json", @@ -1556,24 +1477,35 @@ dependencies = [ [[package]] name = "near-rpc-error-core" -version = "0.1.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db59973d0e8d8bd4be5ae508600add29f96737722d30e05cfc49e5044ded955" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn", +] + +[[package]] +name = "near-rpc-error-core" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffa8dbf8437a28ac40fcb85859ab0d0b8385013935b000c7a51ae79631dd74d9" +checksum = "4a98c9bd7edee4dcfc293e3511e9fab826bcd6fbfbfe06124a1164b94ee60351" dependencies = [ "proc-macro2", "quote", "serde", - "serde_json", "syn", ] [[package]] name = "near-rpc-error-macro" -version = "0.1.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c6111d713e90c7c551dee937f4a06cb9ea2672243455a4454cc7566387ba2d9" +checksum = "46bde9eb491ab7ccccd48ee6d438dc07aa74318faa0ff007717c3d5b538d3951" dependencies = [ - "near-rpc-error-core", + "near-rpc-error-core 0.5.0", "proc-macro2", "quote", "serde", @@ -1582,54 +1514,44 @@ dependencies = [ ] [[package]] -name = "near-runtime" -version = "4.0.0-pre.1" +name = "near-rpc-error-macro" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e4c0a4cd2ee5ccbc1fd5d492180ebf33ac1159d721b2e0c58c11953131fb449" +checksum = "1abade92d0fc76a6c25aeb82f3e7fd97678ab5d0fd92b80149a65d1088e86505" dependencies = [ - "borsh", - "byteorder", - "ethereum-types", - "hex", - "lazy_static", - "log", - "near-crypto", - "near-metrics", - "near-primitives", - "near-runtime-utils", - "near-store", - "near-vm-errors", - "near-vm-logic", - "near-vm-runner", - "num-bigint", - "num-rational", - "num-traits", - "rand 0.7.3", + "near-rpc-error-core 0.10.0", + "proc-macro2", + "quote", "serde", "serde_json", + "syn", ] [[package]] -name = "near-runtime-utils" -version = "4.0.0-pre.1" +name = "near-sandbox-utils" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a48d80c4ca1d4cf99bc16490e1e3d49826c150dfc4410ac498918e45c7d98e07" +checksum = "51766f7cdbe34f7358f0dd2286297425ce7d57907078818b6e461b4ce83159fb" dependencies = [ - "lazy_static", - "regex", + "anyhow", + "binary-install", + "chrono", + "hex 0.3.2", + "home", ] [[package]] name = "near-sdk" -version = "3.1.0" +version = "4.0.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7383e242d3e07bf0951e8589d6eebd7f18bb1c1fc5fbec3fad796041a6aebd1" +checksum = "a4f17c763e91999827a2ad30b909f79e82a56c448bf7170ed72841756397e5a3" dependencies = [ - "base64", + "base64 0.13.0", "borsh", "bs58", - "near-primitives-core", + "near-primitives-core 0.10.0", "near-sdk-macros", + "near-sys", "near-vm-logic", "serde", "serde_json", @@ -1637,10 +1559,10 @@ dependencies = [ ] [[package]] -name = "near-sdk-core" -version = "3.1.0" +name = "near-sdk-macros" +version = "4.0.0-pre.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "284a78d9eb8eda58330462fa0023a6d7014c941df1f0387095e7dfd1dc0f2bce" +checksum = "1d07b8d59302bf900707c41654a7ba178c5a2d8040a8812647f6b7e7e28dc5b1" dependencies = [ "Inflector", "proc-macro2", @@ -1649,131 +1571,103 @@ dependencies = [ ] [[package]] -name = "near-sdk-macros" -version = "3.1.0" +name = "near-sys" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6a7aa3f46fac44416d8a93d14f30a562c4d730a1c6bf14bffafab5f475c244a" + +[[package]] +name = "near-units" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2037337438f97d1ce5f7c896cf229dc56dacd5c01142d1ef95a7d778cde6ce7d" +checksum = "97a2b77f295d398589eeee51ad0887905ef1734fb12b45cb6d77bd7e401988b9" dependencies = [ - "near-sdk-core", - "proc-macro2", - "quote", - "syn", + "near-units-core", + "near-units-macro", ] [[package]] -name = "near-sdk-sim" -version = "3.1.0" +name = "near-units-core" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdedcf70a6bf5b7d9062e2ebd3dbd80955d062f63b8da7a5d81e77e685fbbc89" +checksum = "89aa2a7985de87a08ca35f28abd8d00f0f901e704257e6e029aadef981386bc6" dependencies = [ - "funty", - "lazy-static-include", - "near-crypto", - "near-pool", - "near-primitives", - "near-runtime", - "near-sdk", - "near-store", - "near-vm-logic", + "num-format", + "regex", +] + +[[package]] +name = "near-units-macro" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ab45d066220846f9bd5c21e9ab88c47c892edd36f962ada78bf8308523171a" +dependencies = [ + "near-units-core", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "near-store" -version = "0.1.0-pre.1" +name = "near-vm-errors" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07e880d1d9a4ca5a1ca1ea0366fd80e295465f90cd0c1209f45d6d0b7a443ed4" +checksum = "e781248bed1f8e4792aee0c0362cf8bc831fc9f51573bc43807b5e07e0e7db81" dependencies = [ "borsh", - "byteorder", - "cached", - "derive_more", - "elastic-array", - "lazy_static", - "near-crypto", - "near-primitives", - "num_cpus", - "rand 0.7.3", - "rocksdb", + "hex 0.4.2", + "near-account-id 0.10.0", + "near-rpc-error-macro 0.10.0", "serde", - "serde_json", - "strum", ] [[package]] name = "near-vm-errors" -version = "4.0.0-pre.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e281d8730ed8cb0e3e69fb689acee6b93cdb43824cd69a8ffd7e1bfcbd1177d7" +checksum = "ffec816703a13b6ca5b3dbd0005e6eb5360087058203c93e859a019dbfd88300" dependencies = [ "borsh", - "hex", - "near-rpc-error-macro", + "hex 0.4.2", + "near-account-id 0.5.0", + "near-rpc-error-macro 0.5.0", "serde", ] [[package]] name = "near-vm-logic" -version = "4.0.0-pre.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11cb28a2d07f37680efdaf860f4c9802828c44fc50c08009e7884de75d982c5" +checksum = "9c06b3cb3ccf0423a9ba6908ccf07abe19c3c34319af200c733f34b7ac5af0ab" dependencies = [ - "base64", + "base64 0.13.0", "borsh", "bs58", "byteorder", - "near-primitives-core", - "near-runtime-utils", - "near-vm-errors", + "near-account-id 0.10.0", + "near-crypto 0.10.0", + "near-primitives 0.10.0", + "near-primitives-core 0.10.0", + "near-vm-errors 0.10.0", + "ripemd160", "serde", "sha2", "sha3", ] [[package]] -name = "near-vm-runner" -version = "4.0.0-pre.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93a66e94e12ec66a29674cc4efa975c280415aa0c944d7294cedbdb0c3858b48" -dependencies = [ - "anyhow", - "borsh", - "cached", - "log", - "near-primitives", - "near-vm-errors", - "near-vm-logic", - "parity-wasm", - "pwasm-utils", - "tracing", - "wasmer", - "wasmer-compiler-singlepass", - "wasmer-runtime-core-near", - "wasmer-runtime-near", - "wasmer-types", - "wasmtime", -] - -[[package]] -name = "nix" -version = "0.15.0" +name = "nodrop" +version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2e0b4f3320ed72aaedb9a5ac838690a8047c7b275da22711fddff4f8a14229" -dependencies = [ - "bitflags", - "cc", - "cfg-if 0.1.10", - "libc", - "void", -] +checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" [[package]] -name = "nom" -version = "5.1.2" +name = "ntapi" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" dependencies = [ - "memchr", - "version_check", + "winapi", ] [[package]] @@ -1787,6 +1681,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-format" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bafe4179722c2894288ee77a9f044f02811c86af699344c498b0840c698a2465" +dependencies = [ + "arrayvec 0.4.12", + "itoa 0.4.6", +] + [[package]] name = "num-integer" version = "0.1.44" @@ -1829,27 +1733,6 @@ dependencies = [ "libc", ] -[[package]] -name = "object" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37fd5004feb2ce328a52b0b3d01dbf4ffff72583493900ed15f22d4111c51693" -dependencies = [ - "crc32fast", - "indexmap", - "wasmparser 0.57.0", -] - -[[package]] -name = "object" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" -dependencies = [ - "crc32fast", - "indexmap", -] - [[package]] name = "object" version = "0.23.0" @@ -1875,27 +1758,64 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "page_size" -version = "0.4.2" +name = "openssl" +version = "0.10.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eebde548fbbf1ea81a99b128872779c437752fb99f217c45245e1a61dcd9edcd" +checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ + "bitflags", + "cfg-if 1.0.0", + "foreign-types", "libc", - "winapi", + "once_cell", + "openssl-sys", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.72" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +dependencies = [ + "autocfg", + "cc", + "libc", + "pkg-config", + "vcpkg", ] [[package]] name = "parity-scale-codec" -version = "2.1.1" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f518afaa5a47d0d6386229b0a6e01e86427291d643aa4cabb4992219f504f8" +checksum = "373b1a4c1338d9cd3d1fa53b3a11bdab5ab6bd80a20f7f7becd76953ae2be909" dependencies = [ "arrayvec 0.7.0", "bitvec", "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.1.0", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "parity-secp256k1" version = "0.7.0" @@ -1908,22 +1828,6 @@ dependencies = [ "rand 0.7.3", ] -[[package]] -name = "parity-wasm" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc878dac00da22f8f61e7af3157988424567ab01d9920b962ef7dcbd7cd865" - -[[package]] -name = "parking_lot" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.7.2", -] - [[package]] name = "parking_lot" version = "0.11.1" @@ -1931,22 +1835,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ "instant", - "lock_api 0.4.3", - "parking_lot_core 0.8.3", -] - -[[package]] -name = "parking_lot_core" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "smallvec", - "winapi", + "lock_api", + "parking_lot_core", ] [[package]] @@ -1963,18 +1853,32 @@ dependencies = [ "winapi", ] -[[package]] -name = "peeking_take_while" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19b17cddbe7ec3f8bc800887bab5e717348c95ea2ca0b1bf0837fb964dc67099" - [[package]] name = "percent-encoding" version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +[[package]] +name = "pin-project" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.0.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "pin-project-lite" version = "0.2.6" @@ -1987,6 +1891,21 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkg-config" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" + +[[package]] +name = "portpicker" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "be97d76faf1bfab666e1375477b23fde79eccf0276e9b63b92a39d676a889ba9" +dependencies = [ + "rand 0.8.4", +] + [[package]] name = "ppv-lite86" version = "0.2.10" @@ -1995,14 +1914,12 @@ checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "primitive-types" -version = "0.9.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2415937401cb030a2a0a4d922483f945fa068f52a7dbb22ce0fe5f2b6f6adace" +checksum = "05e4722c697a58a99d5d06a08c30821d7c082a4632198de1eaa5a6c22ef42373" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", "uint", ] @@ -2016,41 +1933,15 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-crate" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "1ebace6889caf889b4d3f76becee12e90353f2b8c7d875534a71e5742f8f6f83" dependencies = [ - "proc-macro2", - "quote", - "version_check", + "thiserror", + "toml", ] -[[package]] -name = "proc-macro-hack" -version = "0.5.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" - -[[package]] -name = "proc-macro-nested" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" - [[package]] name = "proc-macro2" version = "1.0.24" @@ -2069,7 +1960,7 @@ dependencies = [ "cfg-if 1.0.0", "fnv", "lazy_static", - "parking_lot 0.11.1", + "parking_lot", "protobuf", "regex", "thiserror", @@ -2081,17 +1972,6 @@ version = "2.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b7f4a129bb3754c25a4e04032a90173c68f85168f77118ac4cb4936e7f06f92" -[[package]] -name = "pwasm-utils" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f7a12f176deee919f4ba55326ee17491c8b707d0987aed822682c821b660192" -dependencies = [ - "byteorder", - "log", - "parity-wasm", -] - [[package]] name = "quote" version = "1.0.7" @@ -2122,9 +2002,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" +checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" dependencies = [ "libc", "rand_chacha 0.3.0", @@ -2188,42 +2068,6 @@ dependencies = [ "rand_core 0.6.2", ] -[[package]] -name = "raw-cpuid" -version = "7.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "beb71f708fe39b2c5e98076204c3cc094ee5a4c12c4cdb119a2b72dc34164f41" -dependencies = [ - "bitflags", - "cc", - "rustc_version", -] - -[[package]] -name = "rayon" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" -dependencies = [ - "autocfg", - "crossbeam-deque", - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-utils", - "lazy_static", - "num_cpus", -] - [[package]] name = "redox_syscall" version = "0.1.57" @@ -2240,93 +2084,118 @@ dependencies = [ ] [[package]] -name = "reed-solomon-erasure" -version = "4.0.2" +name = "redox_users" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" +checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" dependencies = [ - "smallvec", + "getrandom 0.1.16", + "redox_syscall 0.1.57", + "rust-argon2", ] [[package]] -name = "regalloc" -version = "0.0.30" +name = "redox_users" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2041c2d34f6ff346d6f428974f03d8bf12679b0c816bb640dc5eb1d48848d8d1" +checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" dependencies = [ - "log", - "rustc-hash", - "smallvec", + "getrandom 0.2.2", + "redox_syscall 0.2.6", ] [[package]] -name = "regalloc" -version = "0.0.31" +name = "reed-solomon-erasure" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" +checksum = "a415a013dd7c5d4221382329a5a3482566da675737494935cbbbcdec04662f9d" dependencies = [ - "log", - "rustc-hash", "smallvec", ] [[package]] name = "regex" -version = "1.4.3" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" +checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" dependencies = [ "aho-corasick", "memchr", "regex-syntax", - "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.22" +version = "0.6.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" +checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" [[package]] -name = "region" -version = "2.2.0" +name = "remove_dir_all" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "bitflags", - "libc", - "mach", "winapi", ] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "reqwest" +version = "0.11.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" +checksum = "87f242f1488a539a79bac6dbe7c8609ae43b7914b7736210f239a37cccb32525" dependencies = [ - "winapi", + "base64 0.13.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "lazy_static", + "log", + "mime", + "native-tls", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "tokio", + "tokio-native-tls", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "winreg", ] [[package]] -name = "rlp" -version = "0.5.0" +name = "ripemd160" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e54369147e3e7796c9b885c7304db87ca3d09a0a98f72843d532868675bbfba8" +checksum = "2eca4ecc81b7f313189bf73ce724400a07da2a6dac19588b03c8bd76a2dcc251" dependencies = [ - "bytes", - "rustc-hex", + "block-buffer 0.9.0", + "digest 0.9.0", + "opaque-debug 0.3.0", ] [[package]] -name = "rocksdb" -version = "0.15.0" +name = "rust-argon2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23d83c02c429044d58474eaf5ae31e062d0de894e21125b47437ec0edc1397e6" +checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" dependencies = [ - "libc", - "librocksdb-sys", + "base64 0.13.0", + "blake2b_simd", + "constant_time_eq", + "crossbeam-utils", ] [[package]] @@ -2335,27 +2204,12 @@ version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - [[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.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - [[package]] name = "ryu" version = "1.0.5" @@ -2363,59 +2217,58 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] -name = "scopeguard" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" - -[[package]] -name = "semver" -version = "0.9.0" +name = "schannel" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" dependencies = [ - "semver-parser", + "lazy_static", + "winapi", ] [[package]] -name = "semver-parser" -version = "0.7.0" +name = "scopeguard" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "serde" -version = "1.0.117" +name = "security-framework" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88fa983de7720629c9387e9f517353ed404164b1e482c970a90c1a4aaf7dc1a" +checksum = "23a2ac85147a3a11d77ecf1bc7166ec0b92febfa4461c37944e180f319ece467" dependencies = [ - "serde_derive", + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] -name = "serde-bench" -version = "0.0.7" +name = "security-framework-sys" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d733da87e79faaac25616e33d26299a41143fd4cd42746cbb0e91d8feea243fd" +checksum = "a57321bf8bc2362081b2599912d2961fe899c0efadf1b4b2f8d48b3e253bb96c" dependencies = [ - "byteorder", - "serde", + "core-foundation-sys", + "libc", ] [[package]] -name = "serde_bytes" -version = "0.11.5" +name = "serde" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" dependencies = [ - "serde", + "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.117" +version = "1.0.136" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbd1ae72adb44aab48f325a02444a5fc079349a8d804c1fc922aed3f7454c74e" +checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" dependencies = [ "proc-macro2", "quote", @@ -2424,12 +2277,24 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.60" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1500e84d27fe482ed1dc791a56eddc2f230046a040fa908c08bda1d9fb615779" +checksum = "d23c1ba4cf0efd44be32017709280b32d1cea5c3f1275c3b6d9e8bc54f758085" dependencies = [ "indexmap", - "itoa", + "itoa 1.0.1", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa 1.0.1", "ryu", "serde", ] @@ -2461,10 +2326,13 @@ dependencies = [ ] [[package]] -name = "shlex" -version = "0.1.1" +name = "signal-hook-registry" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fdf1b9db47230893d76faad238fd6097fd6d6a9245cd7a4d90dbd639536bbd2" +checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" +dependencies = [ + "libc", +] [[package]] name = "signature" @@ -2473,19 +2341,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f0242b8e50dd9accdd56170e94ca1ebd223b098eb9c83539a6e367d0f36ae68" [[package]] -name = "slab" -version = "0.4.3" +name = "siphasher" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" +checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" [[package]] -name = "slash-formatter" -version = "3.1.1" +name = "slab" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55a065b7c425d213cbefcaaa4b62dd936183fa41c806a74767c72dd659ff4ad0" -dependencies = [ - "concat-with", -] +checksum = "f173ac3d1a7e3b28003f40de0b5ce7fe2710f9b9dc3fc38664cebee46b3b6527" [[package]] name = "smallvec" @@ -2505,10 +2370,14 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" +name = "socket2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +dependencies = [ + "libc", + "winapi", +] [[package]] name = "static_assertions" @@ -2516,18 +2385,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "strsim" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - [[package]] name = "strum" version = "0.20.0" @@ -2557,9 +2414,9 @@ checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "1.0.57" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4211ce9909eb971f111059df92c45640aad50a619cf55cd76476be803c4c68e6" +checksum = "6498a9efc342871f91cc2d0d694c674368b4ceb40f62b65a7a08c3792935e702" dependencies = [ "proc-macro2", "quote", @@ -2585,16 +2442,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "target-lexicon" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab0e7238dcc7b40a7be719a25365910f6807bd864f4cce6b2e6b873658e2b19d" - -[[package]] -name = "target-lexicon" -version = "0.11.2" +name = "tar" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" +dependencies = [ + "filetime", + "libc", + "xattr", +] [[package]] name = "tempfile" @@ -2604,7 +2460,7 @@ checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ "cfg-if 1.0.0", "libc", - "rand 0.8.3", + "rand 0.8.4", "redox_syscall 0.2.6", "remove_dir_all", "winapi", @@ -2612,33 +2468,24 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.24" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.24" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", "syn", ] -[[package]] -name = "thread_local" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" -dependencies = [ - "once_cell", -] - [[package]] name = "time" version = "0.1.43" @@ -2649,15 +2496,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - [[package]] name = "tinyvec" version = "1.2.0" @@ -2674,31 +2512,29 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] -name = "toml" -version = "0.5.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" -dependencies = [ - "serde", -] - -[[package]] -name = "tracing" -version = "0.1.25" +name = "tokio" +version = "1.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" +checksum = "0c27a64b625de6d309e8c57716ba93021dccf1b3b5c97edd6d3dd2d2135afc0a" dependencies = [ - "cfg-if 1.0.0", + "bytes", + "libc", + "memchr", + "mio", + "num_cpus", + "once_cell", + "parking_lot", "pin-project-lite", - "tracing-attributes", - "tracing-core", + "signal-hook-registry", + "tokio-macros", + "winapi", ] [[package]] -name = "tracing-attributes" -version = "0.1.15" +name = "tokio-macros" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" +checksum = "b557f72f448c511a979e2564e55d74e6c4432fc96ff4f6241bc6bded342643b7" dependencies = [ "proc-macro2", "quote", @@ -2706,581 +2542,306 @@ dependencies = [ ] [[package]] -name = "tracing-core" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "typenum" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" - -[[package]] -name = "uint" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e" -dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" -dependencies = [ - "matches", -] - -[[package]] -name = "unicode-normalization" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" - -[[package]] -name = "unicode-xid" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" - -[[package]] -name = "url" -version = "2.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" -dependencies = [ - "form_urlencoded", - "idna", - "matches", - "percent-encoding", -] - -[[package]] -name = "validator" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" -dependencies = [ - "idna", - "lazy_static", - "regex", - "serde", - "serde_derive", - "serde_json", - "url", - "validator_types", -] - -[[package]] -name = "validator_types" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" - -[[package]] -name = "version_check" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" - -[[package]] -name = "void" -version = "1.0.2" +name = "tokio-native-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" - -[[package]] -name = "w_near" -version = "1.0.0" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ - "near-contract-standards", - "near-sdk", - "near-sdk-sim", + "native-tls", + "tokio", ] [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" - -[[package]] -name = "wasmer" -version = "1.0.2" +name = "tokio-retry" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a70cfae554988d904d64ca17ab0e7cd652ee5c8a0807094819c1ea93eb9d6866" +checksum = "7f57eb36ecbe0fc510036adff84824dd3c24bb781e21bfa67b69d556aa85214f" dependencies = [ - "cfg-if 0.1.10", - "indexmap", - "more-asserts", - "target-lexicon 0.11.2", - "thiserror", - "wasmer-compiler", - "wasmer-compiler-cranelift", - "wasmer-derive", - "wasmer-engine", - "wasmer-engine-jit", - "wasmer-engine-native", - "wasmer-types", - "wasmer-vm", - "wat", - "winapi", + "pin-project", + "rand 0.8.4", + "tokio", ] [[package]] -name = "wasmer-compiler" -version = "1.0.2" +name = "tokio-util" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7732a9cab472bd921d5a0c422f45b3d03f62fa2c40a89e0770cef6d47e383e" +checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" dependencies = [ - "enumset", - "serde", - "serde_bytes", - "smallvec", - "target-lexicon 0.11.2", - "thiserror", - "wasmer-types", - "wasmer-vm", - "wasmparser 0.65.0", + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "tokio", ] [[package]] -name = "wasmer-compiler-cranelift" -version = "1.0.2" +name = "toml" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48cb9395f094e1d81534f4c5e330ed4cdb424e8df870d29ad585620284f5fddb" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ - "cranelift-codegen 0.68.0", - "cranelift-frontend 0.68.0", - "gimli 0.22.0", - "more-asserts", - "rayon", "serde", - "smallvec", - "tracing", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", ] [[package]] -name = "wasmer-compiler-singlepass" -version = "1.0.2" +name = "tower-service" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" + +[[package]] +name = "tracing" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "426ae6ef0f606ca815510f3e2ef6f520e217514bfb7a664defe180b9a9e75d07" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ - "byteorder", - "dynasm", - "dynasmrt", - "lazy_static", - "more-asserts", - "rayon", - "serde", - "smallvec", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", + "cfg-if 1.0.0", + "pin-project-lite", + "tracing-attributes", + "tracing-core", ] [[package]] -name = "wasmer-derive" -version = "1.0.2" +name = "tracing-attributes" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b86dcd2c3efdb8390728a2b56f762db07789aaa5aa872a9dc776ba3a7912ed" +checksum = "c42e6fa53307c8a17e4ccd4dc81cf5ec38db9209f59b222210375b54ee40d1e2" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", "syn", ] [[package]] -name = "wasmer-engine" -version = "1.0.2" +name = "tracing-core" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efe4667d6bd888f26ae8062a63a9379fa697415b4b4e380f33832e8418fd71b5" +checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" dependencies = [ - "backtrace", - "bincode", "lazy_static", - "memmap2", - "more-asserts", - "rustc-demangle", - "serde", - "serde_bytes", - "target-lexicon 0.11.2", - "thiserror", - "wasmer-compiler", - "wasmer-types", - "wasmer-vm", ] [[package]] -name = "wasmer-engine-jit" -version = "1.0.2" +name = "try-lock" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26770be802888011b4a3072f2a282fc2faa68aa48c71b3db6252a3937a85f3da" -dependencies = [ - "bincode", - "cfg-if 0.1.10", - "region", - "serde", - "serde_bytes", - "wasmer-compiler", - "wasmer-engine", - "wasmer-types", - "wasmer-vm", - "winapi", -] +checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" [[package]] -name = "wasmer-engine-native" -version = "1.0.2" +name = "typenum" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bb4083a6c69f2cd4b000b82a80717f37c6cc2e536aee3a8ffe9af3edc276a8b" -dependencies = [ - "bincode", - "cfg-if 0.1.10", - "leb128", - "libloading 0.6.7", - "serde", - "tempfile", - "tracing", - "wasmer-compiler", - "wasmer-engine", - "wasmer-object", - "wasmer-types", - "wasmer-vm", - "which", -] +checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] -name = "wasmer-object" -version = "1.0.2" +name = "uint" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf8e0c12b82ff81ebecd30d7e118be5fec871d6de885a90eeb105df0a769a7b" +checksum = "e11fe9a9348741cf134085ad57c249508345fe16411b3d7fb4ff2da2f1d6382e" dependencies = [ - "object 0.22.0", - "thiserror", - "wasmer-compiler", - "wasmer-types", + "byteorder", + "crunchy", + "hex 0.4.2", + "static_assertions", ] [[package]] -name = "wasmer-runtime-core-near" -version = "0.17.1" +name = "unicode-bidi" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2390b0b8cf58615c2f8b454d9535e1aed1d14c510cc1ce1af806a1992ad53300" +checksum = "eeb8be209bb1c96b7c177c7420d26e04eccacb0eeae6b980e35fcb74678107e0" dependencies = [ - "bincode", - "blake3", - "cc", - "digest 0.8.1", - "errno", - "hex", - "indexmap", - "lazy_static", - "libc", - "nix", - "page_size", - "parking_lot 0.10.2", - "rustc_version", - "serde", - "serde-bench", - "serde_bytes", - "serde_derive", - "smallvec", - "target-lexicon 0.10.0", - "wasmparser 0.51.4", - "winapi", + "matches", ] [[package]] -name = "wasmer-runtime-near" -version = "0.17.1" +name = "unicode-normalization" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6660e86bc7697fa29bab902214d5b33d394a990826c401b10816bcd285f938f" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ - "lazy_static", - "memmap", - "serde", - "serde_derive", - "wasmer-runtime-core-near", - "wasmer-singlepass-backend-near", + "tinyvec", ] [[package]] -name = "wasmer-singlepass-backend-near" -version = "0.17.1" +name = "unicode-segmentation" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" + +[[package]] +name = "unicode-xid" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" + +[[package]] +name = "url" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3f23543ef8f59667be4945c22eb4b1a50a79ff340555f6f23354223d2695541" +checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" dependencies = [ - "bincode", - "byteorder", - "dynasm", - "dynasmrt", - "lazy_static", - "libc", - "nix", + "form_urlencoded", + "idna", + "matches", + "percent-encoding", "serde", - "serde_derive", - "smallvec", - "wasmer-runtime-core-near", ] [[package]] -name = "wasmer-types" -version = "1.0.2" +name = "uuid" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7f4ac28c2951cd792c18332f03da523ed06b170f5cf6bb5b1bdd7e36c2a8218" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "cranelift-entity 0.68.0", - "serde", - "thiserror", + "getrandom 0.2.2", ] [[package]] -name = "wasmer-vm" -version = "1.0.2" +name = "validator" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7635ba0b6d2fd325f588d69a950ad9fa04dddbf6ad08b6b2a183146319bf6ae" +checksum = "841d6937c33ec6039d8071bcf72933146b5bbe378d645d8fa59bdadabfc2a249" dependencies = [ - "backtrace", - "cc", - "cfg-if 0.1.10", - "indexmap", - "libc", - "memoffset 0.6.3", - "more-asserts", - "region", + "idna", + "lazy_static", + "regex", "serde", - "thiserror", - "wasmer-types", - "winapi", + "serde_derive", + "serde_json", + "url", + "validator_types", ] [[package]] -name = "wasmparser" -version = "0.51.4" +name = "validator_types" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aeb1956b19469d1c5e63e459d29e7b5aa0f558d9f16fcef09736f8a265e6c10a" +checksum = "ad9680608df133af2c1ddd5eaf1ddce91d60d61b6bc51494ef326458365a470a" [[package]] -name = "wasmparser" -version = "0.57.0" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32fddd575d477c6e9702484139cf9f23dcd554b06d185ed0f56c857dd3a47aa6" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] -name = "wasmparser" -version = "0.59.0" +name = "version_check" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a950e6a618f62147fd514ff445b2a0b53120d382751960797f85f058c7eda9b9" +checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] -name = "wasmparser" -version = "0.65.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc2fe6350834b4e528ba0901e7aa405d78b89dc1fa3145359eb4de0e323fcf" +name = "w_near" +version = "1.0.0" +dependencies = [ + "anyhow", + "near-contract-standards", + "near-primitives 0.5.0", + "near-sdk", + "near-units", + "tokio", + "workspaces", +] [[package]] -name = "wasmtime" -version = "0.20.0" +name = "want" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "373b87ebd6721f4121e28eeaaa41943548c48bcca04ac9bb063004207e5e7d70" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "anyhow", - "backtrace", - "bincode", - "cfg-if 0.1.10", - "lazy_static", - "libc", "log", - "region", - "rustc-demangle", - "serde", - "smallvec", - "target-lexicon 0.11.2", - "wasmparser 0.59.0", - "wasmtime-environ", - "wasmtime-jit", - "wasmtime-profiling", - "wasmtime-runtime", - "winapi", + "try-lock", ] [[package]] -name = "wasmtime-cranelift" -version = "0.20.0" +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40c01df908e54d40bed80326ade122825d464888991beafd950d186f1be309c2" -dependencies = [ - "cranelift-codegen 0.67.0", - "cranelift-entity 0.67.0", - "cranelift-frontend 0.67.0", - "cranelift-wasm", - "wasmtime-environ", -] +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" [[package]] -name = "wasmtime-debug" -version = "0.20.0" +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28962772f96fadb79dc7be5ade135ca55d2b0017a012f4869e2476a03abbe733" -dependencies = [ - "anyhow", - "gimli 0.21.0", - "more-asserts", - "object 0.21.1", - "target-lexicon 0.11.2", - "thiserror", - "wasmparser 0.59.0", - "wasmtime-environ", -] +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] -name = "wasmtime-environ" -version = "0.20.0" +name = "wasm-bindgen" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c0d7401bf253b7b1f426afd70d285bb23ea9a1c7605d6af788c95db5084edf5" +checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" dependencies = [ - "anyhow", - "cfg-if 0.1.10", - "cranelift-codegen 0.67.0", - "cranelift-entity 0.67.0", - "cranelift-wasm", - "gimli 0.21.0", - "indexmap", - "log", - "more-asserts", - "serde", - "thiserror", - "wasmparser 0.59.0", + "cfg-if 1.0.0", + "wasm-bindgen-macro", ] [[package]] -name = "wasmtime-jit" -version = "0.20.0" +name = "wasm-bindgen-backend" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c838a108318e7c5a2201addb3d3b27a6ef3d142f0eb0addc815b9c2541e5db5" +checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" dependencies = [ - "anyhow", - "cfg-if 0.1.10", - "cranelift-codegen 0.67.0", - "cranelift-entity 0.67.0", - "cranelift-frontend 0.67.0", - "cranelift-native", - "cranelift-wasm", - "gimli 0.21.0", + "bumpalo", + "lazy_static", "log", - "more-asserts", - "object 0.21.1", - "region", - "serde", - "target-lexicon 0.11.2", - "thiserror", - "wasmparser 0.59.0", - "wasmtime-cranelift", - "wasmtime-debug", - "wasmtime-environ", - "wasmtime-obj", - "wasmtime-profiling", - "wasmtime-runtime", - "winapi", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] -name = "wasmtime-obj" -version = "0.20.0" +name = "wasm-bindgen-futures" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc8422b0acce519b74c3ae5db59167c611ea92220e5c334ad406e977277e0f23" +checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" dependencies = [ - "anyhow", - "more-asserts", - "object 0.21.1", - "target-lexicon 0.11.2", - "wasmtime-debug", - "wasmtime-environ", + "cfg-if 1.0.0", + "js-sys", + "wasm-bindgen", + "web-sys", ] [[package]] -name = "wasmtime-profiling" -version = "0.20.0" +name = "wasm-bindgen-macro" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33f2689bf523f843555e57e24d59abf0c5013007366b866081d73a15e510b4b2" +checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" dependencies = [ - "anyhow", - "cfg-if 0.1.10", - "lazy_static", - "libc", - "serde", - "target-lexicon 0.11.2", - "wasmtime-environ", - "wasmtime-runtime", + "quote", + "wasm-bindgen-macro-support", ] [[package]] -name = "wasmtime-runtime" -version = "0.20.0" +name = "wasm-bindgen-macro-support" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7353f5e79390048128e44b5ceda7255723b2066de4026df9a168b0b2593df71" +checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" dependencies = [ - "backtrace", - "cc", - "cfg-if 0.1.10", - "indexmap", - "lazy_static", - "libc", - "log", - "memoffset 0.5.6", - "more-asserts", - "region", - "thiserror", - "wasmtime-environ", - "winapi", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", ] [[package]] -name = "wast" -version = "35.0.2" +name = "wasm-bindgen-shared" +version = "0.2.79" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ef140f1b49946586078353a453a1d28ba90adfc54dde75710bc1931de204d68" -dependencies = [ - "leb128", -] +checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" [[package]] -name = "wat" -version = "1.0.37" +name = "web-sys" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ec280a739b69173e0ffd12c1658507996836ba4e992ed9bc1e5385a0bd72a02" +checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" dependencies = [ - "wast", + "js-sys", + "wasm-bindgen", ] [[package]] @@ -3295,16 +2856,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "which" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b55551e42cbdf2ce2bedd2203d0cc08dba002c27510f86dab6d0ce304cba3dfe" -dependencies = [ - "either", - "libc", -] - [[package]] name = "winapi" version = "0.3.9" @@ -3327,12 +2878,60 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "winreg" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" +dependencies = [ + "winapi", +] + +[[package]] +name = "workspaces" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f46b5b989c75d33dad4dfee4a5e402d87cae8f72129fe6d0126800883c2b83b" +dependencies = [ + "anyhow", + "async-trait", + "base64 0.13.0", + "borsh", + "chrono", + "dirs 3.0.2", + "hex 0.4.2", + "libc", + "near-account-id 0.5.0", + "near-crypto 0.5.0", + "near-jsonrpc-client", + "near-jsonrpc-primitives", + "near-primitives 0.5.0", + "near-sandbox-utils", + "portpicker", + "rand 0.8.4", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-retry", + "url", +] + [[package]] name = "wyz" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" +[[package]] +name = "xattr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +dependencies = [ + "libc", +] + [[package]] name = "zeroize" version = "1.3.0" @@ -3353,3 +2952,17 @@ dependencies = [ "syn", "synstructure", ] + +[[package]] +name = "zip" +version = "0.5.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +dependencies = [ + "byteorder", + "bzip2", + "crc32fast", + "flate2", + "thiserror", + "time", +] diff --git a/w-near/Cargo.toml b/w-near/Cargo.toml index 30045e14..2b5a8bda 100644 --- a/w-near/Cargo.toml +++ b/w-near/Cargo.toml @@ -5,14 +5,18 @@ authors = ["Near Inc ", "Vincent "] +edition = "2018" + +[lib] +crate-type = ["cdylib"] + +[dependencies] +near-sdk = "4.0.0-pre.7" +near-contract-standards = "4.0.0-pre.7" diff --git a/w-near/test-w-near-defi/src/lib.rs b/w-near/test-w-near-defi/src/lib.rs new file mode 100644 index 00000000..b599fada --- /dev/null +++ b/w-near/test-w-near-defi/src/lib.rs @@ -0,0 +1,92 @@ +/*! +Some hypothetical DeFi contract that will do smart things with the transferred tokens +*/ +use near_contract_standards::fungible_token::receiver::FungibleTokenReceiver; +use near_sdk::borsh::{self, BorshDeserialize, BorshSerialize}; +use near_sdk::json_types::U128; +use near_sdk::{ + env, ext_contract, log, near_bindgen, require, AccountId, Balance, Gas, PanicOnDefault, + PromiseOrValue, +}; + +const BASE_GAS: u64 = 5_000_000_000_000; +const PROMISE_CALL: u64 = 5_000_000_000_000; +const GAS_FOR_FT_ON_TRANSFER: Gas = Gas(BASE_GAS + PROMISE_CALL); + +const NO_DEPOSIT: Balance = 0; + +#[near_bindgen] +#[derive(BorshDeserialize, BorshSerialize, PanicOnDefault)] +pub struct DeFi { + fungible_token_account_id: AccountId, +} + +// Defining cross-contract interface. This allows to create a new promise. +#[ext_contract(ext_self)] +pub trait ValueReturnTrait { + fn value_please(&self, amount_to_return: String) -> PromiseOrValue; +} + +// Have to repeat the same trait for our own implementation. +trait ValueReturnTrait { + fn value_please(&self, amount_to_return: String) -> PromiseOrValue; +} + +#[near_bindgen] +impl DeFi { + #[init] + pub fn new(fungible_token_account_id: AccountId) -> Self { + require!(!env::state_exists(), "Already initialized"); + Self { + fungible_token_account_id, + } + } +} + +#[near_bindgen] +impl FungibleTokenReceiver for DeFi { + /// If given `msg: "invest", immediately returns U128::From(0) + /// Otherwise, makes a cross-contract call to own `value_please` function, passing `msg` + /// value_please will attempt to parse `msg` as an integer and return a U128 version of it + fn ft_on_transfer( + &mut self, + sender_id: AccountId, + amount: U128, + msg: String, + ) -> PromiseOrValue { + // Verifying that we were called by fungible token contract that we expect. + require!( + env::predecessor_account_id() == self.fungible_token_account_id, + "Only supports the one fungible token contract" + ); + log!( + "in {} tokens from @{} ft_on_transfer, msg = {}", + amount.0, + sender_id.as_ref(), + msg + ); + match msg.as_str() { + "invest" => PromiseOrValue::Value(U128::from(0)), + _ => { + let prepaid_gas = env::prepaid_gas(); + let account_id = env::current_account_id(); + ext_self::value_please( + msg, + account_id, + NO_DEPOSIT, + prepaid_gas - GAS_FOR_FT_ON_TRANSFER, + ) + .into() + } + } + } +} + +#[near_bindgen] +impl ValueReturnTrait for DeFi { + fn value_please(&self, amount_to_return: String) -> PromiseOrValue { + log!("in value_please, amount_to_return = {}", amount_to_return); + let amount: Balance = amount_to_return.parse().expect("Not an integer"); + PromiseOrValue::Value(amount.into()) + } +} diff --git a/w-near/tests/mod.rs b/w-near/tests/mod.rs deleted file mode 100644 index b335d657..00000000 --- a/w-near/tests/mod.rs +++ /dev/null @@ -1,194 +0,0 @@ -use near_sdk::json_types::U128; -use near_sdk::serde_json::json; -use near_sdk::Balance; -use near_sdk_sim::{ - call, deploy, init_simulator, to_yocto, view, ContractAccount, ExecutionResult, UserAccount, - DEFAULT_GAS, -}; -use w_near::ContractContract as Contract; - -near_sdk_sim::lazy_static_include::lazy_static_include_bytes! { - W_NEAR_WASM_BYTES => "res/w_near.wasm", - LEGACY_W_NEAR_WASM_BYTES => "res/legacy_w_near.wasm", -} - -const CONTRACT_ID: &str = "wrapnear"; -const LEGACY_BYTE_COST: Balance = 10_000_000_000_000_000_000; - -const STORAGE_BALANCE: Balance = 125 * LEGACY_BYTE_COST; - -// Register the given `user` with Legacy wNEAR contract -fn legacy_register_user(user: &UserAccount) { - user.call( - CONTRACT_ID.to_string(), - "storage_deposit", - &json!({ - "account_id": user.valid_account_id() - }) - .to_string() - .into_bytes(), - DEFAULT_GAS / 2, - 125 * LEGACY_BYTE_COST, // attached deposit - ) - .assert_success(); -} - -fn wrap_near(user: &UserAccount, amount: Balance) -> ExecutionResult { - user.call( - CONTRACT_ID.to_string(), - "near_deposit", - &json!({ - "account_id": user.valid_account_id() - }) - .to_string() - .into_bytes(), - DEFAULT_GAS / 2, - amount, // attached deposit - ) -} - -fn deploy_legacy() -> (UserAccount, ContractAccount) { - let root = init_simulator(None); - let w_near = deploy!( - contract: Contract, - contract_id: CONTRACT_ID.to_string(), - bytes: &LEGACY_W_NEAR_WASM_BYTES, - signer_account: root, - init_method: new() - ); - (root, w_near) -} - -fn deploy_w_near() -> (UserAccount, ContractAccount) { - let root = init_simulator(None); - let w_near = deploy!( - contract: Contract, - contract_id: CONTRACT_ID.to_string(), - bytes: &W_NEAR_WASM_BYTES, - signer_account: root, - init_method: new() - ); - (root, w_near) -} - -#[test] -pub fn test_upgrade() { - let (root, w_near) = deploy_legacy(); - - let legacy_storage_minimum_balance: U128 = - view!(w_near.storage_minimum_balance()).unwrap_json(); - assert_eq!(legacy_storage_minimum_balance.0, STORAGE_BALANCE); - - let alice = root.create_user("alice".to_string(), to_yocto("100")); - legacy_register_user(&alice); - - wrap_near(&alice, to_yocto("10")).assert_success(); - - let alice_balance: U128 = view!(w_near.ft_balance_of(alice.valid_account_id())).unwrap_json(); - assert_eq!(alice_balance.0, to_yocto("10")); - - w_near - .user_account - .create_transaction(CONTRACT_ID.to_string()) - .deploy_contract(W_NEAR_WASM_BYTES.to_vec()) - .submit() - .assert_success(); - - let storage_minimum_balance: U128 = view!(w_near.storage_minimum_balance()).unwrap_json(); - assert_eq!(storage_minimum_balance.0, STORAGE_BALANCE); - - let alice_balance: U128 = view!(w_near.ft_balance_of(alice.valid_account_id())).unwrap_json(); - assert_eq!(alice_balance.0, to_yocto("10")); - - let bob = root.create_user("bob".to_string(), to_yocto("100")); - legacy_register_user(&bob); - - wrap_near(&bob, to_yocto("15")).assert_success(); - - let bob_balance: U128 = view!(w_near.ft_balance_of(bob.valid_account_id())).unwrap_json(); - assert_eq!(bob_balance.0, to_yocto("15")); - - call!( - alice, - w_near.ft_transfer(bob.valid_account_id(), to_yocto("5").into(), None), - deposit = 1 - ) - .assert_success(); - - let bob_balance: U128 = view!(w_near.ft_balance_of(bob.valid_account_id())).unwrap_json(); - assert_eq!(bob_balance.0, to_yocto("20")); -} - -#[test] -pub fn test_legacy_ft_transfer() { - let (root, w_near) = deploy_legacy(); - - let alice = root.create_user("alice".to_string(), to_yocto("100")); - legacy_register_user(&alice); - - wrap_near(&alice, to_yocto("10")).assert_success(); - - let alice_balance: U128 = view!(w_near.ft_balance_of(alice.valid_account_id())).unwrap_json(); - assert_eq!(alice_balance.0, to_yocto("10")); - - let bob = root.create_user("bob".to_string(), to_yocto("100")); - legacy_register_user(&bob); - - call!( - alice, - w_near.ft_transfer(bob.valid_account_id(), to_yocto("5").into(), None), - deposit = 1 - ) - .assert_success(); - - let bob_balance: U128 = view!(w_near.ft_balance_of(bob.valid_account_id())).unwrap_json(); - assert_eq!(bob_balance.0, to_yocto("5")); -} - -#[test] -pub fn test_ft_transfer() { - let (root, w_near) = deploy_w_near(); - - let alice = root.create_user("alice".to_string(), to_yocto("100")); - legacy_register_user(&alice); - - wrap_near(&alice, to_yocto("10")).assert_success(); - - let alice_balance: U128 = view!(w_near.ft_balance_of(alice.valid_account_id())).unwrap_json(); - assert_eq!(alice_balance.0, to_yocto("10")); - - let bob = root.create_user("bob".to_string(), to_yocto("100")); - legacy_register_user(&bob); - - call!( - alice, - w_near.ft_transfer(bob.valid_account_id(), to_yocto("5").into(), None), - deposit = 1 - ) - .assert_success(); - - let bob_balance: U128 = view!(w_near.ft_balance_of(bob.valid_account_id())).unwrap_json(); - assert_eq!(bob_balance.0, to_yocto("5")); -} - -#[test] -pub fn test_legacy_wrap_fail() { - let (root, _w_near) = deploy_legacy(); - - let alice = root.create_user("alice".to_string(), to_yocto("100")); - - let status = wrap_near(&alice, to_yocto("10")); - assert!(!status.is_ok()) -} - -#[test] -pub fn test_wrap_without_storage_deposit() { - let (root, w_near) = deploy_w_near(); - - let alice = root.create_user("alice".to_string(), to_yocto("100")); - - wrap_near(&alice, to_yocto("10")).assert_success(); - - let alice_balance: U128 = view!(w_near.ft_balance_of(alice.valid_account_id())).unwrap_json(); - assert_eq!(alice_balance.0, to_yocto("10") - STORAGE_BALANCE); -} diff --git a/w-near/tests/workspaces/main.rs b/w-near/tests/workspaces/main.rs new file mode 100644 index 00000000..3cc35397 --- /dev/null +++ b/w-near/tests/workspaces/main.rs @@ -0,0 +1,5 @@ +mod test_legacy; +mod test_storage; +mod test_transfer; +mod test_w_near; +mod utils; diff --git a/w-near/tests/workspaces/test_legacy.rs b/w-near/tests/workspaces/test_legacy.rs new file mode 100644 index 00000000..7e1915b6 --- /dev/null +++ b/w-near/tests/workspaces/test_legacy.rs @@ -0,0 +1,156 @@ +use crate::utils::{create_user, init_legacy, legacy_register_user, wrap_near, STORAGE_BALANCE}; +use near_primitives::views::FinalExecutionStatus; +use near_sdk::json_types::U128; +use near_sdk::ONE_YOCTO; +use near_units::parse_near; + +#[tokio::test] +async fn test_upgrade() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_legacy(&worker).await?; + + let alice = legacy_register_user("alice", &contract, &worker).await?; + + let legacy_storage_minimum_balance: U128 = contract + .call(&worker, "storage_minimum_balance") + .view() + .await? + .json()?; + assert_eq!(legacy_storage_minimum_balance.0, STORAGE_BALANCE); + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + let contract = contract + .as_account() + .deploy(&worker, include_bytes!("../../res/w_near.wasm").to_vec()) + .await? + .result; + + let storage_minimum_balance: U128 = contract + .call(&worker, "storage_minimum_balance") + .view() + .await? + .json()?; + assert_eq!(storage_minimum_balance.0, STORAGE_BALANCE); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + let bob = create_user("bob", &contract, &worker).await?; + + let res = wrap_near(&bob, &contract, &worker, parse_near!("1.5 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let bob_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((bob.id(),))? + .view() + .await? + .json()?; + assert_eq!(bob_balance.0, parse_near!("1.5 N")); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer") + .args_json(( + bob.id(), + U128::from(parse_near!("0.5 N")), + Option::::None, + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let bob_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((bob.id(),))? + .view() + .await? + .json()?; + assert_eq!(bob_balance.0, parse_near!("2 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_legacy_ft_transfer() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_legacy(&worker).await?; + + let alice = legacy_register_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + let bob = legacy_register_user("bob", &contract, &worker).await?; + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer") + .args_json(( + bob.id(), + U128::from(parse_near!("0.5 N")), + Option::::None, + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let bob_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((bob.id(),))? + .view() + .await? + .json()?; + assert_eq!(bob_balance.0, parse_near!("0.5 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_legacy_wrap_fail() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_legacy(&worker).await?; + + // Create a user, but do not register them + let res = contract + .as_account() + .create_subaccount(&worker, "alice") + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let alice = res.result; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::Failure(_))); + + Ok(()) +} diff --git a/w-near/tests/workspaces/test_storage.rs b/w-near/tests/workspaces/test_storage.rs new file mode 100644 index 00000000..5958ff01 --- /dev/null +++ b/w-near/tests/workspaces/test_storage.rs @@ -0,0 +1,222 @@ +use crate::utils::{create_user, init_w_near, wrap_near, LEGACY_BYTE_COST, STORAGE_BALANCE}; +use near_contract_standards::storage_management::StorageBalance; +use near_primitives::views::FinalExecutionStatus; +use near_sdk::json_types::U128; +use near_sdk::ONE_YOCTO; +use near_units::parse_near; + +#[tokio::test] +async fn test_wrap_without_storage_deposit() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + // Create a user, but do not register them + let res = contract + .as_account() + .create_subaccount(&worker, "alice") + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let alice = res.result; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N") - STORAGE_BALANCE); + + Ok(()) +} + +#[tokio::test] +async fn test_close_account_empty_balance() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = alice + .call(&worker, contract.id().clone(), "storage_unregister") + .args_json((Option::::None,))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(res.json::()?); + + Ok(()) +} + +#[tokio::test] +async fn test_close_account_non_empty_balance() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "storage_unregister") + .args_json((Option::::None,))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("Can't unregister the account with the positive balance without force")); + + let res = alice + .call(&worker, contract.id().clone(), "storage_unregister") + .args_json((Some(false),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("Can't unregister the account with the positive balance without force")); + + let res = alice + .call(&worker, contract.id().clone(), "storage_unregister") + .args_json((Some(true),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(res.json::()?); + + Ok(()) +} + +#[tokio::test] +async fn test_disallow_non_zero_storage_withdrawal() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let alice_storage_balance = alice + .call(&worker, contract.id().clone(), "storage_withdraw") + .args_json((U128::from(0),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await? + .json::()?; + assert_eq!(alice_storage_balance.total.0, 125 * LEGACY_BYTE_COST); + assert_eq!(alice_storage_balance.available.0, 0); + + let res = alice + .call(&worker, contract.id().clone(), "storage_withdraw") + .args_json((U128::from(1),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("The amount is greater than the available storage balance")); + + Ok(()) +} + +#[tokio::test] +async fn test_disallow_storage_withdrawal_for_non_registered() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let res = contract + .as_account() + .create_subaccount(&worker, "alice") + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let alice = res.result; + + let res = alice + .call(&worker, contract.id().clone(), "storage_withdraw") + .args_json((U128::from(0),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()).contains("not registered")); + + Ok(()) +} + +#[tokio::test] +async fn test_double_storage_deposit() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let alice_storage_balance = contract + .call(&worker, "storage_balance_of") + .args_json((alice.id(),))? + .gas(300_000_000_000_000) + .view() + .await? + .json::>()? + .unwrap(); + assert_eq!(alice_storage_balance.total.0, 125 * LEGACY_BYTE_COST); + assert_eq!(alice_storage_balance.available.0, 0); + + let alice_storage_balance = contract + .call(&worker, "storage_deposit") + .args_json((alice.id(), Option::::None))? + .gas(300_000_000_000_000) + .deposit(125 * LEGACY_BYTE_COST) + .transact() + .await? + .json::()?; + // Total storage balance remains the same + assert_eq!(alice_storage_balance.total.0, 125 * LEGACY_BYTE_COST); + assert_eq!(alice_storage_balance.available.0, 0); + + Ok(()) +} + +#[tokio::test] +async fn test_insufficient_storage_deposit() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let res = contract + .as_account() + .create_subaccount(&worker, "alice") + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let alice = res.result; + + let res = contract + .call(&worker, "storage_deposit") + .args_json((alice.id(), Option::::None))? + .gas(300_000_000_000_000) + .deposit(125 * LEGACY_BYTE_COST - 1) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("The attached deposit is less than the minimum storage balance")); + + Ok(()) +} diff --git a/w-near/tests/workspaces/test_transfer.rs b/w-near/tests/workspaces/test_transfer.rs new file mode 100644 index 00000000..2d5588da --- /dev/null +++ b/w-near/tests/workspaces/test_transfer.rs @@ -0,0 +1,365 @@ +use crate::utils::{create_user, init_defi, init_w_near, register_user, wrap_near}; +use near_primitives::views::FinalExecutionStatus; +use near_sdk::json_types::U128; +use near_sdk::ONE_YOCTO; +use near_units::parse_near; + +#[tokio::test] +async fn test_ft_transfer() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + let bob = create_user("bob", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer") + .args_json(( + bob.id(), + U128::from(parse_near!("0.5 N")), + Option::::None, + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("0.5 N")); + + let bob_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((bob.id(),))? + .view() + .await? + .json()?; + assert_eq!(bob_balance.0, parse_near!("0.5 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_ft_transfer_themselves() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer") + .args_json(( + alice.id(), + U128::from(parse_near!("0.5 N")), + Option::::None, + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("Sender and receiver should be different")); + + Ok(()) +} + +#[tokio::test] +async fn test_ft_transfer_zero() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + let bob = create_user("bob", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer") + .args_json((bob.id(), U128::from(0), Option::::None))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!( + format!("{:?}", res.status.as_failure()).contains("The amount should be a positive number") + ); + + Ok(()) +} + +#[tokio::test] +async fn test_transfer_call_invest() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + let defi_contract = init_defi(&worker, &contract).await?; + + // register root & defi accounts as wNEAR accounts + register_user(&contract.as_account(), &contract, &worker).await?; + register_user(&defi_contract.as_account(), &contract, &worker).await?; + + let res = wrap_near( + contract.as_account(), + &contract, + &worker, + parse_near!("3 N"), + ) + .await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + // root invests in defi by calling `ft_transfer_call` + let res = contract + .call(&worker, "ft_transfer_call") + .args_json(( + defi_contract.id(), + U128::from(parse_near!("1 N")), + Option::::None, + "invest", + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let root_balance = contract + .call(&worker, "ft_balance_of") + .args_json((contract.id(),))? + .view() + .await? + .json::()?; + let defi_balance = contract + .call(&worker, "ft_balance_of") + .args_json((defi_contract.id(),))? + .view() + .await? + .json::()?; + assert_eq!(root_balance.0, parse_near!("2 N")); + assert_eq!(defi_balance.0, parse_near!("1 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_transfer_call_when_called_contract_not_registered_with_ft() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + let defi_contract = init_defi(&worker, &contract).await?; + + register_user(&contract.as_account(), &contract, &worker).await?; + + let res = wrap_near( + contract.as_account(), + &contract, + &worker, + parse_near!("3 N"), + ) + .await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + // call fails because defi contract is not registered as a wNEAR account + let res = contract + .call(&worker, "ft_transfer_call") + .args_json(( + defi_contract.id(), + parse_near!("1 N"), + Option::::None, + "invest", + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::Failure(_))); + + // balances remain unchanged + let root_balance = contract + .call(&worker, "ft_balance_of") + .args_json((contract.id(),))? + .view() + .await? + .json::()?; + let defi_balance = contract + .call(&worker, "ft_balance_of") + .args_json((defi_contract.id(),))? + .view() + .await? + .json::()?; + assert_eq!(root_balance.0, parse_near!("3 N")); + assert_eq!(defi_balance.0, 0); + + Ok(()) +} + +#[tokio::test] +async fn test_transfer_call_with_promise_and_refund() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + let defi_contract = init_defi(&worker, &contract).await?; + + register_user(&contract.as_account(), &contract, &worker).await?; + register_user(&defi_contract.as_account(), &contract, &worker).await?; + + let res = wrap_near( + contract.as_account(), + &contract, + &worker, + parse_near!("3 N"), + ) + .await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = contract + .call(&worker, "ft_transfer_call") + .args_json(( + defi_contract.id(), + U128::from(parse_near!("1 N")), + Option::::None, + U128::from(parse_near!("0.5 N")), + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let root_balance = contract + .call(&worker, "ft_balance_of") + .args_json((contract.id(),))? + .view() + .await? + .json::()?; + let defi_balance = contract + .call(&worker, "ft_balance_of") + .args_json((defi_contract.id(),))? + .view() + .await? + .json::()?; + assert_eq!(root_balance.0, parse_near!("2.5 N")); + assert_eq!(defi_balance.0, parse_near!("0.5 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_transfer_call_promise_panics_for_a_full_refund() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + let defi_contract = init_defi(&worker, &contract).await?; + + register_user(&contract.as_account(), &contract, &worker).await?; + register_user(&defi_contract.as_account(), &contract, &worker).await?; + + let res = wrap_near( + contract.as_account(), + &contract, + &worker, + parse_near!("3 N"), + ) + .await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = contract + .call(&worker, "ft_transfer_call") + .args_json(( + defi_contract.id(), + U128::from(parse_near!("1 N")), + Option::::None, + "invalid integer".to_string(), + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + // balances remain unchanged + let root_balance = contract + .call(&worker, "ft_balance_of") + .args_json((contract.id(),))? + .view() + .await? + .json::()?; + let defi_balance = contract + .call(&worker, "ft_balance_of") + .args_json((defi_contract.id(),))? + .view() + .await? + .json::()?; + assert_eq!(root_balance.0, parse_near!("3 N")); + assert_eq!(defi_balance.0, 0); + + Ok(()) +} + +#[tokio::test] +async fn test_ft_transfer_call_themselves() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer_call") + .args_json(( + alice.id(), + U128::from(parse_near!("1 N")), + Option::::None, + "invest", + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(format!("{:?}", res.status.as_failure()) + .contains("Sender and receiver should be different")); + + Ok(()) +} + +#[tokio::test] +async fn test_ft_transfer_call_zero() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + let defi_contract = init_defi(&worker, &contract).await?; + + register_user(&contract.as_account(), &contract, &worker).await?; + register_user(&defi_contract.as_account(), &contract, &worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let res = alice + .call(&worker, contract.id().clone(), "ft_transfer_call") + .args_json(( + defi_contract.id(), + U128::from(0), + Option::::None, + "invest", + ))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!( + format!("{:?}", res.status.as_failure()).contains("The amount should be a positive number") + ); + + Ok(()) +} diff --git a/w-near/tests/workspaces/test_w_near.rs b/w-near/tests/workspaces/test_w_near.rs new file mode 100644 index 00000000..3c78476b --- /dev/null +++ b/w-near/tests/workspaces/test_w_near.rs @@ -0,0 +1,106 @@ +use crate::utils::{create_user, init_w_near, wrap_near}; +use near_primitives::views::FinalExecutionStatus; +use near_sdk::json_types::U128; +use near_sdk::ONE_YOCTO; +use near_units::parse_near; + +#[tokio::test] +async fn test_total_supply() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let bob = create_user("bob", &contract, &worker).await?; + + let res = wrap_near(&bob, &contract, &worker, parse_near!("2 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let total_supply: U128 = contract + .call(&worker, "ft_total_supply") + .view() + .await? + .json()?; + assert_eq!(total_supply.0, parse_near!("3 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_withdraw_near() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + let res = alice + .call(&worker, contract.id().clone(), "near_withdraw") + .args_json((U128::from(parse_near!("0.5 N")),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("0.5 N")); + + Ok(()) +} + +#[tokio::test] +async fn test_withdraw_too_much_near() -> anyhow::Result<()> { + let worker = workspaces::sandbox(); + let contract = init_w_near(&worker).await?; + + let alice = create_user("alice", &contract, &worker).await?; + + let res = wrap_near(&alice, &contract, &worker, parse_near!("1 N")).await?; + assert!(matches!(res, FinalExecutionStatus::SuccessValue(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + let res = alice + .call(&worker, contract.id().clone(), "near_withdraw") + .args_json((U128::from(parse_near!("1.5 N")),))? + .gas(300_000_000_000_000) + .deposit(ONE_YOCTO) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::Failure(_))); + + let alice_balance: U128 = contract + .call(&worker, "ft_balance_of") + .args_json((alice.id(),))? + .view() + .await? + .json()?; + assert_eq!(alice_balance.0, parse_near!("1 N")); + + Ok(()) +} diff --git a/w-near/tests/workspaces/utils.rs b/w-near/tests/workspaces/utils.rs new file mode 100644 index 00000000..67814b1c --- /dev/null +++ b/w-near/tests/workspaces/utils.rs @@ -0,0 +1,141 @@ +use near_primitives::views::FinalExecutionStatus; +use near_sdk::Balance; +use near_units::parse_near; +use workspaces::prelude::DevAccountDeployer; +use workspaces::{Account, Contract, DevNetwork, Worker}; + +pub const LEGACY_BYTE_COST: Balance = 10_000_000_000_000_000_000; + +pub const STORAGE_BALANCE: Balance = 125 * LEGACY_BYTE_COST; + +pub async fn init_legacy(worker: &Worker) -> anyhow::Result { + let contract = worker + .dev_deploy(include_bytes!("../../res/legacy_w_near.wasm").to_vec()) + .await?; + let res = contract + .call(&worker, "new") + .args_json((contract.id(),))? + .gas(300_000_000_000_000) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + Ok(contract) +} + +pub async fn init_w_near(worker: &Worker) -> anyhow::Result { + let contract = worker + .dev_deploy(include_bytes!("../../res/w_near.wasm").to_vec()) + .await?; + let res = contract + .call(&worker, "new") + .args_json((contract.id(),))? + .gas(300_000_000_000_000) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + Ok(contract) +} + +pub async fn init_defi( + worker: &Worker, + contract: &Contract, +) -> anyhow::Result { + let defi_contract = worker + .dev_deploy(include_bytes!("../../res/w_near_defi.wasm").to_vec()) + .await?; + let res = defi_contract + .call(&worker, "new") + .args_json((contract.id(),))? + .gas(300_000_000_000_000) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + Ok(defi_contract) +} + +pub async fn legacy_register_user( + name: &str, + contract: &Contract, + worker: &Worker, +) -> anyhow::Result { + let res = contract + .as_account() + .create_subaccount(&worker, name) + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let account = res.result; + + let res = contract + .call(&worker, "storage_deposit") + .args_json((account.id(),))? + .gas(300_000_000_000_000) + .deposit(125 * LEGACY_BYTE_COST) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + Ok(account) +} + +pub async fn register_user( + account: &Account, + contract: &Contract, + worker: &Worker, +) -> anyhow::Result<()> { + let res = contract + .call(&worker, "storage_deposit") + .args_json((account.id(), Option::::None))? + .gas(300_000_000_000_000) + .deposit(125 * LEGACY_BYTE_COST) + .transact() + .await?; + assert!(matches!(res.status, FinalExecutionStatus::SuccessValue(_))); + + Ok(()) +} + +pub async fn create_user( + name: &str, + contract: &Contract, + worker: &Worker, +) -> anyhow::Result { + let res = contract + .as_account() + .create_subaccount(&worker, name) + .initial_balance(parse_near!("10 N")) + .transact() + .await?; + assert!(matches!( + res.details.status, + FinalExecutionStatus::SuccessValue(_) + )); + let account = res.result; + + register_user(&account, &contract, &worker).await?; + + Ok(account) +} + +pub async fn wrap_near( + account: &Account, + contract: &Contract, + worker: &Worker, + amount: Balance, +) -> anyhow::Result { + Ok(account + .call(&worker, contract.id().clone(), "near_deposit") + .args_json((account.id(),))? + .gas(300_000_000_000_000) + .deposit(amount) + .transact() + .await? + .status) +}