From 09065183ae7dcfe55267ca753efca1aa655b5c04 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 12:54:08 +0700 Subject: [PATCH 01/27] feat: use the graph instead of rpc for fetching events --- Cargo.lock | 3398 +++++++---------- Cargo.toml | 24 +- abi/ERC20.json | 222 ++ config/config.base-sepolia.toml | 25 +- config/config.base.toml | 3 +- config/config.mainnet.toml | 27 +- src/cli/accounts_status.rs | 24 +- src/cli/availability.rs | 2 +- src/cli/balance_validation.rs | 24 +- src/cli/configure.rs | 67 +- src/cli/console.rs | 6 +- src/cli/export_deposit_accounts.rs | 39 +- src/cli/interactive.rs | 3 +- src/cli/mod.rs | 28 +- src/external_api/contracts/convert.rs | 37 + src/external_api/contracts/error.rs | 49 +- src/external_api/contracts/events.rs | 227 +- src/external_api/contracts/handlers.rs | 149 + src/external_api/contracts/int1.rs | 232 +- src/external_api/contracts/minter.rs | 199 +- src/external_api/contracts/mod.rs | 2 + src/external_api/contracts/token.rs | 58 +- src/external_api/contracts/utils.rs | 337 +- src/external_api/graph/client.rs | 343 ++ src/external_api/graph/error.rs | 10 + src/external_api/graph/mod.rs | 2 + src/external_api/intmax/availability.rs | 14 +- src/external_api/intmax/circulation.rs | 2 +- src/external_api/intmax/error.rs | 4 + src/external_api/intmax/gas_estimation.rs | 56 - src/external_api/intmax/gnark.rs | 8 +- src/external_api/intmax/mod.rs | 1 - src/external_api/intmax/withdrawal.rs | 102 +- src/external_api/mod.rs | 2 + src/external_api/query.rs | 163 + src/main.rs | 4 +- src/services/assets_status.rs | 47 +- src/services/balance_transfer.rs | 59 +- src/services/claim/claim.rs | 63 +- src/services/claim/contract.rs | 61 - src/services/claim/mod.rs | 1 - src/services/claim/witness_generation.rs | 9 +- src/services/mining/cancel.rs | 31 - src/services/mining/deposit.rs | 53 - src/services/mining/deterministic_sleep.rs | 30 +- src/services/mining/mod.rs | 59 +- src/services/mining/withdrawal/mod.rs | 48 +- .../mining/withdrawal/witness_generation.rs | 11 +- src/services/mod.rs | 49 +- src/services/sync.rs | 136 +- src/services/utils.rs | 138 +- src/state/key.rs | 15 +- src/state/state.rs | 54 +- src/test/mod.rs | 40 +- src/utils/config.rs | 3 +- src/utils/derive_key.rs | 27 +- src/utils/env_config.rs | 53 +- src/utils/env_validation.rs | 21 +- src/utils/errors.rs | 27 +- src/utils/network.rs | 8 +- 60 files changed, 3435 insertions(+), 3501 deletions(-) create mode 100644 abi/ERC20.json create mode 100644 src/external_api/contracts/convert.rs create mode 100644 src/external_api/contracts/handlers.rs create mode 100644 src/external_api/graph/client.rs create mode 100644 src/external_api/graph/error.rs create mode 100644 src/external_api/graph/mod.rs delete mode 100644 src/external_api/intmax/gas_estimation.rs create mode 100644 src/external_api/query.rs delete mode 100644 src/services/claim/contract.rs delete mode 100644 src/services/mining/cancel.rs delete mode 100644 src/services/mining/deposit.rs diff --git a/Cargo.lock b/Cargo.lock index a9a8aa3..58111ab 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addchain" version = "0.2.0" @@ -53,23 +43,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", + "cfg-if", + "cipher", "cpufeatures", "opaque-debug", ] -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", - "cpufeatures", -] - [[package]] name = "aes-gcm" version = "0.9.4" @@ -77,22 +56,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ "aead", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", + "aes", + "cipher", + "ctr", "ghash", "subtle", ] -[[package]] -name = "ahash" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb" -dependencies = [ - "const-random", -] - [[package]] name = "ahash" version = "0.7.8" @@ -110,7 +80,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "const-random", "once_cell", "version_check", @@ -132,6 +102,587 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" +[[package]] +name = "alloy" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a6f38130b8716f18c69cede2b8ebe6cf70038a3d97740907bb0637941f759be" +dependencies = [ + "alloy-consensus", + "alloy-contract", + "alloy-core", + "alloy-eips", + "alloy-genesis", + "alloy-network", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-serde", + "alloy-signer", + "alloy-signer-local", + "alloy-transport", + "alloy-transport-http", +] + +[[package]] +name = "alloy-chains" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "517e5acbd38b6d4c59da380e8bbadc6d365bf001903ce46cf5521c53c647e07b" +dependencies = [ + "alloy-primitives", + "num_enum", + "strum 0.27.1", +] + +[[package]] +name = "alloy-consensus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7329eb72d95576dfb8813175bcf671198fb24266b0b3e520052a513e30c284df" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-trie", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "secp256k1", + "serde", + "serde_with", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-consensus-any" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31b286aeef04a32720c10defd21c3aa6c626154ac442b55f6d472caeb1c6741" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-contract" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1658352ca9425d7b5bbb3ae364bc276ab18d4afae06f5faf00377b6964fdf68" +dependencies = [ + "alloy-consensus", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types-eth", + "alloy-sol-types", + "alloy-transport", + "futures", + "futures-util", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-core" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a3c5a28f166629752f2e7246b813cdea3243cca59aab2d4264b1fd68392c10eb" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", + "alloy-sol-types", +] + +[[package]] +name = "alloy-dyn-abi" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18cc14d832bc3331ca22a1c7819de1ede99f58f61a7d123952af7dde8de124a6" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "itoa", + "serde", + "serde_json", + "winnow", +] + +[[package]] +name = "alloy-eip2124" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b82752a889170df67bbb36d42ca63c531eb16274f0d7299ae2a680facba17bd" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d4769c6ffddca380b0070d71c8b7f30bed375543fe76bb2f74ec0acf4b7cd16" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eips" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fa190bfa5340aee544ac831114876fa73bc8da487095b49a5ea153a6a4656ea" +dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "auto_impl", + "c-kzg", + "derive_more", + "either", + "serde", + "sha2", +] + +[[package]] +name = "alloy-genesis" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b81b2dfd278d58af8bfde8753fa4685407ba8fbad8bc88a2bb0e065eed48478" +dependencies = [ + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "alloy-trie", + "serde", +] + +[[package]] +name = "alloy-json-abi" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ccaa79753d7bf15f06399ea76922afbfaf8d18bebed9e8fc452984b4a90dcc9" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-json-rpc" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89ab2dba5dca01ad4281b4d4726a18e2012a20e3950bfc2a90c5376840555366" +dependencies = [ + "alloy-primitives", + "alloy-sol-types", + "serde", + "serde_json", + "thiserror 2.0.12", + "tracing", +] + +[[package]] +name = "alloy-network" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0ed07e76fbc72790a911ea100cdfbe85b1f12a097c91b948042e854959d140e" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-json-rpc", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-types-any", + "alloy-rpc-types-eth", + "alloy-serde", + "alloy-signer", + "alloy-sol-types", + "async-trait", + "auto_impl", + "derive_more", + "futures-utils-wasm", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-network-primitives" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f05aa52713c376f797b3c7077708585f22a5c3053a7b1b2b355ea98edeb2052d" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-primitives" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18c35fc4b03ace65001676358ffbbaefe2a2b27ee50fe777c345082c7c888be8" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "foldhash", + "getrandom 0.3.3", + "hashbrown 0.15.3", + "indexmap 2.6.0", + "itoa", + "k256", + "keccak-asm", + "paste", + "proptest", + "rand 0.9.1", + "ruint", + "rustc-hash", + "serde", + "sha3", + "tiny-keccak", +] + +[[package]] +name = "alloy-provider" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05a3f7a59c276c6e410267e77a166f9297dbe74e4605f1abf625e29d85c53144" +dependencies = [ + "alloy-chains", + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-network", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-types-eth", + "alloy-signer", + "alloy-sol-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "either", + "futures", + "futures-utils-wasm", + "lru", + "parking_lot", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rlp" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] + +[[package]] +name = "alloy-rlp-derive" +version = "0.3.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64b728d511962dda67c1bc7ea7c03736ec275ed2cf4c35d9585298ac9ccf3b73" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "alloy-rpc-client" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5f185483536cbcbf55971077140e03548dad4f3a4ddb35044bcdc01b8f02ce1" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "futures", + "pin-project", + "reqwest 0.12.8", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "tracing-futures", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-rpc-types" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "347dfd77ba4d74886dba9e2872ff64fb246001b08868d27baec94e7248503e08" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67971a228100ac65bd86e90439028853435f21796330ef08f00a70a918a84126" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-eth" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89d9b4293dfd4721781d33ee40de060376932d4a55d421cf6618ad66ff97cc52" +dependencies = [ + "alloy-consensus", + "alloy-consensus-any", + "alloy-eips", + "alloy-network-primitives", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "alloy-sol-types", + "itertools 0.14.0", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-serde" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b7d927aa39ca51545ae4c9cf4bdb2cbc1f6b46ab4b54afc3ed9255f93eedbce" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] + +[[package]] +name = "alloy-signer" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c63771b50008d2b079187e9e74a08235ab16ecaf4609b4eb895e2890a3bcd465" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "either", + "elliptic-curve", + "k256", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-signer-local" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db906294ee7876bd332cd760f460d30de183554434e07fc19d7d54e16a7aeaf0" +dependencies = [ + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand 0.8.5", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-sol-macro" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8612e0658964d616344f199ab251a49d48113992d81b92dab93ed855faa66383" +dependencies = [ + "alloy-sol-macro-expander", + "alloy-sol-macro-input", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "alloy-sol-macro-expander" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a384edac7283bc4c010a355fb648082860c04b826bb7a814c45263c8f304c74" +dependencies = [ + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck", + "indexmap 2.6.0", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn 2.0.101", + "syn-solidity", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro-input" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd588c2d516da7deb421b8c166dc60b7ae31bca5beea29ab6621fcfa53d6ca5" +dependencies = [ + "alloy-json-abi", + "const-hex", + "dunce", + "heck", + "macro-string", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.101", + "syn-solidity", +] + +[[package]] +name = "alloy-sol-type-parser" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e86ddeb70792c7ceaad23e57d52250107ebbb86733e52f4a25d8dc1abc931837" +dependencies = [ + "serde", + "winnow", +] + +[[package]] +name = "alloy-sol-types" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "584cb97bfc5746cb9dcc4def77da11694b5d6d7339be91b7480a6a68dc129387" +dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "serde", +] + +[[package]] +name = "alloy-transport" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca9b645fe4f4e6582cfbb4a8d20cedcf5aa23548e92eacbdacac6278b425e023" +dependencies = [ + "alloy-json-rpc", + "alloy-primitives", + "base64 0.22.1", + "derive_more", + "futures", + "futures-utils-wasm", + "parking_lot", + "serde", + "serde_json", + "thiserror 2.0.12", + "tokio", + "tower", + "tracing", + "url", + "wasmtimer", +] + +[[package]] +name = "alloy-transport-http" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee18869ecabe658ff6316e7db7c25d958c7d10f0a1723c2f7447d4f402920b66" +dependencies = [ + "alloy-json-rpc", + "alloy-transport", + "reqwest 0.12.8", + "serde_json", + "tower", + "tracing", + "url", +] + +[[package]] +name = "alloy-trie" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more", + "nybbles", + "serde", + "smallvec", + "tracing", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -202,18 +753,6 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" -[[package]] -name = "app_dirs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -dependencies = [ - "ole32-sys", - "shell32-sys", - "winapi 0.2.8", - "xdg", -] - [[package]] name = "arbitrary" version = "1.3.2" @@ -230,24 +769,42 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" dependencies = [ "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", ] [[package]] name = "ark-ec" version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" +dependencies = [ + "ark-ff 0.4.2", + "ark-poly", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "hashbrown 0.13.2", + "itertools 0.10.5", + "num-traits", + "zeroize", +] + +[[package]] +name = "ark-ff" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", "derivative", - "hashbrown 0.13.2", - "itertools 0.10.5", + "num-bigint 0.4.6", "num-traits", + "paste", + "rustc_version 0.3.3", "zeroize", ] @@ -257,12 +814,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", - "digest", + "digest 0.10.7", "itertools 0.10.5", "num-bigint 0.4.6", "num-traits", @@ -271,6 +828,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ark-ff-asm" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" +dependencies = [ + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-asm" version = "0.4.2" @@ -281,6 +848,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "ark-ff-macros" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "quote", + "syn 1.0.109", +] + [[package]] name = "ark-ff-macros" version = "0.4.2" @@ -300,13 +879,23 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", + "ark-ff 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", "derivative", "hashbrown 0.13.2", ] +[[package]] +name = "ark-serialize" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] + [[package]] name = "ark-serialize" version = "0.4.2" @@ -314,8 +903,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" dependencies = [ "ark-serialize-derive", - "ark-std", - "digest", + "ark-std 0.4.0", + "digest 0.10.7", "num-bigint 0.4.6", ] @@ -332,75 +921,75 @@ dependencies = [ [[package]] name = "ark-std" -version = "0.4.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", "rand 0.8.5", ] [[package]] -name = "arrayvec" -version = "0.5.2" +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand 0.8.5", +] [[package]] name = "arrayvec" version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +dependencies = [ + "serde", +] [[package]] -name = "ascii-canvas" -version = "3.0.0" +name = "async-stream" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" dependencies = [ - "term", + "async-stream-impl", + "futures-core", + "pin-project-lite", ] [[package]] -name = "async-trait" -version = "0.1.83" +name = "async-stream-impl" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" +checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] -name = "async_io_stream" -version = "0.3.3" +name = "async-trait" +version = "0.1.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd" dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] name = "auto_impl" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" +checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", -] - -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.4.0", + "syn 2.0.101", ] [[package]] @@ -416,7 +1005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -454,12 +1043,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bincode" version = "1.3.3" @@ -471,18 +1054,34 @@ dependencies = [ [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] [[package]] name = "bitflags" @@ -496,16 +1095,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", -] - [[package]] name = "bitvec" version = "1.0.1" @@ -513,7 +1102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", - "radium 0.7.0", + "radium", "tap", "wyz", ] @@ -528,13 +1117,15 @@ dependencies = [ ] [[package]] -name = "bs58" -version = "0.5.1" +name = "blst" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +checksum = "47c79a94619fade3c0b887670333513a67ac28a6a7e653eb260bf0d4103db38d" dependencies = [ - "sha2", - "tinyvec", + "cc", + "glob", + "threadpool", + "zeroize", ] [[package]] @@ -545,15 +1136,9 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" - -[[package]] -name = "byte-slice-cast" -version = "1.2.2" +version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "byteorder" @@ -571,75 +1156,29 @@ dependencies = [ ] [[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" +name = "c-kzg" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +checksum = "7318cfa722931cb5fe0838b98d3ce5621e75f6a6408abc21721d80de9223f2e4" dependencies = [ + "blst", "cc", + "glob", + "hex", "libc", - "pkg-config", -] - -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", + "once_cell", "serde", - "serde_json", - "thiserror", ] [[package]] name = "cc" -version = "1.1.25" +version = "1.2.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d9e0b4957f635b8d3da819d0db5603620467ecf1f692d22a8c2717ce27e6d8" +checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" dependencies = [ - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -656,6 +1195,7 @@ dependencies = [ "iana-time-zone", "js-sys", "num-traits", + "serde", "wasm-bindgen", "windows-targets 0.52.6", ] @@ -669,16 +1209,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "4.5.19" @@ -710,7 +1240,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -719,67 +1249,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec 1.0.1", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2", - "thiserror", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -801,7 +1270,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml 0.5.11", + "toml", "yaml-rust", ] @@ -820,11 +1289,11 @@ dependencies = [ [[package]] name = "const-hex" -version = "1.13.1" +version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0121754e84117e65f9d90648ee6aa4882a6e63110307ab73967a4c5e7e69e586" +checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "hex", "proptest", @@ -854,15 +1323,9 @@ checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom 0.2.15", "once_cell", - "tiny-keccak 2.0.2", + "tiny-keccak", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "core-foundation" version = "0.9.4" @@ -888,13 +1351,28 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9710d3b3739c2e349eb44fe848ad0b7c8cb1e42bd87ee49371df2f7acaf3e675" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + [[package]] name = "crc32fast" version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -956,16 +1434,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -974,10 +1443,10 @@ version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest", + "digest 0.10.7", "fiat-crypto", "rustc_version 0.4.1", "subtle", @@ -992,14 +1461,57 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] -name = "data-encoding" -version = "2.6.0" +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.101", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "dashmap" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" +dependencies = [ + "cfg-if", + "crossbeam-utils", + "hashbrown 0.14.5", + "lock_api", + "once_cell", + "parking_lot_core", +] [[package]] name = "der" @@ -1018,6 +1530,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1039,18 +1552,28 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", + "unicode-xid", ] [[package]] @@ -1062,32 +1585,29 @@ dependencies = [ "console", "shell-words", "tempfile", - "thiserror", + "thiserror 1.0.64", "zeroize", ] [[package]] name = "digest" -version = "0.10.7" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", + "generic-array", ] [[package]] -name = "dir" -version = "0.1.2" +name = "digest" +version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaaafd76867bdccfab7c7a5cc98b9321b515f8663072fd4b0fd9e2ceac3911e" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "app_dirs", - "home 0.3.4", - "journaldb", - "vapory-types", + "block-buffer", + "const-oid", + "crypto-common", + "subtle", ] [[package]] @@ -1099,16 +1619,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1121,17 +1631,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -1140,7 +1639,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -1168,9 +1667,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ "der", - "digest", + "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] @@ -1202,9 +1702,12 @@ dependencies = [ [[package]] name = "either" -version = "1.13.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -1214,26 +1717,18 @@ checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ "base16ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", "pkcs8", "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -1246,25 +1741,7 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", + "cfg-if", ] [[package]] @@ -1307,356 +1784,40 @@ dependencies = [ ] [[package]] -name = "eth-keystore" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes 0.8.4", - "ctr 0.9.2", - "digest", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak 2.0.2", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types 0.12.2", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest 0.11.27", - "serde", - "serde_json", - "syn 2.0.79", - "toml 0.8.19", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.79", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec 0.7.6", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.79", - "tempfile", - "thiserror", - "tiny-keccak 2.0.2", - "unicode-xid", -] - -[[package]] -name = "ethers-etherscan" -version = "2.0.14" +name = "fastrand" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" -dependencies = [ - "chrono", - "ethers-core", - "reqwest 0.11.27", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror", - "tracing", -] +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] -name = "ethers-middleware" -version = "2.0.14" +name = "fastrlp" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "async-trait", + "arrayvec", "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", + "bytes", ] [[package]] -name = "ethers-providers" -version = "2.0.14" +name = "fastrlp" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" dependencies = [ - "async-trait", + "arrayvec", "auto_impl", - "base64 0.21.7", "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2", - "thiserror", - "tracing", -] - -[[package]] -name = "ethers-solc" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" -dependencies = [ - "cfg-if 1.0.0", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home 0.5.9", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver 1.0.23", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak 2.0.2", - "tokio", - "tracing", - "walkdir", - "yansi", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastmap" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ea69bd8c9a9aa331b38daa335f7a672183c5281514c0d5c5c48ef63ef09a66" -dependencies = [ - "tetsy-plain-hasher", - "vapory-types", ] -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - [[package]] name = "ff" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec 1.0.1", + "bitvec", "byteorder", "ff_derive", "rand_core 0.6.4", @@ -1670,7 +1831,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" dependencies = [ "addchain", - "cfg-if 1.0.0", + "cfg-if", "num-bigint 0.3.3", "num-integer", "num-traits", @@ -1706,12 +1867,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.34" @@ -1728,6 +1883,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1744,22 +1905,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "fs2" -version = "0.4.3" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "libc", - "winapi 0.3.9", + "percent-encoding", ] [[package]] @@ -1816,16 +1967,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -1834,7 +1975,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -1849,16 +1990,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.31" @@ -1878,13 +2009,10 @@ dependencies = [ ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "futures-utils-wasm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "generic-array" @@ -1899,26 +2027,27 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.1.16" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", + "js-sys", "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "getrandom" -version = "0.2.15" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ - "cfg-if 1.0.0", - "js-sys", + "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1939,21 +2068,9 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "gloo-timers" -version = "0.2.6" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] +checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" [[package]] name = "group" @@ -1978,23 +2095,13 @@ dependencies = [ "futures-sink", "futures-util", "http 0.2.12", - "indexmap", + "indexmap 2.6.0", "slab", "tokio", "tokio-util", "tracing", ] -[[package]] -name = "hashbrown" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" -dependencies = [ - "ahash 0.2.19", - "autocfg 0.1.8", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -2027,17 +2134,14 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e087f84d4f86bf4b218b927129862374b72199ae7d8657835f1e89000eea4fb" - -[[package]] -name = "hashers" -version = "1.0.1" +version = "0.15.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" +checksum = "84b26c544d002229e640969970a2e74021aadf6e2f96372b9c58eff97de08eb3" dependencies = [ - "fxhash", + "allocator-api2", + "equivalent", + "foldhash", + "serde", ] [[package]] @@ -2057,33 +2161,26 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "serde", ] [[package]] -name = "home" -version = "0.3.4" +name = "hex-conservative" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29302b90cfa76231a757a887d1e3153331a63c7f80b6c75f86366334cbe70708" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "scopeguard 0.3.3", - "winapi 0.3.9", + "arrayvec", ] [[package]] -name = "home" -version = "0.5.9" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "windows-sys 0.52.0", + "digest 0.10.7", ] [[package]] @@ -2198,25 +2295,11 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.13.2", + "smallvec", "tokio", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "rustls", - "tokio", - "tokio-rustls", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -2288,6 +2371,12 @@ dependencies = [ "cc", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "0.5.0" @@ -2307,52 +2396,28 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" -version = "0.1.3" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.101", ] [[package]] -name = "impl-trait-for-tuples" -version = "0.2.2" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "autocfg", + "hashbrown 0.12.3", + "serde", ] -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - [[package]] name = "indexmap" version = "2.6.0" @@ -2360,7 +2425,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ "equivalent", - "hashbrown 0.15.0", + "hashbrown 0.15.3", + "serde", ] [[package]] @@ -2376,22 +2442,13 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - [[package]] name = "instant" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -2402,8 +2459,8 @@ dependencies = [ "anyhow", "ark-bn254", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", "ff", "hashbrown 0.14.5", "hex", @@ -2462,38 +2519,19 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.32" +name = "itertools" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" dependencies = [ - "libc", + "either", ] [[package]] -name = "journaldb" -version = "0.2.0" +name = "itoa" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76a0abc6ebe6b53a2af01026ec5b2e56fa4579ac14a91acfa0a33858ce079c3" -dependencies = [ - "fastmap", - "log", - "parking_lot 0.9.0", - "tetsy-bytes", - "tetsy-hash-db", - "tetsy-keccak-hasher", - "tetsy-kvdb", - "tetsy-memory-db", - "tetsy-rlp", - "tetsy-util-mem 0.3.0", - "vapory-types", -] +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "js-sys" @@ -2515,32 +2553,18 @@ dependencies = [ "serde", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2", - "signature", ] [[package]] @@ -2553,43 +2577,23 @@ dependencies = [ ] [[package]] -name = "keccak-hash" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce2bd4c29270e724d3eaadf7bdc8700af4221fc0ed771b855eadcd1b98d52851" -dependencies = [ - "primitive-types 0.10.1", - "tiny-keccak 2.0.2", -] - -[[package]] -name = "lalrpop" -version = "0.20.2" +name = "keccak-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +checksum = "505d1856a39b200489082f90d897c3f07c455563880bc5952e38eabf731c83b6" dependencies = [ - "ascii-canvas", - "bit-set", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak 2.0.2", - "unicode-xid", - "walkdir", + "digest 0.10.7", + "sha3-asm", ] [[package]] -name = "lalrpop-util" -version = "0.20.2" +name = "keccak-hash" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +checksum = "ce2bd4c29270e724d3eaadf7bdc8700af4221fc0ed771b855eadcd1b98d52851" dependencies = [ - "regex-automata", + "primitive-types 0.10.1", + "tiny-keccak", ] [[package]] @@ -2606,9 +2610,9 @@ checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libm" -version = "0.2.8" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" [[package]] name = "libredox" @@ -2632,23 +2636,14 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard 1.2.0", -] - [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.4.0", - "scopeguard 1.2.0", + "autocfg", + "scopeguard", ] [[package]] @@ -2665,27 +2660,22 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.4.3" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" dependencies = [ - "hashbrown 0.6.3", + "hashbrown 0.15.3", ] [[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "md-5" -version = "0.10.6" +name = "macro-string" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ - "cfg-if 1.0.0", - "digest", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] @@ -2711,6 +2701,7 @@ name = "mining-cli" version = "1.2.2" dependencies = [ "aes-gcm", + "alloy", "anyhow", "bincode", "chrono", @@ -2718,32 +2709,31 @@ dependencies = [ "config", "console", "dialoguer", - "dir", "dirs", "dotenv", - "ethers", + "futures", "hex", "intmax2-zkp", "log", "mining_circuit_v1", "num-bigint 0.4.6", - "openssl", - "openssl-sys", "plonky2", "rand 0.8.5", "rand_chacha 0.3.1", "regex", "reqwest 0.11.27", - "rpassword", "self_update", "serde", "serde_json", + "serde_qs", + "serde_with", "sha3", "simplelog", - "strum", - "strum_macros", - "thiserror", + "strum 0.26.3", + "strum_macros 0.26.4", + "thiserror 1.0.64", "tokio", + "tower", ] [[package]] @@ -2800,12 +2790,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nom" version = "7.1.3" @@ -2836,7 +2820,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ - "autocfg 1.4.0", + "autocfg", "num-integer", "num-traits", ] @@ -2883,7 +2867,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ - "autocfg 1.4.0", + "autocfg", "num-integer", "num-traits", ] @@ -2905,7 +2889,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.4.0", + "autocfg", "libm", ] @@ -2934,10 +2918,9 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -2956,29 +2939,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] -name = "object" -version = "0.36.5" +name = "nybbles" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" dependencies = [ - "memchr", + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", ] [[package]] -name = "ole32-sys" -version = "0.2.0" +name = "object" +version = "0.36.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +checksum = "aedf0a2d09c573ed1d8d85b30c119153926a2b36dce0ab28322c09a117a4683e" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "memchr", ] [[package]] name = "once_cell" -version = "1.20.2" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -2986,31 +2972,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec 0.7.6", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "openssl" version = "0.10.66" @@ -3018,7 +2979,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -3034,7 +2995,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -3043,15 +3004,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" -[[package]] -name = "openssl-src" -version = "300.3.2+3.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.103" @@ -3060,7 +3012,6 @@ checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -3087,10 +3038,10 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.6", - "bitvec 1.0.1", - "byte-slice-cast 1.2.2", - "impl-trait-for-tuples 0.2.2", + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", ] @@ -3107,64 +3058,27 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.3", - "rustc_version 0.2.3", -] - [[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ - "lock_api 0.4.12", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66b810a62be75176a80873726630147a5ca780cd33921e0b5709033e66b0a" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version 0.2.3", - "smallvec 0.6.14", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] name = "parking_lot_core" version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "redox_syscall 0.5.7", - "smallvec 1.13.2", - "windows-targets 0.52.6", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.52.6", ] [[package]] @@ -3173,49 +3087,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - [[package]] name = "pathdiff" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest", - "hmac", -] - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -3229,7 +3106,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.64", "ucd-trie", ] @@ -3253,7 +3130,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -3267,95 +3144,24 @@ dependencies = [ "sha2", ] -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.1", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.79", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.6" +version = "1.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -3418,8 +3224,8 @@ dependencies = [ "anyhow", "ark-bn254", "ark-ec", - "ark-ff", - "ark-std", + "ark-ff 0.4.2", + "ark-std 0.4.0", "env_logger", "hashbrown 0.14.5", "hex", @@ -3462,7 +3268,7 @@ dependencies = [ "plonky2", "rand 0.8.5", "starky", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] @@ -3496,7 +3302,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug", "universal-hash", @@ -3523,22 +3329,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.79", -] - [[package]] name = "primitive-types" version = "0.10.1" @@ -3557,36 +3347,57 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] [[package]] name = "proc-macro-crate" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" +checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ "toml_edit", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ + "bit-set", + "bit-vec", "bitflags 2.6.0", "lazy_static", "num-traits", @@ -3594,9 +3405,17 @@ dependencies = [ "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax", + "rusty-fork", + "tempfile", "unarray", ] +[[package]] +name = "quick-error" +version = "1.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" + [[package]] name = "quick-xml" version = "0.23.1" @@ -3616,10 +3435,10 @@ dependencies = [ ] [[package]] -name = "radium" -version = "0.3.0" +name = "r-efi" +version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" [[package]] name = "radium" @@ -3627,19 +3446,6 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -3649,16 +3455,18 @@ dependencies = [ "libc", "rand_chacha 0.3.1", "rand_core 0.6.4", + "serde", ] [[package]] -name = "rand_chacha" -version = "0.2.2" +name = "rand" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", ] [[package]] @@ -3672,12 +3480,13 @@ dependencies = [ ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "rand_chacha" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" dependencies = [ - "getrandom 0.1.16", + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -3690,12 +3499,13 @@ dependencies = [ ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rand_core" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "rand_core 0.5.1", + "getrandom 0.3.3", + "serde", ] [[package]] @@ -3727,12 +3537,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.5.7" @@ -3750,7 +3554,7 @@ checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -3797,7 +3601,6 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", - "hyper-rustls", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -3807,7 +3610,6 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -3816,13 +3618,11 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", "winreg", ] @@ -3876,45 +3676,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "getrandom 0.2.15", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest", -] - [[package]] name = "rlp" version = "0.5.2" @@ -3922,21 +3683,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ron" version = "0.7.1" @@ -3949,22 +3698,45 @@ dependencies = [ ] [[package]] -name = "rpassword" -version = "5.0.1" +name = "ruint" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +checksum = "11256b5fe8c68f56ac6f39ef0720e592f33d2367a4782740d9c9142e889c7fb4" dependencies = [ - "libc", - "winapi 0.3.9", + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp 0.3.1", + "fastrlp 0.4.0", + "num-bigint 0.4.6", + "num-integer", + "num-traits", + "parity-scale-codec", + "primitive-types 0.12.2", + "proptest", + "rand 0.8.5", + "rand 0.9.1", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", ] +[[package]] +name = "ruint-macro" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" + [[package]] name = "rust-ini" version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ordered-multimap", ] @@ -3974,6 +3746,15 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +dependencies = [ + "rand 0.8.5", +] + [[package]] name = "rustc-hex" version = "2.1.0" @@ -3982,11 +3763,11 @@ checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" [[package]] name = "rustc_version" -version = "0.2.3" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" dependencies = [ - "semver 0.9.0", + "semver 0.11.0", ] [[package]] @@ -4011,18 +3792,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -4047,16 +3816,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustversion" version = "1.0.17" @@ -4064,52 +3823,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] -name = "ryu" -version = "1.0.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" - -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.4", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.11.3" +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ - "cfg-if 1.0.0", - "derive_more", - "parity-scale-codec", - "scale-info-derive", + "fnv", + "quick-error", + "tempfile", + "wait-timeout", ] [[package]] -name = "scale-info-derive" -version = "2.11.3" +name = "ryu" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "schannel" @@ -4122,37 +3851,9 @@ dependencies = [ [[package]] name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - -[[package]] -name = "sct" -version = "0.7.1" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sec1" @@ -4164,10 +3865,32 @@ dependencies = [ "der", "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", + "serde", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + [[package]] name = "security-framework" version = "2.11.1" @@ -4219,15 +3942,15 @@ dependencies = [ "serde_json", "tempfile", "urlencoding", - "zip 2.2.0", + "zip", "zipsign-api", ] [[package]] name = "semver" -version = "0.9.0" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ "semver-parser", ] @@ -4237,27 +3960,15 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] [[package]] name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +checksum = "9900206b54a3527fdc7b8a938bffd94a568bac4f4aa8113b209df75a09c0dec2" +dependencies = [ + "pest", +] [[package]] name = "serde" @@ -4276,7 +3987,7 @@ checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -4292,12 +4003,14 @@ dependencies = [ ] [[package]] -name = "serde_spanned" -version = "0.6.8" +name = "serde_qs" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "f3faaf9e727533a19351a43cc5a8de957372163c7d35cc48c90b75cdda13c352" dependencies = [ + "percent-encoding", "serde", + "thiserror 2.0.12", ] [[package]] @@ -4313,14 +4026,43 @@ dependencies = [ ] [[package]] -name = "sha1" -version = "0.10.6" +name = "serde_with" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest", + "base64 0.22.1", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.6.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", ] [[package]] @@ -4329,9 +4071,9 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] @@ -4340,25 +4082,25 @@ version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ - "digest", + "digest 0.10.7", "keccak", ] [[package]] -name = "shell-words" -version = "1.1.0" +name = "sha3-asm" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" +dependencies = [ + "cc", + "cfg-if", +] [[package]] -name = "shell32-sys" -version = "0.1.2" +name = "shell-words" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" [[package]] name = "shlex" @@ -4381,7 +4123,7 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] @@ -4391,18 +4133,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint 0.4.6", - "num-traits", - "thiserror", - "time", -] - [[package]] name = "simplelog" version = "0.12.2" @@ -4414,28 +4144,13 @@ dependencies = [ "time", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.4.0", -] - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", + "autocfg", ] [[package]] @@ -4443,6 +4158,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -4454,32 +4172,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "solang-parser" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" -dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror", - "unicode-xid", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spki" version = "0.7.3" @@ -4512,19 +4204,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.3", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "strsim" version = "0.11.1" @@ -4536,8 +4215,14 @@ name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" + +[[package]] +name = "strum" +version = "0.27.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ - "strum_macros", + "strum_macros 0.27.1", ] [[package]] @@ -4550,34 +4235,27 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] -name = "subtle" -version = "2.4.1" +name = "strum_macros" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.101", +] [[package]] -name = "svm-rs" -version = "0.3.5" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" -dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest 0.11.27", - "semver 1.0.23", - "serde", - "serde_json", - "sha2", - "thiserror", - "url", - "zip 0.6.6", -] +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" @@ -4592,9 +4270,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -4602,285 +4280,128 @@ dependencies = [ ] [[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" +name = "syn-solidity" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "1b5d879005cc1b5ba4e18665be9e9501d9da3a9b95f625497c4cb7ee082b532e" dependencies = [ + "paste", "proc-macro2", "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "tetsy-bytes" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b126714a30c5abc3fd13af622369d65945a91bf315ed555db109a7050abc9440" - -[[package]] -name = "tetsy-fixed-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ed8b78ac3c63bc64d5f0ea6ef5841ccd214f4f007386ffe214086fa6eb803d" -dependencies = [ - "byteorder", - "rand 0.7.3", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "tetsy-hash-db" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bdafe780365bec794d716a51eb589d84c360514a125e9508c973f14991f4f5" - -[[package]] -name = "tetsy-impl-codec" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9fd308572d831c4b2fa619a617d2c6c6ec3ff34edae98266f9ee7c2815a05f" -dependencies = [ - "tetsy-scale-codec", + "syn 2.0.101", ] [[package]] -name = "tetsy-impl-rlp" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d9894e9174ee77ec06e122256349fcccad3c1b0b3d34ed741c38fde7974c9a" -dependencies = [ - "tetsy-rlp", -] - -[[package]] -name = "tetsy-impl-serde" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73849bf47bb3ea3423e6e6b53091cdbf6e47252b4be0ff83cb7e9eb47b0ab1e5" -dependencies = [ - "serde", -] - -[[package]] -name = "tetsy-keccak-hasher" -version = "0.1.1" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d628ecb0ccb5bf172a39084cf7e1e76173900485dd3db486e13672a411730e24" -dependencies = [ - "tetsy-hash-db", - "tetsy-plain-hasher", - "tiny-keccak 1.5.0", - "vapory-types", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "tetsy-kvdb" -version = "0.3.2" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd005ae5a328e0ad832898850929b1a703c1c196989744eb894b34669fbcc061" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ - "smallvec 1.13.2", - "tetsy-bytes", - "tetsy-util-mem 0.4.2", + "futures-core", ] [[package]] -name = "tetsy-memory-db" -version = "0.18.1" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9788a83f194d7eaff56a334af01fa832d833f4d5fa60271592ac0933b0f11253" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "ahash 0.2.19", - "hashbrown 0.6.3", - "tetsy-hash-db", - "tetsy-util-mem 0.3.0", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", ] [[package]] -name = "tetsy-plain-hasher" -version = "0.2.1" +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26df2c3d8f8ffd558f0ac4ac592f2b3f43350b8f333573eefd55a54fe2ace738" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "crunchy", + "core-foundation-sys", + "libc", ] [[package]] -name = "tetsy-primitive-types" -version = "0.6.0" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab7bd08ec411a022351f271cc69721ac7ce6be9f3cefaca201ade5b8f5b05fc" -dependencies = [ - "tetsy-fixed-hash", - "tetsy-impl-codec", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "uint-crate", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "tetsy-rlp" -version = "0.4.5" +name = "tempfile" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa29cb060e6f816433b8a2956a27034059452a5d8c7493306f1e2e9d11a1a7b" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ - "rustc-hex", + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] -name = "tetsy-scale-codec" -version = "1.3.0" +name = "termcolor" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe48c9474a98c5af2796dccc6a228e9752ba87ad5912dacf23a0c8e696896ff" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ - "arrayvec 0.5.2", - "bitvec 0.17.4", - "byte-slice-cast 0.3.5", - "serde", + "winapi-util", ] [[package]] -name = "tetsy-util-mem" -version = "0.3.0" +name = "thiserror" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcb4de95856e89362585321f053820f3aaae0cda29ecda57af2654f6dd1e5f3" +checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.6.3", - "impl-trait-for-tuples 0.1.3", - "lru", - "parking_lot 0.9.0", - "smallvec 1.13.2", - "tetsy-util-mem-derive", - "vapory-types", - "winapi 0.3.9", + "thiserror-impl 1.0.64", ] [[package]] -name = "tetsy-util-mem" -version = "0.4.2" +name = "thiserror" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5247c86d5290b9aa3b126f7993b0b561b1419ca3fa1dab334a0c74ebdd8f5d" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.6.3", - "impl-trait-for-tuples 0.1.3", - "lru", - "parking_lot 0.9.0", - "smallvec 1.13.2", - "tetsy-primitive-types", - "tetsy-util-mem-derive", - "vapory-types", - "winapi 0.3.9", + "thiserror-impl 2.0.12", ] [[package]] -name = "tetsy-util-mem-derive" -version = "0.1.1" +name = "thiserror-impl" +version = "1.0.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5ba230d73eac389b2a43327e90e857ccee06c2c734726067555708164cbd19" +checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" dependencies = [ "proc-macro2", - "syn 1.0.109", - "synstructure", + "quote", + "syn 2.0.101", ] [[package]] -name = "thiserror" -version = "1.0.64" +name = "thiserror-impl" +version = "2.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ - "thiserror-impl", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] -name = "thiserror-impl" -version = "1.0.64" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.79", + "num_cpus", ] [[package]] @@ -4916,15 +4437,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" -dependencies = [ - "crunchy", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4959,7 +4471,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.3", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -4975,7 +4487,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -4989,28 +4501,15 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" +name = "tokio-stream" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" dependencies = [ - "futures-util", - "log", - "rustls", + "futures-core", + "pin-project-lite", "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", + "tokio-util", ] [[package]] @@ -5036,38 +4535,41 @@ dependencies = [ ] [[package]] -name = "toml" -version = "0.8.19" +name = "toml_datetime" +version = "0.6.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" + +[[package]] +name = "toml_edit" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ - "serde", - "serde_spanned", + "indexmap 2.6.0", "toml_datetime", - "toml_edit", + "winnow", ] [[package]] -name = "toml_datetime" -version = "0.6.8" +name = "tower" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" dependencies = [ - "serde", + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 1.0.1", + "tower-layer", + "tower-service", ] [[package]] -name = "toml_edit" -version = "0.22.22" +name = "tower-layer" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" -dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", -] +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" @@ -5088,13 +4590,13 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -5112,6 +4614,8 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" dependencies = [ + "futures", + "futures-task", "pin-project", "tracing", ] @@ -5122,26 +4626,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" @@ -5166,18 +4650,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint-crate" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54e7d173b20bb6938b878aa29ccdf294c23202c384bd096bc5cfd162eee77a2" -dependencies = [ - "byteorder", - "crunchy", - "rustc-hex", - "static_assertions", -] - [[package]] name = "unarray" version = "0.1.4" @@ -5237,18 +4709,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.2" @@ -5266,12 +4726,6 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8parse" version = "0.2.2" @@ -5279,41 +4733,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.15", - "serde", -] - -[[package]] -name = "vapbloom" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5cf5523abfbbc0ee98ac9ec1c8e8339dede2963bf82bdb8e84d4c8251e4091" -dependencies = [ - "crunchy", - "tetsy-fixed-hash", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "tiny-keccak 1.5.0", -] - -[[package]] -name = "vapory-types" -version = "0.8.0" +name = "valuable" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06968740059dd4ddf354280f706f2a207b49537b79b0341b765d1bceeaf8d7c4" -dependencies = [ - "tetsy-fixed-hash", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "tetsy-primitive-types", - "uint-crate", - "vapbloom", -] +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" [[package]] name = "vcpkg" @@ -5328,13 +4751,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] -name = "walkdir" -version = "2.5.0" +name = "wait-timeout" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +checksum = "09ac3b126d3914f9849036f826e054cbabdc8519970b8998ddaf3b5bd3c65f11" dependencies = [ - "same-file", - "winapi-util", + "libc", ] [[package]] @@ -5348,15 +4770,18 @@ dependencies = [ [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.14.2+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] [[package]] name = "wasm-bindgen" @@ -5364,7 +4789,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "wasm-bindgen-macro", ] @@ -5380,7 +4805,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -5390,7 +4815,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -5414,7 +4839,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -5425,6 +4850,20 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "web-sys" version = "0.3.70" @@ -5445,40 +4884,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -5488,12 +4893,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.52.0" @@ -5683,9 +5082,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.20" +version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +checksum = "c06928c8748d81b05c9be96aad92e1b6ff01833332f281e8cfca3be4b35fc9ec" dependencies = [ "memchr", ] @@ -5696,27 +5095,17 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] [[package]] -name = "ws_stream_wasm" -version = "0.7.4" +name = "wit-bindgen-rt" +version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "bitflags 2.6.0", ] [[package]] @@ -5728,12 +5117,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xdg" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" - [[package]] name = "yaml-rust" version = "0.4.5" @@ -5743,12 +5126,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "zerocopy" version = "0.7.35" @@ -5767,7 +5144,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.101", ] [[package]] @@ -5787,27 +5164,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", -] - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes 0.8.4", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd", + "syn 2.0.101", ] [[package]] @@ -5821,9 +5178,9 @@ dependencies = [ "crossbeam-utils", "displaydoc", "flate2", - "indexmap", + "indexmap 2.6.0", "memchr", - "thiserror", + "thiserror 1.0.64", "time", "zopfli", ] @@ -5835,7 +5192,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6413a546ada9dbcd0b9a3e0b0880581279e35047bce9797e523b3408e1df607c" dependencies = [ "ed25519-dalek", - "thiserror", + "thiserror 1.0.64", ] [[package]] @@ -5851,32 +5208,3 @@ dependencies = [ "once_cell", "simd-adler32", ] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index ab10d22..730f77d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,17 +8,15 @@ edition = "2021" [dependencies] anyhow = "1.0.88" bincode = "1.3.3" -plonky2 = { git="https://github.com/InternetMaximalism/polygon-plonky2.git", branch="intmax2-dev"} -intmax2-zkp = {git ="https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev"} -mining_circuit_v1 ={git ="https://github.com/InternetMaximalism/intmax2-mining.git"} +plonky2 = { git = "https://github.com/InternetMaximalism/polygon-plonky2.git", branch = "intmax2-dev" } +intmax2-zkp = { git = "https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev" } +mining_circuit_v1 = { git = "https://github.com/InternetMaximalism/intmax2-mining.git" } num-bigint = "0.4.6" -serde = {version="1.0.210", features = ["derive"]} +serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" config = "0.13" reqwest = { version = "0.11", features = ["json"] } -ethers = "2.0" tokio = { version = "1", features = ["full"] } -rpassword = "5.0" aes-gcm = "0.9" sha3 = "0.10.0" dialoguer = "0.11.0" @@ -28,7 +26,6 @@ simplelog = "0.12.2" log = "0.4.22" chrono = "0.4.38" regex = "1.10.6" -dir = "0.1.2" dirs = "5.0.1" clap = { version = "4.5.18", features = ["derive"] } dotenv = "0.15.0" @@ -36,8 +33,13 @@ hex = "0.4.3" thiserror = "1.0.64" strum = "0.26.3" strum_macros = "0.26.4" -openssl = { version = "0.10", features = ["vendored"] } -openssl-sys = { version = "0.9", features = ["vendored"] } -self_update = {version="0.41.0", features=["archive-zip", "compression-zip-deflate"]} +self_update = { version = "0.41.0", features = [ + "archive-zip", + "compression-zip-deflate", +] } rand_chacha = "0.3.1" - +alloy = { version = "1.0.7", features = ["rand"] } +tower = "0.5.2" +serde_qs = "0.15.0" +futures = "0.3.31" +serde_with = "3.12.0" diff --git a/abi/ERC20.json b/abi/ERC20.json new file mode 100644 index 0000000..668d697 --- /dev/null +++ b/abi/ERC20.json @@ -0,0 +1,222 @@ +[ + { + "constant": true, + "inputs": [], + "name": "name", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_spender", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "approve", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "totalSupply", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_from", + "type": "address" + }, + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transferFrom", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "decimals", + "outputs": [ + { + "name": "", + "type": "uint8" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + } + ], + "name": "balanceOf", + "outputs": [ + { + "name": "balance", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": true, + "inputs": [], + "name": "symbol", + "outputs": [ + { + "name": "", + "type": "string" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "constant": false, + "inputs": [ + { + "name": "_to", + "type": "address" + }, + { + "name": "_value", + "type": "uint256" + } + ], + "name": "transfer", + "outputs": [ + { + "name": "", + "type": "bool" + } + ], + "payable": false, + "stateMutability": "nonpayable", + "type": "function" + }, + { + "constant": true, + "inputs": [ + { + "name": "_owner", + "type": "address" + }, + { + "name": "_spender", + "type": "address" + } + ], + "name": "allowance", + "outputs": [ + { + "name": "", + "type": "uint256" + } + ], + "payable": false, + "stateMutability": "view", + "type": "function" + }, + { + "payable": true, + "stateMutability": "payable", + "type": "fallback" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "owner", + "type": "address" + }, + { + "indexed": true, + "name": "spender", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Approval", + "type": "event" + }, + { + "anonymous": false, + "inputs": [ + { + "indexed": true, + "name": "from", + "type": "address" + }, + { + "indexed": true, + "name": "to", + "type": "address" + }, + { + "indexed": false, + "name": "value", + "type": "uint256" + } + ], + "name": "Transfer", + "type": "event" + } +] \ No newline at end of file diff --git a/config/config.base-sepolia.toml b/config/config.base-sepolia.toml index d1dace6..25f06f6 100644 --- a/config/config.base-sepolia.toml +++ b/config/config.base-sepolia.toml @@ -2,17 +2,18 @@ availability_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/availability" withdrawal_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/gnark-withdraw-circuit" claim_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" -withdrawal_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/withdrawal" -circulation_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining" -gas_server_url="https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate" -tree_data_repository="InternetMaximalism/intmax2-v1-mining-mock" -tree_data_directory="base-sepolia-data" -tree_data_branch="main" +withdrawal_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/withdrawal" +circulation_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining" +gas_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate" +tree_data_repository = "InternetMaximalism/intmax2-v1-mining-mock" +tree_data_directory = "base-sepolia-data" +tree_data_branch = "main" sync_tree_data_interval_in_sec = 3600 gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 84532 +graph_url = "http://localhost:8000/subgraphs/name/stage-int1" int1_address = "0x5dfa05aAdbE75a92f6153508950533fC1bed98BE" minter_address = "0xeF9CBc6F2f602AF19b0fEc2cc4F217177730858E" token_address = "0x2699CD7f883DecC464171a7A92f4CcC4eF220fa2" @@ -22,12 +23,12 @@ single_claim_gas = 600000 [service] repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" -mining_min_cooldown_in_sec = 20 -mining_max_cooldown_in_sec = 200 +mining_min_cooldown_in_sec = 20 +mining_max_cooldown_in_sec = 200 loop_cooldown_in_sec = 10 -high_gas_retry_inverval_in_sec = 10 +high_gas_retry_interval_in_sec = 10 [env] -default_max_gas_price ="100" -default_mining_times="5" -default_mining_unit="0.1" \ No newline at end of file +default_max_gas_price = "100" +default_mining_times = "5" +default_mining_unit = "0.1" diff --git a/config/config.base.toml b/config/config.base.toml index 34bcd88..875052d 100644 --- a/config/config.base.toml +++ b/config/config.base.toml @@ -13,6 +13,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 8453 +graph_url = "http://localhost:8000/subgraphs/name/prod-int1" int1_address = "0x195F9b5F42435bB71E9765E66a9bdFE40d44A895" minter_address = "0x1f5a5Eb6C3894351425BD51ea2AE1ef3FEC93976" token_address = "0xf95117e3a5B7968703CeD3B66A9CbE0Bc9e1D8bf" @@ -25,7 +26,7 @@ repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" mining_min_cooldown_in_sec = 3600 # 1 hour mining_max_cooldown_in_sec = 21600 # 6 hours loop_cooldown_in_sec = 10 -high_gas_retry_inverval_in_sec = 10 +high_gas_retry_interval_in_sec = 10 [env] default_max_gas_price ="10" diff --git a/config/config.mainnet.toml b/config/config.mainnet.toml index fd0a7bf..88ea584 100644 --- a/config/config.mainnet.toml +++ b/config/config.mainnet.toml @@ -2,17 +2,18 @@ availability_server_url = "https://v1.mining-gateway.intmax.xyz/v1/availability" withdrawal_gnark_prover_url = "https://v1.mining-gateway.intmax.xyz/v1/gnark-withdraw-circuit" claim_gnark_prover_url = "https://v1.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" -withdrawal_server_url="https://v1.mining-gateway.intmax.xyz/v1/withdrawal" -circulation_server_url="https://v1.mining-gateway.intmax.xyz/v1/mining" -gas_server_url="" -tree_data_repository="InternetMaximalism/intmax2-mining" -tree_data_directory="data" -tree_data_branch="main" -sync_tree_data_interval_in_sec = 3600 # 60 minutes +withdrawal_server_url = "https://v1.mining-gateway.intmax.xyz/v1/withdrawal" +circulation_server_url = "https://v1.mining-gateway.intmax.xyz/v1/mining" +gas_server_url = "" +tree_data_repository = "InternetMaximalism/intmax2-mining" +tree_data_directory = "data" +tree_data_branch = "main" +sync_tree_data_interval_in_sec = 3600 # 60 minutes gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 1 +graph_url = "http://localhost:8000/subgraphs/name/legacy-int1" int1_address = "0x0Ac498bCA32B00E2584171844fb9A5943398D9c1" minter_address = "0x38DE07d2526Ae929f1903E5F109B70C50e12A8E0" token_address = "0xe24e207c6156241cAfb41D025B3b5F0677114C81" @@ -22,12 +23,12 @@ single_claim_gas = 600000 [service] repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" -mining_min_cooldown_in_sec = 3600 # 1 hour -mining_max_cooldown_in_sec = 21600 # 6 hours +mining_min_cooldown_in_sec = 3600 # 1 hour +mining_max_cooldown_in_sec = 21600 # 6 hours loop_cooldown_in_sec = 10 -high_gas_retry_inverval_in_sec = 10 +high_gas_retry_interval_in_sec = 10 [env] -default_max_gas_price ="30" -default_mining_times="10" -default_mining_unit="0.1" \ No newline at end of file +default_max_gas_price = "30" +default_mining_times = "10" +default_mining_unit = "0.1" diff --git a/src/cli/accounts_status.rs b/src/cli/accounts_status.rs index aa15bce..d2631c5 100644 --- a/src/cli/accounts_status.rs +++ b/src/cli/accounts_status.rs @@ -1,12 +1,8 @@ -use ethers::types::{H256, U256}; +use alloy::{primitives::{B256, U256}, providers::Provider as _}; use crate::{ external_api::{ - contracts::{ - token::get_token_balance, - utils::{get_address, get_balance}, - }, - intmax::circulation::get_circulation, + contracts::utils::get_address_from_private_key, intmax::circulation::get_circulation }, services::utils::{is_address_used, pretty_format_u256}, state::{key::Key, state::State}, @@ -18,12 +14,12 @@ use crate::{ pub async fn accounts_status( state: &mut State, mining_times: u64, - withdrawal_private_key: H256, + withdrawal_private_key: B256, ) -> anyhow::Result<()> { println!("Network: {}", get_network()); - let withdrawal_address = get_address(withdrawal_private_key); - let withdrawal_balance = get_balance(withdrawal_address).await?; - let withdrawal_token_balance = get_token_balance(withdrawal_address).await?; + let withdrawal_address = get_address_from_private_key(withdrawal_private_key); + let withdrawal_balance = state.provider.get_balance(withdrawal_address).await?; + let withdrawal_token_balance = state.token.get_token_balance(withdrawal_address).await?; println!( "Withdrawal address(don’t deposit Ether to this): {} {} ETH {} ITX", withdrawal_address, @@ -32,11 +28,11 @@ pub async fn accounts_status( ); let mut key_number = 0; - let mut total_short_term_claimable_amount = U256::zero(); - let mut total_long_term_claimable_amount = U256::zero(); + let mut total_short_term_claimable_amount = U256::default(); + let mut total_long_term_claimable_amount = U256::default(); loop { let key = Key::new(withdrawal_private_key, key_number); - if !is_address_used(key.deposit_address).await { + if !is_address_used(&state.provider,key.deposit_address).await? { println!( "Total short term claimable amount: {} ITX", pretty_format_u256(total_short_term_claimable_amount) @@ -49,7 +45,7 @@ pub async fn accounts_status( } let assets_status = state.sync_and_fetch_assets(&key).await?; let is_qualified = !get_circulation(key.deposit_address).await?.is_excluded; - let deposit_balance = get_balance(key.deposit_address).await?; + let deposit_balance = state.provider.get_balance(key.deposit_address).await?; println!( "Deposit address #{}: {:?} {} ETH. Qualified: {}. Deposits: {}/{}. Claimable Short: {} ITX, Claimable Long: {} ITX", key_number, diff --git a/src/cli/availability.rs b/src/cli/availability.rs index e6136ae..fe13332 100644 --- a/src/cli/availability.rs +++ b/src/cli/availability.rs @@ -4,7 +4,7 @@ use crate::external_api::intmax::{availability::get_availability, error::IntmaxE use super::console::print_error; -pub async fn check_avaliability() -> anyhow::Result<()> { +pub async fn check_availability() -> anyhow::Result<()> { match get_availability().await { Ok(output) => { if !output.is_available { diff --git a/src/cli/balance_validation.rs b/src/cli/balance_validation.rs index 3ffc940..6fb3c44 100644 --- a/src/cli/balance_validation.rs +++ b/src/cli/balance_validation.rs @@ -1,14 +1,18 @@ -use ethers::types::{Address, U256}; +use alloy::{ + primitives::{Address, U256}, + providers::Provider, +}; use crate::{ - external_api::contracts::utils::get_gas_price, + external_api::contracts::utils::NormalProvider, services::{ - assets_status::AssetsStatus, claim::MAX_CLAIMS, utils::insuffient_balance_instruction, + assets_status::AssetsStatus, claim::MAX_CLAIMS, utils::insufficient_balance_instruction, }, utils::config::Settings, }; pub async fn validate_deposit_address_balance( + provider: &NormalProvider, assets_status: &AssetsStatus, deposit_address: Address, mining_unit: U256, @@ -21,24 +25,26 @@ pub async fn validate_deposit_address_balance( 0 }; let settings = Settings::load()?; - let gas_price = get_gas_price().await?; - let single_deposit_gas: U256 = settings.blockchain.single_deposit_gas.into(); + let gas_price = U256::from(provider.get_gas_price().await?); + let single_deposit_gas = U256::from(settings.blockchain.single_deposit_gas); let min_balance = (mining_unit + gas_price * single_deposit_gas) * U256::from(remaining_deposits); - insuffient_balance_instruction(deposit_address, min_balance, "deposit").await?; + insufficient_balance_instruction(provider, deposit_address, min_balance, "deposit").await?; Ok(()) } pub async fn validate_withdrawal_address_balance( + provider: &NormalProvider, assets_status: &AssetsStatus, withdrawal_address: Address, ) -> anyhow::Result<()> { let remaining_claims = assets_status.short_term_not_claimed_indices.len(); let num_claim_tx = remaining_claims.div_ceil(MAX_CLAIMS); let settings = Settings::load()?; - let gas_price = get_gas_price().await?; - let single_claim_gas: U256 = settings.blockchain.single_claim_gas.into(); + let gas_price = U256::from(provider.get_gas_price().await?); + let single_claim_gas = U256::from(settings.blockchain.single_claim_gas); let min_balance = single_claim_gas * gas_price * U256::from(num_claim_tx); - insuffient_balance_instruction(withdrawal_address, min_balance, "withdrawal").await?; + insufficient_balance_instruction(provider, withdrawal_address, min_balance, "withdrawal") + .await?; Ok(()) } diff --git a/src/cli/configure.rs b/src/cli/configure.rs index 92efc5e..9d7cb7f 100644 --- a/src/cli/configure.rs +++ b/src/cli/configure.rs @@ -1,13 +1,19 @@ use std::{collections::HashMap, str::FromStr}; +use alloy::{ + primitives::{ + utils::{format_units, parse_ether, parse_units}, + Address, B256, U256, + }, + providers::Provider as _, +}; use anyhow::bail; use console::style; use dialoguer::{Confirm, Input, Password, Select}; -use ethers::types::{Address, H256, U256}; use strum::IntoEnumIterator as _; use crate::{ - external_api::contracts::utils::{get_address, get_balance_with_rpc}, + external_api::contracts::utils::{get_address_from_private_key, get_provider}, utils::{ config::Settings, encryption::{decrypt, encrypt}, @@ -42,10 +48,10 @@ pub async fn new_config(network: Network) -> anyhow::Result { .interact()?; let (max_gas_price, mining_unit, mining_times) = if use_default { ( - ethers::utils::parse_units(default_env.default_max_gas_price, "gwei") + parse_units(&default_env.default_max_gas_price, "gwei") .unwrap() .into(), - ethers::utils::parse_ether(default_env.default_mining_unit).unwrap(), + parse_ether(&default_env.default_mining_unit).unwrap(), default_env.default_mining_times, ) } else { @@ -54,8 +60,8 @@ pub async fn new_config(network: Network) -> anyhow::Result { let mining_times = input_mining_times()?; (max_gas_price, mining_unit, mining_times) }; - let withdrawal_private_key: H256 = input_withdrawal_private_key(&rpc_url).await?; - let withdrawal_address = get_address(withdrawal_private_key); + let withdrawal_private_key: B256 = input_withdrawal_private_key(&rpc_url).await?; + let withdrawal_address = get_address_from_private_key(withdrawal_private_key); let (encrypt, keys, encrypted_keys) = input_encryption(withdrawal_private_key)?; let config = EnvConfig { network, @@ -85,7 +91,7 @@ pub async fn modify_config(config: &EnvConfig) -> anyhow::Result { let modify_max_gas_price = Confirm::new() .with_prompt(format!( "Modify max gas price {} GWei?", - ethers::utils::format_units(config.max_gas_price, "gwei").unwrap() + format_units(config.max_gas_price, "gwei").unwrap() )) .default(false) .interact()?; @@ -96,7 +102,10 @@ pub async fn modify_config(config: &EnvConfig) -> anyhow::Result { }; let modify_withdrawal_address = Confirm::new() - .with_prompt(format!("Modify withdrawal account {:?}?", get_address(key))) + .with_prompt(format!( + "Modify withdrawal account {:?}?", + get_address_from_private_key(key) + )) .default(false) .interact()?; let withdrawal_private_key = if modify_withdrawal_address { @@ -105,7 +114,7 @@ pub async fn modify_config(config: &EnvConfig) -> anyhow::Result { key }; let (encrypt, keys, encrypted_keys) = input_encryption(withdrawal_private_key)?; - let withdrawal_address = get_address(withdrawal_private_key); + let withdrawal_address = get_address_from_private_key(withdrawal_private_key); let config = EnvConfig { network: config.network, rpc_url, @@ -221,9 +230,9 @@ fn input_max_gas_price() -> anyhow::Result { .with_prompt("Max gas price for transactions in GWei") .default(default_max_gas_price) .validate_with(|max_gas_price: &String| { - let result = ethers::utils::parse_units(max_gas_price, "gwei"); + let result = parse_units(max_gas_price, "gwei"); if let Ok(x) = result { - if x > ethers::utils::parse_units("210", "gwei").unwrap() { + if x > parse_units("210", "gwei").unwrap() { return Err("Gas price too high (>210 GWei)"); } Ok(()) @@ -232,9 +241,7 @@ fn input_max_gas_price() -> anyhow::Result { } }) .interact()?; - let max_gas_price = ethers::utils::parse_units(max_gas_price, "gwei") - .unwrap() - .into(); + let max_gas_price = parse_units(&max_gas_price, "gwei").unwrap().into(); Ok(max_gas_price) } @@ -246,8 +253,8 @@ fn input_mining_unit() -> anyhow::Result { .default(0) .interact()?; let mining_unit = match selection { - 0 => ethers::utils::parse_ether("0.1").unwrap(), - 1 => ethers::utils::parse_ether("1").unwrap(), + 0 => parse_ether("0.1").unwrap(), + 1 => parse_ether("1").unwrap(), _ => unreachable!(), }; Ok(mining_unit) @@ -267,14 +274,14 @@ fn input_mining_times() -> anyhow::Result { Ok(mining_times) } -async fn input_withdrawal_private_key(rpc_url: &str) -> anyhow::Result { +async fn input_withdrawal_private_key(rpc_url: &str) -> anyhow::Result { loop { let withdrawal_private_key: String = Password::new() .with_prompt(format!("Withdrawal private key of {}", get_network())) .validate_with(|input: &String| validate_private_key_with_duplication_check(&[], input)) .interact()?; - let withdrawal_private_key: H256 = withdrawal_private_key.parse().unwrap(); - let withdrawal_address = get_address(withdrawal_private_key); + let withdrawal_private_key: B256 = withdrawal_private_key.parse().unwrap(); + let withdrawal_address = get_address_from_private_key(withdrawal_private_key); println!("Withdrawal Address: {:?}", withdrawal_address); // duplication check @@ -284,8 +291,9 @@ async fn input_withdrawal_private_key(rpc_url: &str) -> anyhow::Result { // non-balance check { - let balance = get_balance_with_rpc(rpc_url, withdrawal_address).await?; - if balance != U256::zero() { + let provider = get_provider(rpc_url)?; + let balance = provider.get_balance(withdrawal_address).await?; + if balance != U256::default() { let colored_message = format!( "{} {}", style("WARNING:").yellow().bold(), @@ -306,7 +314,7 @@ async fn input_withdrawal_private_key(rpc_url: &str) -> anyhow::Result { } } -fn is_withdrawal_address_duplicated(withdrawal_addres: Address) -> anyhow::Result { +fn is_withdrawal_address_duplicated(withdrawal_address: Address) -> anyhow::Result { let mut address_to_network = HashMap::::new(); for network in Network::iter() { for config_index in EnvConfig::get_existing_indices(network) { @@ -314,7 +322,8 @@ fn is_withdrawal_address_duplicated(withdrawal_addres: Address) -> anyhow::Resul address_to_network.insert(config.withdrawal_address, (network, config_index)); } } - if let Some((duplicated_network, duplicated_index)) = address_to_network.get(&withdrawal_addres) + if let Some((duplicated_network, duplicated_index)) = + address_to_network.get(&withdrawal_address) { let message = format!( "Withdrawal address is duplicated as {} config #{}. Please use a different address.", @@ -328,8 +337,8 @@ fn is_withdrawal_address_duplicated(withdrawal_addres: Address) -> anyhow::Resul } fn input_encryption( - withdrawal_private_key: H256, -) -> anyhow::Result<(bool, Option, Option>)> { + withdrawal_private_key: B256, +) -> anyhow::Result<(bool, Option, Option>)> { let do_encrypt = Confirm::new() .with_prompt("Do you set password to encrypt private keys?") .default(true) @@ -353,13 +362,13 @@ fn input_encryption( } fn validate_private_key_with_duplication_check( - private_keys: &[H256], + private_keys: &[B256], input: &str, ) -> Result<(), &'static str> { - let result: Result = input.parse(); + let result: Result = input.parse(); match result { Ok(x) => { - if x == H256::zero() { + if x == B256::default() { return Err("Invalid private key"); } if private_keys.contains(&x) { @@ -371,7 +380,7 @@ fn validate_private_key_with_duplication_check( } } -pub fn recover_withdrawal_private_key(config: &EnvConfig) -> anyhow::Result { +pub fn recover_withdrawal_private_key(config: &EnvConfig) -> anyhow::Result { let key = if !config.encrypt { config.withdrawal_private_key.clone().unwrap() } else { diff --git a/src/cli/console.rs b/src/cli/console.rs index c76706a..a877300 100644 --- a/src/cli/console.rs +++ b/src/cli/console.rs @@ -1,7 +1,7 @@ use console::{style, Term}; use log::{error, info, warn}; -pub fn initialize_console() { +pub fn clear_console() { let term = Term::stdout(); term.write_line("").unwrap(); } @@ -32,7 +32,7 @@ pub fn print_log(message: S) { style(message.to_string()).blue() ); term.write_line(&colored_message).unwrap(); - initialize_console(); + clear_console(); info!("{}", message.to_string()); } @@ -50,8 +50,6 @@ pub fn print_warning(message: S) { warn!("{}", message.to_string()); } - - pub fn print_assets_status(assets_status: &crate::services::assets_status::AssetsStatus) { print_status(format!( "Deposits: {} (success: {} pending: {} rejected: {} cancelled: {}) Withdrawn: {}", diff --git a/src/cli/export_deposit_accounts.rs b/src/cli/export_deposit_accounts.rs index 74ce51e..aecd1e0 100644 --- a/src/cli/export_deposit_accounts.rs +++ b/src/cli/export_deposit_accounts.rs @@ -1,8 +1,11 @@ +use alloy::{ + primitives::{Address, B256}, + providers::Provider as _, +}; use dialoguer::{Confirm, Select}; -use ethers::types::{Address, H256}; use crate::{ - external_api::contracts::utils::get_balance, + external_api::contracts::utils::NormalProvider, services::{ balance_transfer::balance_transfer, utils::{is_address_used, pretty_format_u256}, @@ -10,9 +13,12 @@ use crate::{ state::key::Key, }; -pub async fn export_deposit_accounts(withdrawal_private_key: H256) -> anyhow::Result<()> { +pub async fn export_deposit_accounts( + provider: &NormalProvider, + withdrawal_private_key: B256, +) -> anyhow::Result<()> { let key = Key::new(withdrawal_private_key, 0); - let balance = get_balance(key.deposit_address).await?; + let balance = provider.get_balance(key.deposit_address).await?; println!(); println!( "Deposit Address: {:?} ({} ETH)", @@ -26,12 +32,15 @@ pub async fn export_deposit_accounts(withdrawal_private_key: H256) -> anyhow::Re .default(true) .interact()?; if do_transfer { - transfer_instruction(withdrawal_private_key).await?; + transfer_instruction(provider, withdrawal_private_key).await?; } Ok(()) } -async fn transfer_instruction(withdrawal_private_key: H256) -> anyhow::Result<()> { +async fn transfer_instruction( + provider: &NormalProvider, + withdrawal_private_key: B256, +) -> anyhow::Result<()> { let key = Key::new(withdrawal_private_key, 0); let to_address: Address = dialoguer::Input::::new() .with_prompt("Enter the address to transfer to") @@ -62,23 +71,26 @@ async fn transfer_instruction(withdrawal_private_key: H256) -> anyhow::Result<() if !is_ok { return Ok(()); } else { - balance_transfer(key.deposit_private_key, to_address).await?; + balance_transfer(provider, key.deposit_private_key, to_address).await?; } Ok(()) } -pub async fn legacy_export_deposit_accounts(withdrawal_private_key: H256) -> anyhow::Result<()> { +pub async fn legacy_export_deposit_accounts( + provider: &NormalProvider, + withdrawal_private_key: B256, +) -> anyhow::Result<()> { let mut key_number = 0; loop { let key = Key::new(withdrawal_private_key, key_number); - if !is_address_used(key.deposit_address).await { + if !is_address_used(provider, key.deposit_address).await? { if key_number == 0 { println!("No deposit accounts found."); return Ok(()); } break; } - let balance = get_balance(key.deposit_address).await?; + let balance = provider.get_balance(key.deposit_address).await?; println!(); println!( "Deposit Address #{}: {:?} ({} ETH)", @@ -96,13 +108,14 @@ pub async fn legacy_export_deposit_accounts(withdrawal_private_key: H256) -> any .interact()?; if do_transfer { - legacy_transfer_instruction(withdrawal_private_key, key_number).await?; + legacy_transfer_instruction(provider, withdrawal_private_key, key_number).await?; } Ok(()) } async fn legacy_transfer_instruction( - withdrawal_private_key: H256, + provider: &NormalProvider, + withdrawal_private_key: B256, up_to_key_number: u64, ) -> anyhow::Result<()> { let deposit_addresses = (0..up_to_key_number) @@ -153,7 +166,7 @@ async fn legacy_transfer_instruction( if !is_ok { continue; } else { - balance_transfer(key.deposit_private_key, to_address).await?; + balance_transfer(provider, key.deposit_private_key, to_address).await?; } let do_more = Confirm::new() .with_prompt("Do you want to make more transfers?") diff --git a/src/cli/interactive.rs b/src/cli/interactive.rs index 909d4db..c3818bf 100644 --- a/src/cli/interactive.rs +++ b/src/cli/interactive.rs @@ -1,8 +1,8 @@ use std::collections::HashMap; +use alloy::primitives::Address; use console::style; use dialoguer::Select; -use ethers::types::Address; use strum::IntoEnumIterator; use crate::utils::{ @@ -43,7 +43,6 @@ fn address_duplication_check() -> anyhow::Result<()> { } } } - Ok(()) } diff --git a/src/cli/mod.rs b/src/cli/mod.rs index be9c10d..22c217c 100644 --- a/src/cli/mod.rs +++ b/src/cli/mod.rs @@ -1,14 +1,14 @@ use std::io::{self, Read as _}; use ::console::{style, Term}; +use alloy::primitives::B256; use configure::recover_withdrawal_private_key; -use console::initialize_console; -use ethers::types::H256; +use console::clear_console; use mode_selection::{legacy_select_mode, select_mode}; use term_of_use::make_agreement; use crate::{ - external_api::contracts::utils::get_address, + external_api::contracts::utils::get_address_from_private_key, services::{claim_loop, exit_loop, legacy_claim_loop, mining_loop}, state::{mode::RunMode, state::State}, utils::{ @@ -40,7 +40,7 @@ pub async fn run(mode: Option) -> anyhow::Result<()> { let config = EnvConfig::import_from_env()?; let withdrawal_private_key = recover_withdrawal_private_key(&config)?; - if config.withdrawal_address != get_address(withdrawal_private_key) { + if config.withdrawal_address != get_address_from_private_key(withdrawal_private_key) { anyhow::bail!("Withdrawal address does not match the address derived from the private key"); } validate_env_config(&config).await?; @@ -61,14 +61,14 @@ pub async fn run(mode: Option) -> anyhow::Result<()> { mode.unwrap() }; - let mut state = State::new(); + let mut state = State::new(&config.rpc_url); // prints the status of the accounts if mutable mode if mode == RunMode::Mining || mode == RunMode::Claim || mode == RunMode::Exit { accounts_status::accounts_status(&mut state, config.mining_times, withdrawal_private_key) .await?; } - initialize_console(); + clear_console(); mode_loop( &mut mode, &mut state, @@ -84,7 +84,7 @@ async fn mode_loop( mode: &mut RunMode, state: &mut State, config: &EnvConfig, - withdrawal_private_key: H256, + withdrawal_private_key: B256, is_interactive: bool, ) -> anyhow::Result<()> { loop { @@ -113,11 +113,17 @@ async fn mode_loop( } RunMode::Export => { if is_legacy() { - export_deposit_accounts::legacy_export_deposit_accounts(withdrawal_private_key) - .await?; + export_deposit_accounts::legacy_export_deposit_accounts( + &state.provider, + withdrawal_private_key, + ) + .await?; } else { - export_deposit_accounts::export_deposit_accounts(withdrawal_private_key) - .await?; + export_deposit_accounts::export_deposit_accounts( + &state.provider, + withdrawal_private_key, + ) + .await?; } press_enter_to_continue(); } diff --git a/src/external_api/contracts/convert.rs b/src/external_api/contracts/convert.rs new file mode 100644 index 0000000..e9ac882 --- /dev/null +++ b/src/external_api/contracts/convert.rs @@ -0,0 +1,37 @@ +use alloy::primitives::{Address as AlloyAddress, TxHash, B256, U256 as AlloyU256}; +use intmax2_zkp::ethereum_types::{ + address::Address as IntmaxAddress, bytes32::Bytes32, u256::U256 as IntmaxU256, + u32limb_trait::U32LimbTrait, +}; + +pub fn convert_u256_to_alloy(input: IntmaxU256) -> AlloyU256 { + AlloyU256::from_be_slice(&input.to_bytes_be()) +} + +pub fn convert_u256_to_intmax(input: AlloyU256) -> IntmaxU256 { + IntmaxU256::from_bytes_be(&input.to_be_bytes_vec()) +} + +pub fn convert_address_to_alloy(input: IntmaxAddress) -> AlloyAddress { + AlloyAddress::from_slice(&input.to_bytes_be()) +} + +pub fn convert_address_to_intmax(input: AlloyAddress) -> IntmaxAddress { + IntmaxAddress::from_bytes_be(&input.0 .0) +} + +pub fn convert_b256_to_bytes32(input: B256) -> Bytes32 { + Bytes32::from_bytes_be(&input.0) +} + +pub fn convert_tx_hash_to_bytes32(input: TxHash) -> Bytes32 { + Bytes32::from_bytes_be(&input.0) +} + +pub fn convert_bytes32_to_tx_hash(input: Bytes32) -> TxHash { + TxHash::from_slice(&input.to_bytes_be()) +} + +pub fn convert_bytes32_to_b256(input: Bytes32) -> B256 { + B256::from_slice(&input.to_bytes_be()) +} diff --git a/src/external_api/contracts/error.rs b/src/external_api/contracts/error.rs index 210fea7..50aaf74 100644 --- a/src/external_api/contracts/error.rs +++ b/src/external_api/contracts/error.rs @@ -1,13 +1,46 @@ -use thiserror::Error; +use alloy::{ + primitives::B256, + transports::{RpcError, TransportErrorKind}, +}; -#[derive(Error, Debug)] +#[derive(Debug, thiserror::Error)] pub enum BlockchainError { - #[error("Network error: {0}")] - NetworkError(String), + #[error("Contract error: {0}")] + ContractError(#[from] alloy::contract::Error), + + #[error("Insufficient funds: {0}")] + InsufficientFunds(String), + + #[error("Transaction failed: {0}")] + TransactionFailed(String), + + #[error("RPC error: {0}")] + RPCError(#[from] RpcError), + + #[error("Join error: {0}")] + JoinError(String), + + #[error("Decode call data error: {0}")] + DecodeCallDataError(String), + + #[error("Token not found")] + TokenNotFound, + + #[error("Transaction not found: {0:?}")] + TxNotFound(B256), + + #[error("Transaction not found in batch")] + TxNotFoundBatch, + + #[error("Transaction error: {0}")] + TransactionError(String), + + #[error("Max tx retries reached")] + MaxTxRetriesReached, + + #[error("Parse error: {0}")] + ParseError(String), + #[error("Env error: {0}")] EnvError(String), - #[error("Internal error: {0}")] - InternalError(String), - #[error("Tx not found: {0}")] - TxNotFound(String), } diff --git a/src/external_api/contracts/events.rs b/src/external_api/contracts/events.rs index 1b7823f..69e4c54 100644 --- a/src/external_api/contracts/events.rs +++ b/src/external_api/contracts/events.rs @@ -1,22 +1,8 @@ -use ethers::{providers::Middleware as _, types::Address}; +use alloy::primitives::Address; use intmax2_zkp::{ common::deposit::Deposit, - ethereum_types::{bytes32::Bytes32, u256::U256, u32limb_trait::U32LimbTrait}, + ethereum_types::{bytes32::Bytes32, u256::U256}, }; -use log::info; - -use crate::{ - external_api::contracts::utils::{get_block, get_latest_block_number}, - utils::retry::with_retry, -}; - -use super::{ - error::BlockchainError, - int1::get_int1_contract, - utils::{get_client, u256_as_bytes_be}, -}; - -const EVENT_BLOCK_RANGE: u64 = 100000; #[derive(Clone, Debug)] pub struct Deposited { @@ -26,6 +12,7 @@ pub struct Deposited { pub token_index: u32, pub amount: U256, pub tx_nonce: u64, + pub timestamp: u64, } impl Deposited { @@ -38,217 +25,9 @@ impl Deposited { } } -pub async fn get_deposited_event_by_sender( - sender: Address, -) -> Result, BlockchainError> { - info!("get_deposited_event_by_sender"); - let int1 = get_int1_contract().await?; - - let settings = crate::utils::config::Settings::load().unwrap(); - let mut events = Vec::new(); - let mut from_block = settings.blockchain.int1_deployed_block; - loop { - info!("get_deposited_event_by_sender: from_block={}", from_block); - let new_events = with_retry(|| async { - int1.deposited_filter() - .address(int1.address().into()) - .topic2(sender) - .from_block(from_block) - .to_block(from_block + EVENT_BLOCK_RANGE) - .query_with_meta() - .await - }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get deposited event".to_string()))?; - events.extend(new_events); - let latest_block_number = get_latest_block_number().await?; - from_block += EVENT_BLOCK_RANGE; - if from_block > latest_block_number { - break; - } - } - - let client = get_client().await?; - let mut deposited_events = Vec::new(); - let mut seen_deposit_id = std::collections::HashSet::new(); - for (event, meta) in events { - // skip duplicated deposit - let deposit_id = event.deposit_id; - if seen_deposit_id.contains(&deposit_id) { - continue; - } else { - seen_deposit_id.insert(deposit_id); - } - - let tx_hash = meta.transaction_hash; - let tx = with_retry(|| async { client.get_transaction(tx_hash).await }) - .await - .map_err(|_| BlockchainError::TxNotFound(tx_hash.to_string()))? - .expect("tx not found"); // this should not happen - let tx_nonce = tx.nonce.as_u64(); - deposited_events.push(Deposited { - deposit_id: event.deposit_id.try_into().unwrap(), - sender: event.sender, - recipient_salt_hash: Bytes32::from_bytes_be(&event.recipient_salt_hash), - token_index: event.token_index, - amount: U256::from_bytes_be(&u256_as_bytes_be(event.amount)), - tx_nonce, - }); - } - deposited_events.sort_by_key(|event| event.deposit_id); - Ok(deposited_events) -} - #[derive(Clone, Debug)] pub struct DepositLeafInserted { pub deposit_index: u32, pub deposit_hash: Bytes32, pub block_number: u64, } - -pub async fn get_deposit_leaf_inserted_event( - from_block: u64, -) -> Result, BlockchainError> { - log::info!("get_deposit_leaf_inserted_event"); - - let mut events = Vec::new(); - let mut from_block = from_block; - loop { - log::info!("get_deposit_leaf_inserted_event: from_block={}", from_block); - let int1 = get_int1_contract().await?; - let new_events = with_retry(|| async { - int1.deposit_leaf_inserted_filter() - .address(int1.address().into()) - .from_block(from_block) - .to_block(from_block + EVENT_BLOCK_RANGE) - .query_with_meta() - .await - }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to get deposit leaf inserted event".to_string()) - })?; - events.extend(new_events); - let latest_block_number = get_latest_block_number().await?; - from_block += EVENT_BLOCK_RANGE; - if from_block > latest_block_number { - break; - } - } - let mut deposit_leaf_inserted_events = Vec::new(); - let mut seen_deposit_indices = std::collections::HashSet::new(); - for (event, meta) in events { - // skip duplicated deposit - let deposit_index = event.deposit_index; - if seen_deposit_indices.contains(&deposit_index) { - continue; - } else { - seen_deposit_indices.insert(deposit_index); - } - deposit_leaf_inserted_events.push(DepositLeafInserted { - deposit_index: event.deposit_index, - deposit_hash: Bytes32::from_bytes_be(&event.deposit_hash), - block_number: meta.block_number.as_u64(), - }); - } - - deposit_leaf_inserted_events.sort_by_key(|event| event.deposit_index); - - Ok(deposit_leaf_inserted_events) -} - -pub async fn get_latest_deposit_timestamp(sender: Address) -> Result, BlockchainError> { - log::info!("get_latest_deposit_timestamp"); - let int1 = get_int1_contract().await?; - - let mut to_block = get_latest_block_number().await?; - let int1_deployed_block = crate::utils::config::Settings::load() - .unwrap() - .blockchain - .int1_deployed_block; - loop { - let events = with_retry(|| async { - int1.deposited_filter() - .from_block(to_block.saturating_sub(EVENT_BLOCK_RANGE)) - .to_block(to_block) - .address(int1.address().into()) - .topic2(sender) - .query_with_meta() - .await - }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get deposited event".to_string()))?; - let max_block_number: Option = events - .into_iter() - .map(|(_, meta)| meta.block_number.as_u64()) - .max(); - if let Some(max_block_number) = max_block_number { - let block = get_block(max_block_number).await?; - return Ok(Some(block.unwrap().timestamp.as_u64())); - } - to_block = to_block.saturating_sub(EVENT_BLOCK_RANGE); - if to_block < int1_deployed_block { - return Ok(None); - } - } -} - -pub async fn get_latest_withdrawal_timestamp( - recipient: Address, -) -> Result, BlockchainError> { - log::info!("get_latest_withdrawal_timestamp"); - let int1 = get_int1_contract().await?; - - let mut to_block = get_latest_block_number().await?; - let int1_deployed_block = crate::utils::config::Settings::load() - .unwrap() - .blockchain - .int1_deployed_block; - loop { - let events = with_retry(|| async { - int1.withdrawn_filter() - .from_block(to_block.saturating_sub(EVENT_BLOCK_RANGE)) - .to_block(to_block) - .address(int1.address().into()) - .topic1(recipient) - .query_with_meta() - .await - }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get withdrawn event".to_string()))?; - let max_block_number: Option = events - .into_iter() - .map(|(_, meta)| meta.block_number.as_u64()) - .max(); - if let Some(max_block_number) = max_block_number { - let block = get_block(max_block_number).await?; - return Ok(Some(block.unwrap().timestamp.as_u64())); - } - to_block = to_block.saturating_sub(EVENT_BLOCK_RANGE); - if to_block < int1_deployed_block { - return Ok(None); - } - } -} - -#[cfg(test)] -mod tests { - use ethers::types::Address; - - use super::*; - - #[tokio::test] - async fn test_get_deposited_event() { - let sender: Address = "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" - .parse() - .unwrap(); - let events = get_deposited_event_by_sender(sender).await.unwrap(); - dbg!(events); - } - - #[tokio::test] - async fn test_get_deposit_leaf_inserted_event() { - let events = get_deposit_leaf_inserted_event(0).await.unwrap(); - dbg!(events); - } -} diff --git a/src/external_api/contracts/handlers.rs b/src/external_api/contracts/handlers.rs new file mode 100644 index 0000000..4bac1d7 --- /dev/null +++ b/src/external_api/contracts/handlers.rs @@ -0,0 +1,149 @@ +use super::{error::BlockchainError, utils::ProviderWithSigner}; +use alloy::{ + consensus::{Transaction as _, TxEip1559}, + primitives::TxHash, + providers::{PendingTransactionError, Provider as _}, + rpc::types::TransactionRequest, +}; +use std::time::Duration; + +const TIMEOUT: Duration = Duration::from_secs(20); +const MAX_GAS_BUMP_ATTEMPTS: u32 = 3; +const GAS_BUMP_PERCENTAGE: u64 = 25; // Should be above 10 to avoid replacement transaction underpriced error + +pub async fn send_transaction_with_gas_bump( + signer: ProviderWithSigner, + tx_request: TransactionRequest, + tx_name: &str, +) -> Result { + let sendable_tx = signer.fill(tx_request).await?; + let tx_envelope = sendable_tx.try_into_envelope().unwrap(); + let tx_hash = *tx_envelope.hash(); + // make tx eip1559 object to get parameters + let tx_eip1559 = tx_envelope.as_eip1559().unwrap().tx().clone(); + log::info!( + "Sending transaction: {} with nonce {}, gas limit {}, value {}, max fee per gas {:?}, max priority fee per gas {:?}", + tx_name, + tx_eip1559.nonce, + tx_eip1559.gas_limit, + tx_eip1559.value, + tx_eip1559.max_fee_per_gas, + tx_eip1559.max_priority_fee_per_gas + ); + match signer + .send_tx_envelope(tx_envelope) + .await? + .with_timeout(Some(TIMEOUT)) + .watch() + .await + { + Ok(tx_hash) => { + log::info!( + "Transaction sent: {:?} with tx hash: {:?}", + tx_name.to_string(), + tx_hash + ); + Ok(tx_hash) + } + Err(PendingTransactionError::TxWatcher(_)) => { + // timeout, so we need to bump the gas + resend_tx_with_gas_bump(signer, tx_hash, &tx_eip1559, tx_name).await + } + Err(e) => Err(BlockchainError::TransactionError(format!( + "{tx_name} failed with error: {e:?}" + ))), + } +} + +async fn resend_tx_with_gas_bump( + signer: ProviderWithSigner, + initial_tx_hash: TxHash, + tx_eip1559: &TxEip1559, + tx_name: &str, +) -> Result { + log::info!("Resending transaction: {tx_name}"); + let mut pending_tx_hashes = vec![initial_tx_hash]; + + let mut current_tx = tx_eip1559.clone(); + + for attempt in 1..=MAX_GAS_BUMP_ATTEMPTS { + // check if previous tx succeeded + for tx_hash in pending_tx_hashes.iter().rev() { + let tx_receipt = signer.get_transaction_receipt(*tx_hash).await?; + if let Some(tx_receipt) = tx_receipt { + log::info!( + "Previous tx settled with hash: {:?}", + tx_receipt.transaction_hash + ); + if tx_receipt.status() { + return Ok(tx_receipt.transaction_hash); + } else { + return Err(BlockchainError::TransactionFailed(format!( + "Transaction {} failed with tx hash: {:?}", + tx_name, tx_receipt.transaction_hash + ))); + } + } + } + // bump gas + let fee_estimation = signer.estimate_eip1559_fees().await?; + + let (new_max_priority_fee_per_gas, new_max_fee_per_gas) = + if fee_estimation.max_priority_fee_per_gas > current_tx.max_priority_fee_per_gas { + // use the estimated fee which is higher than the current fee + ( + fee_estimation.max_priority_fee_per_gas, + fee_estimation.max_fee_per_gas, + ) + } else { + // bump the gas by a percentage + ( + current_tx.max_priority_fee_per_gas * (100 + GAS_BUMP_PERCENTAGE as u128) / 100, + current_tx.max_fee_per_gas * (100 + GAS_BUMP_PERCENTAGE as u128) / 100, + ) + }; + + let new_tx_request = TransactionRequest::default() + .max_priority_fee_per_gas(new_max_priority_fee_per_gas) + .max_fee_per_gas(new_max_fee_per_gas) + .nonce(current_tx.nonce) + .to(current_tx.to().unwrap()) + .nonce(current_tx.nonce) + .gas_limit(current_tx.gas_limit) + .input(current_tx.input.into()) + .value(current_tx.value); + + // send the new transaction + let sendable_tx = signer.fill(new_tx_request).await?; + let tx_envelope = sendable_tx.try_into_envelope().unwrap(); + log::info!( + "Sending bumped gas tx {tx_name} attempt: {attempt} with new max_fee_per_gas: {new_max_fee_per_gas:?}, new max_priority_fee_per_gas: {new_max_priority_fee_per_gas:?}", + ); + + match signer + .send_tx_envelope(tx_envelope.clone()) + .await? + .with_timeout(Some(TIMEOUT)) + .watch() + .await + { + Ok(tx_hash) => { + println!("Transaction sent: {tx_hash:?}"); + return Ok(tx_hash); + } + Err(PendingTransactionError::TxWatcher(_)) => { + // timeout, so we need to bump the gas again + log::info!("Transaction timed out, bumping gas again"); + } + Err(e) => { + return Err(BlockchainError::TransactionError(format!( + "{tx_name} failed with error: {e:?}" + ))); + } + } + // update the current transaction + current_tx = tx_envelope.as_eip1559().unwrap().tx().clone(); + pending_tx_hashes.push(*tx_envelope.tx_hash()); + } + Err(BlockchainError::MaxTxRetriesReached) +} diff --git a/src/external_api/contracts/int1.rs b/src/external_api/contracts/int1.rs index fea9632..af44893 100644 --- a/src/external_api/contracts/int1.rs +++ b/src/external_api/contracts/int1.rs @@ -1,61 +1,28 @@ -use std::sync::Arc; - -use ethers::{ - contract::abigen, - core::k256::ecdsa::SigningKey, - middleware::SignerMiddleware, - providers::{Http, Provider}, - signers::Wallet, - types::{Address, H256, U256}, -}; -use intmax2_zkp::ethereum_types::{bytes32::Bytes32, u32limb_trait::U32LimbTrait}; - -use crate::utils::retry::with_retry; - use super::{ + convert::{convert_address_to_alloy, convert_bytes32_to_b256, convert_u256_to_alloy}, error::BlockchainError, - utils::{get_client, get_client_with_signer}, + handlers::send_transaction_with_gas_bump, + utils::{get_provider_with_signer, NormalProvider}, }; +use alloy::{ + primitives::{Address, TxHash, B256, U256}, + sol, +}; +use intmax2_zkp::ethereum_types::{bytes32::Bytes32, u32limb_trait::U32LimbTrait}; +use mining_circuit_v1::withdrawal::simple_withraw_circuit::SimpleWithdrawalPublicInputs; +use DepositLib::Deposit; +use IInt1::WithdrawalPublicInputs; -abigen!(Int1, "abi/Int1L.json",); - -pub async fn get_int1_contract() -> Result>, BlockchainError> { - let settings = crate::utils::config::Settings::load().unwrap(); - let int1_address: Address = settings.blockchain.int1_address.parse().unwrap(); - let client = get_client().await?; - let contract = Int1::new(int1_address, client); - Ok(contract) -} - -pub async fn get_int1_contract_with_signer( - private_key: H256, -) -> Result, Wallet>>, BlockchainError> { - let settings = crate::utils::config::Settings::load().unwrap(); - let client = get_client_with_signer(private_key).await?; - let int1_address: Address = settings.blockchain.int1_address.parse().unwrap(); - let contract = Int1::new(int1_address, Arc::new(client)); - Ok(contract) -} - -pub async fn get_deposit_root() -> Result { - let int1 = get_int1_contract().await?; - let root = with_retry(|| async { int1.get_deposit_root().call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call get_deposit_root in int1".to_string()) - })?; - Ok(Bytes32::from_bytes_be(&root)) -} +sol!( + #[sol(rpc)] + Int1, + "abi/Int1L.json", +); -pub async fn get_deposit_root_exits(root: Bytes32) -> Result { - let int1 = get_int1_contract().await?; - let root: [u8; 32] = root.to_bytes_be().try_into().unwrap(); - let block_number: U256 = with_retry(|| async { int1.deposit_roots(root).call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call deposit_roots in int1".to_string()) - })?; - Ok(block_number != 0.into()) +#[derive(Debug, Clone)] +pub struct Int1Contract { + pub provider: NormalProvider, + pub address: Address, } #[derive(Debug, Clone, Default, PartialEq)] @@ -65,45 +32,126 @@ pub struct DepositData { pub is_rejected: bool, } -pub async fn get_deposit_data(deposit_id: u64) -> Result { - let int1 = get_int1_contract().await?; - let data = with_retry(|| async { - int1.get_deposit_data(ethers::types::U256::from(deposit_id)) - .call() - .await - }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call get_deposit_data in int1".to_string()) - })?; - let data = DepositData { - deposit_hash: Bytes32::from_bytes_be(&data.deposit_hash), - sender: data.sender, - is_rejected: data.is_rejected, - }; - Ok(data) -} +impl Int1Contract { + pub fn new(provider: NormalProvider, address: Address) -> Self { + Self { provider, address } + } -pub async fn get_withdrawal_nullifier_exists(nullifier: Bytes32) -> Result { - let int1 = get_int1_contract().await?; - let nullifier: [u8; 32] = nullifier.to_bytes_be().try_into().unwrap(); - let block_number = with_retry(|| async { int1.nullifiers(nullifier).call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call nullifiers in int1".to_string()) - })?; - let exists = block_number != 0.into(); - Ok(exists) -} + pub async fn get_deposit_root(&self) -> Result { + let int1 = Int1::new(self.address, self.provider.clone()); + let root = int1.getDepositRoot().call().await?; + Ok(Bytes32::from_bytes_be(&root.to_vec())) + } + + pub async fn get_deposit_root_exits(&self, root: Bytes32) -> Result { + let int1 = Int1::new(self.address, self.provider.clone()); + let root = convert_bytes32_to_b256(root); + let block_number = int1.depositRoots(root).call().await?; + Ok(!block_number.is_zero()) + } + + pub async fn get_deposit_data(&self, deposit_id: u64) -> Result { + let int1 = Int1::new(self.address, self.provider.clone()); + let data = int1.getDepositData(U256::from(deposit_id)).call().await?; + let data = DepositData { + deposit_hash: Bytes32::from_bytes_be(&data.depositHash.to_vec()), + sender: data.sender, + is_rejected: data.isRejected, + }; + Ok(data) + } + + pub async fn get_withdrawal_nullifier_exists( + &self, + nullifier: Bytes32, + ) -> Result { + let int1 = Int1::new(self.address, self.provider.clone()); + let nullifier = convert_bytes32_to_b256(nullifier); + let block_number = int1.nullifiers(nullifier).call().await?; + Ok(!block_number.is_zero()) + } -pub async fn get_last_processed_deposit_id() -> Result { - let int1 = get_int1_contract().await?; - let id = with_retry(|| async { int1.get_last_processed_deposit_id().call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError( - "failed to call get_last_processed_deposit_id in int1".to_string(), - ) - })?; - Ok(id.as_u64()) + pub async fn get_last_processed_deposit_id(&self) -> Result { + let int1 = Int1::new(self.address, self.provider.clone()); + let id = int1.getLastProcessedDepositId().call().await?; + Ok(id.to()) + } + + pub async fn withdrawal( + &self, + signer_private_key: B256, + pis: &SimpleWithdrawalPublicInputs, + proof: Vec, + ) -> Result { + let signer = get_provider_with_signer(&self.provider, signer_private_key); + let contract = Int1::new(self.address, signer.clone()); + let public_inputs = WithdrawalPublicInputs { + depositRoot: convert_bytes32_to_b256(pis.deposit_root), + nullifier: convert_bytes32_to_b256(pis.nullifier), + recipient: convert_address_to_alloy(pis.recipient), + tokenIndex: pis.token_index, + amount: convert_u256_to_alloy(pis.amount), + }; + let tx_request = contract + .withdraw(public_inputs, proof.into()) + .into_transaction_request(); + let tx_hash = send_transaction_with_gas_bump(signer, tx_request, "withdrawal").await?; + Ok(tx_hash) + } + + pub async fn cancel_deposit( + &self, + signer_private_key: B256, + deposit_id: u64, + recipient_salt_hash: Bytes32, + token_index: u32, + amount: U256, + ) -> Result { + let signer = get_provider_with_signer(&self.provider, signer_private_key); + let contract = Int1::new(self.address, signer.clone()); + let deposit = Deposit { + recipientSaltHash: convert_bytes32_to_b256(recipient_salt_hash), + tokenIndex: token_index, + amount, + }; + let tx_request = contract + .cancelDeposit(U256::from(deposit_id), deposit) + .into_transaction_request(); + let tx_hash = send_transaction_with_gas_bump(signer, tx_request, "cancel_deposit").await?; + Ok(tx_hash) + } + + pub async fn deposit_native_token( + &self, + signer_private_key: B256, + recipient_salt_hash: Bytes32, + value: U256, + ) -> Result { + let signer = get_provider_with_signer(&self.provider, signer_private_key); + let contract = Int1::new(self.address, signer.clone()); + let tx_request = contract + .depositNativeToken(convert_bytes32_to_b256(recipient_salt_hash)) + .value(value) + .into_transaction_request(); + let tx_hash = + send_transaction_with_gas_bump(signer, tx_request, "deposit_native_token").await?; + Ok(tx_hash) + } } + +// let deposit_address = key.deposit_address; +// let nonce = get_account_nonce(deposit_address).await?; +// let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, nonce); +// let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); +// let pubkey_salt_hash: [u8; 32] = get_pubkey_salt_hash(pubkey, salt) +// .to_bytes_be() +// .try_into() +// .unwrap(); + +// let deposit_address = key.deposit_address; + +// await_until_low_gas_price().await?; +// let int1 = get_int1_contract_with_signer(key.deposit_private_key).await?; +// let mut tx = int1 +// .deposit_native_token(pubkey_salt_hash) +// .value(mining_unit); diff --git a/src/external_api/contracts/minter.rs b/src/external_api/contracts/minter.rs index e54beed..8aca6e8 100644 --- a/src/external_api/contracts/minter.rs +++ b/src/external_api/contracts/minter.rs @@ -1,87 +1,138 @@ -use std::sync::Arc; - -use ethers::{ - contract::abigen, - core::k256::ecdsa::SigningKey, - middleware::SignerMiddleware, - providers::{Http, Provider}, - signers::Wallet, - types::{Address, H256}, +use crate::external_api::contracts::{ + convert::{convert_address_to_alloy, convert_u256_to_alloy}, + utils::get_provider_with_signer, }; -use intmax2_zkp::ethereum_types::{bytes32::Bytes32, u32limb_trait::U32LimbTrait}; - -use crate::utils::retry::with_retry; use super::{ - error::BlockchainError, - utils::{get_client, get_client_with_signer}, + convert::convert_bytes32_to_b256, error::BlockchainError, + handlers::send_transaction_with_gas_bump, utils::NormalProvider, }; +use alloy::{ + primitives::{Address, Bytes, B256}, + sol, +}; +use intmax2_zkp::ethereum_types::{bytes32::Bytes32, u32limb_trait::U32LimbTrait}; +use mining_circuit_v1::claim::{claim_circuit::ClaimPublicInputs, mining_claim::MiningClaim}; -abigen!(MinterV1, "abi/MinterV1L.json",); +sol!( + #[sol(rpc)] + MinterV1, + "abi/MinterV1L.json", +); -pub async fn get_minter_contract() -> Result>, BlockchainError> { - let settings = crate::utils::config::Settings::load().unwrap(); - let client = get_client().await?; - let minter_address: Address = settings.blockchain.minter_address.parse().unwrap(); - let contract = MinterV1::new(minter_address, client); - Ok(contract) +#[derive(Debug, Clone)] +pub struct MinterContract { + pub provider: NormalProvider, + pub address: Address, } -pub async fn get_minter_contract_with_signer( - private_key: H256, -) -> Result< - minter_v1::MinterV1, Wallet>>, - BlockchainError, -> { - let settings = crate::utils::config::Settings::load().unwrap(); - let client = get_client_with_signer(private_key).await?; - let minter_address: Address = settings.blockchain.minter_address.parse().unwrap(); - let contract = MinterV1::new(minter_address, Arc::new(client)); - Ok(contract) -} +impl MinterContract { + pub fn new(provider: NormalProvider, address: Address) -> Self { + Self { provider, address } + } -pub async fn get_short_term_eligible_root() -> Result { - let minter = get_minter_contract().await?; - let root = with_retry(|| async { minter.short_term_eligible_tree_root().call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call eligible_tree_root in minter".to_string()) - })?; - Ok(Bytes32::from_bytes_be(&root)) -} + pub async fn get_short_term_eligible_root(&self) -> Result { + let minter = MinterV1::new(self.address, self.provider.clone()); + let root = minter.shortTermEligibleTreeRoot().call().await?; + Ok(Bytes32::from_bytes_be(&root.to_vec())) + } -pub async fn get_long_term_eligible_root() -> Result { - let minter = get_minter_contract().await?; - let root = with_retry(|| async { minter.long_term_eligible_tree_root().call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call eligible_tree_root in minter".to_string()) - })?; - Ok(Bytes32::from_bytes_be(&root)) -} + pub async fn get_long_term_eligible_root(&self) -> Result { + let minter = MinterV1::new(self.address, self.provider.clone()); + let root = minter.longTermEligibleTreeRoot().call().await?; + Ok(Bytes32::from_bytes_be(&root.to_vec())) + } -pub async fn get_short_term_claim_nullifier_exists( - nullifier: Bytes32, -) -> Result { - let minter = get_minter_contract().await?; - let nullifier: [u8; 32] = nullifier.to_bytes_be().try_into().unwrap(); - let exists = with_retry(|| async { minter.short_term_nullifiers(nullifier).call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call nullifiers in minter".to_string()) - })?; - Ok(exists) -} + pub async fn get_short_term_claim_nullifier_exists( + &self, + nullifier: Bytes32, + ) -> Result { + let minter = MinterV1::new(self.address, self.provider.clone()); + let nullifier = convert_bytes32_to_b256(nullifier); + let exists = minter.shortTermNullifiers(nullifier).call().await?; + Ok(exists) + } -pub async fn get_long_term_claim_nullifier_exists( - nullifier: Bytes32, -) -> Result { - let minter = get_minter_contract().await?; - let nullifier: [u8; 32] = nullifier.to_bytes_be().try_into().unwrap(); - let exists = with_retry(|| async { minter.long_term_nullifiers(nullifier).call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call nullifiers in minter".to_string()) - })?; - Ok(exists) + pub async fn get_long_term_claim_nullifier_exists( + &self, + nullifier: Bytes32, + ) -> Result { + let minter = MinterV1::new(self.address, self.provider.clone()); + let nullifier = convert_bytes32_to_b256(nullifier); + let exists = minter.longTermNullifiers(nullifier).call().await?; + Ok(exists) + } + + pub async fn claim_tokens( + &self, + signer_private_key: B256, + is_short_term: bool, + claims: &[MiningClaim], + pis: &ClaimPublicInputs, + proof: Bytes, + ) -> Result<(), BlockchainError> { + let signer = get_provider_with_signer(&self.provider, signer_private_key); + let contract = MinterV1::new(self.address, signer.clone()); + let claims = claims + .iter() + .map(|claim| IMinterV1L::MintClaim { + recipient: convert_address_to_alloy(claim.recipient), + nullifier: convert_bytes32_to_b256(claim.nullifier), + amount: convert_u256_to_alloy(claim.amount), + }) + .collect::>(); + let pis = IMinterV1L::ClaimPublicInputs { + depositTreeRoot: convert_bytes32_to_b256(pis.deposit_tree_root), + eligibleTreeRoot: convert_bytes32_to_b256(pis.eligible_tree_root), + lastClaimHash: convert_bytes32_to_b256(pis.last_claim_hash), + }; + let tx_request = contract + .claimTokens(is_short_term, claims, pis, proof) + .into_transaction_request(); + send_transaction_with_gas_bump(signer, tx_request, "claim_tokens").await?; + Ok(()) + } } + +// pub async fn claim_tokens( +// claim_key: B256, +// is_short_term: bool, +// claims: &[MiningClaim], +// pis: ClaimPublicInputs, +// proof: &str, +// ) -> anyhow::Result<()> { +// info!( +// "Calling claim_tokens: claims {:?}, pis {:?}, proof {:?}", +// claims, pis, proof +// ); +// let mut mint_claims = Vec::::new(); +// for claim in claims { +// mint_claims.push(minter_v1::MintClaim { +// recipient: Address::from_slice(&claim.recipient.to_bytes_be()), +// nullifier: claim.nullifier.to_bytes_be().try_into().unwrap(), +// amount: U256::from_big_endian(&claim.amount.to_bytes_be()), +// }); +// } +// let pis = minter_v1::ClaimPublicInputs { +// deposit_tree_root: pis.deposit_tree_root.to_bytes_be().try_into().unwrap(), +// eligible_tree_root: pis.eligible_tree_root.to_bytes_be().try_into().unwrap(), +// last_claim_hash: pis.last_claim_hash.to_bytes_be().try_into().unwrap(), +// }; +// let proof = Bytes::from_str(proof).unwrap(); +// let claim_address = get_wallet(claim_key).await?.address(); +// print_status(format!("Claiming tokens for address: {}", claim_address)); + +// await_until_low_gas_price().await?; +// let minter = get_minter_contract_with_signer(claim_key).await?; +// let mut tx = minter.claim_tokens( +// is_short_term, +// mint_claims.clone(), +// pis.clone(), +// proof.clone(), +// ); +// set_gas_price(&mut tx).await?; +// info!("Calling claim_tokens: tx {:?}", tx); +// let _tx_hash = handle_contract_call(tx, claim_address, "claim", "claim").await?; +// print_log(format!("Successfully claimed")); +// Ok(()) +// } diff --git a/src/external_api/contracts/mod.rs b/src/external_api/contracts/mod.rs index 37aba05..c44fe00 100644 --- a/src/external_api/contracts/mod.rs +++ b/src/external_api/contracts/mod.rs @@ -1,5 +1,7 @@ +pub mod convert; pub mod error; pub mod events; +pub mod handlers; pub mod int1; pub mod minter; pub mod token; diff --git a/src/external_api/contracts/token.rs b/src/external_api/contracts/token.rs index a6973d9..06db769 100644 --- a/src/external_api/contracts/token.rs +++ b/src/external_api/contracts/token.rs @@ -1,43 +1,27 @@ -use ethers::{ - contract::abigen, - providers::{Http, Provider}, - types::{Address, U256}, +use super::{error::BlockchainError, utils::NormalProvider}; +use alloy::{ + primitives::{Address, U256}, + sol, }; -use log::info; -use crate::utils::retry::with_retry; - -use super::{error::BlockchainError, utils::get_client}; - -abigen!( - IERC20, - r#"[ - function totalSupply() external view returns (uint256) - function balanceOf(address account) external view returns (uint256) - function transfer(address recipient, uint256 amount) external returns (bool) - function allowance(address owner, address spender) external view returns (uint256) - function approve(address spender, uint256 amount) external returns (bool) - function transferFrom( address sender, address recipient, uint256 amount) external returns (bool) - event Transfer(address indexed from, address indexed to, uint256 value) - event Approval(address indexed owner, address indexed spender, uint256 value) - ]"#, +sol!( + #[sol(rpc)] + ERC20, + "abi/ERC20.json", ); - -pub async fn get_token_contract() -> Result>, BlockchainError> { - let settings = crate::utils::config::Settings::load().unwrap(); - let client = get_client().await?; - let token_address: Address = settings.blockchain.token_address.parse().unwrap(); - let contract = IERC20::new(token_address, client); - Ok(contract) +pub struct TokenContract { + pub provider: NormalProvider, + pub address: Address, } -pub async fn get_token_balance(address: Address) -> Result { - info!("get_token_balance"); - let contract = get_token_contract().await?; - let balance = with_retry(|| async { contract.balance_of(address).call().await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("failed to call balance_of in token".to_string()) - })?; - Ok(balance) +impl TokenContract { + pub fn new(provider: NormalProvider, address: Address) -> Self { + Self { provider, address } + } + + pub async fn get_token_balance(&self, address: Address) -> Result { + let contract = ERC20::new(self.address, self.provider.clone()); + let balance = contract.balanceOf(address).call().await?; + Ok(balance) + } } diff --git a/src/external_api/contracts/utils.rs b/src/external_api/contracts/utils.rs index 22f4140..23c4c23 100644 --- a/src/external_api/contracts/utils.rs +++ b/src/external_api/contracts/utils.rs @@ -1,197 +1,168 @@ -use std::{env, sync::Arc}; - -use ethers::{ - core::k256::{ecdsa::SigningKey, SecretKey}, - middleware::SignerMiddleware, - providers::{Http, Middleware, Provider}, - signers::{LocalWallet, Signer, Wallet}, - types::{Address, Block, H256, U256}, - utils::hex::ToHex, -}; -use log::info; - -use crate::utils::{retry::with_retry, time::sleep_for}; - use super::error::BlockchainError; - -fn get_rpc_url() -> Result { - let rpc_url = env::var("RPC_URL") - .map_err(|_| BlockchainError::EnvError("RPC_URL is not set".to_string()))?; - Ok(rpc_url) -} - -async fn get_provider() -> Result, BlockchainError> { - let rpc_url = get_rpc_url()?; - let provider = Provider::::try_from(rpc_url) - .map_err(|_| BlockchainError::EnvError("Failed to parse RPC_URL".to_string()))?; +use alloy::{ + network::EthereumWallet, + primitives::{Address, TxHash, B256}, + providers::{ + fillers::{ + ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, SimpleNonceManager, + WalletFiller, + }, + Identity, Provider, ProviderBuilder, + }, + rpc::{client::RpcClient, types::Transaction}, + signers::local::PrivateKeySigner, + transports::{ + http::Http, + layers::{FallbackLayer, RetryBackoffLayer}, + }, +}; +use futures::{stream, StreamExt as _}; +use reqwest::Url; +use std::{collections::HashMap, env}; +use tower::ServiceBuilder; + +// Use simple nonce manager for the nonce filler because it's easier to handle nonce errors. +pub type JoinedRecommendedFillersWithSimpleNonce = JoinFill< + JoinFill, NonceFiller>, + ChainIdFiller, +>; + +pub type NormalProvider = + FillProvider; + +pub type ProviderWithSigner = FillProvider< + JoinFill>, + alloy::providers::RootProvider, +>; + +// alloy does not support fallback transport in WASM, so we use a provider without fallback transport in WASM. +pub fn get_provider(rpc_urls: &str) -> Result { + let retry_layer = RetryBackoffLayer::new(5, 1000, 100); + let url: Url = rpc_urls + .parse() + .map_err(|e| BlockchainError::ParseError(format!("Failed to parse URL {rpc_urls}: {e}")))?; + let client = RpcClient::builder().layer(retry_layer).http(url); + let provider = ProviderBuilder::default() + .with_gas_estimation() + .with_simple_nonce_management() + .fetch_chain_id() + .connect_client(client); Ok(provider) } -pub async fn get_client() -> Result>, BlockchainError> { - let provider = get_provider().await?; - let client = Arc::new(provider); - Ok(client) -} - -pub async fn get_latest_block_number() -> Result { - info!("get_latest_block_number"); - let client = get_client().await?; - let block_number = with_retry(|| async { client.get_block_number().await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get block number".to_string()))?; - Ok(block_number.as_u64()) -} - -pub async fn get_client_with_rpc_url( - rpc_url: &str, -) -> Result>, BlockchainError> { - let provider = Provider::::try_from(rpc_url) - .map_err(|e| BlockchainError::InternalError(e.to_string()))?; - Ok(Arc::new(provider)) -} - -pub async fn get_client_with_signer( - private_key: H256, -) -> Result, Wallet>, BlockchainError> { - let provider = get_provider().await?; - let wallet = get_wallet(private_key).await?; - let client = SignerMiddleware::new(provider, wallet); - Ok(client) -} - -pub async fn get_wallet(private_key: H256) -> Result, BlockchainError> { - let settings = crate::utils::config::Settings::load().unwrap(); - let key = SecretKey::from_bytes(private_key.as_bytes().into()).unwrap(); - let wallet = Wallet::from(key).with_chain_id(settings.blockchain.chain_id); - Ok(wallet) -} - -pub fn get_address(private_key: H256) -> Address { - let wallet = private_key - .encode_hex::() - .parse::() - .unwrap(); - wallet.address() -} - -pub async fn get_account_nonce(address: Address) -> Result { - info!("get_account_nonce"); - let client = get_client().await?; - let nonce = with_retry(|| async { client.get_transaction_count(address, None).await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get nonce".to_string()))?; - Ok(nonce.as_u64()) -} - -pub async fn get_balance(address: Address) -> Result { - info!("get_balance"); - let client = get_client().await?; - let balance = with_retry(|| async { client.get_balance(address, None).await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get balance".to_string()))?; - Ok(balance) -} - -pub async fn get_balance_with_rpc( - rpc_url: &str, - address: Address, -) -> Result { - info!("get_balance"); - let client = get_client_with_rpc_url(rpc_url).await?; - let balance = with_retry(|| async { client.get_balance(address, None).await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get balance".to_string()))?; - Ok(balance) -} - -pub async fn get_gas_price() -> Result { - info!("get_gas_price"); - let client = get_client().await?; - let gas_price = with_retry(|| async { client.get_gas_price().await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get gas price".to_string()))?; - Ok(gas_price) -} - -pub async fn get_eip1559_fees() -> Result<(U256, U256), BlockchainError> { - let client = get_client().await?; - let (max_gas_price, max_priority_fee_per_gas) = - with_retry(|| async { client.estimate_eip1559_fees(None).await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("Failed to estimate EIP1559 fees".to_string()) +pub fn get_provider_with_fallback(rpc_urls: &[String]) -> Result { + let retry_layer = RetryBackoffLayer::new(5, 1000, 100); + let transports = rpc_urls + .iter() + .map(|url| { + let url: Url = url.parse().map_err(|e| { + BlockchainError::ParseError(format!("Failed to parse URL {url}: {e}")) })?; - Ok((max_gas_price, max_priority_fee_per_gas)) + Ok(Http::new(url)) + }) + .collect::, BlockchainError>>()?; + let fallback_layer = + FallbackLayer::default().with_active_transport_count(transports.len().try_into().unwrap()); + let transport = ServiceBuilder::new() + .layer(fallback_layer) + .service(transports); + let client = RpcClient::builder() + .layer(retry_layer) + .transport(transport, false); + let provider = ProviderBuilder::default() + .with_gas_estimation() + .with_simple_nonce_management() + .fetch_chain_id() + .connect_client(client); + Ok(provider) } -pub async fn get_tx_receipt( - tx_hash: H256, -) -> Result { - info!("get_tx_receipt"); - let client = get_client().await?; - let mut loop_count = 0; - loop { - if loop_count > 20 { - return Err(BlockchainError::TxNotFound(tx_hash.to_string())); +pub fn get_provider_with_signer( + provider: &NormalProvider, + private_key: B256, +) -> ProviderWithSigner { + let signer = PrivateKeySigner::from_bytes(&private_key).unwrap(); + let wallet = EthereumWallet::new(signer); + let wallet_filler = WalletFiller::new(wallet); + provider.clone().join_with(wallet_filler) +} + +pub fn get_address_from_private_key(private_key: B256) -> Address { + let signer = PrivateKeySigner::from_bytes(&private_key).unwrap(); + signer.address() +} + +pub async fn get_batch_transaction( + provider: &NormalProvider, + tx_hashes: &[TxHash], +) -> Result, BlockchainError> { + let mut target_tx_hashes = tx_hashes.to_vec(); + let mut fetched_txs = HashMap::new(); + let mut retry_count = 0; + let max_tries = std::env::var("MAX_TRIES") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(10); + while !target_tx_hashes.is_empty() { + let (partial_fetched_txs, failed_tx_hashes) = + get_batch_transaction_inner(provider, &target_tx_hashes).await?; + fetched_txs.extend(partial_fetched_txs); + if failed_tx_hashes.is_empty() { + break; } - let receipt = with_retry(|| async { client.get_transaction_receipt(tx_hash).await }) - .await - .map_err(|_| { - BlockchainError::NetworkError("faied to get transaction receipt".to_string()) - })?; - if receipt.is_some() { - return Ok(receipt.unwrap()); + target_tx_hashes = failed_tx_hashes; + retry_count += 1; + if retry_count > max_tries { + return Err(BlockchainError::TxNotFoundBatch); } - sleep_for(10); - loop_count += 1; + tokio::time::sleep(std::time::Duration::from_secs(2)).await; } -} - -pub async fn get_block(block_number: u64) -> Result>, BlockchainError> { - info!("get_block"); - let client = get_client().await.unwrap(); - let block = with_retry(|| async { client.get_block(block_number).await }) - .await - .map_err(|_| BlockchainError::NetworkError("failed to get block".to_string()))?; - Ok(block) -} - -pub fn u256_as_bytes_be(u256: ethers::types::U256) -> [u8; 32] { - let mut bytes = [0u8; 32]; - u256.to_big_endian(&mut bytes); - bytes -} - -#[cfg(test)] -mod tests { - use ethers::types::Address; - - use crate::{external_api::contracts::token::get_token_balance, utils::config::Settings}; - - #[tokio::test] - async fn test_get_minter_token_balance() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - let settings = Settings::load()?; - let minter_address: Address = settings.blockchain.minter_address.parse()?; - let balance = get_token_balance(minter_address).await?; - println!("{}", balance); - Ok(()) + let mut txs = Vec::new(); + for tx_hash in tx_hashes { + txs.push(fetched_txs.get(tx_hash).unwrap().clone()); } - - #[tokio::test] - async fn test_get_gas_price() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - let gas_price = super::get_gas_price().await?; - println!("{}", gas_price); - Ok(()) + Ok(txs) +} + +async fn get_batch_transaction_inner( + provider: &NormalProvider, + tx_hashes: &[TxHash], +) -> Result<(HashMap, Vec), BlockchainError> { + let max_parallel_requests = env::var("MAX_PARALLEL_REQUESTS") + .ok() + .and_then(|s| s.parse().ok()) + .unwrap_or(20); + + let results = stream::iter(tx_hashes) + .map(|&tx_hash| { + let provider = provider.clone(); + async move { + match provider.get_transaction_by_hash(tx_hash).await { + Ok(Some(tx)) => Ok((tx_hash, Ok(tx))), + Ok(None) => Ok((tx_hash, Err(BlockchainError::TxNotFound(tx_hash)))), + Err(e) => Err(e), + } + } + }) + .buffer_unordered(max_parallel_requests) + .collect::>() + .await; + + let mut fetched_txs = HashMap::new(); + let mut failed_tx_hashes = Vec::new(); + + for result in results { + match result { + Ok((tx_hash, Ok(tx))) => { + fetched_txs.insert(tx_hash, tx); + } + Ok((tx_hash, Err(BlockchainError::TxNotFound(_)))) => { + failed_tx_hashes.push(tx_hash); + } + Ok((_, Err(e))) => return Err(e), + Err(e) => return Err(BlockchainError::JoinError(e.to_string())), + } } - #[tokio::test] - async fn test_get_eip1559_fees() -> anyhow::Result<()> { - dotenv::dotenv().ok(); - let (max_gas_price, max_priority_fee_per_gas) = super::get_eip1559_fees().await?; - println!("max_gas_price: {}", max_gas_price); - println!("max_priority_fee_per_gas: {}", max_priority_fee_per_gas); - Ok(()) - } + Ok((fetched_txs, failed_tx_hashes)) } diff --git a/src/external_api/graph/client.rs b/src/external_api/graph/client.rs new file mode 100644 index 0000000..6f3f52e --- /dev/null +++ b/src/external_api/graph/client.rs @@ -0,0 +1,343 @@ +use alloy::consensus::Transaction; +use alloy::primitives::{Address, TxHash}; +use intmax2_zkp::ethereum_types::bytes32::Bytes32; +use intmax2_zkp::ethereum_types::u256::U256; +use reqwest::Client; +use serde::{Deserialize, Serialize}; +use serde_json::json; +use serde_with::serde_as; +use serde_with::DisplayFromStr; + +use crate::external_api::contracts::utils::get_batch_transaction; +use crate::external_api::{ + contracts::{ + events::{DepositLeafInserted, Deposited}, + utils::NormalProvider, + }, + query::post_request_with_bearer_token, +}; + +use super::error::GraphClientError; + +// A wrapper around TheGraphClient that provides additional functionality for interacting with the L1 and L2 providers. +#[derive(Clone, Debug)] +pub struct GraphClient { + pub url: String, + pub bearer_token: Option, + pub client: Client, + pub provider: NormalProvider, +} + +impl GraphClient { + pub fn new(provider: NormalProvider, url: &str, bearer_token: Option) -> Self { + let client = Client::new(); + GraphClient { + client, + provider, + url: url.to_string(), + bearer_token, + } + } + + // get all deposited events by sender address + pub async fn get_deposited_event_by_sender( + &self, + deposit_address: Address, + ) -> Result, GraphClientError> { + let query = r#" + query MyQuery($senderAddress: String!) { + depositeds( + where: { sender: $senderAddress }, + orderBy: blockTimestamp, + orderDirection: asc + ) { + sender + tokenIndex + transactionHash + blockTimestamp + depositId + recipientSaltHash + amount + } + } + "#; + let request = json!({ + "query": query, + "variables": { + "senderAddress": deposit_address, + } + }); + let response: GraphQLResponse = post_request_with_bearer_token( + &self.url, + "", + self.bearer_token.clone(), + Some(&request), + ) + .await?; + + let tx_hashes = response + .data + .depositeds + .iter() + .map(|entry| entry.transaction_hash) + .collect::>(); + let txs = get_batch_transaction(&self.provider, &tx_hashes).await?; + + let mut deposited = Vec::new(); + for (event, tx) in response.data.depositeds.iter().zip(txs.iter()) { + deposited.push(Deposited { + sender: event.sender, + token_index: event.token_index, + deposit_id: event.deposit_id, + recipient_salt_hash: event.recipient_salt_hash, + amount: event.amount, + tx_nonce: tx.nonce(), + timestamp: event.block_timestamp, + }); + } + + Ok(deposited) + } + + pub async fn get_deposit_leaf_inserted_event( + &self, + next_deposit_index: u32, + ) -> Result, GraphClientError> { + let limit = 1000; // Adjust the limit as needed + let mut deposit_leaf_inserteds = Vec::new(); + let mut current_index = next_deposit_index; + loop { + let entries = self + .get_deposit_leaf_inserted_event_inner(current_index, limit) + .await?; + if entries.is_empty() { + break; + } + deposit_leaf_inserteds.extend(entries); + current_index = deposit_leaf_inserteds.last().unwrap().deposit_index + 1; + } + Ok(deposit_leaf_inserteds) + } + + async fn get_deposit_leaf_inserted_event_inner( + &self, + next_deposit_index: u32, + limit: u64, + ) -> Result, GraphClientError> { + let query = r#" + query MyQuery($nextDepositIndex: BigInt!, $limit: Int!) { + depositLeafInserteds( + where: { depositIndex_gte: $nextDepositIndex }, + orderBy: depositIndex, + orderDirection: asc, + first: $limit + ) { + blockNumber + depositIndex + depositHash + } + } + "#; + let request = json!({ + "query": query, + "variables": { + "nextDepositIndex": next_deposit_index, + "limit": limit, + } + }); + let response: GraphQLResponse = post_request_with_bearer_token( + &self.url, + "", + self.bearer_token.clone(), + Some(&request), + ) + .await?; + + let deposit_leaf_inserteds = response + .data + .deposit_leaf_inserteds + .into_iter() + .map(|entry| DepositLeafInserted { + deposit_index: entry.deposit_index, + deposit_hash: entry.deposit_hash, + block_number: entry.block_number, + }) + .collect::>(); + Ok(deposit_leaf_inserteds) + } + + pub async fn get_latest_deposit_timestamp( + &self, + sender: Address, + ) -> Result, GraphClientError> { + let mut depositeds = self.get_deposited_event_by_sender(sender).await?; + depositeds.sort_by_key(|d| d.timestamp); + if let Some(latest_deposit) = depositeds.last() { + return Ok(Some(latest_deposit.timestamp)); + } else { + return Ok(None); + } + } + + pub async fn get_latest_withdrawal_timestamp( + &self, + recipient: Address, + ) -> Result, GraphClientError> { + let query = r#" + query MyQuery($recipientAddress: String!) { + withdrawns( + where: { recipient: $recipientAddress }, + orderBy: blockTimestamp, + orderDirection: desc, + first: 1 + ) { + blockTimestamp + } + } + "#; + let request = json!({ + "query": query, + "variables": { + "recipientAddress": recipient, + } + }); + let response: GraphQLResponse = post_request_with_bearer_token( + &self.url, + "", + self.bearer_token.clone(), + Some(&request), + ) + .await?; + let timestamp = response + .data + .withdrawns + .first() + .map(|entry| entry.block_timestamp); + Ok(timestamp) + } +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct GraphQLResponse { + pub data: T, +} + +#[derive(Debug, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct DepositedsData { + pub depositeds: Vec, +} + +#[serde_as] +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DepositedEntry { + #[serde_as(as = "DisplayFromStr")] + pub deposit_id: u64, + pub sender: Address, + pub recipient_salt_hash: Bytes32, + #[serde_as(as = "DisplayFromStr")] + pub token_index: u32, + pub amount: U256, + pub transaction_hash: TxHash, + #[serde_as(as = "DisplayFromStr")] + pub block_timestamp: u64, +} + +#[derive(Debug, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct DepositLeafInsertedsData { + pub deposit_leaf_inserteds: Vec, +} + +#[serde_as] +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct DepositLeafInsertedEntry { + #[serde_as(as = "DisplayFromStr")] + pub deposit_index: u32, + pub deposit_hash: Bytes32, + #[serde_as(as = "DisplayFromStr")] + pub block_number: u64, +} + +#[derive(Debug, Deserialize, Clone)] +#[serde(rename_all = "camelCase")] +pub struct WithdrawnData { + pub withdrawns: Vec, +} + +#[serde_as] +#[derive(Clone, Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct WithdrawnEntry { + #[serde_as(as = "DisplayFromStr")] + pub block_timestamp: u64, +} + +#[cfg(test)] +mod tests { + use std::env; + + use super::*; + use crate::external_api::contracts::utils::get_provider; + + fn get_client() -> Result { + let graph_url = + env::var("GRAPH_URL").unwrap_or_else(|_| "http://example.com/graphql".to_string()); + let rpc_url = env::var("RPC_URL").unwrap_or_else(|_| "http://localhost:8545".to_string()); + let provider = get_provider(&rpc_url).unwrap(); + + Ok(GraphClient::new(provider, &graph_url, None)) + } + + #[tokio::test] + async fn test_graph_client_get_deposited_event_by_sender() { + let client = get_client().unwrap(); + let result = client + .get_deposited_event_by_sender( + "0x4c5187eea6df32a4a2eadb3459a395c83309f0be" + .parse() + .unwrap(), + ) + .await + .unwrap(); + dbg!(&result); + } + + #[tokio::test] + async fn test_graph_client_deposit_leaf_inserted_event() { + let client = get_client().unwrap(); + let result = client.get_deposit_leaf_inserted_event(0).await.unwrap(); + dbg!(&result.len()); + } + + #[tokio::test] + async fn test_graph_client_get_latest_deposit_timestamp() { + let client = get_client().unwrap(); + let result = client + .get_latest_deposit_timestamp( + "0x4c5187eea6df32a4a2eadb3459a395c83309f0be" + .parse() + .unwrap(), + ) + .await + .unwrap(); + dbg!(&result); + } + + #[tokio::test] + async fn test_graph_client_get_latest_withdrawal_timestamp() { + let client = get_client().unwrap(); + let result = client + .get_latest_withdrawal_timestamp( + "0xC2233d8937d2581F374caB4C2E89257828bB1BF8" + .parse() + .unwrap(), + ) + .await + .unwrap(); + dbg!(&result); + } +} diff --git a/src/external_api/graph/error.rs b/src/external_api/graph/error.rs new file mode 100644 index 0000000..40bd91d --- /dev/null +++ b/src/external_api/graph/error.rs @@ -0,0 +1,10 @@ +use crate::external_api::{contracts::error::BlockchainError, query::RequestError}; + +#[derive(Debug, thiserror::Error)] +pub enum GraphClientError { + #[error("Blockchain error: {0}")] + BlockchainError(#[from] BlockchainError), + + #[error("Request error: {0}")] + RequestError(#[from] RequestError), +} diff --git a/src/external_api/graph/mod.rs b/src/external_api/graph/mod.rs new file mode 100644 index 0000000..f27e761 --- /dev/null +++ b/src/external_api/graph/mod.rs @@ -0,0 +1,2 @@ +pub mod client; +pub mod error; diff --git a/src/external_api/intmax/availability.rs b/src/external_api/intmax/availability.rs index 39380f7..d4c69aa 100644 --- a/src/external_api/intmax/availability.rs +++ b/src/external_api/intmax/availability.rs @@ -10,19 +10,19 @@ use super::error::{IntmaxError, IntmaxErrorResponse}; #[derive(Clone, Debug, Deserialize, Serialize)] #[serde(rename_all = "camelCase")] -pub struct AvaliabilityServerSuccessResponse { +pub struct AvailabilityServerSuccessResponse { pub is_available: bool, pub message: String, } #[derive(Serialize, Deserialize)] #[serde(untagged)] -enum AvaliabilityServerResponse { - Success(AvaliabilityServerSuccessResponse), +enum AvailabilityServerResponse { + Success(AvailabilityServerSuccessResponse), Error(IntmaxErrorResponse), } -pub async fn get_availability() -> Result { +pub async fn get_availability() -> Result { info!("get_availability"); let version = env!("CARGO_PKG_VERSION"); let settings = Settings::load().unwrap(); @@ -38,13 +38,13 @@ pub async fn get_availability() -> Result Ok(success), - AvaliabilityServerResponse::Error(error) => Err(IntmaxError::ServerError(error)), + AvailabilityServerResponse::Success(success) => Ok(success), + AvailabilityServerResponse::Error(error) => Err(IntmaxError::ServerError(error)), } } diff --git a/src/external_api/intmax/circulation.rs b/src/external_api/intmax/circulation.rs index f49707e..ff083ea 100644 --- a/src/external_api/intmax/circulation.rs +++ b/src/external_api/intmax/circulation.rs @@ -1,4 +1,4 @@ -use ethers::types::Address; +use alloy::primitives::Address; use log::info; use serde::{Deserialize, Serialize}; diff --git a/src/external_api/intmax/error.rs b/src/external_api/intmax/error.rs index f3f0440..a7d8272 100644 --- a/src/external_api/intmax/error.rs +++ b/src/external_api/intmax/error.rs @@ -1,6 +1,8 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; +use crate::external_api::contracts::error::BlockchainError; + #[derive(Debug, Serialize, Deserialize)] #[serde(rename_all = "camelCase")] pub struct IntmaxErrorResponse { @@ -11,6 +13,8 @@ pub struct IntmaxErrorResponse { #[derive(thiserror::Error, Debug)] pub enum IntmaxError { + #[error("Blockchain error: {0}")] + BlockchainError(#[from] BlockchainError), #[error("Network error: {0}")] NetworkError(String), #[error("Serialization error: {0}")] diff --git a/src/external_api/intmax/gas_estimation.rs b/src/external_api/intmax/gas_estimation.rs deleted file mode 100644 index 008604b..0000000 --- a/src/external_api/intmax/gas_estimation.rs +++ /dev/null @@ -1,56 +0,0 @@ -use log::info; -use serde::{Deserialize, Serialize}; - -use crate::{ - external_api::intmax::header::VersionHeader as _, - utils::{config::Settings, retry::with_retry}, -}; - -use super::error::{IntmaxError, IntmaxErrorResponse}; - -#[derive(Clone, Debug, Deserialize, Serialize)] -#[serde(rename_all = "camelCase")] -pub struct GasPriceSuccessResponse { - pub max_fee_per_gas: u64, - pub max_priority_fee_per_gas: u64, -} - -#[derive(Serialize, Deserialize)] -#[serde(untagged)] -enum GasPriceResponse { - Success(GasPriceSuccessResponse), - Error(IntmaxErrorResponse), -} - -pub async fn get_gas_estimation() -> Result { - info!("Getting gas price"); - let settings = Settings::load().unwrap(); - let response = with_retry(|| async { - reqwest::Client::new() - .get(settings.api.gas_server_url.clone()) - .with_version_header() - .send() - .await - }) - .await - .map_err(|_| IntmaxError::NetworkError("failed to request circulation server".to_string()))?; - let response_json: GasPriceResponse = response.json().await.map_err(|e| { - IntmaxError::SerializeError(format!("failed to parse response: {}", e.to_string())) - })?; - match response_json { - GasPriceResponse::Success(success) => Ok(success), - GasPriceResponse::Error(error) => Err(IntmaxError::ServerError(error)), - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[tokio::test] - async fn test_get_gas_price() { - dotenv::dotenv().ok(); - let response = get_gas_estimation().await.unwrap(); - dbg!(response); - } -} diff --git a/src/external_api/intmax/gnark.rs b/src/external_api/intmax/gnark.rs index 079553e..94915a4 100644 --- a/src/external_api/intmax/gnark.rs +++ b/src/external_api/intmax/gnark.rs @@ -1,4 +1,4 @@ -use ethers::types::Address; +use alloy::primitives::Address; use intmax2_zkp::wrapper_config::plonky2_config::PoseidonBN128GoldilocksConfig; use log::info; @@ -43,13 +43,13 @@ impl GnarkStartProofInput { #[derive(Serialize, Deserialize)] #[serde(untagged)] enum GnarkStartProofResponse { - Success(GnarkStartProofSucessResponse), + Success(GnarkStartProofSuccessResponse), Error(IntmaxErrorResponse), } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] #[serde(rename_all = "camelCase")] -pub struct GnarkStartProofSucessResponse { +pub struct GnarkStartProofSuccessResponse { pub job_id: String, pub status: String, pub estimated_time: Option, // in milliseconds @@ -81,7 +81,7 @@ pub async fn gnark_start_prove( base_url: &str, address: Address, plonky2_proof: ProofWithPublicInputs, -) -> Result { +) -> Result { info!( "gnark_start_prove with args address: {}, pis: {:?}", address, plonky2_proof.public_inputs diff --git a/src/external_api/intmax/mod.rs b/src/external_api/intmax/mod.rs index bf9c54d..eba5323 100644 --- a/src/external_api/intmax/mod.rs +++ b/src/external_api/intmax/mod.rs @@ -1,7 +1,6 @@ pub mod availability; pub mod circulation; pub mod error; -pub mod gas_estimation; pub mod gnark; pub mod withdrawal; pub mod header; \ No newline at end of file diff --git a/src/external_api/intmax/withdrawal.rs b/src/external_api/intmax/withdrawal.rs index 420344c..5d3585c 100644 --- a/src/external_api/intmax/withdrawal.rs +++ b/src/external_api/intmax/withdrawal.rs @@ -1,19 +1,12 @@ -use ethers::{ - providers::{Http, PendingTransaction}, - types::{Address, Bytes, H256, U256}, -}; -use intmax2_zkp::ethereum_types::u32limb_trait::U32LimbTrait; +use alloy::primitives::{Bytes, TxHash, B256}; use log::info; use mining_circuit_v1::withdrawal::simple_withraw_circuit::SimpleWithdrawalPublicInputs; use serde::{Deserialize, Serialize}; use serde_json::Value; -use std::str::FromStr; +use std::str::FromStr as _; use crate::{ - external_api::{ - contracts::int1::{get_int1_contract_with_signer, int_1}, - intmax::header::VersionHeader as _, - }, + external_api::{contracts::int1::Int1Contract, intmax::header::VersionHeader as _}, utils::{ config::Settings, network::{get_network, Network}, @@ -39,8 +32,8 @@ pub struct SubmitWithdrawalSuccess { #[derive(Debug, Serialize, Deserialize)] #[serde(untagged)] -enum SumbitWithdrawalResponse { - Sucess(SubmitWithdrawalSuccess), +enum SubmitWithdrawalResponse { + Success(SubmitWithdrawalSuccess), Error(IntmaxErrorResponse), } @@ -48,13 +41,13 @@ enum SumbitWithdrawalResponse { #[serde(rename_all = "camelCase")] pub struct QueryWithdrawalSuccess { pub status: String, - pub transaction_hash: Option, + pub transaction_hash: Option, } #[derive(Debug, Serialize, Deserialize)] #[serde(untagged)] enum QueryWithdrawalResponse { - Sucess(QueryWithdrawalSuccess), + Success(QueryWithdrawalSuccess), Error(IntmaxErrorResponse), } @@ -85,14 +78,14 @@ async fn start_withdrawal( e.to_string() )) })?; - let response: SumbitWithdrawalResponse = + let response: SubmitWithdrawalResponse = serde_json::from_value(response.clone()).map_err(|_| { IntmaxError::SerializeError(format!("failed to parse response: {}", response)) })?; match response { - SumbitWithdrawalResponse::Sucess(success) => Ok(success.withdrawal_id), - SumbitWithdrawalResponse::Error(error) => Err(IntmaxError::ServerError(error)), + SubmitWithdrawalResponse::Success(success) => Ok(success.withdrawal_id), + SubmitWithdrawalResponse::Error(error) => Err(IntmaxError::ServerError(error)), } } @@ -123,19 +116,27 @@ async fn query_withdrawal(withdrawal_id: &str) -> Result Ok(success), + QueryWithdrawalResponse::Success(success) => Ok(success), QueryWithdrawalResponse::Error(error) => Err(IntmaxError::ServerError(error)), } } pub async fn submit_withdrawal( + int1: &Int1Contract, pis: SimpleWithdrawalPublicInputs, proof: &str, -) -> Result { +) -> Result { info!("submit_withdrawal with args {:?} proof {}", pis, proof); - let tx_hash = if get_network() == Network::Localnet { - let tx_hash = localnet_withdrawal(pis, proof).await.unwrap(); - tx_hash + if get_network() == Network::Localnet { + let local_private_key: B256 = + "0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a" + .parse() + .unwrap(); + let proof_hex = Bytes::from_str(proof).unwrap(); + let tx_hash = int1 + .withdrawal(local_private_key, &pis, proof_hex.to_vec()) + .await?; + Ok(tx_hash) } else { let withdrawal_id = start_withdrawal(pis, proof).await?; let max_try = 5; @@ -156,10 +157,7 @@ pub async fn submit_withdrawal( info!("withdrawal is processing"); sleep_for(cooldown); } - "completed" => { - let tx_hash = H256::from_str(&status.transaction_hash.unwrap()).unwrap(); - break tx_hash; - } + "completed" => return Ok(status.transaction_hash.unwrap()), "failed" => { return Err(IntmaxError::InternalError(format!( "withdrawal failed: {}", @@ -180,57 +178,5 @@ pub async fn submit_withdrawal( } } } - }; - Ok(tx_hash) -} - -async fn localnet_withdrawal( - pis: SimpleWithdrawalPublicInputs, - proof: &str, -) -> anyhow::Result { - // Hardhat's default private key for withdrawal - let local_private_key = - H256::from_str("0x5de4111afa1a4b94908f83103eb1f1706367c2e68ca870fc3fb9a804cdab365a") - .unwrap(); - let int1 = get_int1_contract_with_signer(local_private_key).await?; - let public_inputs = int_1::WithdrawalPublicInputs { - deposit_root: pis.deposit_root.to_bytes_be().try_into().unwrap(), - nullifier: pis.nullifier.to_bytes_be().try_into().unwrap(), - recipient: Address::from_slice(&pis.recipient.to_bytes_be()), - token_index: pis.token_index, - amount: U256::from_big_endian(&pis.amount.to_bytes_be()), - }; - let proof = Bytes::from_str(proof)?; - let tx = int1.withdraw(public_inputs, proof); - let pending_tx: PendingTransaction = match tx.send().await { - Ok(tx) => { - sleep_for(5); - tx - } - Err(e) => { - return Err(anyhow::anyhow!("Error sending transaction: {:?}", e)); - } - }; - Ok(pending_tx.tx_hash()) -} - -#[cfg(test)] -mod tests { - use intmax2_zkp::ethereum_types::{address::Address, bytes32::Bytes32, u256::U256}; - - #[tokio::test] - #[ignore] - async fn test_submit_withdrawal() { - let pis = - mining_circuit_v1::withdrawal::simple_withraw_circuit::SimpleWithdrawalPublicInputs { - deposit_root: Bytes32::default(), - nullifier: Bytes32::default(), - recipient: Address::default(), - token_index: 0, - amount: U256::default(), - }; - let proof = "0x12345678"; - let tx_hash = super::submit_withdrawal(pis, proof).await.unwrap(); - println!("tx_hash: {:?}", tx_hash); } } diff --git a/src/external_api/mod.rs b/src/external_api/mod.rs index b63b57d..6d20559 100644 --- a/src/external_api/mod.rs +++ b/src/external_api/mod.rs @@ -1,3 +1,5 @@ pub mod contracts; pub mod github; +pub mod graph; pub mod intmax; +pub mod query; diff --git a/src/external_api/query.rs b/src/external_api/query.rs new file mode 100644 index 0000000..af35a45 --- /dev/null +++ b/src/external_api/query.rs @@ -0,0 +1,163 @@ +use reqwest::{header, Response, Url}; +use serde::{de::DeserializeOwned, Deserialize, Serialize}; + +use crate::utils::retry::with_retry; + +#[derive(Debug, Deserialize)] +struct ErrorResponse { + error: String, + #[serde(default)] + message: Option, +} + +#[derive(thiserror::Error, Debug)] +pub enum RequestError { + #[error("Malformed URL: {0}")] + MalformedUrl(String), + + #[error("Network error: {0}")] + NetworkError(String), + + #[error("Serialization error: {0}")] + SerializeError(String), + + #[error("Deserialization error: {0}")] + DeserializationError(String), + + #[error("Request error: {0} - {1} - URL: {2} - Request: {3}")] + RequestError( + reqwest::StatusCode, + String, + String, // URL + String, // Request string + ), +} + +pub async fn post_request( + base_url: &str, + endpoint: &str, + body: Option<&B>, +) -> Result { + post_request_with_bearer_token(base_url, endpoint, None, body).await +} + +pub async fn post_request_with_bearer_token( + base_url: &str, + endpoint: &str, + bearer_token: Option, + body: Option<&B>, +) -> Result { + let url = format!("{base_url}{endpoint}"); + let _ = Url::parse(&url) + .map_err(|e| RequestError::MalformedUrl(format!("Failed to parse URL {url}: {e}")))?; + let client = reqwest::Client::new(); + let mut request = client.post(url.clone()); + if let Some(token) = bearer_token { + request = request.header(header::AUTHORIZATION, token); + } + if let Some(body) = body { + request = request.json(body); + } + let response = with_retry(|| async { request.try_clone().unwrap().send().await }) + .await + .map_err(|e| RequestError::NetworkError(e.to_string()))?; + + // Serialize the body to a string for logging + let body_str = if let Some(body) = &body { + let body_str = serde_json::to_string(body) + .map_err(|e| RequestError::SerializeError(format!("Failed to serialize body: {e}")))?; + Some(body_str) + } else { + None + }; + let body_size = body_str.as_ref().map(|s| s.len()).unwrap_or(0); + log::debug!("POST request url: {url} body size: {body_size} bytes"); + + handle_response(response, &url, &body_str).await +} + +pub async fn get_request( + base_url: &str, + endpoint: &str, + query: Option, +) -> Result +where + Q: Serialize, + R: DeserializeOwned, +{ + let mut url = format!("{base_url}{endpoint}"); + let _ = Url::parse(&url) + .map_err(|e| RequestError::MalformedUrl(format!("Failed to parse URL {url}: {e}")))?; + let query_str = query + .as_ref() + .map(|q| { + serde_qs::to_string(&q).map_err(|e| { + RequestError::SerializeError(format!("Failed to serialize query: {e}")) + }) + }) + .transpose()?; + if query_str.is_some() { + url = format!("{}?{}", url, query_str.as_ref().unwrap()); + } + let client = reqwest::Client::new(); + let response = with_retry(|| async { client.get(&url).send().await }) + .await + .map_err(|e| RequestError::NetworkError(e.to_string()))?; + log::debug!("GET request url: {url}"); + handle_response(response, &url, &query_str).await +} + +async fn handle_response( + response: Response, + url: &str, + request_str: &Option, +) -> Result { + let status = response.status(); + if !status.is_success() { + let error_text = response + .text() + .await + .unwrap_or_else(|_| "Failed to read error response".to_string()); + let error_message = match serde_json::from_str::(&error_text) { + Ok(error_resp) => error_resp.message.unwrap_or(error_resp.error), + Err(_) => error_text, + }; + let abr_request = if log::log_enabled!(log::Level::Debug) { + // full request string + request_str.clone().unwrap_or_default() + } else { + // Truncate the request string to 500 characters if it is too long + request_str + .as_ref() + .map(|s| s.chars().take(500).collect::()) + .unwrap_or_default() + }; + return Err(RequestError::RequestError( + status.into(), + error_message, + url.to_string(), + abr_request, + )); + } + + let response_text = response + .text() + .await + .map_err(|e| RequestError::DeserializationError(format!("Failed to read response: {e}")))?; + + match serde_json::from_str::(&response_text) { + Ok(result) => Ok(result), + Err(e) => { + let abr_response = if log::log_enabled!(log::Level::Debug) { + // full request string + response_text + } else { + // Truncate the response string to 500 characters if it is too long + response_text.chars().take(500).collect::() + }; + Err(RequestError::DeserializationError(format!( + "Failed to deserialize response of url:{url} response:{abr_response}, error:{e}" + ))) + } + } +} diff --git a/src/main.rs b/src/main.rs index 28995c8..9f10a52 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,6 +1,6 @@ use clap::{arg, command, Parser}; use cli::{ - availability::check_avaliability, configure::select_network, console::print_error, + availability::check_availability, configure::select_network, console::print_error, press_enter_to_continue, run, }; use dotenv::dotenv; @@ -87,6 +87,6 @@ async fn set_up(is_interactive: bool) -> anyhow::Result<()> { serde_json::to_string_pretty(&settings)? ); - check_avaliability().await?; + check_availability().await?; Ok(()) } diff --git a/src/services/assets_status.rs b/src/services/assets_status.rs index 6389e09..2a2f29e 100644 --- a/src/services/assets_status.rs +++ b/src/services/assets_status.rs @@ -1,19 +1,11 @@ -use ethers::types::{Address, H256, U256}; -use intmax2_zkp::{ - common::deposit::get_pubkey_salt_hash, ethereum_types::u32limb_trait::U32LimbTrait, - utils::leafable::Leafable as _, -}; +use alloy::primitives::{Address, B256, U256}; +use intmax2_zkp::{common::deposit::get_pubkey_salt_hash, utils::leafable::Leafable as _}; use log::warn; use mining_circuit_v1::claim::claim_inner_circuit::get_deposit_nullifier; use crate::{ external_api::contracts::{ - events::{get_deposited_event_by_sender, Deposited}, - int1::{ - get_deposit_data, get_last_processed_deposit_id, get_withdrawal_nullifier_exists, - DepositData, - }, - minter::{get_long_term_claim_nullifier_exists, get_short_term_claim_nullifier_exists}, + convert::convert_u256_to_alloy, events::Deposited, int1::DepositData, }, state::state::State, utils::derive_key::derive_salt_from_private_key_nonce, @@ -41,10 +33,15 @@ pub struct AssetsStatus { pub async fn fetch_assets_status( state: &State, deposit_address: Address, - deposit_private_key: H256, + deposit_private_key: B256, ) -> anyhow::Result { - let senders_deposits = get_deposited_event_by_sender(deposit_address).await?; + let graph_client = &state.graph_client; + let int1 = &state.int1; + let minter = &state.minter; + let senders_deposits = graph_client + .get_deposited_event_by_sender(deposit_address) + .await?; let mut contained_indices = Vec::new(); let mut not_contained_indices = Vec::new(); for (index, event) in senders_deposits.iter().enumerate() { @@ -64,13 +61,13 @@ pub async fn fetch_assets_status( let mut pending_indices = Vec::new(); for &index in ¬_contained_indices { let event = &senders_deposits[index]; - let deposit_data = get_deposit_data(event.deposit_id).await?; + let deposit_data = int1.get_deposit_data(event.deposit_id).await?; if deposit_data.is_rejected { rejected_indices.push(index); } else if deposit_data == DepositData::default() { cancelled_indices.push(index); } else { - let last_processed_deposit_id = get_last_processed_deposit_id().await?; + let last_processed_deposit_id = int1.get_last_processed_deposit_id().await?; // this may occur because of the delay of the event log if event.deposit_id < last_processed_deposit_id { warn!( @@ -89,7 +86,7 @@ pub async fn fetch_assets_status( let salt = derive_salt_from_private_key_nonce(deposit_private_key, event.tx_nonce); let nullifier = get_pubkey_salt_hash(intmax2_zkp::ethereum_types::u256::U256::default(), salt); - let is_exists = get_withdrawal_nullifier_exists(nullifier).await?; + let is_exists = int1.get_withdrawal_nullifier_exists(nullifier).await?; if is_exists { withdrawn_indices.push(index); } else { @@ -127,17 +124,19 @@ pub async fn fetch_assets_status( let mut short_term_claimed_indices = Vec::new(); let mut short_term_not_claimed_indices = Vec::new(); - let mut short_term_claimable_amount = U256::zero(); + let mut short_term_claimable_amount = U256::default(); for (&index, &amount) in short_term_eligible_indices .iter() .zip(short_term_eligible_amounts.iter()) { let event = &senders_deposits[index]; - let eligible_amount = U256::from_big_endian(&amount.to_bytes_be()); + let eligible_amount = convert_u256_to_alloy(amount); let salt = derive_salt_from_private_key_nonce(deposit_private_key, event.tx_nonce); let nullifier = get_deposit_nullifier(&event.deposit(), salt); - let is_exists = get_short_term_claim_nullifier_exists(nullifier).await?; + let is_exists = minter + .get_short_term_claim_nullifier_exists(nullifier) + .await?; if is_exists { short_term_claimed_indices.push(index); } else { @@ -149,17 +148,19 @@ pub async fn fetch_assets_status( let mut long_term_claimed_indices = Vec::new(); let mut long_term_not_claimed_indices = Vec::new(); - let mut long_term_claimable_amount = U256::zero(); + let mut long_term_claimable_amount = U256::default(); for (&index, &amount) in long_term_eligible_indices .iter() .zip(long_term_eligible_amounts.iter()) { let event = &senders_deposits[index]; - let eligible_amount = U256::from_big_endian(&amount.to_bytes_be()); + let eligible_amount = convert_u256_to_alloy(amount); let salt = derive_salt_from_private_key_nonce(deposit_private_key, event.tx_nonce); let nullifier = get_deposit_nullifier(&event.deposit(), salt); - let is_exists = get_long_term_claim_nullifier_exists(nullifier).await?; + let is_exists = minter + .get_long_term_claim_nullifier_exists(nullifier) + .await?; if is_exists { long_term_claimed_indices.push(index); } else { @@ -209,7 +210,7 @@ impl AssetsStatus { } } - /// Retruns the times of deposits that are not cancelled + /// Returns the times of deposits that are not cancelled pub fn effective_deposit_times(&self) -> usize { assert!(self.senders_deposits.len() >= self.cancelled_indices.len()); self.senders_deposits.len() - self.cancelled_indices.len() // this never underflows diff --git a/src/services/balance_transfer.rs b/src/services/balance_transfer.rs index 6737895..ce6d778 100644 --- a/src/services/balance_transfer.rs +++ b/src/services/balance_transfer.rs @@ -1,61 +1,38 @@ -use ethers::{ - providers::Middleware, - types::{Address, Eip1559TransactionRequest, H256}, +use alloy::{ + primitives::{Address, B256, U256}, + providers::Provider as _, + rpc::types::TransactionRequest, }; -use log::info; use crate::{ - cli::console::{print_status, print_warning}, + cli::console::print_warning, external_api::contracts::{ error::BlockchainError, - utils::{ - get_address, get_balance, get_client_with_signer, get_eip1559_fees, get_tx_receipt, - }, + handlers::send_transaction_with_gas_bump, + utils::{get_address_from_private_key, get_provider_with_signer, NormalProvider}, }, - utils::retry::with_retry, }; pub async fn balance_transfer( - deposit_private_key: H256, + provider: &NormalProvider, + deposit_private_key: B256, to_address: Address, ) -> Result<(), BlockchainError> { - let deposit_address = get_address(deposit_private_key); - let balance = get_balance(deposit_address).await?; - let client = get_client_with_signer(deposit_private_key).await?; - let gas_limit = { - with_retry(|| async { - let tx = Eip1559TransactionRequest::new() - .to(to_address) - .value(balance); - client.estimate_gas(&tx.into(), None).await - }) - .await - .map_err(|_| BlockchainError::NetworkError("Failed to estimate gas".to_string()))? - }; - info!("Estimated gas limit: {}", gas_limit); - let (max_gas_price, max_priority_fee_per_gas) = get_eip1559_fees().await?; - let gas_price = max_gas_price + max_priority_fee_per_gas; + let signer = get_provider_with_signer(provider, deposit_private_key); + let deposit_address = get_address_from_private_key(deposit_private_key); + let balance = provider.get_balance(deposit_address).await?; + // todo: use estimate gas + let gas_limit = U256::from(10000); + let gas_price = U256::from(provider.get_gas_price().await?); if balance < gas_price * gas_limit { print_warning("Insufficient balance to transfer"); return Ok(()); } let transfer_amount = balance - gas_price * gas_limit; - let signer = get_client_with_signer(deposit_private_key).await?; - let tx = Eip1559TransactionRequest::new() + let tx_request = TransactionRequest::default() .to(to_address) - .value(transfer_amount) - .max_fee_per_gas(max_gas_price) - .max_priority_fee_per_gas(max_priority_fee_per_gas); - let pending_tx = signer - .send_transaction(tx, None) - .await - .map_err(|_| BlockchainError::NetworkError("Failed to send transaction".to_string()))?; - print_status(format!("Transfer tx hash: {:?}", pending_tx.tx_hash())); - let reciept = get_tx_receipt(pending_tx.tx_hash()).await?; - if reciept.status.unwrap() != 1.into() { - print_warning("Transfer failed. Please retry."); - } - print_status("Transfer successful"); + .value(transfer_amount); + send_transaction_with_gas_bump(signer, tx_request, "send balance").await?; Ok(()) } diff --git a/src/services/claim/claim.rs b/src/services/claim/claim.rs index cf83cb8..6656dcd 100644 --- a/src/services/claim/claim.rs +++ b/src/services/claim/claim.rs @@ -1,7 +1,7 @@ -use std::time::UNIX_EPOCH; +use std::{str::FromStr, time::UNIX_EPOCH}; +use alloy::primitives::Bytes; use anyhow::ensure; -use contract::claim_tokens; use mining_circuit_v1::claim::claim_circuit::ClaimPublicInputs; use crate::{ @@ -10,6 +10,7 @@ use crate::{ contracts::events::Deposited, intmax::gnark::{fetch_gnark_proof, gnark_start_prove}, }, + services::utils::await_until_low_gas_price, state::{key::Key, state::State}, utils::config::Settings, }; @@ -129,7 +130,7 @@ async fn from_step4(state: &State, key: &Key) -> anyhow::Result<()> { } // Call contract -async fn from_step5(_state: &State, key: &Key) -> anyhow::Result<()> { +async fn from_step5(state: &State, key: &Key) -> anyhow::Result<()> { print_status("Claim: calling contract"); let status = temp::ClaimStatus::new()?; ensure!(status.next_step == temp::ClaimStep::ContractCall); @@ -144,37 +145,41 @@ async fn from_step5(_state: &State, key: &Key) -> anyhow::Result<()> { last_claim_hash, }; temp::ClaimStatus::delete()?; - claim_tokens( - key.withdrawal_private_key, - status.is_short_term, - &claims, - pis, - &status.gnark_proof.unwrap(), - ) - .await?; + await_until_low_gas_price(&state.provider).await?; + let proof = Bytes::from_str(&status.gnark_proof.unwrap())?; + state + .minter + .claim_tokens( + key.withdrawal_private_key, + status.is_short_term, + &claims, + &pis, + proof, + ) + .await?; Ok(()) } -#[cfg(test)] -mod tests { - use crate::test::{get_dummy_keys, get_dummy_state}; +// #[cfg(test)] +// mod tests { +// use crate::test::{get_dummy_keys, get_dummy_state}; - use super::*; +// use super::*; - #[tokio::test] - #[ignore] - async fn test_claim_task() { - let dummy_key = get_dummy_keys(); +// #[tokio::test] +// #[ignore] +// async fn test_claim_task() { +// let dummy_key = get_dummy_keys(); - let mut state = get_dummy_state().await; - let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); +// let mut state = get_dummy_state().await; +// let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); - let is_short_term = true; - let not_claimed_events = assets_status.get_not_claimed_events(is_short_term); - assert!(not_claimed_events.len() > 0); +// let is_short_term = true; +// let not_claimed_events = assets_status.get_not_claimed_events(is_short_term); +// assert!(not_claimed_events.len() > 0); - single_claim_task(&mut state, &dummy_key, is_short_term, ¬_claimed_events) - .await - .unwrap(); - } -} +// single_claim_task(&mut state, &dummy_key, is_short_term, ¬_claimed_events) +// .await +// .unwrap(); +// } +// } diff --git a/src/services/claim/contract.rs b/src/services/claim/contract.rs deleted file mode 100644 index 11c5081..0000000 --- a/src/services/claim/contract.rs +++ /dev/null @@ -1,61 +0,0 @@ -use std::str::FromStr; - -use ethers::{ - signers::Signer as _, - types::{Address, Bytes, H256, U256}, -}; -use intmax2_zkp::ethereum_types::u32limb_trait::U32LimbTrait; -use log::info; -use mining_circuit_v1::claim::{claim_circuit::ClaimPublicInputs, mining_claim::MiningClaim}; - -use crate::{ - cli::console::{print_log, print_status}, - external_api::contracts::{ - minter::{get_minter_contract_with_signer, minter_v1}, - utils::get_wallet, - }, - services::utils::{await_until_low_gas_price, handle_contract_call, set_gas_price}, -}; - -pub async fn claim_tokens( - claim_key: H256, - is_short_term: bool, - claims: &[MiningClaim], - pis: ClaimPublicInputs, - proof: &str, -) -> anyhow::Result<()> { - info!( - "Calling claim_tokens: claims {:?}, pis {:?}, proof {:?}", - claims, pis, proof - ); - let mut mint_claims = Vec::::new(); - for claim in claims { - mint_claims.push(minter_v1::MintClaim { - recipient: Address::from_slice(&claim.recipient.to_bytes_be()), - nullifier: claim.nullifier.to_bytes_be().try_into().unwrap(), - amount: U256::from_big_endian(&claim.amount.to_bytes_be()), - }); - } - let pis = minter_v1::ClaimPublicInputs { - deposit_tree_root: pis.deposit_tree_root.to_bytes_be().try_into().unwrap(), - eligible_tree_root: pis.eligible_tree_root.to_bytes_be().try_into().unwrap(), - last_claim_hash: pis.last_claim_hash.to_bytes_be().try_into().unwrap(), - }; - let proof = Bytes::from_str(proof).unwrap(); - let claim_address = get_wallet(claim_key).await?.address(); - print_status(format!("Claiming tokens for address: {}", claim_address)); - - await_until_low_gas_price().await?; - let minter = get_minter_contract_with_signer(claim_key).await?; - let mut tx = minter.claim_tokens( - is_short_term, - mint_claims.clone(), - pis.clone(), - proof.clone(), - ); - set_gas_price(&mut tx).await?; - info!("Calling claim_tokens: tx {:?}", tx); - let _tx_hash = handle_contract_call(tx, claim_address, "claim", "claim").await?; - print_log(format!("Successfully claimed")); - Ok(()) -} diff --git a/src/services/claim/mod.rs b/src/services/claim/mod.rs index eee5e81..a50d986 100644 --- a/src/services/claim/mod.rs +++ b/src/services/claim/mod.rs @@ -8,7 +8,6 @@ use crate::{ use super::assets_status::AssetsStatus; pub mod claim; -pub mod contract; pub mod temp; pub mod witness_generation; diff --git a/src/services/claim/witness_generation.rs b/src/services/claim/witness_generation.rs index 31640c9..846af8c 100644 --- a/src/services/claim/witness_generation.rs +++ b/src/services/claim/witness_generation.rs @@ -1,13 +1,10 @@ use anyhow::{ensure, Ok}; -use intmax2_zkp::{ - ethereum_types::{address::Address, bytes32::Bytes32, u32limb_trait::U32LimbTrait}, - utils::leafable::Leafable, -}; +use intmax2_zkp::{ethereum_types::bytes32::Bytes32, utils::leafable::Leafable}; use log::info; use mining_circuit_v1::claim::claim_inner_circuit::ClaimInnerValue; use crate::{ - external_api::contracts::events::Deposited, + external_api::contracts::{convert::convert_address_to_intmax, events::Deposited}, services::claim::MAX_CLAIMS, state::{key::Key, state::State}, utils::derive_key::{derive_pubkey_from_private_key, derive_salt_from_private_key_nonce}, @@ -37,7 +34,7 @@ pub async fn generate_claim_witness( let eligible_tree_root: Bytes32 = eligible_tree.get_root().into(); let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); - let recipient = Address::from_bytes_be(&key.withdrawal_address.as_bytes()); + let recipient = convert_address_to_intmax(key.withdrawal_address); let mut witnesses = Vec::new(); let mut prev_claim_hash = Bytes32::default(); for event in events { diff --git a/src/services/mining/cancel.rs b/src/services/mining/cancel.rs deleted file mode 100644 index 6b55ed2..0000000 --- a/src/services/mining/cancel.rs +++ /dev/null @@ -1,31 +0,0 @@ -use intmax2_zkp::ethereum_types::u32limb_trait::U32LimbTrait as _; - -use crate::{ - cli::console::print_log, - external_api::contracts::{ - events::Deposited, - int1::{get_int1_contract_with_signer, int_1}, - }, - services::utils::{await_until_low_gas_price, handle_contract_call, set_gas_price}, - state::{key::Key, state::State}, -}; - -pub async fn cancel_task(_state: &State, key: &Key, event: Deposited) -> anyhow::Result<()> { - let deposit = int_1::Deposit { - recipient_salt_hash: event.recipient_salt_hash.to_bytes_be().try_into().unwrap(), - token_index: event.token_index, - amount: ethers::types::U256::from_big_endian(&event.amount.to_bytes_be()), - }; - let deposit_address = key.deposit_address; - - await_until_low_gas_price().await?; - let int1 = get_int1_contract_with_signer(key.deposit_private_key).await?; - let mut tx = int1.cancel_deposit(event.deposit_id.into(), deposit.clone()); - set_gas_price(&mut tx).await?; - let tx_hash = handle_contract_call(tx, deposit_address, "deposit", "cancel").await?; - print_log(format!( - "Cancelled deposit id {:?} with tx hash {:?}", - event.deposit_id, tx_hash, - )); - Ok(()) -} diff --git a/src/services/mining/deposit.rs b/src/services/mining/deposit.rs deleted file mode 100644 index 57d9ffc..0000000 --- a/src/services/mining/deposit.rs +++ /dev/null @@ -1,53 +0,0 @@ -use ethers::types::U256; -use intmax2_zkp::{ - common::deposit::get_pubkey_salt_hash, ethereum_types::u32limb_trait::U32LimbTrait as _, -}; - -use crate::{ - cli::console::print_log, - external_api::contracts::{int1::get_int1_contract_with_signer, utils::get_account_nonce}, - services::utils::{await_until_low_gas_price, handle_contract_call, set_gas_price}, - state::{key::Key, state::State}, - utils::derive_key::{derive_pubkey_from_private_key, derive_salt_from_private_key_nonce}, -}; - -pub async fn deposit_task(_state: &State, key: &Key, mining_unit: U256) -> anyhow::Result<()> { - let deposit_address = key.deposit_address; - let nonce = get_account_nonce(deposit_address).await?; - let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, nonce); - let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); - let pubkey_salt_hash: [u8; 32] = get_pubkey_salt_hash(pubkey, salt) - .to_bytes_be() - .try_into() - .unwrap(); - - let deposit_address = key.deposit_address; - - await_until_low_gas_price().await?; - let int1 = get_int1_contract_with_signer(key.deposit_private_key).await?; - let mut tx = int1 - .deposit_native_token(pubkey_salt_hash) - .value(mining_unit); - set_gas_price(&mut tx).await?; - tx.tx.set_nonce(nonce); - let _tx_hash = handle_contract_call(tx, deposit_address, "deposit", "deposit").await?; - print_log(format!("Successfully deposited")); - Ok(()) -} - -#[cfg(test)] -mod tests { - use crate::test::{get_dummy_keys, get_dummy_state}; - - #[tokio::test] - #[ignore] - async fn test_deposit() { - let state = get_dummy_state().await; - let dummy_key = get_dummy_keys(); - - let mining_uint = 100_000_000_000_000_000u128.into(); - super::deposit_task(&state, &dummy_key, mining_uint) - .await - .unwrap(); - } -} diff --git a/src/services/mining/deterministic_sleep.rs b/src/services/mining/deterministic_sleep.rs index 4f870d1..d810fff 100644 --- a/src/services/mining/deterministic_sleep.rs +++ b/src/services/mining/deterministic_sleep.rs @@ -1,39 +1,47 @@ -use ethers::types::Address; +use alloy::primitives::Address; use log::info; use rand::{Rng as _, SeedableRng as _}; use rand_chacha::ChaCha20Rng; use crate::{ cli::console::print_log, - external_api::contracts::events::{ - get_latest_deposit_timestamp, get_latest_withdrawal_timestamp, - }, + external_api::graph::client::GraphClient, utils::{config::Settings, encryption::keccak256_hash, time::sleep_for}, }; /// Random sleep before deposit to improve privacy. -pub async fn sleep_before_deposit(withdrawal_address: Address) -> anyhow::Result<()> { - let last_withdrawal_time = get_latest_withdrawal_timestamp(withdrawal_address).await?; +pub async fn sleep_before_deposit( + graph_client: &GraphClient, + withdrawal_address: Address, +) -> anyhow::Result<()> { + let last_withdrawal_time = graph_client + .get_latest_withdrawal_timestamp(withdrawal_address) + .await?; info!("last_withdrawal_time: {:?}", last_withdrawal_time); if last_withdrawal_time.is_none() { return Ok(()); // no withdrawal yet } let last_withdrawal_time = last_withdrawal_time.unwrap(); - let sleep_time = determin_sleep_time(last_withdrawal_time, withdrawal_address, "deposit"); + let sleep_time = determine_sleep_time(last_withdrawal_time, withdrawal_address, "deposit"); let target_time = last_withdrawal_time + sleep_time; sleep_if_needed(target_time, true).await; Ok(()) } /// Random sleep before withdrawal to improve privacy. -pub async fn sleep_before_withdrawal(deposit_address: Address) -> anyhow::Result<()> { - let last_deposit_time = get_latest_deposit_timestamp(deposit_address).await?; +pub async fn sleep_before_withdrawal( + graph_client: &GraphClient, + deposit_address: Address, +) -> anyhow::Result<()> { + let last_deposit_time: Option = graph_client + .get_latest_deposit_timestamp(deposit_address) + .await?; info!("last_deposit_time: {:?}", last_deposit_time); if last_deposit_time.is_none() { return Ok(()); // no deposit yet } let last_deposit_time = last_deposit_time.unwrap(); - let sleep_time = determin_sleep_time(last_deposit_time, deposit_address, "withdrawal"); + let sleep_time = determine_sleep_time(last_deposit_time, deposit_address, "withdrawal"); let target_time = last_deposit_time + sleep_time; sleep_if_needed(target_time, false).await; Ok(()) @@ -62,7 +70,7 @@ async fn sleep_if_needed(target_time: u64, is_deposit: bool) { sleep_for(sleep_from_now); } -fn determin_sleep_time(last_time: u64, address: Address, random_nonce: &'static str) -> u64 { +fn determine_sleep_time(last_time: u64, address: Address, random_nonce: &'static str) -> u64 { let seed_str = format!("{}{}{}", last_time, address, random_nonce); let seed_hash = keccak256_hash(&seed_str); let mut rng = ChaCha20Rng::from_seed(seed_hash); diff --git a/src/services/mining/mod.rs b/src/services/mining/mod.rs index 4e24169..f8ca7b0 100644 --- a/src/services/mining/mod.rs +++ b/src/services/mining/mod.rs @@ -1,19 +1,21 @@ -use cancel::cancel_task; -use deposit::deposit_task; +use alloy::{primitives::U256, providers::Provider}; +use anyhow::Context; use deterministic_sleep::{sleep_before_deposit, sleep_before_withdrawal}; -use ethers::types::U256; +use intmax2_zkp::common::deposit::get_pubkey_salt_hash; use withdrawal::withdrawal_task; use crate::{ cli::console::print_warning, + external_api::contracts::convert::convert_u256_to_alloy, state::{key::Key, state::State}, - utils::errors::CLIError, + utils::{ + derive_key::{derive_pubkey_from_private_key, derive_salt_from_private_key_nonce}, + errors::CLIError, + }, }; use super::assets_status::AssetsStatus; -pub mod cancel; -pub mod deposit; pub mod deterministic_sleep; pub mod withdrawal; @@ -29,9 +31,17 @@ pub async fn mining_task( if cancel_pending_deposits { for &index in assets_status.pending_indices.iter() { let event = assets_status.senders_deposits[index].clone(); - cancel_task(state, key, event).await.map_err(|e| { - CLIError::InternalError(format!("Failed to cancel a pending deposit: {:#}", e)) - })?; + state + .int1 + .cancel_deposit( + key.deposit_private_key, + event.deposit_id, + event.recipient_salt_hash, + event.token_index, + convert_u256_to_alloy(event.amount), + ) + .await + .context("Failed to cancel deposit")?; } } @@ -42,16 +52,24 @@ pub async fn mining_task( key.deposit_address )); let event = assets_status.senders_deposits[index].clone(); - cancel_task(state, key, event).await.map_err(|e| { - CLIError::InternalError(format!("Failed to cancel a rejected deposit: {:#}", e)) - })?; + state + .int1 + .cancel_deposit( + key.deposit_private_key, + event.deposit_id, + event.recipient_salt_hash, + event.token_index, + convert_u256_to_alloy(event.amount), + ) + .await + .context("Failed to cancel rejected deposit")?; // Halt the CLI if a deposit is rejected to prevent further deposits return Err(CLIError::InternalError("Deposit is rejected".to_string()).into()); } // withdrawal if !assets_status.not_withdrawn_indices.is_empty() { - sleep_before_withdrawal(key.deposit_address).await?; + sleep_before_withdrawal(&state.graph_client, key.deposit_address).await?; for &index in assets_status.not_withdrawn_indices.iter() { let event = assets_status.senders_deposits[index].clone(); withdrawal_task(state, key, event) @@ -64,10 +82,19 @@ pub async fn mining_task( // deposit if new_deposit { - sleep_before_deposit(key.withdrawal_address).await?; - deposit_task(state, key, mining_unit) + sleep_before_deposit(&state.graph_client, key.withdrawal_address).await?; + let deposit_address = key.deposit_address; + let account = state.provider.get_account(deposit_address).await?; + let nonce = account.nonce; + let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, nonce); + let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); + let pubkey_salt_hash = get_pubkey_salt_hash(pubkey, salt); + // execute deposit task + state + .int1 + .deposit_native_token(key.deposit_private_key, pubkey_salt_hash, mining_unit) .await - .map_err(|e| CLIError::InternalError(format!("Failed to deposit: {:#}", e)))?; + .context("Failed to deposit native token")?; return Ok(()); } diff --git a/src/services/mining/withdrawal/mod.rs b/src/services/mining/withdrawal/mod.rs index 08e6b2c..74a6ecb 100644 --- a/src/services/mining/withdrawal/mod.rs +++ b/src/services/mining/withdrawal/mod.rs @@ -1,12 +1,13 @@ use std::time::UNIX_EPOCH; +use alloy::providers::Provider as _; use anyhow::ensure; use mining_circuit_v1::withdrawal::simple_withraw_circuit::SimpleWithdrawalPublicInputs; use crate::{ cli::console::print_status, external_api::{ - contracts::{events::Deposited, utils::get_tx_receipt}, + contracts::events::Deposited, intmax::{ gnark::{fetch_gnark_proof, gnark_start_prove}, withdrawal::submit_withdrawal, @@ -43,7 +44,7 @@ pub async fn resume_withdrawal_task(state: &State, key: &Key) -> anyhow::Result< // Generate witness async fn from_step1(state: &State, key: &Key, event: Deposited) -> anyhow::Result<()> { print_status("Withdrawal: generating withdrawal witness"); - let witness = witness_generation::generate_withdrawa_witness(state, key, event)?; + let witness = witness_generation::generate_withdrawal_witness(state, key, event)?; let status = temp::WithdrawalStatus { next_step: temp::WithdrawalStep::Plonky2Prove, witness: witness.clone(), @@ -116,7 +117,7 @@ async fn from_step4(state: &State, key: &Key) -> anyhow::Result<()> { } // Call contract -async fn from_step5(_state: &State, _key: &Key) -> anyhow::Result<()> { +async fn from_step5(state: &State, _key: &Key) -> anyhow::Result<()> { print_status("Withdrawal: calling contract"); let status = temp::WithdrawalStatus::new()?; ensure!(status.next_step == temp::WithdrawalStep::ContractCall); @@ -127,18 +128,15 @@ async fn from_step5(_state: &State, _key: &Key) -> anyhow::Result<()> { token_index: status.witness.deposit_leaf.token_index, amount: status.witness.deposit_leaf.amount, }; - await_until_low_gas_price().await?; - let tx_hash = submit_withdrawal(pis, status.gnark_proof.as_ref().unwrap()).await?; + await_until_low_gas_price(&state.provider).await?; + let tx_hash = submit_withdrawal(&state.int1, pis, status.gnark_proof.as_ref().unwrap()).await?; // delete here because get_tx_receipt may fail, and we don't want to retry this step temp::WithdrawalStatus::delete()?; - - print_status(format!("Withdral tx hash: {:?}", tx_hash)); - let tx_reciept = get_tx_receipt(tx_hash).await?; - ensure!( - tx_reciept.status == Some(ethers::types::U64::from(1)), - "Withdrawal transaction failed" - ); - print_status(format!("Succsesfully withdrawn")); + let receipt = state.provider.get_transaction_receipt(tx_hash).await?; + ensure!(receipt.is_some(), "Transaction receipt not found"); + let receipt = receipt.unwrap(); + ensure!(receipt.status(), "Transaction failed"); + print_status(format!("Successfully withdrawn")); Ok(()) } @@ -146,20 +144,20 @@ async fn from_step5(_state: &State, _key: &Key) -> anyhow::Result<()> { mod tests { use crate::test::{get_dummy_keys, get_dummy_state}; - #[tokio::test] - #[ignore] - async fn test_withdrawal() { - let mut state = get_dummy_state().await; + // #[tokio::test] + // #[ignore] + // async fn test_withdrawal() { + // let mut state = get_dummy_state().await; - let dummy_key = get_dummy_keys(); - let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); - let events = assets_status.get_not_withdrawn_events(); - assert!(events.len() > 0); + // let dummy_key = get_dummy_keys(); + // let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); + // let events = assets_status.get_not_withdrawn_events(); + // assert!(events.len() > 0); - super::withdrawal_task(&mut state, &dummy_key, events[0].clone()) - .await - .unwrap(); - } + // super::withdrawal_task(&mut state, &dummy_key, events[0].clone()) + // .await + // .unwrap(); + // } #[tokio::test] #[ignore] diff --git a/src/services/mining/withdrawal/witness_generation.rs b/src/services/mining/withdrawal/witness_generation.rs index de9aeb6..ae96586 100644 --- a/src/services/mining/withdrawal/witness_generation.rs +++ b/src/services/mining/withdrawal/witness_generation.rs @@ -1,17 +1,14 @@ -use intmax2_zkp::{ - ethereum_types::{address::Address, u32limb_trait::U32LimbTrait as _}, - utils::leafable::Leafable as _, -}; +use intmax2_zkp::utils::leafable::Leafable as _; use log::info; use mining_circuit_v1::withdrawal::simple_withraw_circuit::SimpleWithdrawalValue; use crate::{ - external_api::contracts::events::Deposited, + external_api::contracts::{convert::convert_address_to_intmax, events::Deposited}, state::{key::Key, state::State}, utils::derive_key::{derive_pubkey_from_private_key, derive_salt_from_private_key_nonce}, }; -pub fn generate_withdrawa_witness( +pub fn generate_withdrawal_witness( state: &State, key: &Key, event: Deposited, @@ -23,7 +20,7 @@ pub fn generate_withdrawa_witness( .get_index(event.deposit().hash()) .unwrap(); let deposit_merkle_proof = state.deposit_hash_tree.prove(deposit_index); - let recipient = Address::from_bytes_be(key.withdrawal_address.as_bytes()); + let recipient = convert_address_to_intmax(key.withdrawal_address); let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, event.tx_nonce); let deposit_leaf = event.deposit(); diff --git a/src/services/mod.rs b/src/services/mod.rs index 9ca725c..4eefe12 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -1,6 +1,6 @@ use crate::{ cli::{ - availability::check_avaliability, + availability::check_availability, balance_validation::{ validate_deposit_address_balance, validate_withdrawal_address_balance, }, @@ -10,8 +10,8 @@ use crate::{ state::{key::Key, state::State}, utils::{config::Settings, time::sleep_for}, }; +use alloy::primitives::{B256, U256}; use claim::claim_task; -use ethers::types::{H256, U256}; use mining::mining_task; use utils::is_address_used; @@ -25,7 +25,7 @@ pub mod utils; // note: in legacy environment, there is no mining loop pub async fn mining_loop( state: &mut State, - withdrawal_private_key: H256, + withdrawal_private_key: B256, mining_unit: U256, mining_times: u64, ) -> anyhow::Result<()> { @@ -36,6 +36,7 @@ pub async fn mining_loop( )); let assets_status = state.sync_and_fetch_assets(&key).await?; validate_deposit_address_balance( + &state.provider, &assets_status, key.deposit_address, mining_unit, @@ -43,7 +44,7 @@ pub async fn mining_loop( ) .await?; loop { - check_avaliability().await?; + check_availability().await?; let assets_status = state.sync_and_fetch_assets(&key).await?; let is_qualified = !get_circulation(key.deposit_address).await?.is_excluded; let will_deposit = assets_status.effective_deposit_times() < mining_times as usize @@ -89,11 +90,11 @@ pub async fn mining_loop( Ok(()) } -pub async fn exit_loop(state: &mut State, withdrawal_private_key: H256) -> anyhow::Result<()> { +pub async fn exit_loop(state: &mut State, withdrawal_private_key: B256) -> anyhow::Result<()> { let key = Key::new(withdrawal_private_key, 0); print_log(format!("Exit for deposit address{:?}", key.deposit_address)); loop { - check_avaliability().await?; + check_availability().await?; let assets_status = state.sync_and_fetch_assets(&key).await?; if assets_status.pending_indices.is_empty() && assets_status.rejected_indices.is_empty() @@ -101,7 +102,7 @@ pub async fn exit_loop(state: &mut State, withdrawal_private_key: H256) -> anyho { break; } - mining_task(state, &key, &assets_status, false, true, 0.into()).await?; + mining_task(state, &key, &assets_status, false, true, U256::default()).await?; common_loop_cool_down(); } print_status(format!( @@ -113,13 +114,13 @@ pub async fn exit_loop(state: &mut State, withdrawal_private_key: H256) -> anyho pub async fn legacy_exit_loop( state: &mut State, - withdrawal_private_key: H256, + withdrawal_private_key: B256, ) -> anyhow::Result<()> { let mut key_number = 0; loop { - check_avaliability().await?; + check_availability().await?; let key = Key::new(withdrawal_private_key, key_number); - if !is_address_used(key.deposit_address).await { + if !is_address_used(&state.provider, key.deposit_address).await? { print_status("exit loop finished".to_string()); return Ok(()); } @@ -140,18 +141,18 @@ pub async fn legacy_exit_loop( key_number += 1; break; } - mining_task(state, &key, &assets_status, false, true, 0.into()).await?; + mining_task(state, &key, &assets_status, false, true, U256::default()).await?; common_loop_cool_down(); } } } -pub async fn claim_loop(state: &mut State, withdrawal_private_key: H256) -> anyhow::Result<()> { +pub async fn claim_loop(state: &mut State, withdrawal_private_key: B256) -> anyhow::Result<()> { let key = Key::new(withdrawal_private_key, 0); for is_short_term in [true, false] { - check_avaliability().await?; - if !is_address_used(key.deposit_address).await { + check_availability().await?; + if !is_address_used(&state.provider, key.deposit_address).await? { print_status("claim loop finished".to_string()); return Ok(()); } @@ -160,7 +161,12 @@ pub async fn claim_loop(state: &mut State, withdrawal_private_key: H256) -> anyh if is_short_term { "short" } else { "long" } )); let assets_status = state.sync_and_fetch_assets(&key).await?; - validate_withdrawal_address_balance(&assets_status, key.withdrawal_address).await?; + validate_withdrawal_address_balance( + &state.provider, + &assets_status, + key.withdrawal_address, + ) + .await?; claim_task(state, &key, is_short_term, &assets_status).await?; common_loop_cool_down(); } @@ -173,14 +179,14 @@ pub async fn claim_loop(state: &mut State, withdrawal_private_key: H256) -> anyh pub async fn legacy_claim_loop( state: &mut State, - withdrawal_private_key: H256, + withdrawal_private_key: B256, ) -> anyhow::Result<()> { let mut key_number = 0; loop { for is_short_term in [true, false] { - check_avaliability().await?; + check_availability().await?; let key = Key::new(withdrawal_private_key, key_number); - if !is_address_used(key.deposit_address).await { + if !is_address_used(&state.provider, key.deposit_address).await? { print_status("claim loop finished".to_string()); return Ok(()); } @@ -191,7 +197,12 @@ pub async fn legacy_claim_loop( if is_short_term { "short" } else { "long" } )); let assets_status = state.sync_and_fetch_assets(&key).await?; - validate_withdrawal_address_balance(&assets_status, key.withdrawal_address).await?; + validate_withdrawal_address_balance( + &state.provider, + &assets_status, + key.withdrawal_address, + ) + .await?; let assets_status = state.sync_and_fetch_assets(&key).await?; claim_task(state, &key, is_short_term, &assets_status).await?; common_loop_cool_down(); diff --git a/src/services/sync.rs b/src/services/sync.rs index 8b40121..cc6975c 100644 --- a/src/services/sync.rs +++ b/src/services/sync.rs @@ -1,10 +1,8 @@ use crate::{ external_api::{ - contracts::{ - events::get_deposit_leaf_inserted_event, - int1::{get_deposit_root, get_deposit_root_exits}, - }, + contracts::{int1::Int1Contract, minter::MinterContract}, github::{fetch_latest_tree_from_github, BinTrees}, + graph::client::GraphClient, }, utils::{ bin_parser::{BinDepositTree, BinEligibleTree, DepositTreeInfo, EligibleTreeInfo}, @@ -36,6 +34,9 @@ pub enum Error { const MAX_TRY_FETCH_TREE: usize = 10; pub async fn sync_trees( + graph_client: &GraphClient, + int1: &Int1Contract, + minter: &MinterContract, last_deposit_block_number: &mut u64, last_update: &mut NaiveDateTime, deposit_hash_tree: &mut DepositHashTree, @@ -72,7 +73,7 @@ pub async fn sync_trees( let update = || async { if let Some(bin_deposit_tree) = bin_deposit_tree { let (new_deposit_hash_tree, new_block_number) = - parse_and_validate_bin_deposit_tree(bin_deposit_tree).await?; + parse_and_validate_bin_deposit_tree(int1, bin_deposit_tree).await?; log::info!( "Fetched deposit tree with {} leaves from block {}", new_deposit_hash_tree.tree.len(), @@ -82,14 +83,20 @@ pub async fn sync_trees( *last_deposit_block_number = new_block_number; } if let Some(bin_short_term_eligible_tree) = bin_short_term_eligible_tree { - *short_term_eligible_tree = - parse_and_validate_bin_eligible_tree(true, bin_short_term_eligible_tree) - .await?; + *short_term_eligible_tree = parse_and_validate_bin_eligible_tree( + minter, + true, + bin_short_term_eligible_tree, + ) + .await?; } if let Some(bin_long_term_eligible_tree) = bin_long_term_eligible_tree { - *long_term_eligible_tree = - parse_and_validate_bin_eligible_tree(false, bin_long_term_eligible_tree) - .await?; + *long_term_eligible_tree = parse_and_validate_bin_eligible_tree( + minter, + false, + bin_long_term_eligible_tree, + ) + .await?; } Result::<(), Error>::Ok(()) }; @@ -104,24 +111,30 @@ pub async fn sync_trees( } } // sync deposit tree only - *last_deposit_block_number = - sync_to_latest_deposit_tree(deposit_hash_tree, *last_deposit_block_number) - .await - .map_err(|e| { - Error::SyncDepositTreeFromEventsError(format!("Failed to sync deposit tree: {}", e)) - })?; + *last_deposit_block_number = sync_to_latest_deposit_tree( + graph_client, + int1, + deposit_hash_tree, + *last_deposit_block_number, + ) + .await + .map_err(|e| { + Error::SyncDepositTreeFromEventsError(format!("Failed to sync deposit tree: {}", e)) + })?; *last_update = now; // update last_update to now Ok(()) } async fn parse_and_validate_bin_deposit_tree( + int1: &Int1Contract, bin_deposit_tree: BinDepositTree, ) -> Result<(DepositHashTree, u64), Error> { let deposit_tree_info: DepositTreeInfo = bin_deposit_tree .try_into() .map_err(|e: anyhow::Error| Error::TreeDeserializationError(e.to_string()))?; // check roots - let deposit_root_exists = get_deposit_root_exits(deposit_tree_info.root) + let deposit_root_exists = int1 + .get_deposit_root_exits(deposit_tree_info.root) .await .map_err(|e| Error::NetworkError(format!("Failed to get deposit root: {}", e)))?; if !deposit_root_exists { @@ -134,6 +147,7 @@ async fn parse_and_validate_bin_deposit_tree( } async fn parse_and_validate_bin_eligible_tree( + minter: &MinterContract, is_short_term: bool, bin_eligible_tree: BinEligibleTree, ) -> Result { @@ -141,17 +155,13 @@ async fn parse_and_validate_bin_eligible_tree( .try_into() .map_err(|e: anyhow::Error| Error::TreeDeserializationError(e.to_string()))?; let onchain_eligible_root = if is_short_term { - crate::external_api::contracts::minter::get_short_term_eligible_root() - .await - .map_err(|e| { - Error::NetworkError(format!("Failed to get short term eligible root: {}", e)) - })? + minter.get_short_term_eligible_root().await.map_err(|e| { + Error::NetworkError(format!("Failed to get short term eligible root: {}", e)) + })? } else { - crate::external_api::contracts::minter::get_long_term_eligible_root() - .await - .map_err(|e| { - Error::NetworkError(format!("Failed to get long term eligible root: {}", e)) - })? + minter.get_long_term_eligible_root().await.map_err(|e| { + Error::NetworkError(format!("Failed to get long term eligible root: {}", e)) + })? }; if onchain_eligible_root != eligible_tree_info.root { return Err(Error::TreeRootSyncError(format!( @@ -163,19 +173,24 @@ async fn parse_and_validate_bin_eligible_tree( } async fn sync_to_latest_deposit_tree( + graph_client: &GraphClient, + int1: &Int1Contract, deposit_hash_tree: &mut DepositHashTree, from_block: u64, ) -> anyhow::Result { log::info!("Syncing deposit tree from block {}", from_block); - let events = get_deposit_leaf_inserted_event(from_block).await?; + + // todo! + let next_deposit_index = deposit_hash_tree.tree.len(); + let events = graph_client + .get_deposit_leaf_inserted_event(next_deposit_index as u32) + .await?; info!( "Syncing deposit tree from block {}, got {} events. Latest deposit_index={}", from_block, events.len(), events.last().map(|event| event.deposit_index).unwrap_or(0) ); - - let next_deposit_index = deposit_hash_tree.tree.len(); let mut to_append = events .iter() .filter(|event| event.deposit_index as usize >= next_deposit_index) @@ -194,14 +209,13 @@ async fn sync_to_latest_deposit_tree( to_block_number = event.block_number; } let local_root = deposit_hash_tree.get_root(); - let is_exists = get_deposit_root_exits(local_root).await?; + let is_exists = int1.get_deposit_root_exits(local_root).await?; ensure!( is_exists, "Local deposit root does not exist on chain: {}", local_root ); - let current_root = get_deposit_root().await?; - + let current_root = int1.get_deposit_root().await?; // this may occur because of the delay of the event log if local_root != current_root { warn!( @@ -212,30 +226,30 @@ async fn sync_to_latest_deposit_tree( Ok(to_block_number) } -#[cfg(test)] -mod tests { - use crate::utils::{ - deposit_hash_tree::DepositHashTree, eligible_tree_with_map::EligibleTreeWithMap, - }; - - #[tokio::test] - #[ignore] - async fn sync_to_latest_deposit_tree() { - let mut deposit_hash_tree = DepositHashTree::new(); - let mut short_term_eligible_tree = EligibleTreeWithMap::new(); - let mut long_term_eligible_tree = EligibleTreeWithMap::new(); - let mut last_deposit_block_number = 0; - let mut last_update = chrono::NaiveDateTime::default(); - super::sync_trees( - &mut last_deposit_block_number, - &mut last_update, - &mut deposit_hash_tree, - &mut short_term_eligible_tree, - &mut long_term_eligible_tree, - ) - .await - .unwrap(); - - dbg!(deposit_hash_tree.tree.len()); - } -} +// #[cfg(test)] +// mod tests { +// use crate::utils::{ +// deposit_hash_tree::DepositHashTree, eligible_tree_with_map::EligibleTreeWithMap, +// }; + +// #[tokio::test] +// #[ignore] +// async fn sync_to_latest_deposit_tree() { +// let mut deposit_hash_tree = DepositHashTree::new(); +// let mut short_term_eligible_tree = EligibleTreeWithMap::new(); +// let mut long_term_eligible_tree = EligibleTreeWithMap::new(); +// let mut last_deposit_block_number = 0; +// let mut last_update = chrono::NaiveDateTime::default(); +// super::sync_trees( +// &mut last_deposit_block_number, +// &mut last_update, +// &mut deposit_hash_tree, +// &mut short_term_eligible_tree, +// &mut long_term_eligible_tree, +// ) +// .await +// .unwrap(); + +// dbg!(deposit_hash_tree.tree.len()); +// } +// } diff --git a/src/services/utils.rs b/src/services/utils.rs index 639aa70..adc1bb7 100644 --- a/src/services/utils.rs +++ b/src/services/utils.rs @@ -1,106 +1,21 @@ -use anyhow::ensure; -use ethers::{ - core::k256::ecdsa::SigningKey, - middleware::SignerMiddleware, - providers::{Http, Middleware, Provider}, - signers::Wallet, - types::{Address, H256, U256}, +use alloy::{ + primitives::{utils::format_units, Address, U256}, + providers::Provider as _, }; use crate::{ cli::console::{print_status, print_warning}, - external_api::{ - contracts::utils::{get_account_nonce, get_balance, get_client, get_gas_price}, - intmax::gas_estimation::get_gas_estimation, - }, - utils::{config::Settings, env_config::EnvConfig, network::is_legacy, time::sleep_for}, + external_api::contracts::utils::NormalProvider, + utils::{config::Settings, env_config::EnvConfig, time::sleep_for}, }; -pub async fn set_gas_price( - tx: &mut ethers::contract::builders::ContractCall< - SignerMiddleware, Wallet>, - (), - >, -) -> anyhow::Result<()> { - if is_legacy() { - return Ok(()); // gas server does not support legacy environment. - } - let result = get_gas_estimation().await?; - let inner_tx = tx - .tx - .as_eip1559_mut() - .ok_or(anyhow::anyhow!("EIP-1559 tx expected"))?; - *inner_tx = inner_tx - .clone() - .max_priority_fee_per_gas(result.max_priority_fee_per_gas) - .max_fee_per_gas(result.max_fee_per_gas); - Ok(()) -} - -pub async fn handle_contract_call( - tx: ethers::contract::builders::ContractCall< - SignerMiddleware, Wallet>, - (), - >, - from_address: Address, - from_name: S, - tx_name: S, -) -> anyhow::Result { - loop { - let result = tx.send().await; - match result { - Ok(tx) => { - let pending_tx = tx; - print_status(format!( - "{} tx hash: {:?}", - tx_name.to_string(), - pending_tx.tx_hash() - )); - match pending_tx.await? { - Some(tx_receipt) => { - ensure!( - tx_receipt.status.unwrap() == 1.into(), - "{} tx failed", - from_name.to_string() - ); - return Ok(tx_receipt.transaction_hash); - } - None => { - return Err(anyhow::anyhow!( - "Transaction receipt is None. The transaction may not have been mined." - )); - } - } - } - Err(e) => { - let error_message = e.to_string(); - // insufficient balance - if error_message.contains("-32000") { - let estimate_gas = tx.estimate_gas().await?; - let gas_price = get_client().await?.get_gas_price().await?; - let value = tx.tx.value().cloned().unwrap_or_default(); - let necessary_balance = estimate_gas * gas_price + value; - insuffient_balance_instruction( - from_address, - necessary_balance, - &from_name.to_string(), - ) - .await?; - print_status(format!("Retrying {} transaction...", tx_name.to_string())); - } else { - return Err(anyhow::anyhow!("Error sending transaction: {:?}", e)); - } - } - } - } -} - -pub async fn insuffient_balance_instruction( +pub async fn insufficient_balance_instruction( + provider: &NormalProvider, address: Address, required_balance: U256, name: &str, ) -> anyhow::Result<()> { - let balance = get_balance(address).await?; + let balance = provider.get_balance(address).await?; if required_balance <= balance { return Ok(()); } @@ -112,7 +27,7 @@ pub async fn insuffient_balance_instruction( pretty_format_u256(required_balance) )); loop { - let new_balance = get_balance(address).await?; + let new_balance = provider.get_balance(address).await?; if new_balance > required_balance { print_status("Balance updated"); sleep_for(10); @@ -123,51 +38,58 @@ pub async fn insuffient_balance_instruction( Ok(()) } -pub async fn await_until_low_gas_price() -> anyhow::Result<()> { +pub async fn await_until_low_gas_price(provider: &NormalProvider) -> anyhow::Result<()> { let max_gas_price = EnvConfig::import_from_env()?.max_gas_price; let settings = Settings::load()?; - let high_gas_retry_inverval_in_sec = settings.service.high_gas_retry_inverval_in_sec; + let high_gas_retry_interval_in_sec = settings.service.high_gas_retry_interval_in_sec; let _url = settings.service.repository_url; loop { - let current_gas_price = get_gas_price().await?; + let current_gas_price = U256::from(provider.get_gas_price().await?); if current_gas_price <= max_gas_price { log::info!( "Current gas price: {} GWei is lower than max gas price: {} GWei", - ethers::utils::format_units(current_gas_price.clone(), "gwei").unwrap(), - ethers::utils::format_units(max_gas_price.clone(), "gwei").unwrap(), + format_units(current_gas_price.clone(), "gwei").unwrap(), + format_units(max_gas_price.clone(), "gwei").unwrap(), ); break; } print_warning(format!( "Current gas price: {} Gwei > max gas price: {} Gwei. Waiting for gas price to drop...", - ethers::utils::format_units(current_gas_price.clone(), "gwei").unwrap(), - ethers::utils::format_units(max_gas_price.clone(), "gwei").unwrap(), + format_units(current_gas_price.clone(), "gwei").unwrap(), + format_units(max_gas_price.clone(), "gwei").unwrap(), )); - sleep_for(high_gas_retry_inverval_in_sec); + sleep_for(high_gas_retry_interval_in_sec); } Ok(()) } -pub async fn is_address_used(deposit_address: Address) -> bool { - get_account_nonce(deposit_address).await.unwrap() > 0 - || get_balance(deposit_address).await.unwrap() > 0.into() +pub async fn is_address_used( + provider: &NormalProvider, + deposit_address: Address, +) -> anyhow::Result { + let account = provider.get_account(deposit_address).await?; + let nonce = account.nonce; + let balance = account.balance; + Ok(nonce > 0 || balance > U256::default()) } pub fn pretty_format_u256(value: U256) -> String { - let s = ethers::utils::format_units(value, "ether").unwrap(); + let s = format_units(value, "ether").unwrap(); let s = s.trim_end_matches('0').trim_end_matches('.'); s.to_string() } #[cfg(test)] mod tests { + use alloy::primitives::utils::parse_ether; + #[test] fn test_pretty_format() { - let value = ethers::utils::parse_ether("1.01000000000000000").unwrap(); + let value = parse_ether("1.01000000000000000").unwrap(); let pretty = super::pretty_format_u256(value); assert_eq!(pretty, "1.01"); - let value = ethers::utils::parse_ether("1.00000000000000000").unwrap(); + let value = parse_ether("1.00000000000000000").unwrap(); let pretty = super::pretty_format_u256(value); assert_eq!(pretty, "1"); } diff --git a/src/state/key.rs b/src/state/key.rs index ea46d86..46fa9eb 100644 --- a/src/state/key.rs +++ b/src/state/key.rs @@ -1,22 +1,23 @@ -use ethers::types::{Address, H256}; +use alloy::primitives::{Address, B256}; use crate::{ - external_api::contracts::utils::get_address, utils::derive_key::derive_deposit_private_key, + external_api::contracts::utils::get_address_from_private_key, + utils::derive_key::derive_deposit_private_key, }; #[derive(Debug, Clone)] pub struct Key { - pub deposit_private_key: H256, + pub deposit_private_key: B256, pub deposit_address: Address, - pub withdrawal_private_key: H256, + pub withdrawal_private_key: B256, pub withdrawal_address: Address, } impl Key { - pub fn new(withdrawal_private_key: H256, number: u64) -> Self { - let withdrawal_address = get_address(withdrawal_private_key); + pub fn new(withdrawal_private_key: B256, number: u64) -> Self { + let withdrawal_address = get_address_from_private_key(withdrawal_private_key); let deposit_private_key = derive_deposit_private_key(withdrawal_private_key, number); - let deposit_address = get_address(deposit_private_key); + let deposit_address = get_address_from_private_key(deposit_private_key); Self { deposit_private_key, deposit_address, diff --git a/src/state/state.rs b/src/state/state.rs index 93f47ef..c9b2751 100644 --- a/src/state/state.rs +++ b/src/state/state.rs @@ -2,38 +2,82 @@ use chrono::NaiveDateTime; use super::{key::Key, prover::Prover}; use crate::{ + external_api::{ + contracts::{ + int1::Int1Contract, + minter::MinterContract, + token::TokenContract, + utils::{get_provider, NormalProvider}, + }, + graph::client::GraphClient, + }, services::{ assets_status::{fetch_assets_status, AssetsStatus}, sync::sync_trees, }, - utils::{deposit_hash_tree::DepositHashTree, eligible_tree_with_map::EligibleTreeWithMap}, + utils::{ + config::Settings, deposit_hash_tree::DepositHashTree, + eligible_tree_with_map::EligibleTreeWithMap, + }, }; pub struct State { pub deposit_hash_tree: DepositHashTree, pub short_term_eligible_tree: EligibleTreeWithMap, pub long_term_eligible_tree: EligibleTreeWithMap, - pub last_tree_feched_at: NaiveDateTime, + pub last_tree_fetched_at: NaiveDateTime, pub last_deposit_synced_block: u64, pub prover: Prover, + + // block chain state + pub int1: Int1Contract, + pub minter: MinterContract, + pub token: TokenContract, + pub provider: NormalProvider, + + pub graph_client: GraphClient, } impl State { - pub fn new() -> Self { + pub fn new(rpc_url: &str) -> Self { + let settings = Settings::load().unwrap(); + let provider = get_provider(rpc_url).unwrap(); + let int1 = Int1Contract::new( + provider.clone(), + settings.blockchain.int1_address.parse().unwrap(), + ); + let minter = MinterContract::new( + provider.clone(), + settings.blockchain.minter_address.parse().unwrap(), + ); + let token = TokenContract::new( + provider.clone(), + settings.blockchain.token_address.parse().unwrap(), + ); + let graph_client = GraphClient::new(provider.clone(), &settings.blockchain.graph_url, None); + Self { deposit_hash_tree: DepositHashTree::new(), short_term_eligible_tree: EligibleTreeWithMap::new(), long_term_eligible_tree: EligibleTreeWithMap::new(), - last_tree_feched_at: NaiveDateTime::default(), + last_tree_fetched_at: NaiveDateTime::default(), last_deposit_synced_block: 0, prover: Prover::new(), + int1, + minter, + token, + provider, + graph_client, } } pub async fn sync_trees(&mut self) -> anyhow::Result<()> { sync_trees( + &self.graph_client, + &self.int1, + &self.minter, &mut self.last_deposit_synced_block, - &mut self.last_tree_feched_at, + &mut self.last_tree_fetched_at, &mut self.deposit_hash_tree, &mut self.short_term_eligible_tree, &mut self.long_term_eligible_tree, diff --git a/src/test/mod.rs b/src/test/mod.rs index 2d1c922..18c3aea 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -1,22 +1,29 @@ +use alloy::primitives::B256; use chrono::NaiveDateTime; -use ethers::types::H256; use intmax2_zkp::ethereum_types::u256::U256; use mining_circuit_v1::eligible_tree::EligibleLeaf; use num_bigint::BigUint; use crate::{ - external_api::contracts::utils::get_address, + external_api::{ + contracts::{ + int1::Int1Contract, + minter::MinterContract, + token::TokenContract, + utils::{get_address_from_private_key, get_provider}, + }, + graph::client::GraphClient, + }, state::{key::Key, prover::Prover, state::State}, utils::{deposit_hash_tree::DepositHashTree, eligible_tree_with_map::EligibleTreeWithMap}, }; pub fn get_dummy_keys() -> Key { - let deposit_private_key: H256 = + let deposit_private_key: B256 = "0xdf57089febbacf7ba0bc227dafbffa9fc08a93fdc68e1e42411a14efcf23656e" .parse() .unwrap(); - let deposit_address = get_address(deposit_private_key); - + let deposit_address = get_address_from_private_key(deposit_private_key); Key { deposit_private_key, deposit_address, @@ -33,14 +40,35 @@ pub async fn get_dummy_state() -> State { amount: U256::try_from(BigUint::from(10u32).pow(18)).unwrap(), }); } + let settings = crate::utils::config::Settings::load().unwrap(); + // todo: set the rpc url from settings + let provider = get_provider("").unwrap(); + let int1 = Int1Contract::new( + provider.clone(), + settings.blockchain.int1_address.parse().unwrap(), + ); + let minter = MinterContract::new( + provider.clone(), + settings.blockchain.minter_address.parse().unwrap(), + ); + let token = TokenContract::new( + provider.clone(), + settings.blockchain.token_address.parse().unwrap(), + ); + let graph_client = GraphClient::new(provider.clone(), &settings.blockchain.graph_url, None); let state = State { deposit_hash_tree: DepositHashTree::new(), short_term_eligible_tree: eligible_tree.clone(), long_term_eligible_tree: eligible_tree.clone(), - last_tree_feched_at: NaiveDateTime::default(), + last_tree_fetched_at: NaiveDateTime::default(), last_deposit_synced_block: 0, prover: Prover::new(), + int1, + minter, + token, + provider, + graph_client, }; state } diff --git a/src/utils/config.rs b/src/utils/config.rs index 9c353c3..76771cc 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -43,6 +43,7 @@ pub struct Api { #[derive(Clone, Debug, Deserialize, Serialize)] pub struct Blockchain { pub chain_id: u64, + pub graph_url: String, pub int1_address: String, pub minter_address: String, pub token_address: String, @@ -64,7 +65,7 @@ pub struct Service { pub mining_min_cooldown_in_sec: u64, pub mining_max_cooldown_in_sec: u64, pub loop_cooldown_in_sec: u64, - pub high_gas_retry_inverval_in_sec: u64, + pub high_gas_retry_interval_in_sec: u64, } impl Settings { diff --git a/src/utils/derive_key.rs b/src/utils/derive_key.rs index 71d82cc..26bb6d5 100644 --- a/src/utils/derive_key.rs +++ b/src/utils/derive_key.rs @@ -1,15 +1,15 @@ -use ethers::{types::H256, utils::keccak256}; +use alloy::primitives::{keccak256, B256}; use intmax2_zkp::{ common::salt::Salt, ethereum_types::{bytes32::Bytes32, u256::U256, u32limb_trait::U32LimbTrait}, }; use std::str::FromStr; -pub fn derive_salt_from_private_key_nonce(private_key: H256, nonce: u64) -> Salt { +pub fn derive_salt_from_private_key_nonce(private_key: B256, nonce: u64) -> Salt { let deposit_salt_prefix = - H256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") + B256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") .unwrap(); - let prefixed_private_key = vec![deposit_salt_prefix.as_bytes(), private_key.as_bytes()] + let prefixed_private_key = vec![deposit_salt_prefix.to_vec(), private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); @@ -17,29 +17,30 @@ pub fn derive_salt_from_private_key_nonce(private_key: H256, nonce: u64) -> Salt vec![hashed_private_key.to_vec(), nonce.to_be_bytes().to_vec()] .concat() .to_vec(); - let salt_bytes = Bytes32::from_bytes_be(&keccak256(&hashed_private_key_with_nonce)); + let salt_bytes = + Bytes32::from_bytes_be(&keccak256(&hashed_private_key_with_nonce.to_vec()).to_vec()); Salt(salt_bytes.reduce_to_hash_out()) } /// Get the public key from a private key -pub fn derive_pubkey_from_private_key(private_key: H256) -> U256 { +pub fn derive_pubkey_from_private_key(private_key: B256) -> U256 { let deposit_salt_prefix = - H256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") + B256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") .unwrap(); - let prefixed_private_key = vec![deposit_salt_prefix.as_bytes(), private_key.as_bytes()] + let prefixed_private_key = vec![deposit_salt_prefix.to_vec(), private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); - let pubkey = U256::from_bytes_be(&hashed_private_key); + let pubkey = U256::from_bytes_be(&hashed_private_key.to_vec()); pubkey } -pub fn derive_deposit_private_key(withdrawal_private_key: H256, number: u64) -> H256 { +pub fn derive_deposit_private_key(withdrawal_private_key: B256, number: u64) -> B256 { // random prefix let prefix = - H256::from_str("0x80059c155bb5d835019afc9e979c30cabd98c9d2141e67562b7bd636d7005cbc") + B256::from_str("0x80059c155bb5d835019afc9e979c30cabd98c9d2141e67562b7bd636d7005cbc") .unwrap(); - let prefixed_private_key = vec![prefix.as_bytes(), withdrawal_private_key.as_bytes()] + let prefixed_private_key = vec![prefix.to_vec(), withdrawal_private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); @@ -47,6 +48,6 @@ pub fn derive_deposit_private_key(withdrawal_private_key: H256, number: u64) -> vec![hashed_private_key.to_vec(), number.to_be_bytes().to_vec()] .concat() .to_vec(); - let deposit_private_key = H256::from_slice(&keccak256(&hashed_private_key_with_number)); + let deposit_private_key = keccak256(&hashed_private_key_with_number); deposit_private_key } diff --git a/src/utils/env_config.rs b/src/utils/env_config.rs index 985bcac..4f2177e 100644 --- a/src/utils/env_config.rs +++ b/src/utils/env_config.rs @@ -1,7 +1,9 @@ -use std::{env, io::BufReader, path::PathBuf, str::FromStr as _}; - -use ethers::types::{Address, H256, U256}; +use alloy::primitives::{ + utils::{format_units, parse_units}, + Address, B256, U256, +}; use serde::{Deserialize, Serialize}; +use std::{env, io::BufReader, path::PathBuf, str::FromStr as _}; use super::{ config::Settings, @@ -28,7 +30,7 @@ pub struct EnvConfig { pub max_gas_price: U256, pub encrypt: bool, pub withdrawal_address: Address, - pub withdrawal_private_key: Option, + pub withdrawal_private_key: Option, pub encrypted_withdrawal_private_key: Option>, pub mining_unit: U256, pub mining_times: u64, @@ -125,7 +127,7 @@ impl EnvConfig { fn to_string(&self) -> anyhow::Result { let network = format!("{}", self.network); - let max_gas_price = ethers::utils::format_units(self.max_gas_price, "gwei").unwrap(); + let max_gas_price = format_units(self.max_gas_price, "gwei").unwrap(); let encrypt = if self.withdrawal_private_key.is_some() { "false".to_string() } else if self.encrypted_withdrawal_private_key.is_some() { @@ -139,7 +141,7 @@ impl EnvConfig { .encrypted_withdrawal_private_key .clone() .map(|key| hex::encode(key)); - let mining_unit = ethers::utils::format_units(self.mining_unit, "ether").unwrap(); + let mining_unit = format_units(self.mining_unit, "ether").unwrap(); let mining_times = self.mining_times.to_string(); Ok(EnvConfigString { network, @@ -157,7 +159,7 @@ impl EnvConfig { fn from_string(value: &EnvConfigString) -> anyhow::Result { let network = Network::from_str(&value.network).map_err(|_| anyhow::anyhow!("Invalid network"))?; - let max_gas_price: U256 = ethers::utils::parse_units(value.max_gas_price.clone(), "gwei") + let max_gas_price: U256 = parse_units(&value.max_gas_price, "gwei") .map_err(|_| anyhow::anyhow!("failed to parse MAX_GAS_PRICE"))? .into(); let encrypt = if value.encrypt == "true" { @@ -179,7 +181,7 @@ impl EnvConfig { .map_err(|_| anyhow::anyhow!("failed to parse WITHDRAWAL_ADDRESS"))?; let withdrawal_private_key = if !encrypt { - let withdrawal_private_key: H256 = value + let withdrawal_private_key: B256 = value .withdrawal_private_key .as_ref() .unwrap() @@ -199,7 +201,7 @@ impl EnvConfig { None }; - let mining_unit: U256 = ethers::utils::parse_units(value.mining_unit.clone(), "ether") + let mining_unit: U256 = parse_units(&value.mining_unit, "ether") .map_err(|_| anyhow::anyhow!("failed to parse MINING_UNIT"))? .into(); let mining_times: u64 = value @@ -237,9 +239,14 @@ struct EnvConfigString { #[cfg(test)] mod tests { - use ethers::{types::U256, utils::format_units}; + use alloy::primitives::{ + utils::{format_units, parse_units}, + B256, U256, + }; - use crate::{external_api::contracts::utils::get_address, utils::network::Network}; + use crate::{ + external_api::contracts::utils::get_address_from_private_key, utils::network::Network, + }; #[test] fn load_env_test() { @@ -250,17 +257,17 @@ mod tests { #[test] fn test_env_config_string_conversion() { - let key = ethers::types::H256::random(); - let address = get_address(key); + let key = B256::random(); + let address = get_address_from_private_key(key); let env_config = super::EnvConfig { - network: Network::Holesky, + network: Network::BaseSepolia, rpc_url: "http://localhost:8545".to_string(), - max_gas_price: 30_000_000_000u64.into(), + max_gas_price: U256::from(30_000_000_000u64), encrypt: false, withdrawal_address: address, withdrawal_private_key: Some(key), encrypted_withdrawal_private_key: None, - mining_unit: 100_000_000_000_000_000u128.into(), + mining_unit: U256::from(100_000_000_000_000_000u128), mining_times: 10, }; let env_config_string = env_config.to_string().unwrap(); @@ -270,17 +277,17 @@ mod tests { #[test] fn test_export_and_import_config() { - let key = ethers::types::H256::random(); - let address = get_address(key); + let key = B256::random(); + let address = get_address_from_private_key(key); let env_config = super::EnvConfig { - network: Network::Holesky, + network: Network::BaseSepolia, rpc_url: "http://localhost:8545".to_string(), - max_gas_price: 30_000_000_000u64.into(), + max_gas_price: U256::from(30_000_000_000u64), withdrawal_address: address, encrypt: false, withdrawal_private_key: Some(key), encrypted_withdrawal_private_key: None, - mining_unit: 100_000_000_000_000_000u128.into(), + mining_unit: U256::from(100_000_000_000_000_000u128), mining_times: 10, }; env_config.export_to_env().unwrap(); @@ -293,9 +300,7 @@ mod tests { fn mini_test() { let amount = U256::from(100000000000000000u128); let amount_str: String = format_units(amount, "gwei").unwrap(); - let recover: U256 = ethers::utils::parse_units(amount_str, "gwei") - .unwrap() - .into(); + let recover: U256 = parse_units(&amount_str, "gwei").unwrap().into(); assert_eq!(amount, recover); } } diff --git a/src/utils/env_validation.rs b/src/utils/env_validation.rs index 431330c..b8dc810 100644 --- a/src/utils/env_validation.rs +++ b/src/utils/env_validation.rs @@ -1,9 +1,14 @@ +use alloy::{ + primitives::{utils::parse_ether, U256}, + providers::{Provider, ProviderBuilder}, +}; +use reqwest::Url; + use super::{ config::Settings, env_config::EnvConfig, network::{get_network, Network}, }; -use ethers::{providers::Middleware as _, types::U256}; pub fn get_allowed_mining_times() -> Vec { let network = get_network(); @@ -26,8 +31,8 @@ pub async fn validate_env_config(env: &EnvConfig) -> anyhow::Result<()> { } fn validate_mining_unit(mining_unit: U256) -> anyhow::Result<()> { - let one_tenth: U256 = ethers::utils::parse_ether("0.1").unwrap().into(); - let one: U256 = ethers::utils::parse_ether("1").unwrap().into(); + let one_tenth: U256 = parse_ether("0.1").unwrap().into(); + let one: U256 = parse_ether("1").unwrap().into(); if mining_unit != one_tenth && mining_unit != one { anyhow::bail!("MINING_UNIT environment variable must be either '1' or '0.1'"); } @@ -46,10 +51,14 @@ fn validate_mining_times(mining_times: u64) -> anyhow::Result<()> { } pub async fn validate_rpc_url(rpc_url: &str) -> anyhow::Result<()> { - let client = ethers::providers::Provider::::try_from(rpc_url)?; - let chain_id = client.get_chainid().await?; + let rpc_url: Url = rpc_url + .parse() + .map_err(|e| anyhow::anyhow!("Failed to parse RPC URL {}: {}", rpc_url, e))?; + + let client = ProviderBuilder::new().connect_http(rpc_url); + let chain_id = client.get_chain_id().await?; let setting = Settings::load()?; - if chain_id != setting.blockchain.chain_id.into() { + if chain_id != setting.blockchain.chain_id { return Err(anyhow::anyhow!( "RPC URL chain id {} does not match the expected chain id {}", chain_id, diff --git a/src/utils/errors.rs b/src/utils/errors.rs index e5238a6..7cf182c 100644 --- a/src/utils/errors.rs +++ b/src/utils/errors.rs @@ -1,28 +1,17 @@ -use std::fmt; - -#[derive(Debug)] +#[derive(Debug, thiserror::Error)] pub enum CLIError { + #[error("Version error: {0}")] VersionError(String), + #[error("IO error: {0}")] IoError(std::io::Error), + #[error("Environment variable error: {0}")] EnvError(String), + #[error("Internal error: {0}")] InternalError(String), + #[error("Balance error: {0}")] BalanceError(String), + #[error("Parse error: {0}")] ParseError(String), + #[error("Network error: {0}")] NetworkError(String), } - -impl fmt::Display for CLIError { - fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { - match self { - CLIError::VersionError(msg) => write!(f, "Version error: {}", msg), - CLIError::IoError(err) => write!(f, "IO error: {}", err), - CLIError::EnvError(msg) => write!(f, "Environment variable error: {}", msg), - CLIError::InternalError(msg) => write!(f, "Internal error: {}", msg), - CLIError::BalanceError(msg) => write!(f, "Balance error: {}", msg), - CLIError::ParseError(msg) => write!(f, "Parse error: {}", msg), - CLIError::NetworkError(msg) => write!(f, "Network error: {}", msg), - } - } -} - -impl std::error::Error for CLIError {} diff --git a/src/utils/network.rs b/src/utils/network.rs index fc5c1a7..3b219a0 100644 --- a/src/utils/network.rs +++ b/src/utils/network.rs @@ -1,7 +1,6 @@ -use std::{env, fmt::Display, str::FromStr}; - use serde::{Deserialize, Serialize}; -use strum::EnumIter; +use std::{env, fmt::Display, str::FromStr}; +use strum_macros::EnumIter; #[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, EnumIter)] pub enum Network { @@ -56,6 +55,3 @@ pub fn get_network() -> Network { pub fn is_legacy() -> bool { get_network() == Network::Mainnet || get_network() == Network::Holesky } - -#[cfg(test)] -mod tests {} From deb207b6a66482b4ea382c8399f93471b4b4ea52 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 14:51:07 +0700 Subject: [PATCH 02/27] fix: fix sync test --- Cargo.lock | 54 +++++++++++++++++------ Cargo.toml | 1 + src/services/assets_status.rs | 6 ++- src/services/claim/claim.rs | 47 ++++++++++---------- src/services/mining/withdrawal/mod.rs | 32 ++++++++------ src/services/sync.rs | 62 ++++++++++++++------------- src/test/mod.rs | 5 +-- 7 files changed, 124 insertions(+), 83 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 58111ab..acab63a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1756,14 +1756,14 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.11.5" +version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13fa619b91fb2381732789fc5de83b45675e882f66623b7d8cb4f643017018d" +checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ "anstream", "anstyle", "env_filter", - "humantime", + "jiff", "log", ] @@ -2251,12 +2251,6 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - [[package]] name = "hyper" version = "0.14.30" @@ -2533,6 +2527,30 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" +[[package]] +name = "jiff" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a194df1107f33c79f4f93d02c80798520551949d59dfad22b6157048a88cca93" +dependencies = [ + "jiff-static", + "log", + "portable-atomic", + "portable-atomic-util", + "serde", +] + +[[package]] +name = "jiff-static" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c6e1db7ed32c6c71b759497fae34bf7933636f75a251b9e736555da426f6442" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "js-sys" version = "0.3.70" @@ -2711,6 +2729,7 @@ dependencies = [ "dialoguer", "dirs", "dotenv", + "env_logger", "futures", "hex", "intmax2-zkp", @@ -3310,9 +3329,18 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.9.0" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "portable-atomic-util" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc9c68a3f6da06753e9335d63e27f6b9754dd1920d941135b7ea8224f141adb2" +checksum = "d8a2f0d8d040d7848a709caf78912debcc3f33ee4b3cac47d73d1e1069e83507" +dependencies = [ + "portable-atomic", +] [[package]] name = "powerfmt" @@ -3427,9 +3455,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" dependencies = [ "proc-macro2", ] diff --git a/Cargo.toml b/Cargo.toml index 730f77d..7fac34c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -43,3 +43,4 @@ tower = "0.5.2" serde_qs = "0.15.0" futures = "0.3.31" serde_with = "3.12.0" +env_logger = "0.11.8" diff --git a/src/services/assets_status.rs b/src/services/assets_status.rs index 2a2f29e..4777a07 100644 --- a/src/services/assets_status.rs +++ b/src/services/assets_status.rs @@ -225,10 +225,14 @@ impl AssetsStatus { #[cfg(test)] mod tests { + use crate::utils::env_config::EnvConfig; + #[tokio::test] #[ignore] async fn test_assets_status() { - let mut state = crate::test::get_dummy_state().await; + dotenv::dotenv().ok(); + let env_config = EnvConfig::import_from_env().unwrap(); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; state.sync_trees().await.unwrap(); let dummy_key = crate::test::get_dummy_keys(); diff --git a/src/services/claim/claim.rs b/src/services/claim/claim.rs index 6656dcd..a342c1a 100644 --- a/src/services/claim/claim.rs +++ b/src/services/claim/claim.rs @@ -160,26 +160,27 @@ async fn from_step5(state: &State, key: &Key) -> anyhow::Result<()> { Ok(()) } -// #[cfg(test)] -// mod tests { -// use crate::test::{get_dummy_keys, get_dummy_state}; - -// use super::*; - -// #[tokio::test] -// #[ignore] -// async fn test_claim_task() { -// let dummy_key = get_dummy_keys(); - -// let mut state = get_dummy_state().await; -// let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); - -// let is_short_term = true; -// let not_claimed_events = assets_status.get_not_claimed_events(is_short_term); -// assert!(not_claimed_events.len() > 0); - -// single_claim_task(&mut state, &dummy_key, is_short_term, ¬_claimed_events) -// .await -// .unwrap(); -// } -// } +#[cfg(test)] +mod tests { + use crate::{test::get_dummy_keys, utils::env_config::EnvConfig}; + + use super::*; + + #[tokio::test] + #[ignore] + async fn test_claim_task() { + dotenv::dotenv().ok(); + let env_config = EnvConfig::import_from_env().unwrap(); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; + let dummy_key = get_dummy_keys(); + let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); + + let is_short_term = true; + let not_claimed_events = assets_status.get_not_claimed_events(is_short_term); + assert!(not_claimed_events.len() > 0); + + single_claim_task(&mut state, &dummy_key, is_short_term, ¬_claimed_events) + .await + .unwrap(); + } +} diff --git a/src/services/mining/withdrawal/mod.rs b/src/services/mining/withdrawal/mod.rs index 74a6ecb..d33a6e4 100644 --- a/src/services/mining/withdrawal/mod.rs +++ b/src/services/mining/withdrawal/mod.rs @@ -142,27 +142,31 @@ async fn from_step5(state: &State, _key: &Key) -> anyhow::Result<()> { #[cfg(test)] mod tests { - use crate::test::{get_dummy_keys, get_dummy_state}; + use crate::{test::get_dummy_keys, utils::env_config::EnvConfig}; - // #[tokio::test] - // #[ignore] - // async fn test_withdrawal() { - // let mut state = get_dummy_state().await; + #[tokio::test] + #[ignore] + async fn test_withdrawal() { + dotenv::dotenv().ok(); + let env_config = EnvConfig::import_from_env().unwrap(); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; - // let dummy_key = get_dummy_keys(); - // let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); - // let events = assets_status.get_not_withdrawn_events(); - // assert!(events.len() > 0); + let dummy_key = get_dummy_keys(); + let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); + let events = assets_status.get_not_withdrawn_events(); + assert!(events.len() > 0); - // super::withdrawal_task(&mut state, &dummy_key, events[0].clone()) - // .await - // .unwrap(); - // } + super::withdrawal_task(&mut state, &dummy_key, events[0].clone()) + .await + .unwrap(); + } #[tokio::test] #[ignore] async fn test_resume_withdrawal() { - let mut state = get_dummy_state().await; + dotenv::dotenv().ok(); + let env_config = EnvConfig::import_from_env().unwrap(); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; state.sync_trees().await.unwrap(); let dummy_key = get_dummy_keys(); super::resume_withdrawal_task(&state, &dummy_key) diff --git a/src/services/sync.rs b/src/services/sync.rs index cc6975c..59ba421 100644 --- a/src/services/sync.rs +++ b/src/services/sync.rs @@ -179,8 +179,6 @@ async fn sync_to_latest_deposit_tree( from_block: u64, ) -> anyhow::Result { log::info!("Syncing deposit tree from block {}", from_block); - - // todo! let next_deposit_index = deposit_hash_tree.tree.len(); let events = graph_client .get_deposit_leaf_inserted_event(next_deposit_index as u32) @@ -226,30 +224,36 @@ async fn sync_to_latest_deposit_tree( Ok(to_block_number) } -// #[cfg(test)] -// mod tests { -// use crate::utils::{ -// deposit_hash_tree::DepositHashTree, eligible_tree_with_map::EligibleTreeWithMap, -// }; - -// #[tokio::test] -// #[ignore] -// async fn sync_to_latest_deposit_tree() { -// let mut deposit_hash_tree = DepositHashTree::new(); -// let mut short_term_eligible_tree = EligibleTreeWithMap::new(); -// let mut long_term_eligible_tree = EligibleTreeWithMap::new(); -// let mut last_deposit_block_number = 0; -// let mut last_update = chrono::NaiveDateTime::default(); -// super::sync_trees( -// &mut last_deposit_block_number, -// &mut last_update, -// &mut deposit_hash_tree, -// &mut short_term_eligible_tree, -// &mut long_term_eligible_tree, -// ) -// .await -// .unwrap(); - -// dbg!(deposit_hash_tree.tree.len()); -// } -// } +#[cfg(test)] +mod tests { + use crate::utils::env_config::EnvConfig; + + #[tokio::test] + #[ignore] + async fn sync_to_latest_deposit_tree() { + dotenv::dotenv().ok(); + let _ = env_logger::builder() + .filter_level(log::LevelFilter::Info) + .try_init(); + + let env_config = EnvConfig::import_from_env().unwrap(); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; + + let mut last_deposit_block_number = 0; + let mut last_update = chrono::NaiveDateTime::default(); + super::sync_trees( + &state.graph_client, + &state.int1, + &state.minter, + &mut last_deposit_block_number, + &mut last_update, + &mut state.deposit_hash_tree, + &mut state.short_term_eligible_tree, + &mut state.long_term_eligible_tree, + ) + .await + .unwrap(); + + dbg!(state.deposit_hash_tree.tree.len()); + } +} diff --git a/src/test/mod.rs b/src/test/mod.rs index 18c3aea..89020f3 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -32,7 +32,7 @@ pub fn get_dummy_keys() -> Key { } } -pub async fn get_dummy_state() -> State { +pub async fn get_dummy_state(rpc_url: &str) -> State { let mut eligible_tree = EligibleTreeWithMap::new(); for i in 0..100 { eligible_tree.push(EligibleLeaf { @@ -41,8 +41,7 @@ pub async fn get_dummy_state() -> State { }); } let settings = crate::utils::config::Settings::load().unwrap(); - // todo: set the rpc url from settings - let provider = get_provider("").unwrap(); + let provider = get_provider(rpc_url).unwrap(); let int1 = Int1Contract::new( provider.clone(), settings.blockchain.int1_address.parse().unwrap(), From 9e55459b79b484b5088d4af97441e5344947bd89 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 17:48:17 +0700 Subject: [PATCH 03/27] chore: delete gas server --- config/config.base-sepolia.toml | 1 - config/config.base.toml | 1 - config/config.mainnet.toml | 1 - src/services/sync.rs | 2 +- src/utils/config.rs | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/config/config.base-sepolia.toml b/config/config.base-sepolia.toml index 25f06f6..6289009 100644 --- a/config/config.base-sepolia.toml +++ b/config/config.base-sepolia.toml @@ -4,7 +4,6 @@ withdrawal_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz claim_gnark_prover_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" withdrawal_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/withdrawal" circulation_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining" -gas_server_url = "https://base-sepolia.v1.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate" tree_data_repository = "InternetMaximalism/intmax2-v1-mining-mock" tree_data_directory = "base-sepolia-data" tree_data_branch = "main" diff --git a/config/config.base.toml b/config/config.base.toml index 875052d..da7e2fc 100644 --- a/config/config.base.toml +++ b/config/config.base.toml @@ -4,7 +4,6 @@ withdrawal_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1 claim_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" withdrawal_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/withdrawal" circulation_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining" -gas_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining/gas-fee/estimate" tree_data_repository="InternetMaximalism/intmax2-mining" tree_data_directory="base-data" tree_data_branch="main" diff --git a/config/config.mainnet.toml b/config/config.mainnet.toml index 88ea584..e5c5920 100644 --- a/config/config.mainnet.toml +++ b/config/config.mainnet.toml @@ -4,7 +4,6 @@ withdrawal_gnark_prover_url = "https://v1.mining-gateway.intmax.xyz/v1/gnark-wit claim_gnark_prover_url = "https://v1.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" withdrawal_server_url = "https://v1.mining-gateway.intmax.xyz/v1/withdrawal" circulation_server_url = "https://v1.mining-gateway.intmax.xyz/v1/mining" -gas_server_url = "" tree_data_repository = "InternetMaximalism/intmax2-mining" tree_data_directory = "data" tree_data_branch = "main" diff --git a/src/services/sync.rs b/src/services/sync.rs index 59ba421..4f71165 100644 --- a/src/services/sync.rs +++ b/src/services/sync.rs @@ -103,7 +103,7 @@ pub async fn sync_trees( match update().await { Ok(()) => break, Err(e) => { - warn!("Feched tree is invalid in try {}: {}", try_number, e); + warn!("Fetched tree is invalid in try {}: {}", try_number, e); try_number += 1; sleep_for(30); } diff --git a/src/utils/config.rs b/src/utils/config.rs index 76771cc..467ded8 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -31,7 +31,6 @@ pub struct Api { pub withdrawal_gnark_prover_url: String, pub claim_gnark_prover_url: String, pub circulation_server_url: String, - pub gas_server_url: String, pub tree_data_repository: String, pub tree_data_directory: String, pub tree_data_branch: String, From 67c85e2d32135d39b5c5f5fc7b149e812e710b39 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 18:25:59 +0700 Subject: [PATCH 04/27] fix: replace get account with get transaction count for compatibility reason --- src/external_api/contracts/int1.rs | 17 ----------------- src/services/mining/mod.rs | 6 ++++-- src/services/utils.rs | 5 ++--- 3 files changed, 6 insertions(+), 22 deletions(-) diff --git a/src/external_api/contracts/int1.rs b/src/external_api/contracts/int1.rs index af44893..101b9b4 100644 --- a/src/external_api/contracts/int1.rs +++ b/src/external_api/contracts/int1.rs @@ -138,20 +138,3 @@ impl Int1Contract { Ok(tx_hash) } } - -// let deposit_address = key.deposit_address; -// let nonce = get_account_nonce(deposit_address).await?; -// let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, nonce); -// let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); -// let pubkey_salt_hash: [u8; 32] = get_pubkey_salt_hash(pubkey, salt) -// .to_bytes_be() -// .try_into() -// .unwrap(); - -// let deposit_address = key.deposit_address; - -// await_until_low_gas_price().await?; -// let int1 = get_int1_contract_with_signer(key.deposit_private_key).await?; -// let mut tx = int1 -// .deposit_native_token(pubkey_salt_hash) -// .value(mining_unit); diff --git a/src/services/mining/mod.rs b/src/services/mining/mod.rs index f8ca7b0..e26f137 100644 --- a/src/services/mining/mod.rs +++ b/src/services/mining/mod.rs @@ -84,8 +84,10 @@ pub async fn mining_task( if new_deposit { sleep_before_deposit(&state.graph_client, key.withdrawal_address).await?; let deposit_address = key.deposit_address; - let account = state.provider.get_account(deposit_address).await?; - let nonce = account.nonce; + let nonce = state + .provider + .get_transaction_count(deposit_address) + .await?; let salt = derive_salt_from_private_key_nonce(key.deposit_private_key, nonce); let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); let pubkey_salt_hash = get_pubkey_salt_hash(pubkey, salt); diff --git a/src/services/utils.rs b/src/services/utils.rs index adc1bb7..9c53e6e 100644 --- a/src/services/utils.rs +++ b/src/services/utils.rs @@ -67,9 +67,8 @@ pub async fn is_address_used( provider: &NormalProvider, deposit_address: Address, ) -> anyhow::Result { - let account = provider.get_account(deposit_address).await?; - let nonce = account.nonce; - let balance = account.balance; + let nonce = provider.get_transaction_count(deposit_address).await?; + let balance = provider.get_balance(deposit_address).await?; Ok(nonce > 0 || balance > U256::default()) } From e1c376e1d3aac6d0e7eba6169da33ca1505c3b7c Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 20:50:06 +0700 Subject: [PATCH 05/27] chore: delte last deposit block number because it's not used anymore --- src/services/sync.rs | 39 +++++++++++++++------------------------ src/state/state.rs | 3 --- src/test/mod.rs | 1 - 3 files changed, 15 insertions(+), 28 deletions(-) diff --git a/src/services/sync.rs b/src/services/sync.rs index 4f71165..8b333f1 100644 --- a/src/services/sync.rs +++ b/src/services/sync.rs @@ -12,7 +12,6 @@ use crate::{ time::sleep_for, }, }; - use anyhow::ensure; use chrono::{NaiveDateTime, Utc}; use log::{info, warn}; @@ -37,7 +36,6 @@ pub async fn sync_trees( graph_client: &GraphClient, int1: &Int1Contract, minter: &MinterContract, - last_deposit_block_number: &mut u64, last_update: &mut NaiveDateTime, deposit_hash_tree: &mut DepositHashTree, short_term_eligible_tree: &mut EligibleTreeWithMap, @@ -80,7 +78,6 @@ pub async fn sync_trees( new_block_number ); *deposit_hash_tree = new_deposit_hash_tree; - *last_deposit_block_number = new_block_number; } if let Some(bin_short_term_eligible_tree) = bin_short_term_eligible_tree { *short_term_eligible_tree = parse_and_validate_bin_eligible_tree( @@ -111,16 +108,11 @@ pub async fn sync_trees( } } // sync deposit tree only - *last_deposit_block_number = sync_to_latest_deposit_tree( - graph_client, - int1, - deposit_hash_tree, - *last_deposit_block_number, - ) - .await - .map_err(|e| { - Error::SyncDepositTreeFromEventsError(format!("Failed to sync deposit tree: {}", e)) - })?; + sync_to_latest_deposit_tree(graph_client, int1, deposit_hash_tree) + .await + .map_err(|e| { + Error::SyncDepositTreeFromEventsError(format!("Failed to sync deposit tree: {}", e)) + })?; *last_update = now; // update last_update to now Ok(()) } @@ -132,7 +124,6 @@ async fn parse_and_validate_bin_deposit_tree( let deposit_tree_info: DepositTreeInfo = bin_deposit_tree .try_into() .map_err(|e: anyhow::Error| Error::TreeDeserializationError(e.to_string()))?; - // check roots let deposit_root_exists = int1 .get_deposit_root_exits(deposit_tree_info.root) .await @@ -176,16 +167,13 @@ async fn sync_to_latest_deposit_tree( graph_client: &GraphClient, int1: &Int1Contract, deposit_hash_tree: &mut DepositHashTree, - from_block: u64, -) -> anyhow::Result { - log::info!("Syncing deposit tree from block {}", from_block); +) -> anyhow::Result<()> { let next_deposit_index = deposit_hash_tree.tree.len(); let events = graph_client .get_deposit_leaf_inserted_event(next_deposit_index as u32) .await?; info!( - "Syncing deposit tree from block {}, got {} events. Latest deposit_index={}", - from_block, + "Syncing deposit tree, got {} events. Latest deposit_index={}", events.len(), events.last().map(|event| event.deposit_index).unwrap_or(0) ); @@ -195,7 +183,6 @@ async fn sync_to_latest_deposit_tree( .collect::>(); to_append.sort_by_key(|event| event.deposit_index); - let mut to_block_number = from_block; for event in to_append { ensure!( event.deposit_index as usize == deposit_hash_tree.tree.len(), @@ -204,9 +191,13 @@ async fn sync_to_latest_deposit_tree( event.deposit_index ); deposit_hash_tree.push(event.deposit_hash); - to_block_number = event.block_number; } let local_root = deposit_hash_tree.get_root(); + log::info!( + "Local deposit root: {}, total leaves: {}", + local_root, + deposit_hash_tree.tree.len() + ); let is_exists = int1.get_deposit_root_exits(local_root).await?; ensure!( is_exists, @@ -221,7 +212,7 @@ async fn sync_to_latest_deposit_tree( local_root, current_root ); } - Ok(to_block_number) + Ok(()) } #[cfg(test)] @@ -237,15 +228,15 @@ mod tests { .try_init(); let env_config = EnvConfig::import_from_env().unwrap(); + dbg!(&env_config); + let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; - let mut last_deposit_block_number = 0; let mut last_update = chrono::NaiveDateTime::default(); super::sync_trees( &state.graph_client, &state.int1, &state.minter, - &mut last_deposit_block_number, &mut last_update, &mut state.deposit_hash_tree, &mut state.short_term_eligible_tree, diff --git a/src/state/state.rs b/src/state/state.rs index c9b2751..8e91892 100644 --- a/src/state/state.rs +++ b/src/state/state.rs @@ -26,7 +26,6 @@ pub struct State { pub short_term_eligible_tree: EligibleTreeWithMap, pub long_term_eligible_tree: EligibleTreeWithMap, pub last_tree_fetched_at: NaiveDateTime, - pub last_deposit_synced_block: u64, pub prover: Prover, // block chain state @@ -61,7 +60,6 @@ impl State { short_term_eligible_tree: EligibleTreeWithMap::new(), long_term_eligible_tree: EligibleTreeWithMap::new(), last_tree_fetched_at: NaiveDateTime::default(), - last_deposit_synced_block: 0, prover: Prover::new(), int1, minter, @@ -76,7 +74,6 @@ impl State { &self.graph_client, &self.int1, &self.minter, - &mut self.last_deposit_synced_block, &mut self.last_tree_fetched_at, &mut self.deposit_hash_tree, &mut self.short_term_eligible_tree, diff --git a/src/test/mod.rs b/src/test/mod.rs index 89020f3..9c2cce0 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -61,7 +61,6 @@ pub async fn get_dummy_state(rpc_url: &str) -> State { short_term_eligible_tree: eligible_tree.clone(), long_term_eligible_tree: eligible_tree.clone(), last_tree_fetched_at: NaiveDateTime::default(), - last_deposit_synced_block: 0, prover: Prover::new(), int1, minter, From dcbebbd6f3fd3753d0597b9636c25d2f1180fe81 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 20:53:49 +0700 Subject: [PATCH 06/27] chore: fix clippy --- src/cli/configure.rs | 26 ++++++++++++------------ src/cli/interactive.rs | 6 +++--- src/external_api/contracts/int1.rs | 4 ++-- src/external_api/contracts/minter.rs | 4 ++-- src/external_api/github.rs | 2 +- src/external_api/graph/client.rs | 4 ++-- src/external_api/intmax/circulation.rs | 2 +- src/external_api/intmax/gnark.rs | 4 ++-- src/external_api/intmax/withdrawal.rs | 4 ++-- src/external_api/query.rs | 2 +- src/main.rs | 4 ++-- src/services/assets_status.rs | 4 ++-- src/services/claim/claim.rs | 2 +- src/services/claim/mod.rs | 3 ++- src/services/claim/witness_generation.rs | 4 ++-- src/services/mining/mod.rs | 2 +- src/services/mining/withdrawal/mod.rs | 4 ++-- src/services/utils.rs | 8 ++++---- src/state/mod.rs | 1 + src/state/prover.rs | 6 ++++++ src/state/state.rs | 2 +- src/test/mod.rs | 6 +++--- src/utils/bin_parser.rs | 4 ++-- src/utils/config.rs | 6 +++--- src/utils/deposit_hash_tree.rs | 13 ++++++++---- src/utils/derive_key.rs | 18 ++++++++-------- src/utils/eligible_tree_with_map.rs | 6 ++++++ src/utils/encryption.rs | 2 +- src/utils/env_config.rs | 4 ++-- src/utils/env_validation.rs | 4 ++-- src/utils/network.rs | 7 ++----- 31 files changed, 92 insertions(+), 76 deletions(-) diff --git a/src/cli/configure.rs b/src/cli/configure.rs index 9d7cb7f..74c5235 100644 --- a/src/cli/configure.rs +++ b/src/cli/configure.rs @@ -147,7 +147,7 @@ async fn input_rpc_url() -> anyhow::Result { Ok(_) => break Ok(rpc_url), Err(e) => { let colored_message = - format!("{}: {}", style("Invalid RPC URL").red(), e.to_string()); + format!("{}: {}", style("Invalid RPC URL").red(), e); println!("{}", colored_message); } } @@ -160,23 +160,23 @@ async fn input_alchemy_url() -> anyhow::Result { Network::Localnet => bail!("Localnet is not supported"), Network::Sepolia => { let alchemy_url = format!("https://eth-sepolia.g.alchemy.com/v2/{}", alchemy_api_key); - return Ok(alchemy_url); + Ok(alchemy_url) } Network::Holesky => { let alchemy_url = format!("https://eth-holesky.g.alchemy.com/v2/{}", alchemy_api_key); - return Ok(alchemy_url); + Ok(alchemy_url) } Network::BaseSepolia => { let alchemy_url = format!("https://base-sepolia.g.alchemy.com/v2/{}", alchemy_api_key); - return Ok(alchemy_url); + Ok(alchemy_url) } Network::Mainnet => { let alchemy_url = format!("https://eth-mainnet.g.alchemy.com/v2/{}", alchemy_api_key); - return Ok(alchemy_url); + Ok(alchemy_url) } Network::Base => { let alchemy_url = format!("https://base-mainnet.g.alchemy.com/v2/{}", alchemy_api_key); - return Ok(alchemy_url); + Ok(alchemy_url) } } } @@ -189,23 +189,23 @@ async fn input_infura_url() -> anyhow::Result { Network::Localnet => bail!("Localnet is not supported"), Network::Sepolia => { let infura_url = format!("https://sepolia.infura.io/v3/{}", infura_project_id); - return Ok(infura_url); + Ok(infura_url) } Network::Holesky => { let infura_url = format!("https://holesky.infura.io/v3/{}", infura_project_id); - return Ok(infura_url); + Ok(infura_url) } Network::BaseSepolia => { let infura_url = format!("https://base-sepolia.infura.io/v3/{}", infura_project_id); - return Ok(infura_url); + Ok(infura_url) } Network::Mainnet => { let infura_url = format!("https://mainnet.infura.io/v3/{}", infura_project_id); - return Ok(infura_url); + Ok(infura_url) } Network::Base => { let infura_url = format!("https://base-mainnet.infura.io/v3/{}", infura_project_id); - return Ok(infura_url); + Ok(infura_url) } } } @@ -376,13 +376,13 @@ fn validate_private_key_with_duplication_check( } Ok(()) } - Err(_) => return Err("Invalid private key"), + Err(_) => Err("Invalid private key"), } } pub fn recover_withdrawal_private_key(config: &EnvConfig) -> anyhow::Result { let key = if !config.encrypt { - config.withdrawal_private_key.clone().unwrap() + config.withdrawal_private_key.unwrap() } else { loop { let password = Password::new().with_prompt("Password").interact()?; diff --git a/src/cli/interactive.rs b/src/cli/interactive.rs index c3818bf..0221e2d 100644 --- a/src/cli/interactive.rs +++ b/src/cli/interactive.rs @@ -27,7 +27,9 @@ fn address_duplication_check() -> anyhow::Result<()> { for network in Network::iter() { for config_index in EnvConfig::get_existing_indices(network) { let config = EnvConfig::load_from_file(network, config_index)?; - if address_to_network.get(&config.withdrawal_address).is_some() { + if let std::collections::hash_map::Entry::Vacant(e) = address_to_network.entry(config.withdrawal_address) { + e.insert((network, config_index)); + } else { let (duplicated_network, duplicated_index) = address_to_network.get(&config.withdrawal_address).unwrap(); anyhow::bail!( @@ -38,8 +40,6 @@ fn address_duplication_check() -> anyhow::Result<()> { duplicated_network, duplicated_index, ); - } else { - address_to_network.insert(config.withdrawal_address, (network, config_index)); } } } diff --git a/src/external_api/contracts/int1.rs b/src/external_api/contracts/int1.rs index 101b9b4..fab5a06 100644 --- a/src/external_api/contracts/int1.rs +++ b/src/external_api/contracts/int1.rs @@ -40,7 +40,7 @@ impl Int1Contract { pub async fn get_deposit_root(&self) -> Result { let int1 = Int1::new(self.address, self.provider.clone()); let root = int1.getDepositRoot().call().await?; - Ok(Bytes32::from_bytes_be(&root.to_vec())) + Ok(Bytes32::from_bytes_be(root.as_ref())) } pub async fn get_deposit_root_exits(&self, root: Bytes32) -> Result { @@ -54,7 +54,7 @@ impl Int1Contract { let int1 = Int1::new(self.address, self.provider.clone()); let data = int1.getDepositData(U256::from(deposit_id)).call().await?; let data = DepositData { - deposit_hash: Bytes32::from_bytes_be(&data.depositHash.to_vec()), + deposit_hash: Bytes32::from_bytes_be(data.depositHash.as_ref()), sender: data.sender, is_rejected: data.isRejected, }; diff --git a/src/external_api/contracts/minter.rs b/src/external_api/contracts/minter.rs index 8aca6e8..4ecefcc 100644 --- a/src/external_api/contracts/minter.rs +++ b/src/external_api/contracts/minter.rs @@ -34,13 +34,13 @@ impl MinterContract { pub async fn get_short_term_eligible_root(&self) -> Result { let minter = MinterV1::new(self.address, self.provider.clone()); let root = minter.shortTermEligibleTreeRoot().call().await?; - Ok(Bytes32::from_bytes_be(&root.to_vec())) + Ok(Bytes32::from_bytes_be(root.as_ref())) } pub async fn get_long_term_eligible_root(&self) -> Result { let minter = MinterV1::new(self.address, self.provider.clone()); let root = minter.longTermEligibleTreeRoot().call().await?; - Ok(Bytes32::from_bytes_be(&root.to_vec())) + Ok(Bytes32::from_bytes_be(root.as_ref())) } pub async fn get_short_term_claim_nullifier_exists( diff --git a/src/external_api/github.rs b/src/external_api/github.rs index 2167966..4d8f5b7 100644 --- a/src/external_api/github.rs +++ b/src/external_api/github.rs @@ -143,7 +143,7 @@ fn filter_file( if latest_file.is_none() || latest_date <= prev_date { return (prev_date, None); // no new file } - return (latest_date, latest_file); + (latest_date, latest_file) } async fn fetch_content(client: &reqwest::Client, file: &Value) -> Result, Error> { diff --git a/src/external_api/graph/client.rs b/src/external_api/graph/client.rs index 6f3f52e..180338e 100644 --- a/src/external_api/graph/client.rs +++ b/src/external_api/graph/client.rs @@ -173,9 +173,9 @@ impl GraphClient { let mut depositeds = self.get_deposited_event_by_sender(sender).await?; depositeds.sort_by_key(|d| d.timestamp); if let Some(latest_deposit) = depositeds.last() { - return Ok(Some(latest_deposit.timestamp)); + Ok(Some(latest_deposit.timestamp)) } else { - return Ok(None); + Ok(None) } } diff --git a/src/external_api/intmax/circulation.rs b/src/external_api/intmax/circulation.rs index ff083ea..c27fb2c 100644 --- a/src/external_api/intmax/circulation.rs +++ b/src/external_api/intmax/circulation.rs @@ -38,7 +38,7 @@ pub async fn get_circulation(address: Address) -> Result Ok(success), diff --git a/src/external_api/intmax/gnark.rs b/src/external_api/intmax/gnark.rs index 94915a4..6fa7925 100644 --- a/src/external_api/intmax/gnark.rs +++ b/src/external_api/intmax/gnark.rs @@ -98,7 +98,7 @@ pub async fn gnark_start_prove( .await .map_err(|_| IntmaxError::NetworkError("failed to request gnark server".to_string()))?; let output: GnarkStartProofResponse = response.json().await.map_err(|e| { - IntmaxError::SerializeError(format!("failed to parse response: {}", e.to_string())) + IntmaxError::SerializeError(format!("failed to parse response: {}", e)) })?; match output { GnarkStartProofResponse::Success(success) => Ok(success), @@ -121,7 +121,7 @@ pub async fn gnark_get_proof( .await .map_err(|_| IntmaxError::NetworkError("failed to request gnark server".to_string()))?; let output: GnarkGetProofResponse = response.json().await.map_err(|e| { - IntmaxError::SerializeError(format!("failed to parse response: {}", e.to_string())) + IntmaxError::SerializeError(format!("failed to parse response: {}", e)) })?; match output { GnarkGetProofResponse::Success(success) => Ok(success), diff --git a/src/external_api/intmax/withdrawal.rs b/src/external_api/intmax/withdrawal.rs index 5d3585c..11d311f 100644 --- a/src/external_api/intmax/withdrawal.rs +++ b/src/external_api/intmax/withdrawal.rs @@ -75,7 +75,7 @@ async fn start_withdrawal( let response: Value = response.json().await.map_err(|e| { IntmaxError::SerializeError(format!( "failed to parse response as json: {}", - e.to_string() + e )) })?; let response: SubmitWithdrawalResponse = @@ -107,7 +107,7 @@ async fn query_withdrawal(withdrawal_id: &str) -> Result( .unwrap_or_default() }; return Err(RequestError::RequestError( - status.into(), + status, error_message, url.to_string(), abr_request, diff --git a/src/main.rs b/src/main.rs index 9f10a52..a8a7242 100644 --- a/src/main.rs +++ b/src/main.rs @@ -43,7 +43,7 @@ async fn main() { match set_up(is_interactive).await { Ok(_) => {} Err(e) => { - print_error(format!("Error during setup: {}", e.to_string())); + print_error(format!("Error during setup: {}", e)); press_enter_to_continue(); return; } @@ -53,7 +53,7 @@ async fn main() { match run(mode).await { Ok(_) => {} Err(e) => { - print_error(format!("{}", e.to_string())); + print_error(format!("{}", e)); if is_interactive { // Because Windows closes the console window immediately, we need to wait for the user to see the error message press_enter_to_continue(); diff --git a/src/services/assets_status.rs b/src/services/assets_status.rs index 4777a07..b3e50b2 100644 --- a/src/services/assets_status.rs +++ b/src/services/assets_status.rs @@ -110,7 +110,7 @@ pub async fn fetch_assets_status( .tree .get_leaf(leaf_index as usize); short_term_eligible_amounts.push(leaf.amount); - short_term_eligible_indices.push(index as usize); + short_term_eligible_indices.push(index); } if let Some(leaf_index) = state.long_term_eligible_tree.get_leaf_index(deposit_index) { let leaf = state @@ -118,7 +118,7 @@ pub async fn fetch_assets_status( .tree .get_leaf(leaf_index as usize); long_term_eligible_amounts.push(leaf.amount); - long_term_eligible_indices.push(index as usize); + long_term_eligible_indices.push(index); } } diff --git a/src/services/claim/claim.rs b/src/services/claim/claim.rs index a342c1a..020f1ad 100644 --- a/src/services/claim/claim.rs +++ b/src/services/claim/claim.rs @@ -177,7 +177,7 @@ mod tests { let is_short_term = true; let not_claimed_events = assets_status.get_not_claimed_events(is_short_term); - assert!(not_claimed_events.len() > 0); + assert!(!not_claimed_events.is_empty()); single_claim_task(&mut state, &dummy_key, is_short_term, ¬_claimed_events) .await diff --git a/src/services/claim/mod.rs b/src/services/claim/mod.rs index a50d986..41db3cb 100644 --- a/src/services/claim/mod.rs +++ b/src/services/claim/mod.rs @@ -7,6 +7,7 @@ use crate::{ use super::assets_status::AssetsStatus; +#[allow(clippy::module_inception)] pub mod claim; pub mod temp; pub mod witness_generation; @@ -23,7 +24,7 @@ pub async fn claim_task( .get_not_claimed_events(is_short_term) .chunks(MAX_CLAIMS) { - single_claim_task(state, key, is_short_term, &events) + single_claim_task(state, key, is_short_term, events) .await .map_err(|e| CLIError::InternalError(format!("Failed to claim: {:#}", e)))?; } diff --git a/src/services/claim/witness_generation.rs b/src/services/claim/witness_generation.rs index 846af8c..efd129d 100644 --- a/src/services/claim/witness_generation.rs +++ b/src/services/claim/witness_generation.rs @@ -20,7 +20,7 @@ pub async fn generate_claim_witness( "Generating claim witness for {:?}. is_short_term = {}", events, is_short_term ); - ensure!(events.len() > 0, "No event to generate witness"); + ensure!(!events.is_empty(), "No event to generate witness"); ensure!( events.len() <= MAX_CLAIMS, format!("Max {} events to generate witness", MAX_CLAIMS) @@ -32,7 +32,7 @@ pub async fn generate_claim_witness( &state.long_term_eligible_tree }; - let eligible_tree_root: Bytes32 = eligible_tree.get_root().into(); + let eligible_tree_root: Bytes32 = eligible_tree.get_root(); let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); let recipient = convert_address_to_intmax(key.withdrawal_address); let mut witnesses = Vec::new(); diff --git a/src/services/mining/mod.rs b/src/services/mining/mod.rs index e26f137..d4f07db 100644 --- a/src/services/mining/mod.rs +++ b/src/services/mining/mod.rs @@ -46,7 +46,7 @@ pub async fn mining_task( } // cancel rejected deposits - for &index in assets_status.rejected_indices.iter() { + if let Some(&index) = assets_status.rejected_indices.first() { print_warning(format!( "Deposit address {:?} is rejected because of AML check. For more information, please refer to the documentation.", key.deposit_address diff --git a/src/services/mining/withdrawal/mod.rs b/src/services/mining/withdrawal/mod.rs index d33a6e4..9ad6a76 100644 --- a/src/services/mining/withdrawal/mod.rs +++ b/src/services/mining/withdrawal/mod.rs @@ -136,7 +136,7 @@ async fn from_step5(state: &State, _key: &Key) -> anyhow::Result<()> { ensure!(receipt.is_some(), "Transaction receipt not found"); let receipt = receipt.unwrap(); ensure!(receipt.status(), "Transaction failed"); - print_status(format!("Successfully withdrawn")); + print_status("Successfully withdrawn".to_string()); Ok(()) } @@ -154,7 +154,7 @@ mod tests { let dummy_key = get_dummy_keys(); let assets_status = state.sync_and_fetch_assets(&dummy_key).await.unwrap(); let events = assets_status.get_not_withdrawn_events(); - assert!(events.len() > 0); + assert!(!events.is_empty()); super::withdrawal_task(&mut state, &dummy_key, events[0].clone()) .await diff --git a/src/services/utils.rs b/src/services/utils.rs index 9c53e6e..785261a 100644 --- a/src/services/utils.rs +++ b/src/services/utils.rs @@ -48,15 +48,15 @@ pub async fn await_until_low_gas_price(provider: &NormalProvider) -> anyhow::Res if current_gas_price <= max_gas_price { log::info!( "Current gas price: {} GWei is lower than max gas price: {} GWei", - format_units(current_gas_price.clone(), "gwei").unwrap(), - format_units(max_gas_price.clone(), "gwei").unwrap(), + format_units(current_gas_price, "gwei").unwrap(), + format_units(max_gas_price, "gwei").unwrap(), ); break; } print_warning(format!( "Current gas price: {} Gwei > max gas price: {} Gwei. Waiting for gas price to drop...", - format_units(current_gas_price.clone(), "gwei").unwrap(), - format_units(max_gas_price.clone(), "gwei").unwrap(), + format_units(current_gas_price, "gwei").unwrap(), + format_units(max_gas_price, "gwei").unwrap(), )); sleep_for(high_gas_retry_interval_in_sec); } diff --git a/src/state/mod.rs b/src/state/mod.rs index 9177ac0..d1c2bb8 100644 --- a/src/state/mod.rs +++ b/src/state/mod.rs @@ -1,4 +1,5 @@ pub mod key; pub mod mode; pub mod prover; +#[allow(clippy::module_inception)] pub mod state; diff --git a/src/state/prover.rs b/src/state/prover.rs index 454da8f..8eae8fd 100644 --- a/src/state/prover.rs +++ b/src/state/prover.rs @@ -18,6 +18,12 @@ pub struct Prover { claim_wrapper_processor: OnceLock, } +impl Default for Prover { + fn default() -> Self { + Self::new() + } +} + impl Prover { pub fn new() -> Self { Self { diff --git a/src/state/state.rs b/src/state/state.rs index 8e91892..c3b1e4d 100644 --- a/src/state/state.rs +++ b/src/state/state.rs @@ -85,6 +85,6 @@ impl State { pub async fn sync_and_fetch_assets(&mut self, key: &Key) -> anyhow::Result { self.sync_trees().await?; - fetch_assets_status(&self, key.deposit_address, key.deposit_private_key).await + fetch_assets_status(self, key.deposit_address, key.deposit_private_key).await } } diff --git a/src/test/mod.rs b/src/test/mod.rs index 9c2cce0..ad54add 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -56,7 +56,8 @@ pub async fn get_dummy_state(rpc_url: &str) -> State { ); let graph_client = GraphClient::new(provider.clone(), &settings.blockchain.graph_url, None); - let state = State { + + State { deposit_hash_tree: DepositHashTree::new(), short_term_eligible_tree: eligible_tree.clone(), long_term_eligible_tree: eligible_tree.clone(), @@ -67,6 +68,5 @@ pub async fn get_dummy_state(rpc_url: &str) -> State { token, provider, graph_client, - }; - state + } } diff --git a/src/utils/bin_parser.rs b/src/utils/bin_parser.rs index 0603f0b..e99a7ff 100644 --- a/src/utils/bin_parser.rs +++ b/src/utils/bin_parser.rs @@ -45,7 +45,7 @@ impl TryFrom for EligibleTreeInfo { }); } let expected_root = Bytes32::from_bytes_be(&bin_tree.root_hash); - let actual_root: Bytes32 = tree.get_root().try_into()?; + let actual_root = tree.get_root(); ensure!( actual_root == expected_root, "Root hash mismatch: expected {}, got {}", @@ -113,7 +113,7 @@ impl TryFrom for DepositTreeInfo { tree.push(leaf_hash); } let expected_root = Bytes32::from_bytes_be(&bin_tree.root_hash); - let actual_root: Bytes32 = tree.get_root().try_into()?; + let actual_root = tree.get_root(); ensure!( actual_root == expected_root, "Root hash mismatch: expected {}, got {}", diff --git a/src/utils/config.rs b/src/utils/config.rs index 467ded8..07dd9e1 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -79,9 +79,9 @@ impl Settings { } } -const BASE_SEPOLIA_CONFIG: &'static [u8] = include_bytes!("../../config/config.base-sepolia.toml"); -const BASE_CONFIG: &'static [u8] = include_bytes!("../../config/config.base.toml"); -const MAINNET_CONFIG: &'static [u8] = include_bytes!("../../config/config.mainnet.toml"); +const BASE_SEPOLIA_CONFIG: &[u8] = include_bytes!("../../config/config.base-sepolia.toml"); +const BASE_CONFIG: &[u8] = include_bytes!("../../config/config.base.toml"); +const MAINNET_CONFIG: &[u8] = include_bytes!("../../config/config.mainnet.toml"); pub fn create_config_files() -> anyhow::Result<()> { create_file_with_content(&config_path(Network::BaseSepolia), BASE_SEPOLIA_CONFIG)?; diff --git a/src/utils/deposit_hash_tree.rs b/src/utils/deposit_hash_tree.rs index 9962aac..2a6d72d 100644 --- a/src/utils/deposit_hash_tree.rs +++ b/src/utils/deposit_hash_tree.rs @@ -35,6 +35,12 @@ pub struct DepositHashTree { pub hashes: HashMap, } +impl Default for DepositHashTree { + fn default() -> Self { + Self::new() + } +} + impl DepositHashTree { pub fn new() -> Self { Self { @@ -50,11 +56,10 @@ impl DepositHashTree { pub fn push(&mut self, hash: Bytes32) { let index = self.tree.len(); self.tree.push(DepositHash(hash)); - if self.hashes.contains_key(&hash) { - // don't overwrite the index if the hash already exists - return; + if let std::collections::hash_map::Entry::Vacant(e) = self.hashes.entry(hash) { + e.insert(index as u32); } else { - self.hashes.insert(hash, index as u32); + // don't overwrite the index if the hash already exists } } diff --git a/src/utils/derive_key.rs b/src/utils/derive_key.rs index 26bb6d5..8499aaf 100644 --- a/src/utils/derive_key.rs +++ b/src/utils/derive_key.rs @@ -9,16 +9,16 @@ pub fn derive_salt_from_private_key_nonce(private_key: B256, nonce: u64) -> Salt let deposit_salt_prefix = B256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") .unwrap(); - let prefixed_private_key = vec![deposit_salt_prefix.to_vec(), private_key.to_vec()] + let prefixed_private_key = [deposit_salt_prefix.to_vec(), private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); let hashed_private_key_with_nonce = - vec![hashed_private_key.to_vec(), nonce.to_be_bytes().to_vec()] + [hashed_private_key.to_vec(), nonce.to_be_bytes().to_vec()] .concat() .to_vec(); let salt_bytes = - Bytes32::from_bytes_be(&keccak256(&hashed_private_key_with_nonce.to_vec()).to_vec()); + Bytes32::from_bytes_be(keccak256(&hashed_private_key_with_nonce).as_ref()); Salt(salt_bytes.reduce_to_hash_out()) } @@ -27,11 +27,11 @@ pub fn derive_pubkey_from_private_key(private_key: B256) -> U256 { let deposit_salt_prefix = B256::from_str("0xbf21c6520d666a4167f35c091393809e314f62a8e5cb1c166dd4dcac3abe53ad") .unwrap(); - let prefixed_private_key = vec![deposit_salt_prefix.to_vec(), private_key.to_vec()] + let prefixed_private_key = [deposit_salt_prefix.to_vec(), private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); - let pubkey = U256::from_bytes_be(&hashed_private_key.to_vec()); + let pubkey = U256::from_bytes_be(hashed_private_key.as_ref()); pubkey } @@ -40,14 +40,14 @@ pub fn derive_deposit_private_key(withdrawal_private_key: B256, number: u64) -> let prefix = B256::from_str("0x80059c155bb5d835019afc9e979c30cabd98c9d2141e67562b7bd636d7005cbc") .unwrap(); - let prefixed_private_key = vec![prefix.to_vec(), withdrawal_private_key.to_vec()] + let prefixed_private_key = [prefix.to_vec(), withdrawal_private_key.to_vec()] .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); let hashed_private_key_with_number = - vec![hashed_private_key.to_vec(), number.to_be_bytes().to_vec()] + [hashed_private_key.to_vec(), number.to_be_bytes().to_vec()] .concat() .to_vec(); - let deposit_private_key = keccak256(&hashed_private_key_with_number); - deposit_private_key + + keccak256(&hashed_private_key_with_number) } diff --git a/src/utils/eligible_tree_with_map.rs b/src/utils/eligible_tree_with_map.rs index 91e3a6b..98dcc2a 100644 --- a/src/utils/eligible_tree_with_map.rs +++ b/src/utils/eligible_tree_with_map.rs @@ -9,6 +9,12 @@ pub struct EligibleTreeWithMap { pub map: HashMap, // key: deposit_index, value: eligible index } +impl Default for EligibleTreeWithMap { + fn default() -> Self { + Self::new() + } +} + impl EligibleTreeWithMap { pub fn new() -> Self { let tree = EligibleTree::new(ELIGIBLE_TREE_HEIGHT); diff --git a/src/utils/encryption.rs b/src/utils/encryption.rs index 4e1abce..6fd8296 100644 --- a/src/utils/encryption.rs +++ b/src/utils/encryption.rs @@ -2,7 +2,7 @@ use aes_gcm::{aead::Aead, NewAead as _}; use serde::Serialize; use sha3::{Digest, Keccak256}; -const NONCE: &'static str = "intmaxmining"; +const NONCE: &str = "intmaxmining"; pub fn encrypt(password: &str, value: &T) -> anyhow::Result> { let password_hash = keccak256_hash(password); diff --git a/src/utils/env_config.rs b/src/utils/env_config.rs index 4f2177e..df8542f 100644 --- a/src/utils/env_config.rs +++ b/src/utils/env_config.rs @@ -52,7 +52,7 @@ impl EnvConfig { } pub fn load_from_file(network: Network, i: usize) -> anyhow::Result { - let file = std::fs::File::open(&env_config_path(network, i)).map_err(|_| { + let file = std::fs::File::open(env_config_path(network, i)).map_err(|_| { anyhow::anyhow!( "Faield to open the config file at {:?}", env_config_path(network, i) @@ -140,7 +140,7 @@ impl EnvConfig { let encrypted_withdrawal_private_key = self .encrypted_withdrawal_private_key .clone() - .map(|key| hex::encode(key)); + .map(hex::encode); let mining_unit = format_units(self.mining_unit, "ether").unwrap(); let mining_times = self.mining_times.to_string(); Ok(EnvConfigString { diff --git a/src/utils/env_validation.rs b/src/utils/env_validation.rs index b8dc810..cfc38b8 100644 --- a/src/utils/env_validation.rs +++ b/src/utils/env_validation.rs @@ -31,8 +31,8 @@ pub async fn validate_env_config(env: &EnvConfig) -> anyhow::Result<()> { } fn validate_mining_unit(mining_unit: U256) -> anyhow::Result<()> { - let one_tenth: U256 = parse_ether("0.1").unwrap().into(); - let one: U256 = parse_ether("1").unwrap().into(); + let one_tenth: U256 = parse_ether("0.1").unwrap(); + let one: U256 = parse_ether("1").unwrap(); if mining_unit != one_tenth && mining_unit != one { anyhow::bail!("MINING_UNIT environment variable must be either '1' or '0.1'"); } diff --git a/src/utils/network.rs b/src/utils/network.rs index 3b219a0..d3931cd 100644 --- a/src/utils/network.rs +++ b/src/utils/network.rs @@ -3,20 +3,17 @@ use std::{env, fmt::Display, str::FromStr}; use strum_macros::EnumIter; #[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, EnumIter)] +#[derive(Default)] pub enum Network { Localnet, Sepolia, Holesky, + #[default] BaseSepolia, Base, Mainnet, } -impl Default for Network { - fn default() -> Self { - Network::BaseSepolia - } -} impl Display for Network { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { From f940c3ba8fb58939a4c5858225c32ec40874a622 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 21:11:46 +0700 Subject: [PATCH 07/27] chore: add derive test --- src/utils/derive_key.rs | 53 +++++++++++++++++++++++++++++++++++------ 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/src/utils/derive_key.rs b/src/utils/derive_key.rs index 8499aaf..700aa01 100644 --- a/src/utils/derive_key.rs +++ b/src/utils/derive_key.rs @@ -13,12 +13,10 @@ pub fn derive_salt_from_private_key_nonce(private_key: B256, nonce: u64) -> Salt .concat() .to_vec(); let hashed_private_key = keccak256(keccak256(&prefixed_private_key)); - let hashed_private_key_with_nonce = - [hashed_private_key.to_vec(), nonce.to_be_bytes().to_vec()] - .concat() - .to_vec(); - let salt_bytes = - Bytes32::from_bytes_be(keccak256(&hashed_private_key_with_nonce).as_ref()); + let hashed_private_key_with_nonce = [hashed_private_key.to_vec(), nonce.to_be_bytes().to_vec()] + .concat() + .to_vec(); + let salt_bytes = Bytes32::from_bytes_be(keccak256(&hashed_private_key_with_nonce).as_ref()); Salt(salt_bytes.reduce_to_hash_out()) } @@ -48,6 +46,47 @@ pub fn derive_deposit_private_key(withdrawal_private_key: B256, number: u64) -> [hashed_private_key.to_vec(), number.to_be_bytes().to_vec()] .concat() .to_vec(); - + keccak256(&hashed_private_key_with_number) } + +#[cfg(test)] +mod tests { + use super::*; + use alloy::primitives::B256; + + fn private_key() -> B256 { + "0x8d7a905dad7deda35996c7127b0d6dd9921f7d45e3f8dce86e09370265bb7571" + .parse() + .unwrap() + } + + #[test] + fn test_derive_salt_from_private_key_nonce() { + let nonce = 1; + let salt = derive_salt_from_private_key_nonce(private_key(), nonce); + assert_eq!( + salt.to_string(), + "0xf55e011dcea2bda3f2221d4ac872f681ce6b97dc9490c8d89afafb4e211d4ecc" + ); + } + + #[test] + fn test_derive_pubkey_from_private_key() { + let pubkey = derive_pubkey_from_private_key(private_key()); + assert_eq!( + pubkey.to_string(), + "102824996597214675512080228570082669559954049667357114099795180313928773990100" + ); + } + + #[test] + fn test_derive_deposit_private_key() { + let number = 1; + let deposit_private_key = derive_deposit_private_key(private_key(), number); + assert_eq!( + deposit_private_key.to_string(), + "0x724bfaba8fdaa147295f428cc52c64d012c93056795d4c78ccdcb0d074e636c3" + ); + } +} From 4c514f71eceedb2ced11a0cf28071ff5b5f86cba Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 21:23:39 +0700 Subject: [PATCH 08/27] chore: delete unused network & bump version --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/cli/configure.rs | 19 +------------------ src/utils/env_validation.rs | 2 -- src/utils/network.rs | 12 ++---------- 5 files changed, 5 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index acab63a..d60ec8c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2716,7 +2716,7 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "mining-cli" -version = "1.2.2" +version = "1.3.0" dependencies = [ "aes-gcm", "alloy", diff --git a/Cargo.toml b/Cargo.toml index 7fac34c..aef058f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mining-cli" -version = "1.2.2" +version = "1.3.0" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/cli/configure.rs b/src/cli/configure.rs index 74c5235..f39343f 100644 --- a/src/cli/configure.rs +++ b/src/cli/configure.rs @@ -146,8 +146,7 @@ async fn input_rpc_url() -> anyhow::Result { match validate_rpc_url(&rpc_url).await { Ok(_) => break Ok(rpc_url), Err(e) => { - let colored_message = - format!("{}: {}", style("Invalid RPC URL").red(), e); + let colored_message = format!("{}: {}", style("Invalid RPC URL").red(), e); println!("{}", colored_message); } } @@ -158,14 +157,6 @@ async fn input_alchemy_url() -> anyhow::Result { let alchemy_api_key: String = Password::new().with_prompt("Alchemy API Key").interact()?; match get_network() { Network::Localnet => bail!("Localnet is not supported"), - Network::Sepolia => { - let alchemy_url = format!("https://eth-sepolia.g.alchemy.com/v2/{}", alchemy_api_key); - Ok(alchemy_url) - } - Network::Holesky => { - let alchemy_url = format!("https://eth-holesky.g.alchemy.com/v2/{}", alchemy_api_key); - Ok(alchemy_url) - } Network::BaseSepolia => { let alchemy_url = format!("https://base-sepolia.g.alchemy.com/v2/{}", alchemy_api_key); Ok(alchemy_url) @@ -187,14 +178,6 @@ async fn input_infura_url() -> anyhow::Result { .interact()?; match get_network() { Network::Localnet => bail!("Localnet is not supported"), - Network::Sepolia => { - let infura_url = format!("https://sepolia.infura.io/v3/{}", infura_project_id); - Ok(infura_url) - } - Network::Holesky => { - let infura_url = format!("https://holesky.infura.io/v3/{}", infura_project_id); - Ok(infura_url) - } Network::BaseSepolia => { let infura_url = format!("https://base-sepolia.infura.io/v3/{}", infura_project_id); Ok(infura_url) diff --git a/src/utils/env_validation.rs b/src/utils/env_validation.rs index cfc38b8..e8cd193 100644 --- a/src/utils/env_validation.rs +++ b/src/utils/env_validation.rs @@ -16,8 +16,6 @@ pub fn get_allowed_mining_times() -> Vec { vec![1, 5, 10] } else if network == Network::Base { vec![1, 10] - } else if network == Network::Holesky { - vec![1, 5, 10] } else { vec![10] } diff --git a/src/utils/network.rs b/src/utils/network.rs index d3931cd..f19cf4e 100644 --- a/src/utils/network.rs +++ b/src/utils/network.rs @@ -2,25 +2,19 @@ use serde::{Deserialize, Serialize}; use std::{env, fmt::Display, str::FromStr}; use strum_macros::EnumIter; -#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, EnumIter)] -#[derive(Default)] +#[derive(Debug, Copy, Clone, Serialize, Deserialize, PartialEq, EnumIter, Default)] pub enum Network { Localnet, - Sepolia, - Holesky, #[default] BaseSepolia, Base, Mainnet, } - impl Display for Network { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { Network::Localnet => write!(f, "localnet"), - Network::Sepolia => write!(f, "sepolia"), - Network::Holesky => write!(f, "holesky"), Network::BaseSepolia => write!(f, "base-sepolia"), Network::Base => write!(f, "base"), Network::Mainnet => write!(f, "mainnet"), @@ -34,8 +28,6 @@ impl FromStr for Network { fn from_str(s: &str) -> Result { match s { "localnet" => Ok(Network::Localnet), - "sepolia" => Ok(Network::Sepolia), - "holesky" => Ok(Network::Holesky), "mainnet" => Ok(Network::Mainnet), "base" => Ok(Network::Base), "base-sepolia" => Ok(Network::BaseSepolia), @@ -50,5 +42,5 @@ pub fn get_network() -> Network { } pub fn is_legacy() -> bool { - get_network() == Network::Mainnet || get_network() == Network::Holesky + get_network() == Network::Mainnet } From 4c759eb1d9a80c2da2a435f00cceb21d23a13ed9 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 21:26:47 +0700 Subject: [PATCH 09/27] chore: update deps version --- Cargo.lock | 805 +++++++++++++++++++++++++++++++---------------------- Cargo.toml | 26 +- 2 files changed, 489 insertions(+), 342 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d60ec8c..1ea1543 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -51,9 +51,9 @@ dependencies = [ [[package]] name = "aes-gcm" -version = "0.9.4" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" +checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" dependencies = [ "aead", "aes", @@ -63,17 +63,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.15", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.11" @@ -104,9 +93,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a6f38130b8716f18c69cede2b8ebe6cf70038a3d97740907bb0637941f759be" +checksum = "ca940218f168ba7dd97c22fccd3055e9f2ff463bd5aededf614f1fba71c90648" dependencies = [ "alloy-consensus", "alloy-contract", @@ -414,7 +403,7 @@ dependencies = [ "lru", "parking_lot", "pin-project", - "reqwest 0.12.8", + "reqwest", "serde", "serde_json", "thiserror 2.0.12", @@ -459,7 +448,7 @@ dependencies = [ "async-stream", "futures", "pin-project", - "reqwest 0.12.8", + "reqwest", "serde", "serde_json", "tokio", @@ -660,7 +649,7 @@ checksum = "ee18869ecabe658ff6316e7db7c25d958c7d10f0a1723c2f7447d4f402920b66" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest 0.12.8", + "reqwest", "serde_json", "tower", "tracing", @@ -749,9 +738,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.89" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arbitrary" @@ -939,6 +928,12 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "arraydeque" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" + [[package]] name = "arrayvec" version = "0.7.6" @@ -981,6 +976,12 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + [[package]] name = "auto_impl" version = "1.3.0" @@ -1019,12 +1020,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - [[package]] name = "base64" version = "0.21.7" @@ -1083,17 +1078,14 @@ dependencies = [ "hex-conservative", ] -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - [[package]] name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +dependencies = [ + "serde", +] [[package]] name = "bitvec" @@ -1185,11 +1177,17 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1197,7 +1195,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -1211,9 +1209,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.19" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" +checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" dependencies = [ "clap_builder", "clap_derive", @@ -1221,9 +1219,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.19" +version = "4.5.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" +checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" dependencies = [ "anstream", "anstyle", @@ -1233,9 +1231,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.18" +version = "4.5.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" +checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" dependencies = [ "heck", "proc-macro2", @@ -1245,9 +1243,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" +checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" [[package]] name = "colorchoice" @@ -1257,34 +1255,34 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "config" -version = "0.13.4" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" +checksum = "595aae20e65c3be792d05818e8c63025294ac3cb7e200f11459063a352a6ef80" dependencies = [ "async-trait", + "convert_case", "json5", - "lazy_static", - "nom", "pathdiff", "ron", "rust-ini", "serde", "serde_json", "toml", - "yaml-rust", + "winnow", + "yaml-rust2", ] [[package]] name = "console" -version = "0.15.8" +version = "0.15.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width", - "windows-sys 0.52.0", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", ] [[package]] @@ -1326,6 +1324,15 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1430,9 +1437,9 @@ dependencies = [ [[package]] name = "ctr" -version = "0.8.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" dependencies = [ "cipher", ] @@ -1644,9 +1651,12 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.3.0" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" +checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" +dependencies = [ + "const-random", +] [[package]] name = "dotenv" @@ -1731,9 +1741,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "encoding_rs" @@ -2045,9 +2055,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", + "js-sys", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", + "wasm-bindgen", ] [[package]] @@ -2085,16 +2097,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.3.26" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" dependencies = [ + "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "futures-util", - "http 0.2.12", + "http", "indexmap 2.6.0", "slab", "tokio", @@ -2107,9 +2119,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" @@ -2117,7 +2126,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.11", + "ahash", ] [[package]] @@ -2126,7 +2135,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash", "allocator-api2", "rayon", "serde", @@ -2144,6 +2153,15 @@ dependencies = [ "serde", ] +[[package]] +name = "hashlink" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +dependencies = [ + "hashbrown 0.15.3", +] + [[package]] name = "heck" version = "0.5.0" @@ -2183,17 +2201,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - [[package]] name = "http" version = "1.1.0" @@ -2205,17 +2212,6 @@ dependencies = [ "itoa", ] -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - [[package]] name = "http-body" version = "1.0.1" @@ -2223,7 +2219,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http 1.1.0", + "http", ] [[package]] @@ -2234,8 +2230,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "pin-project-lite", ] @@ -2245,47 +2241,18 @@ version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - [[package]] name = "hyper" -version = "0.14.30" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" +checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", "h2", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "http", + "http-body", "httparse", "itoa", "pin-project-lite", @@ -2295,16 +2262,20 @@ dependencies = [ ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "hyper-rustls" +version = "0.27.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" dependencies = [ - "bytes", - "hyper 0.14.30", - "native-tls", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", "tokio", - "tokio-native-tls", + "tokio-rustls", + "tower-service", + "webpki-roots", ] [[package]] @@ -2315,7 +2286,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper 1.4.1", + "hyper", "hyper-util", "native-tls", "tokio", @@ -2325,21 +2296,28 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.9" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" +checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" dependencies = [ + "base64 0.22.1", "bytes", "futures-channel", + "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.1", - "hyper 1.4.1", + "http", + "http-body", + "hyper", + "ipnet", + "libc", + "percent-encoding", "pin-project-lite", "socket2", + "system-configuration", "tokio", "tower-service", "tracing", + "windows-registry", ] [[package]] @@ -2433,7 +2411,7 @@ dependencies = [ "instant", "number_prefix", "portable-atomic", - "unicode-width", + "unicode-width 0.1.14", ] [[package]] @@ -2479,6 +2457,16 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" +[[package]] +name = "iri-string" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2553,10 +2541,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.70" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -2622,9 +2611,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libm" @@ -2638,16 +2627,10 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.6.0", + "bitflags", "libc", ] -[[package]] -name = "linked-hash-map" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" - [[package]] name = "linux-raw-sys" version = "0.4.14" @@ -2672,9 +2655,9 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.22" +version = "0.4.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" [[package]] name = "lru" @@ -2685,6 +2668,12 @@ dependencies = [ "hashbrown 0.15.3", ] +[[package]] +name = "lru-slab" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" + [[package]] name = "macro-string" version = "0.1.4" @@ -2708,12 +2697,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "mining-cli" version = "1.3.0" @@ -2740,7 +2723,7 @@ dependencies = [ "rand 0.8.5", "rand_chacha 0.3.1", "regex", - "reqwest 0.11.27", + "reqwest", "self_update", "serde", "serde_json", @@ -2749,8 +2732,8 @@ dependencies = [ "sha3", "simplelog", "strum 0.26.3", - "strum_macros 0.26.4", - "thiserror 1.0.64", + "strum_macros", + "thiserror 2.0.12", "tokio", "tower", ] @@ -2809,16 +2792,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - [[package]] name = "num" version = "0.4.3" @@ -2997,7 +2970,7 @@ version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags 2.6.0", + "bitflags", "cfg-if", "foreign-types", "libc", @@ -3043,12 +3016,12 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-multimap" -version = "0.4.3" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" +checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" dependencies = [ "dlv-list", - "hashbrown 0.12.3", + "hashbrown 0.14.5", ] [[package]] @@ -3216,7 +3189,7 @@ name = "plonky2" version = "0.2.2" source = "git+https://github.com/InternetMaximalism/polygon-plonky2.git?branch=intmax2-dev#8dbbe5142aea5a05bcbf948b63935f204e40f646" dependencies = [ - "ahash 0.8.11", + "ahash", "anyhow", "getrandom 0.2.15", "hashbrown 0.14.5", @@ -3426,7 +3399,7 @@ checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", - "bitflags 2.6.0", + "bitflags", "lazy_static", "num-traits", "rand 0.8.5", @@ -3446,13 +3419,68 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-xml" -version = "0.23.1" +version = "0.37.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" +checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" dependencies = [ "memchr", ] +[[package]] +name = "quinn" +version = "0.11.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" +dependencies = [ + "bytes", + "cfg_aliases", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "socket2", + "thiserror 2.0.12", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-proto" +version = "0.11.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" +dependencies = [ + "bytes", + "getrandom 0.3.3", + "lru-slab", + "rand 0.9.1", + "ring", + "rustc-hash", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.12", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "quinn-udp" +version = "0.5.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2", + "tracing", + "windows-sys 0.59.0", +] + [[package]] name = "quote" version = "1.0.40" @@ -3571,7 +3599,7 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -3587,9 +3615,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.0" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3616,60 +3644,23 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.11.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.30", - "hyper-tls 0.5.0", - "ipnet", - "js-sys", - "log", - "mime", - "native-tls", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls-pemfile 1.0.4", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper 0.1.2", - "system-configuration", - "tokio", - "tokio-native-tls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", -] - -[[package]] -name = "reqwest" -version = "0.12.8" +version = "0.12.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +checksum = "c3f27698fc5799d2a281528a908bd874973953ca2e7bc2311637e10c263c723b" dependencies = [ "base64 0.22.1", "bytes", + "encoding_rs", "futures-channel", "futures-core", "futures-util", - "http 1.1.0", - "http-body 1.0.1", + "h2", + "http", + "http-body", "http-body-util", - "hyper 1.4.1", - "hyper-tls 0.6.0", + "hyper", + "hyper-rustls", + "hyper-tls", "hyper-util", "ipnet", "js-sys", @@ -3679,19 +3670,24 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls-pemfile 2.2.0", + "quinn", + "rustls", + "rustls-pki-types", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper 1.0.1", + "sync_wrapper", "tokio", "tokio-native-tls", + "tokio-rustls", + "tower", + "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "windows-registry", + "webpki-roots", ] [[package]] @@ -3704,6 +3700,20 @@ dependencies = [ "subtle", ] +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "untrusted", + "windows-sys 0.52.0", +] + [[package]] name = "rlp" version = "0.5.2" @@ -3716,13 +3726,14 @@ dependencies = [ [[package]] name = "ron" -version = "0.7.1" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", + "base64 0.21.7", + "bitflags", "serde", + "serde_derive", ] [[package]] @@ -3760,12 +3771,13 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-ini" -version = "0.18.0" +version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" +checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" dependencies = [ "cfg-if", "ordered-multimap", + "trim-in-place", ] [[package]] @@ -3813,7 +3825,7 @@ version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags 2.6.0", + "bitflags", "errno", "libc", "linux-raw-sys", @@ -3821,28 +3833,38 @@ dependencies = [ ] [[package]] -name = "rustls-pemfile" -version = "1.0.4" +name = "rustls" +version = "0.23.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" dependencies = [ - "base64 0.21.7", + "once_cell", + "ring", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", ] [[package]] -name = "rustls-pemfile" -version = "2.2.0" +name = "rustls-pki-types" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" dependencies = [ - "rustls-pki-types", + "web-time", ] [[package]] -name = "rustls-pki-types" -version = "1.9.0" +name = "rustls-webpki" +version = "0.102.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] [[package]] name = "rustversion" @@ -3925,7 +3947,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 2.6.0", + "bitflags", "core-foundation", "core-foundation-sys", "libc", @@ -3955,16 +3977,16 @@ dependencies = [ [[package]] name = "self_update" -version = "0.41.0" +version = "0.42.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469a3970061380c19852269f393e74c0fe607a4e23d85267382cf25486aa8de5" +checksum = "d832c086ece0dacc29fb2947bb4219b8f6e12fe9e40b7108f9e57c4224e47b5c" dependencies = [ - "hyper 1.4.1", + "hyper", "indicatif", "log", "quick-xml", "regex", - "reqwest 0.12.8", + "reqwest", "self-replace", "semver 1.0.23", "serde_json", @@ -4020,9 +4042,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.140" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" dependencies = [ "itoa", "memchr", @@ -4041,6 +4063,15 @@ dependencies = [ "thiserror 2.0.12", ] +[[package]] +name = "serde_spanned" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4192,9 +4223,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.7" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", @@ -4215,7 +4246,7 @@ name = "starky" version = "0.4.0" source = "git+https://github.com/InternetMaximalism/polygon-plonky2.git?branch=intmax2-dev#8dbbe5142aea5a05bcbf948b63935f204e40f646" dependencies = [ - "ahash 0.8.11", + "ahash", "anyhow", "hashbrown 0.14.5", "itertools 0.11.0", @@ -4250,20 +4281,7 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ - "strum_macros 0.27.1", -] - -[[package]] -name = "strum_macros" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.101", + "strum_macros", ] [[package]] @@ -4281,9 +4299,9 @@ dependencies = [ [[package]] name = "subtle" -version = "2.4.1" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" @@ -4319,12 +4337,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - [[package]] name = "sync_wrapper" version = "1.0.1" @@ -4336,20 +4348,20 @@ dependencies = [ [[package]] name = "system-configuration" -version = "0.5.1" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" dependencies = [ - "bitflags 1.3.2", + "bitflags", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" dependencies = [ "core-foundation-sys", "libc", @@ -4528,6 +4540,17 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-rustls" +version = "0.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +dependencies = [ + "rustls", + "rustls-pki-types", + "tokio", +] + [[package]] name = "tokio-stream" version = "0.1.17" @@ -4555,11 +4578,14 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.11" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", + "serde_spanned", + "toml_datetime", + "toml_edit", ] [[package]] @@ -4567,6 +4593,9 @@ name = "toml_datetime" version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -4575,6 +4604,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap 2.6.0", + "serde", + "serde_spanned", "toml_datetime", "winnow", ] @@ -4588,7 +4619,26 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper 1.0.1", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-http" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" +dependencies = [ + "bitflags", + "bytes", + "futures-util", + "http", + "http-body", + "iri-string", + "pin-project-lite", + "tower", "tower-layer", "tower-service", ] @@ -4648,6 +4698,12 @@ dependencies = [ "tracing", ] +[[package]] +name = "trim-in-place" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" + [[package]] name = "try-lock" version = "0.2.5" @@ -4705,12 +4761,24 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-segmentation" +version = "1.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" + [[package]] name = "unicode-width" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + [[package]] name = "unicode-xid" version = "0.2.6" @@ -4719,9 +4787,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" +checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" dependencies = [ "generic-array", "subtle", @@ -4737,6 +4805,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "url" version = "2.5.2" @@ -4813,24 +4887,24 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.101", @@ -4851,9 +4925,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4861,9 +4935,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -4874,9 +4948,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.93" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "wasmtimer" @@ -4912,6 +4989,15 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "winapi-util" version = "0.1.9" @@ -4930,34 +5016,39 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + [[package]] name = "windows-registry" -version = "0.2.0" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.52.6", + "windows-targets 0.53.0", ] [[package]] name = "windows-result" -version = "0.2.0" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-targets 0.52.6", + "windows-link", ] [[package]] name = "windows-strings" -version = "0.1.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" dependencies = [ - "windows-result", - "windows-targets 0.52.6", + "windows-link", ] [[package]] @@ -5011,13 +5102,29 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm", + "windows_i686_gnullvm 0.52.6", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows-targets" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" +dependencies = [ + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -5030,6 +5137,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5042,6 +5155,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5054,12 +5173,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5072,6 +5203,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5084,6 +5221,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -5096,6 +5239,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5108,6 +5257,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.7.10" @@ -5117,23 +5272,13 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags 2.6.0", + "bitflags", ] [[package]] @@ -5146,12 +5291,14 @@ dependencies = [ ] [[package]] -name = "yaml-rust" -version = "0.4.5" +name = "yaml-rust2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" +checksum = "18b783b2c2789414f8bb84ca3318fc9c2d7e7be1c22907d37839a58dedb369d3" dependencies = [ - "linked-hash-map", + "arraydeque", + "encoding_rs", + "hashlink", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index aef058f..549fab7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,39 +6,39 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.88" +anyhow = "1.0.98" bincode = "1.3.3" plonky2 = { git = "https://github.com/InternetMaximalism/polygon-plonky2.git", branch = "intmax2-dev" } intmax2-zkp = { git = "https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev" } mining_circuit_v1 = { git = "https://github.com/InternetMaximalism/intmax2-mining.git" } num-bigint = "0.4.6" serde = { version = "1.0.210", features = ["derive"] } -serde_json = "1.0.128" -config = "0.13" -reqwest = { version = "0.11", features = ["json"] } +serde_json = "1.0.140" +config = "0.15.11" +reqwest = { version = "0.12.17", features = ["json"] } tokio = { version = "1", features = ["full"] } aes-gcm = "0.9" sha3 = "0.10.0" dialoguer = "0.11.0" -console = "0.15.8" +console = "0.15.11" rand = "0.8.5" simplelog = "0.12.2" -log = "0.4.22" -chrono = "0.4.38" -regex = "1.10.6" +log = "0.4.27" +chrono = "0.4.41" +regex = "1.11.1" dirs = "5.0.1" -clap = { version = "4.5.18", features = ["derive"] } +clap = { version = "4.5.39", features = ["derive"] } dotenv = "0.15.0" hex = "0.4.3" -thiserror = "1.0.64" +thiserror = "2.0.2" strum = "0.26.3" -strum_macros = "0.26.4" -self_update = { version = "0.41.0", features = [ +strum_macros = "0.27.1" +self_update = { version = "0.42.0", features = [ "archive-zip", "compression-zip-deflate", ] } rand_chacha = "0.3.1" -alloy = { version = "1.0.7", features = ["rand"] } +alloy = { version = "1.0.8", features = ["rand"] } tower = "0.5.2" serde_qs = "0.15.0" futures = "0.3.31" From 63f059060c0086cdbedf36bf41127e8ff3837879 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 21:40:29 +0700 Subject: [PATCH 10/27] chore: more logs --- src/services/sync.rs | 10 +++++----- src/utils/bin_parser.rs | 31 ++++++++++++++++++++++++++++--- 2 files changed, 33 insertions(+), 8 deletions(-) diff --git a/src/services/sync.rs b/src/services/sync.rs index 8b333f1..d8c8f6f 100644 --- a/src/services/sync.rs +++ b/src/services/sync.rs @@ -66,16 +66,16 @@ pub async fn sync_trees( .map_err(|e| { Error::NetworkError(format!("Failed to fetch latest tree from github: {}", e)) })?; + log::info!("fetched bin trees from github"); // retry if TreeRootSyncError occurs let update = || async { if let Some(bin_deposit_tree) = bin_deposit_tree { - let (new_deposit_hash_tree, new_block_number) = + let new_deposit_hash_tree = parse_and_validate_bin_deposit_tree(int1, bin_deposit_tree).await?; log::info!( - "Fetched deposit tree with {} leaves from block {}", + "Fetched deposit tree with {} leaves", new_deposit_hash_tree.tree.len(), - new_block_number ); *deposit_hash_tree = new_deposit_hash_tree; } @@ -120,7 +120,7 @@ pub async fn sync_trees( async fn parse_and_validate_bin_deposit_tree( int1: &Int1Contract, bin_deposit_tree: BinDepositTree, -) -> Result<(DepositHashTree, u64), Error> { +) -> Result { let deposit_tree_info: DepositTreeInfo = bin_deposit_tree .try_into() .map_err(|e: anyhow::Error| Error::TreeDeserializationError(e.to_string()))?; @@ -134,7 +134,7 @@ async fn parse_and_validate_bin_deposit_tree( deposit_tree_info.root ))); } - Ok((deposit_tree_info.tree, deposit_tree_info.block_number)) + Ok(deposit_tree_info.tree) } async fn parse_and_validate_bin_eligible_tree( diff --git a/src/utils/bin_parser.rs b/src/utils/bin_parser.rs index e99a7ff..12cc7ad 100644 --- a/src/utils/bin_parser.rs +++ b/src/utils/bin_parser.rs @@ -1,3 +1,5 @@ +use std::time::Instant; + use anyhow::ensure; use intmax2_zkp::{ constants::DEPOSIT_TREE_HEIGHT, @@ -36,14 +38,29 @@ impl TryFrom for EligibleTreeInfo { type Error = anyhow::Error; fn try_from(bin_tree: BinEligibleTree) -> anyhow::Result { + let instant = Instant::now(); let mut tree = EligibleTreeWithMap::new(); - for leaf in bin_tree.leaves { + for leaf in &bin_tree.leaves { let amount: U256 = BigUint::from_bytes_le(&leaf.amount).try_into()?; tree.push(EligibleLeaf { deposit_index: leaf.deposit_index, amount, }); } + log::info!( + "Inserting {} eligible leaves took {:?}", + bin_tree.leaves.len(), + instant.elapsed() + ); + ensure!(tree.tree.height() == ELIGIBLE_TREE_HEIGHT); + + ensure!( + bin_tree.tree_height == ELIGIBLE_TREE_HEIGHT as u32, + "Tree height mismatch: expected {}, got {}", + ELIGIBLE_TREE_HEIGHT, + bin_tree.tree_height + ); + let expected_root = Bytes32::from_bytes_be(&bin_tree.root_hash); let actual_root = tree.get_root(); ensure!( @@ -107,11 +124,19 @@ impl TryFrom for DepositTreeInfo { type Error = anyhow::Error; fn try_from(bin_tree: BinDepositTree) -> anyhow::Result { + let instant = Instant::now(); let mut tree = DepositHashTree::new(); - for leaf_hash in bin_tree.leaf_hashes { - let leaf_hash: Bytes32 = Bytes32::from_bytes_be(&leaf_hash); + for leaf_hash in &bin_tree.leaf_hashes { + let leaf_hash: Bytes32 = Bytes32::from_bytes_be(leaf_hash); tree.push(leaf_hash); } + log::info!( + "Inserting {} deposit leaves took {:?}", + bin_tree.leaf_hashes.len(), + instant.elapsed() + ); + ensure!(tree.tree.height() == DEPOSIT_TREE_HEIGHT); + let expected_root = Bytes32::from_bytes_be(&bin_tree.root_hash); let actual_root = tree.get_root(); ensure!( From 397eeaf40f42ce38b1e190a7cd8845b5760d5bf6 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Wed, 28 May 2025 22:45:36 +0700 Subject: [PATCH 11/27] chore: fix typo & minor test change --- src/services/assets_status.rs | 4 ++++ src/utils/env_config.rs | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/services/assets_status.rs b/src/services/assets_status.rs index b3e50b2..af3b334 100644 --- a/src/services/assets_status.rs +++ b/src/services/assets_status.rs @@ -231,6 +231,10 @@ mod tests { #[ignore] async fn test_assets_status() { dotenv::dotenv().ok(); + let _ = env_logger::builder() + .filter_level(log::LevelFilter::Info) + .try_init(); + let env_config = EnvConfig::import_from_env().unwrap(); let mut state = crate::test::get_dummy_state(&env_config.rpc_url).await; state.sync_trees().await.unwrap(); diff --git a/src/utils/env_config.rs b/src/utils/env_config.rs index df8542f..6d2c705 100644 --- a/src/utils/env_config.rs +++ b/src/utils/env_config.rs @@ -54,7 +54,7 @@ impl EnvConfig { pub fn load_from_file(network: Network, i: usize) -> anyhow::Result { let file = std::fs::File::open(env_config_path(network, i)).map_err(|_| { anyhow::anyhow!( - "Faield to open the config file at {:?}", + "Failed to open the config file at {:?}", env_config_path(network, i) ) })?; From 36fed06fc9ec7cacfb8640cb4dc068c8bf8be5b6 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 10:35:10 +0700 Subject: [PATCH 12/27] feat: add insufficient balance handler --- config/config.base.toml | 22 +++++------ src/external_api/contracts/handlers.rs | 46 +++++++++++++++++++---- src/external_api/contracts/int1.rs | 28 ++++++++++++-- src/external_api/contracts/minter.rs | 52 ++++---------------------- src/main.rs | 2 +- src/services/balance_transfer.rs | 9 ++++- src/services/claim/claim.rs | 2 +- src/services/mining/mod.rs | 12 +++++- src/services/mining/withdrawal/mod.rs | 2 - 9 files changed, 101 insertions(+), 74 deletions(-) diff --git a/config/config.base.toml b/config/config.base.toml index da7e2fc..b16f9a6 100644 --- a/config/config.base.toml +++ b/config/config.base.toml @@ -2,17 +2,17 @@ availability_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/availability" withdrawal_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/gnark-withdraw-circuit" claim_gnark_prover_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/gnark-claim-circuit" -withdrawal_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/withdrawal" -circulation_server_url="https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining" -tree_data_repository="InternetMaximalism/intmax2-mining" -tree_data_directory="base-data" -tree_data_branch="main" +withdrawal_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/withdrawal" +circulation_server_url = "https://v1.base-prod.mining-gateway.intmax.xyz/v1/mining" +tree_data_repository = "InternetMaximalism/intmax2-mining" +tree_data_directory = "base-data" +tree_data_branch = "main" sync_tree_data_interval_in_sec = 3600 gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 8453 -graph_url = "http://localhost:8000/subgraphs/name/prod-int1" +graph_url = "https://v1.base-prod.graph.intmax.xyz/subgraphs/name/prod-int1" int1_address = "0x195F9b5F42435bB71E9765E66a9bdFE40d44A895" minter_address = "0x1f5a5Eb6C3894351425BD51ea2AE1ef3FEC93976" token_address = "0xf95117e3a5B7968703CeD3B66A9CbE0Bc9e1D8bf" @@ -22,12 +22,12 @@ single_claim_gas = 600000 [service] repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" -mining_min_cooldown_in_sec = 3600 # 1 hour -mining_max_cooldown_in_sec = 21600 # 6 hours +mining_min_cooldown_in_sec = 3600 # 1 hour +mining_max_cooldown_in_sec = 21600 # 6 hours loop_cooldown_in_sec = 10 high_gas_retry_interval_in_sec = 10 [env] -default_max_gas_price ="10" -default_mining_times="10" -default_mining_unit="0.1" \ No newline at end of file +default_max_gas_price = "10" +default_mining_times = "10" +default_mining_unit = "0.1" diff --git a/src/external_api/contracts/handlers.rs b/src/external_api/contracts/handlers.rs index 4bac1d7..b51477f 100644 --- a/src/external_api/contracts/handlers.rs +++ b/src/external_api/contracts/handlers.rs @@ -1,22 +1,29 @@ -use super::{error::BlockchainError, utils::ProviderWithSigner}; +use crate::{cli::console::print_status, services::utils::insufficient_balance_instruction}; + +use super::{ + error::BlockchainError, + utils::{NormalProvider, ProviderWithSigner}, +}; use alloy::{ consensus::{Transaction as _, TxEip1559}, - primitives::TxHash, - providers::{PendingTransactionError, Provider as _}, + primitives::{TxHash, U256}, + providers::{PendingTransactionError, Provider as _, WalletProvider}, rpc::types::TransactionRequest, }; use std::time::Duration; -const TIMEOUT: Duration = Duration::from_secs(20); +const TIMEOUT: Duration = Duration::from_secs(60); const MAX_GAS_BUMP_ATTEMPTS: u32 = 3; const GAS_BUMP_PERCENTAGE: u64 = 25; // Should be above 10 to avoid replacement transaction underpriced error pub async fn send_transaction_with_gas_bump( + provider: &NormalProvider, signer: ProviderWithSigner, tx_request: TransactionRequest, tx_name: &str, + from_name: &str, ) -> Result { - let sendable_tx = signer.fill(tx_request).await?; + let sendable_tx = signer.fill(tx_request.clone()).await?; let tx_envelope = sendable_tx.try_into_envelope().unwrap(); let tx_hash = *tx_envelope.hash(); // make tx eip1559 object to get parameters @@ -49,9 +56,32 @@ pub async fn send_transaction_with_gas_bump( // timeout, so we need to bump the gas resend_tx_with_gas_bump(signer, tx_hash, &tx_eip1559, tx_name).await } - Err(e) => Err(BlockchainError::TransactionError(format!( - "{tx_name} failed with error: {e:?}" - ))), + Err(e) => { + if e.to_string().contains("insufficient funds") { + let estimate_gas = provider.estimate_gas(tx_request.clone()).await?; + let gas_price = provider.get_gas_price().await?; + let value = tx_request.value.unwrap_or_default(); + let necessary_balance = U256::from(estimate_gas) * U256::from(gas_price) + value; + insufficient_balance_instruction( + provider, + signer.default_signer_address(), + necessary_balance, + from_name, + ) + .await + .map_err(|e| { + BlockchainError::TransactionError(format!( + "Failed to check balance for {}: {}", + tx_name, e + )) + })?; + print_status(format!("Retrying {} transaction...", tx_name.to_string())); + } + Err(BlockchainError::TransactionError(format!( + "{} failed with error: {:?}", + tx_name, e + ))) + } } } diff --git a/src/external_api/contracts/int1.rs b/src/external_api/contracts/int1.rs index fab5a06..a0fdbdd 100644 --- a/src/external_api/contracts/int1.rs +++ b/src/external_api/contracts/int1.rs @@ -95,7 +95,14 @@ impl Int1Contract { let tx_request = contract .withdraw(public_inputs, proof.into()) .into_transaction_request(); - let tx_hash = send_transaction_with_gas_bump(signer, tx_request, "withdrawal").await?; + let tx_hash = send_transaction_with_gas_bump( + &self.provider, + signer, + tx_request, + "withdrawal", + "withdrawer", + ) + .await?; Ok(tx_hash) } @@ -117,7 +124,14 @@ impl Int1Contract { let tx_request = contract .cancelDeposit(U256::from(deposit_id), deposit) .into_transaction_request(); - let tx_hash = send_transaction_with_gas_bump(signer, tx_request, "cancel_deposit").await?; + let tx_hash = send_transaction_with_gas_bump( + &self.provider, + signer, + tx_request, + "cancel_deposit", + "depositor", + ) + .await?; Ok(tx_hash) } @@ -133,8 +147,14 @@ impl Int1Contract { .depositNativeToken(convert_bytes32_to_b256(recipient_salt_hash)) .value(value) .into_transaction_request(); - let tx_hash = - send_transaction_with_gas_bump(signer, tx_request, "deposit_native_token").await?; + let tx_hash = send_transaction_with_gas_bump( + &self.provider, + signer, + tx_request, + "deposit_native_token", + "depositor", + ) + .await?; Ok(tx_hash) } } diff --git a/src/external_api/contracts/minter.rs b/src/external_api/contracts/minter.rs index 4ecefcc..1a44c74 100644 --- a/src/external_api/contracts/minter.rs +++ b/src/external_api/contracts/minter.rs @@ -89,50 +89,14 @@ impl MinterContract { let tx_request = contract .claimTokens(is_short_term, claims, pis, proof) .into_transaction_request(); - send_transaction_with_gas_bump(signer, tx_request, "claim_tokens").await?; + send_transaction_with_gas_bump( + &self.provider, + signer, + tx_request, + "claim_tokens", + "claim address", + ) + .await?; Ok(()) } } - -// pub async fn claim_tokens( -// claim_key: B256, -// is_short_term: bool, -// claims: &[MiningClaim], -// pis: ClaimPublicInputs, -// proof: &str, -// ) -> anyhow::Result<()> { -// info!( -// "Calling claim_tokens: claims {:?}, pis {:?}, proof {:?}", -// claims, pis, proof -// ); -// let mut mint_claims = Vec::::new(); -// for claim in claims { -// mint_claims.push(minter_v1::MintClaim { -// recipient: Address::from_slice(&claim.recipient.to_bytes_be()), -// nullifier: claim.nullifier.to_bytes_be().try_into().unwrap(), -// amount: U256::from_big_endian(&claim.amount.to_bytes_be()), -// }); -// } -// let pis = minter_v1::ClaimPublicInputs { -// deposit_tree_root: pis.deposit_tree_root.to_bytes_be().try_into().unwrap(), -// eligible_tree_root: pis.eligible_tree_root.to_bytes_be().try_into().unwrap(), -// last_claim_hash: pis.last_claim_hash.to_bytes_be().try_into().unwrap(), -// }; -// let proof = Bytes::from_str(proof).unwrap(); -// let claim_address = get_wallet(claim_key).await?.address(); -// print_status(format!("Claiming tokens for address: {}", claim_address)); - -// await_until_low_gas_price().await?; -// let minter = get_minter_contract_with_signer(claim_key).await?; -// let mut tx = minter.claim_tokens( -// is_short_term, -// mint_claims.clone(), -// pis.clone(), -// proof.clone(), -// ); -// set_gas_price(&mut tx).await?; -// info!("Calling claim_tokens: tx {:?}", tx); -// let _tx_hash = handle_contract_call(tx, claim_address, "claim", "claim").await?; -// print_log(format!("Successfully claimed")); -// Ok(()) -// } diff --git a/src/main.rs b/src/main.rs index a8a7242..f3c5090 100644 --- a/src/main.rs +++ b/src/main.rs @@ -53,7 +53,7 @@ async fn main() { match run(mode).await { Ok(_) => {} Err(e) => { - print_error(format!("{}", e)); + print_error(format!("{:?}", e)); if is_interactive { // Because Windows closes the console window immediately, we need to wait for the user to see the error message press_enter_to_continue(); diff --git a/src/services/balance_transfer.rs b/src/services/balance_transfer.rs index ce6d778..bf70044 100644 --- a/src/services/balance_transfer.rs +++ b/src/services/balance_transfer.rs @@ -33,6 +33,13 @@ pub async fn balance_transfer( let tx_request = TransactionRequest::default() .to(to_address) .value(transfer_amount); - send_transaction_with_gas_bump(signer, tx_request, "send balance").await?; + send_transaction_with_gas_bump( + provider, + signer, + tx_request, + "send balance", + "deposit address", + ) + .await?; Ok(()) } diff --git a/src/services/claim/claim.rs b/src/services/claim/claim.rs index 020f1ad..a1a82d3 100644 --- a/src/services/claim/claim.rs +++ b/src/services/claim/claim.rs @@ -145,8 +145,8 @@ async fn from_step5(state: &State, key: &Key) -> anyhow::Result<()> { last_claim_hash, }; temp::ClaimStatus::delete()?; - await_until_low_gas_price(&state.provider).await?; let proof = Bytes::from_str(&status.gnark_proof.unwrap())?; + await_until_low_gas_price(&state.provider).await?; state .minter .claim_tokens( diff --git a/src/services/mining/mod.rs b/src/services/mining/mod.rs index d4f07db..e46b6e0 100644 --- a/src/services/mining/mod.rs +++ b/src/services/mining/mod.rs @@ -14,7 +14,7 @@ use crate::{ }, }; -use super::assets_status::AssetsStatus; +use super::{assets_status::AssetsStatus, utils::await_until_low_gas_price}; pub mod deterministic_sleep; pub mod withdrawal; @@ -31,6 +31,7 @@ pub async fn mining_task( if cancel_pending_deposits { for &index in assets_status.pending_indices.iter() { let event = assets_status.senders_deposits[index].clone(); + await_until_low_gas_price(&state.provider).await?; state .int1 .cancel_deposit( @@ -52,6 +53,7 @@ pub async fn mining_task( key.deposit_address )); let event = assets_status.senders_deposits[index].clone(); + await_until_low_gas_price(&state.provider).await?; state .int1 .cancel_deposit( @@ -92,11 +94,17 @@ pub async fn mining_task( let pubkey = derive_pubkey_from_private_key(key.deposit_private_key); let pubkey_salt_hash = get_pubkey_salt_hash(pubkey, salt); // execute deposit task + await_until_low_gas_price(&state.provider).await?; state .int1 .deposit_native_token(key.deposit_private_key, pubkey_salt_hash, mining_unit) .await - .context("Failed to deposit native token")?; + .with_context(|| { + format!( + "Failed to deposit to address {:?} with nonce {}", + key.deposit_address, nonce + ) + })?; return Ok(()); } diff --git a/src/services/mining/withdrawal/mod.rs b/src/services/mining/withdrawal/mod.rs index 9ad6a76..7248dbf 100644 --- a/src/services/mining/withdrawal/mod.rs +++ b/src/services/mining/withdrawal/mod.rs @@ -13,7 +13,6 @@ use crate::{ withdrawal::submit_withdrawal, }, }, - services::utils::await_until_low_gas_price, state::{key::Key, state::State}, utils::config::Settings, }; @@ -128,7 +127,6 @@ async fn from_step5(state: &State, _key: &Key) -> anyhow::Result<()> { token_index: status.witness.deposit_leaf.token_index, amount: status.witness.deposit_leaf.amount, }; - await_until_low_gas_price(&state.provider).await?; let tx_hash = submit_withdrawal(&state.int1, pis, status.gnark_proof.as_ref().unwrap()).await?; // delete here because get_tx_receipt may fail, and we don't want to retry this step temp::WithdrawalStatus::delete()?; From 0082f9253d124e6c20e90deae94a4b42de045984 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 10:37:07 +0700 Subject: [PATCH 13/27] chore: increase transaction timeout --- src/external_api/contracts/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/external_api/contracts/handlers.rs b/src/external_api/contracts/handlers.rs index b51477f..7751a6b 100644 --- a/src/external_api/contracts/handlers.rs +++ b/src/external_api/contracts/handlers.rs @@ -12,7 +12,7 @@ use alloy::{ }; use std::time::Duration; -const TIMEOUT: Duration = Duration::from_secs(60); +const TIMEOUT: Duration = Duration::from_secs(120); const MAX_GAS_BUMP_ATTEMPTS: u32 = 3; const GAS_BUMP_PERCENTAGE: u64 = 25; // Should be above 10 to avoid replacement transaction underpriced error From c480887bd296919b6f5f3f65c8a2ef242f3a2240 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 11:49:30 +0700 Subject: [PATCH 14/27] chore: print tx success status --- src/cli/export_deposit_accounts.rs | 2 ++ src/external_api/contracts/handlers.rs | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/cli/export_deposit_accounts.rs b/src/cli/export_deposit_accounts.rs index aecd1e0..caa1130 100644 --- a/src/cli/export_deposit_accounts.rs +++ b/src/cli/export_deposit_accounts.rs @@ -20,6 +20,8 @@ pub async fn export_deposit_accounts( let key = Key::new(withdrawal_private_key, 0); let balance = provider.get_balance(key.deposit_address).await?; println!(); + println!("Withdrawal Address: {:?}", key.withdrawal_address); + println!("Withdrawal Private Key: {:?}", withdrawal_private_key); println!( "Deposit Address: {:?} ({} ETH)", key.deposit_address, diff --git a/src/external_api/contracts/handlers.rs b/src/external_api/contracts/handlers.rs index 7751a6b..fc02f72 100644 --- a/src/external_api/contracts/handlers.rs +++ b/src/external_api/contracts/handlers.rs @@ -50,11 +50,22 @@ pub async fn send_transaction_with_gas_bump( tx_name.to_string(), tx_hash ); + print_status(format!( + "{} transaction sent successfully with hash: {:?}", + tx_name.to_string(), + tx_hash + )); Ok(tx_hash) } Err(PendingTransactionError::TxWatcher(_)) => { // timeout, so we need to bump the gas - resend_tx_with_gas_bump(signer, tx_hash, &tx_eip1559, tx_name).await + let tx_hash = resend_tx_with_gas_bump(signer, tx_hash, &tx_eip1559, tx_name).await?; + print_status(format!( + "{} transaction sent successfully with hash: {:?}", + tx_name.to_string(), + tx_hash + )); + Ok(tx_hash) } Err(e) => { if e.to_string().contains("insufficient funds") { From f7666885e0ed5a47cb0b142e5d0eb562c3c8df4b Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 13:24:44 +0700 Subject: [PATCH 15/27] feat: github cache --- src/external_api/github.rs | 63 ++++++++++++++++++++++++++++++++------ 1 file changed, 54 insertions(+), 9 deletions(-) diff --git a/src/external_api/github.rs b/src/external_api/github.rs index 4d8f5b7..78f2abb 100644 --- a/src/external_api/github.rs +++ b/src/external_api/github.rs @@ -3,10 +3,12 @@ use log::info; use regex::Regex; use reqwest::{self}; use serde_json::Value; +use sha3::Digest as _; use crate::utils::{ bin_parser::{BinDepositTree, BinEligibleTree}, config::Settings, + file::{create_file_with_content, get_data_path}, }; #[derive(Debug, thiserror::Error)] @@ -15,6 +17,8 @@ pub enum Error { NetworkError, #[error("Failed to deserialize data {}", _0)] DeserializeError(String), + #[error("Cache error: {}", _0)] + CacheError(String), } #[derive(Debug)] @@ -64,7 +68,13 @@ pub async fn fetch_latest_tree_from_github(last_update: NaiveDate) -> Result Result Result Result, Error> { - let download_url = file["download_url"] - .as_str() - .ok_or(Error::DeserializeError( - "no download_url filed in github files".to_string(), - ))?; +async fn fetch_content(client: &reqwest::Client, download_url: &str) -> Result, Error> { + if let Some(cached_content) = read_cache(download_url) + .await + .map_err(|e| Error::CacheError(format!("failed to read cache: {}", e)))? + { + info!("Using cached content for {}", download_url); + return Ok(cached_content); + } let content = client .get(download_url) .header("User-Agent", "Rust-GitHub-File-Reader") @@ -161,9 +183,32 @@ async fn fetch_content(client: &reqwest::Client, file: &Value) -> Result .bytes() .await .map_err(|_| Error::DeserializeError("failed to deserialize files as bytes".to_string()))?; + write_cache(download_url, &content) + .await + .map_err(|e| Error::CacheError(format!("failed to write cache: {}", e)))?; Ok(content.into()) } +async fn read_cache(download_url: &str) -> anyhow::Result>> { + if let Ok(content) = std::fs::read(cache_path(download_url)?) { + return Ok(Some(content)); + } else { + return Ok(None); + } +} + +async fn write_cache(download_url: &str, content: &[u8]) -> anyhow::Result<()> { + create_file_with_content(&cache_path(download_url)?, content)?; + Ok(()) +} + +fn cache_path(download_url: &str) -> anyhow::Result { + let hex_str = hex::encode(sha3::Keccak256::digest(download_url.as_bytes())); + let data_path = get_data_path()?; + let cache_path = data_path.join("github_cache").join(hex_str); + Ok(cache_path) +} + #[cfg(test)] mod tests { use super::*; From d59311d9d5b0aec0c81670cbcfbcee818d7f8638 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 13:52:21 +0700 Subject: [PATCH 16/27] feat: print balance of withdrawal --- src/cli/export_deposit_accounts.rs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cli/export_deposit_accounts.rs b/src/cli/export_deposit_accounts.rs index caa1130..d1daa48 100644 --- a/src/cli/export_deposit_accounts.rs +++ b/src/cli/export_deposit_accounts.rs @@ -18,14 +18,18 @@ pub async fn export_deposit_accounts( withdrawal_private_key: B256, ) -> anyhow::Result<()> { let key = Key::new(withdrawal_private_key, 0); - let balance = provider.get_balance(key.deposit_address).await?; println!(); - println!("Withdrawal Address: {:?}", key.withdrawal_address); + println!( + "Withdrawal Address: {:?} ({} ETH)", + key.withdrawal_address, + pretty_format_u256(provider.get_balance(key.withdrawal_address).await?) + ); println!("Withdrawal Private Key: {:?}", withdrawal_private_key); + println!(); println!( "Deposit Address: {:?} ({} ETH)", key.deposit_address, - pretty_format_u256(balance), + pretty_format_u256(provider.get_balance(key.deposit_address).await?), ); println!("Private Key: {:?}", key.deposit_private_key); From 3873857fba83ede70bac9967cd8682e6b2249b5b Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 13:57:49 +0700 Subject: [PATCH 17/27] feat: abr diplay of withdrawal --- src/cli/accounts_status.rs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli/accounts_status.rs b/src/cli/accounts_status.rs index d2631c5..299dc0f 100644 --- a/src/cli/accounts_status.rs +++ b/src/cli/accounts_status.rs @@ -18,11 +18,14 @@ pub async fn accounts_status( ) -> anyhow::Result<()> { println!("Network: {}", get_network()); let withdrawal_address = get_address_from_private_key(withdrawal_private_key); + + let withdrawal_str = withdrawal_address.to_string(); + let withdrawal_abr_str =withdrawal_str[0..6].to_string() + "..." + &withdrawal_str[withdrawal_str.len()-4..]; let withdrawal_balance = state.provider.get_balance(withdrawal_address).await?; let withdrawal_token_balance = state.token.get_token_balance(withdrawal_address).await?; println!( - "Withdrawal address(don’t deposit Ether to this): {} {} ETH {} ITX", - withdrawal_address, + "Withdrawal address (don’t deposit Ether to this): {} {} ETH {} ITX", + withdrawal_abr_str, pretty_format_u256(withdrawal_balance), pretty_format_u256(withdrawal_token_balance), ); From 91b2737760fbdc8985dfc61f67a081433389579b Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 14:38:54 +0700 Subject: [PATCH 18/27] feat: notify balance update in insufficient_balance_instruction --- src/services/utils.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/services/utils.rs b/src/services/utils.rs index 785261a..f8d1f14 100644 --- a/src/services/utils.rs +++ b/src/services/utils.rs @@ -15,7 +15,7 @@ pub async fn insufficient_balance_instruction( required_balance: U256, name: &str, ) -> anyhow::Result<()> { - let balance = provider.get_balance(address).await?; + let mut balance = provider.get_balance(address).await?; if required_balance <= balance { return Ok(()); } @@ -32,6 +32,13 @@ pub async fn insufficient_balance_instruction( print_status("Balance updated"); sleep_for(10); break; + } else if new_balance != balance { + print_warning(format!( + "Balance is still insufficient: {} ETH < {} ETH. Waiting for your deposit...", + pretty_format_u256(new_balance), + pretty_format_u256(required_balance) + )); + balance = new_balance; } sleep_for(10); } From f05b638a1f555edff17b80b1cb62c5f7dc946748 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Thu, 29 May 2025 14:42:19 +0700 Subject: [PATCH 19/27] chore: fix typos --- docs/base_mainnet_quickstart.md | 4 ++-- docs/base_sepolia_quickstart.md | 2 +- docs/faq.md | 4 ++-- docs/migrate.md | 6 +++--- docs/windows_guide.md | 2 +- src/external_api/intmax/gnark.rs | 6 +++--- src/services/assets_status.rs | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/docs/base_mainnet_quickstart.md b/docs/base_mainnet_quickstart.md index 7fd7771..e95e24d 100644 --- a/docs/base_mainnet_quickstart.md +++ b/docs/base_mainnet_quickstart.md @@ -224,14 +224,14 @@ To claim ITX token, select `Claim`. You can check whether an deposit address is
2. **Claim ITX Token To Withdrawal Address**: - If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availablity time reaches. To see the tokens in your wallet, ensure to add the ITX mainnet token contract address to your wallet using this [guide](./add_token_to_wallet.md). + If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availability time reaches. To see the tokens in your wallet, ensure to add the ITX mainnet token contract address to your wallet using this [guide](./add_token_to_wallet.md).
Mining CLI
Check wallet to see tokens. -After claiming process is done, you can proceed to retreiving available ETH in the Intmax2 Network back to your withdrawal address. Proceed by pressing any key as instructed by CLI. +After claiming process is done, you can proceed to retrieving available ETH in the Intmax2 Network back to your withdrawal address. Proceed by pressing any key as instructed by CLI. ## Withdraw ETH diff --git a/docs/base_sepolia_quickstart.md b/docs/base_sepolia_quickstart.md index 0cfd1eb..8815024 100644 --- a/docs/base_sepolia_quickstart.md +++ b/docs/base_sepolia_quickstart.md @@ -211,7 +211,7 @@ To claim ITX token, select `Claim`. You can check whether an deposit address is
2. **Claim ITX Token To Withdrawal Address**: -If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availablity time reaches. To see the tokens in your wallet, ensure to add the ITX token contract address to your wallet using the Network [guide](./add_token_to_wallet.md). +If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availability time reaches. To see the tokens in your wallet, ensure to add the ITX token contract address to your wallet using the Network [guide](./add_token_to_wallet.md).
Mining CLI
diff --git a/docs/faq.md b/docs/faq.md index 58a8207..0fa3909 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -2,11 +2,11 @@ ### 1. Why can’t I find my ETH after depositing to the CLI address -You probably sent ETH in the wrong network, you can retreive ETH back and send to the right network +You probably sent ETH in the wrong network, you can retrieve ETH back and send to the right network ### 2. How to recover funds when sent to the wrong network -Export private key first and import the wallet account in an external wallet(e.g, INTMAX Wallet or Metamask). You cannow transfer the funds and send using the corrrect network. +Export private key first and import the wallet account in an external wallet(e.g, INTMAX Wallet or Metamask). You cannow transfer the funds and send using the correct network. ### 3. Error: Internal error: Failed to claim: Error sending transaction: Revert (bytes(0x)) ERROR: Internal error: Failed to claim: Error sending transaction: MiddlewareError...(JsonRpcError { code: -32003, message: "insufficient funds for gas * price + value: have 13090885838070 want 2612337489 diff --git a/docs/migrate.md b/docs/migrate.md index bea5815..b86ac80 100644 --- a/docs/migrate.md +++ b/docs/migrate.md @@ -22,7 +22,7 @@ Before you begin, please ensure you have the following: ### Upgrading CLI Version -1. **Lauching the CLI** Double-click on the mining-cli shown in this image to launch. +1. **Launching the CLI** Double-click on the mining-cli shown in this image to launch.
Mining CLI
@@ -84,14 +84,14 @@ To claim ITX token, select `Claim`. You can check whether an deposit address is Mining CLI 2. **Claim ITX Token To Withdrawal Address**: -If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availablity time reaches. To see the tokens in your wallet, ensure to add the ITX mainnet token contract address to your wallet using the Network [guide](./add_token_to_wallet.md). +If `Claim` was selected and your address qualifies for ITX tokens, the CLI automatically transfers your available ITX tokens to your withdrawal wallet immediately or when the token availability time reaches. To see the tokens in your wallet, ensure to add the ITX mainnet token contract address to your wallet using the Network [guide](./add_token_to_wallet.md).
Mining CLI
Check wallet to see tokens. -After claiming process is done, you can proceed to retreiving available ETH in the INTMAX2 Network back to your withdrawal address. Proceed by pressing any key as instructed by CLI. +After claiming process is done, you can proceed to retrieving available ETH in the INTMAX2 Network back to your withdrawal address. Proceed by pressing any key as instructed by CLI. ### Withdraw ETH diff --git a/docs/windows_guide.md b/docs/windows_guide.md index d8795ab..b4e0781 100644 --- a/docs/windows_guide.md +++ b/docs/windows_guide.md @@ -56,7 +56,7 @@ Double click the mining CLI to run as you normally would after adding the exclus
Mining CLI
-11. **Runing The Mining CLI**: Windows Defender will proceed to show file name and publisher. Scroll down the screen and select *Run anyway*. +11. **Running The Mining CLI**: Windows Defender will proceed to show file name and publisher. Scroll down the screen and select *Run anyway*.
Mining CLI
diff --git a/src/external_api/intmax/gnark.rs b/src/external_api/intmax/gnark.rs index 6fa7925..3f91468 100644 --- a/src/external_api/intmax/gnark.rs +++ b/src/external_api/intmax/gnark.rs @@ -58,13 +58,13 @@ pub struct GnarkStartProofSuccessResponse { #[derive(Serialize, Deserialize)] #[serde(untagged)] enum GnarkGetProofResponse { - Success(GnarkGetProofSucessResponse), + Success(GnarkGetProofSuccessResponse), Error(IntmaxErrorResponse), } #[derive(Serialize, Deserialize, Clone, Debug, PartialEq)] #[serde(rename_all = "camelCase")] -pub struct GnarkGetProofSucessResponse { +pub struct GnarkGetProofSuccessResponse { pub job_id: String, pub status: String, pub result: Option, @@ -109,7 +109,7 @@ pub async fn gnark_start_prove( pub async fn gnark_get_proof( base_url: &str, job_id: &str, -) -> Result { +) -> Result { info!("gnark_get_proof with arg job_id: {}", job_id); let response = with_retry(|| async { reqwest::Client::new() diff --git a/src/services/assets_status.rs b/src/services/assets_status.rs index af3b334..2296f8c 100644 --- a/src/services/assets_status.rs +++ b/src/services/assets_status.rs @@ -213,7 +213,7 @@ impl AssetsStatus { /// Returns the times of deposits that are not cancelled pub fn effective_deposit_times(&self) -> usize { assert!(self.senders_deposits.len() >= self.cancelled_indices.len()); - self.senders_deposits.len() - self.cancelled_indices.len() // this never underflows + self.senders_deposits.len() - self.cancelled_indices.len() // this never undertows } pub fn no_remaining(&self) -> bool { From 94cf4247de488518d1ccd3c9527817773efc77fa Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Fri, 30 May 2025 09:00:44 +0700 Subject: [PATCH 20/27] fix: reject all indices --- src/services/mining/mod.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/services/mining/mod.rs b/src/services/mining/mod.rs index e46b6e0..980d626 100644 --- a/src/services/mining/mod.rs +++ b/src/services/mining/mod.rs @@ -47,10 +47,10 @@ pub async fn mining_task( } // cancel rejected deposits - if let Some(&index) = assets_status.rejected_indices.first() { + for &index in assets_status.rejected_indices.iter() { print_warning(format!( "Deposit address {:?} is rejected because of AML check. For more information, please refer to the documentation.", - key.deposit_address + key.deposit_address )); let event = assets_status.senders_deposits[index].clone(); await_until_low_gas_price(&state.provider).await?; @@ -65,6 +65,8 @@ pub async fn mining_task( ) .await .context("Failed to cancel rejected deposit")?; + } + if !assets_status.rejected_indices.is_empty() { // Halt the CLI if a deposit is rejected to prevent further deposits return Err(CLIError::InternalError("Deposit is rejected".to_string()).into()); } From 04d217364a5aafc85438d481fe18979383114473 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Fri, 30 May 2025 09:01:13 +0700 Subject: [PATCH 21/27] chore: increase cooldown for less rpc requests --- config/config.base-sepolia.toml | 4 ++-- config/config.base.toml | 4 ++-- config/config.mainnet.toml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/config/config.base-sepolia.toml b/config/config.base-sepolia.toml index 6289009..9779295 100644 --- a/config/config.base-sepolia.toml +++ b/config/config.base-sepolia.toml @@ -24,8 +24,8 @@ single_claim_gas = 600000 repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" mining_min_cooldown_in_sec = 20 mining_max_cooldown_in_sec = 200 -loop_cooldown_in_sec = 10 -high_gas_retry_interval_in_sec = 10 +loop_cooldown_in_sec = 60 +high_gas_retry_interval_in_sec = 30 [env] default_max_gas_price = "100" diff --git a/config/config.base.toml b/config/config.base.toml index b16f9a6..81086d1 100644 --- a/config/config.base.toml +++ b/config/config.base.toml @@ -24,8 +24,8 @@ single_claim_gas = 600000 repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" mining_min_cooldown_in_sec = 3600 # 1 hour mining_max_cooldown_in_sec = 21600 # 6 hours -loop_cooldown_in_sec = 10 -high_gas_retry_interval_in_sec = 10 +loop_cooldown_in_sec = 60 +high_gas_retry_interval_in_sec = 30 [env] default_max_gas_price = "10" diff --git a/config/config.mainnet.toml b/config/config.mainnet.toml index e5c5920..8af8582 100644 --- a/config/config.mainnet.toml +++ b/config/config.mainnet.toml @@ -24,8 +24,8 @@ single_claim_gas = 600000 repository_url = "https://github.com/InternetMaximalism/intmax2-mining-cli" mining_min_cooldown_in_sec = 3600 # 1 hour mining_max_cooldown_in_sec = 21600 # 6 hours -loop_cooldown_in_sec = 10 -high_gas_retry_interval_in_sec = 10 +loop_cooldown_in_sec = 60 +high_gas_retry_interval_in_sec = 30 [env] default_max_gas_price = "30" From 41954a6261b7ac0b4d757209f02f269476d20c64 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Fri, 30 May 2025 14:06:14 +0700 Subject: [PATCH 22/27] feat: add health check for graph client --- config/config.base-sepolia.toml | 1 + config/config.base.toml | 1 + config/config.mainnet.toml | 1 + src/external_api/graph/client.rs | 75 +++++++++++++++++++++++++++++++- src/external_api/graph/error.rs | 3 ++ src/services/mod.rs | 7 ++- src/services/utils.rs | 23 +++++++++- src/state/state.rs | 7 ++- src/test/mod.rs | 8 +++- src/utils/config.rs | 1 + 10 files changed, 120 insertions(+), 7 deletions(-) diff --git a/config/config.base-sepolia.toml b/config/config.base-sepolia.toml index 9779295..a78905e 100644 --- a/config/config.base-sepolia.toml +++ b/config/config.base-sepolia.toml @@ -13,6 +13,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 84532 graph_url = "http://localhost:8000/subgraphs/name/stage-int1" +graph_health_check_timeout_in_sec = 60 int1_address = "0x5dfa05aAdbE75a92f6153508950533fC1bed98BE" minter_address = "0xeF9CBc6F2f602AF19b0fEc2cc4F217177730858E" token_address = "0x2699CD7f883DecC464171a7A92f4CcC4eF220fa2" diff --git a/config/config.base.toml b/config/config.base.toml index 81086d1..6fb07a3 100644 --- a/config/config.base.toml +++ b/config/config.base.toml @@ -13,6 +13,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 8453 graph_url = "https://v1.base-prod.graph.intmax.xyz/subgraphs/name/prod-int1" +graph_health_check_timeout_in_sec = 60 int1_address = "0x195F9b5F42435bB71E9765E66a9bdFE40d44A895" minter_address = "0x1f5a5Eb6C3894351425BD51ea2AE1ef3FEC93976" token_address = "0xf95117e3a5B7968703CeD3B66A9CbE0Bc9e1D8bf" diff --git a/config/config.mainnet.toml b/config/config.mainnet.toml index 8af8582..53dbf18 100644 --- a/config/config.mainnet.toml +++ b/config/config.mainnet.toml @@ -13,6 +13,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 1 graph_url = "http://localhost:8000/subgraphs/name/legacy-int1" +graph_health_check_timeout_in_sec = 60 int1_address = "0x0Ac498bCA32B00E2584171844fb9A5943398D9c1" minter_address = "0x38DE07d2526Ae929f1903E5F109B70C50e12A8E0" token_address = "0xe24e207c6156241cAfb41D025B3b5F0677114C81" diff --git a/src/external_api/graph/client.rs b/src/external_api/graph/client.rs index 180338e..f5c0cd6 100644 --- a/src/external_api/graph/client.rs +++ b/src/external_api/graph/client.rs @@ -26,16 +26,23 @@ pub struct GraphClient { pub bearer_token: Option, pub client: Client, pub provider: NormalProvider, + pub health_check_timeout: u64, } impl GraphClient { - pub fn new(provider: NormalProvider, url: &str, bearer_token: Option) -> Self { + pub fn new( + provider: NormalProvider, + url: &str, + bearer_token: Option, + health_check_timeout: u64, + ) -> Self { let client = Client::new(); GraphClient { client, provider, url: url.to_string(), bearer_token, + health_check_timeout, } } @@ -215,6 +222,44 @@ impl GraphClient { .map(|entry| entry.block_timestamp); Ok(timestamp) } + + pub async fn health_check(&self) -> Result<(), GraphClientError> { + let query = r#" + query MyQuery { + _meta { + block { + timestamp + } + hasIndexingErrors + } + } + "#; + let request = json!({ + "query": query, + }); + let response: GraphQLResponse = post_request_with_bearer_token( + &self.url, + "", + self.bearer_token.clone(), + Some(&request), + ) + .await?; + + if response.data.meta.has_indexing_errors { + return Err(GraphClientError::HealthCheckError( + "Graph has indexing errors".to_string(), + )); + } + let timestamp = response.data.meta.block.timestamp; + let current_timestamp = chrono::Utc::now().timestamp() as u64; + if current_timestamp.saturating_sub(timestamp) > self.health_check_timeout { + return Err(GraphClientError::HealthCheckError(format!( + "Graph is not up to date. Last update was at {} seconds ago", + current_timestamp.saturating_sub(timestamp) + ))); + } + Ok(()) + } } #[derive(Debug, Serialize, Deserialize)] @@ -276,6 +321,25 @@ pub struct WithdrawnEntry { pub block_timestamp: u64, } +#[derive(Debug, Deserialize, Serialize)] +struct MetaData { + #[serde(rename = "_meta")] + meta: MetaEntry, +} + +#[derive(Debug, Deserialize, Serialize)] +#[serde(rename_all = "camelCase")] +struct MetaEntry { + block: Block, + has_indexing_errors: bool, +} + +#[serde_as] +#[derive(Debug, Deserialize, Serialize)] +struct Block { + timestamp: u64, +} + #[cfg(test)] mod tests { use std::env; @@ -289,7 +353,7 @@ mod tests { let rpc_url = env::var("RPC_URL").unwrap_or_else(|_| "http://localhost:8545".to_string()); let provider = get_provider(&rpc_url).unwrap(); - Ok(GraphClient::new(provider, &graph_url, None)) + Ok(GraphClient::new(provider, &graph_url, None, 60)) } #[tokio::test] @@ -340,4 +404,11 @@ mod tests { .unwrap(); dbg!(&result); } + + #[tokio::test] + async fn test_graph_client_health_check() { + let client = get_client().unwrap(); + let result = client.health_check().await; + assert!(result.is_ok(), "Health check failed: {:?}", result); + } } diff --git a/src/external_api/graph/error.rs b/src/external_api/graph/error.rs index 40bd91d..4f16742 100644 --- a/src/external_api/graph/error.rs +++ b/src/external_api/graph/error.rs @@ -7,4 +7,7 @@ pub enum GraphClientError { #[error("Request error: {0}")] RequestError(#[from] RequestError), + + #[error("Health check error: {0}")] + HealthCheckError(String), } diff --git a/src/services/mod.rs b/src/services/mod.rs index 4eefe12..7d65b0f 100644 --- a/src/services/mod.rs +++ b/src/services/mod.rs @@ -13,7 +13,7 @@ use crate::{ use alloy::primitives::{B256, U256}; use claim::claim_task; use mining::mining_task; -use utils::is_address_used; +use utils::{await_until_graph_syncs, is_address_used}; pub mod assets_status; pub mod balance_transfer; @@ -45,6 +45,7 @@ pub async fn mining_loop( .await?; loop { check_availability().await?; + await_until_graph_syncs(&state.graph_client).await?; let assets_status = state.sync_and_fetch_assets(&key).await?; let is_qualified = !get_circulation(key.deposit_address).await?.is_excluded; let will_deposit = assets_status.effective_deposit_times() < mining_times as usize @@ -95,6 +96,7 @@ pub async fn exit_loop(state: &mut State, withdrawal_private_key: B256) -> anyho print_log(format!("Exit for deposit address{:?}", key.deposit_address)); loop { check_availability().await?; + await_until_graph_syncs(&state.graph_client).await?; let assets_status = state.sync_and_fetch_assets(&key).await?; if assets_status.pending_indices.is_empty() && assets_status.rejected_indices.is_empty() @@ -119,6 +121,7 @@ pub async fn legacy_exit_loop( let mut key_number = 0; loop { check_availability().await?; + await_until_graph_syncs(&state.graph_client).await?; let key = Key::new(withdrawal_private_key, key_number); if !is_address_used(&state.provider, key.deposit_address).await? { print_status("exit loop finished".to_string()); @@ -152,6 +155,7 @@ pub async fn claim_loop(state: &mut State, withdrawal_private_key: B256) -> anyh let key = Key::new(withdrawal_private_key, 0); for is_short_term in [true, false] { check_availability().await?; + await_until_graph_syncs(&state.graph_client).await?; if !is_address_used(&state.provider, key.deposit_address).await? { print_status("claim loop finished".to_string()); return Ok(()); @@ -185,6 +189,7 @@ pub async fn legacy_claim_loop( loop { for is_short_term in [true, false] { check_availability().await?; + await_until_graph_syncs(&state.graph_client).await?; let key = Key::new(withdrawal_private_key, key_number); if !is_address_used(&state.provider, key.deposit_address).await? { print_status("claim loop finished".to_string()); diff --git a/src/services/utils.rs b/src/services/utils.rs index f8d1f14..87ba4a0 100644 --- a/src/services/utils.rs +++ b/src/services/utils.rs @@ -5,7 +5,7 @@ use alloy::{ use crate::{ cli::console::{print_status, print_warning}, - external_api::contracts::utils::NormalProvider, + external_api::{contracts::utils::NormalProvider, graph::client::GraphClient}, utils::{config::Settings, env_config::EnvConfig, time::sleep_for}, }; @@ -70,6 +70,27 @@ pub async fn await_until_low_gas_price(provider: &NormalProvider) -> anyhow::Res Ok(()) } +pub async fn await_until_graph_syncs(graph: &GraphClient) -> anyhow::Result<()> { + let mut retries = 0; + loop { + match graph.health_check().await { + Ok(()) => { + log::info!("Graph is synced and healthy"); + break; + } + Err(e) => { + print_warning(format!("Graph is not synced yet: {}. Retrying...", e)); + sleep_for(10); + } + } + if retries >= 10 { + return Err(anyhow::anyhow!("Graph is not synced after 10 attempts")); + } + retries += 1; + } + Ok(()) +} + pub async fn is_address_used( provider: &NormalProvider, deposit_address: Address, diff --git a/src/state/state.rs b/src/state/state.rs index c3b1e4d..8af1afa 100644 --- a/src/state/state.rs +++ b/src/state/state.rs @@ -53,7 +53,12 @@ impl State { provider.clone(), settings.blockchain.token_address.parse().unwrap(), ); - let graph_client = GraphClient::new(provider.clone(), &settings.blockchain.graph_url, None); + let graph_client = GraphClient::new( + provider.clone(), + &settings.blockchain.graph_url, + None, + settings.blockchain.graph_health_check_timeout_in_sec, + ); Self { deposit_hash_tree: DepositHashTree::new(), diff --git a/src/test/mod.rs b/src/test/mod.rs index ad54add..82114f2 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -54,9 +54,13 @@ pub async fn get_dummy_state(rpc_url: &str) -> State { provider.clone(), settings.blockchain.token_address.parse().unwrap(), ); - let graph_client = GraphClient::new(provider.clone(), &settings.blockchain.graph_url, None); + let graph_client = GraphClient::new( + provider.clone(), + &settings.blockchain.graph_url, + None, + settings.blockchain.graph_health_check_timeout_in_sec, + ); - State { deposit_hash_tree: DepositHashTree::new(), short_term_eligible_tree: eligible_tree.clone(), diff --git a/src/utils/config.rs b/src/utils/config.rs index 07dd9e1..55efd1f 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -43,6 +43,7 @@ pub struct Api { pub struct Blockchain { pub chain_id: u64, pub graph_url: String, + pub graph_health_check_timeout_in_sec: u64, pub int1_address: String, pub minter_address: String, pub token_address: String, From c5465322845a820f2ff85792e65debe0f73aafd7 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Fri, 30 May 2025 18:11:02 +0700 Subject: [PATCH 23/27] Update src/cli/accounts_status.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/cli/accounts_status.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/cli/accounts_status.rs b/src/cli/accounts_status.rs index 299dc0f..06a8644 100644 --- a/src/cli/accounts_status.rs +++ b/src/cli/accounts_status.rs @@ -20,7 +20,11 @@ pub async fn accounts_status( let withdrawal_address = get_address_from_private_key(withdrawal_private_key); let withdrawal_str = withdrawal_address.to_string(); - let withdrawal_abr_str =withdrawal_str[0..6].to_string() + "..." + &withdrawal_str[withdrawal_str.len()-4..]; + let withdrawal_abr_str = format!( + "{}...{}", + &withdrawal_str[0..6], + &withdrawal_str[withdrawal_str.len() - 4..] + ); let withdrawal_balance = state.provider.get_balance(withdrawal_address).await?; let withdrawal_token_balance = state.token.get_token_balance(withdrawal_address).await?; println!( From 87116a6e1322c8d7eb38d0a6cf82654b0b0f3258 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Fri, 30 May 2025 18:11:35 +0700 Subject: [PATCH 24/27] Update src/cli/configure.rs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- src/cli/configure.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cli/configure.rs b/src/cli/configure.rs index f39343f..79c8eca 100644 --- a/src/cli/configure.rs +++ b/src/cli/configure.rs @@ -263,7 +263,7 @@ async fn input_withdrawal_private_key(rpc_url: &str) -> anyhow::Result { .with_prompt(format!("Withdrawal private key of {}", get_network())) .validate_with(|input: &String| validate_private_key_with_duplication_check(&[], input)) .interact()?; - let withdrawal_private_key: B256 = withdrawal_private_key.parse().unwrap(); + let withdrawal_private_key: B256 = withdrawal_private_key.parse()?; let withdrawal_address = get_address_from_private_key(withdrawal_private_key); println!("Withdrawal Address: {:?}", withdrawal_address); From 01d7df7ab23b719a94351056e301244986eb1635 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Mon, 2 Jun 2025 15:43:39 +0700 Subject: [PATCH 25/27] chore: replace graphql url for base sepolia/mainnet --- config/config.base-sepolia.toml | 2 +- config/config.mainnet.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/config.base-sepolia.toml b/config/config.base-sepolia.toml index a78905e..4daf218 100644 --- a/config/config.base-sepolia.toml +++ b/config/config.base-sepolia.toml @@ -12,7 +12,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 84532 -graph_url = "http://localhost:8000/subgraphs/name/stage-int1" +graph_url = "https://base-sepolia.graph.intmax.xyz/subgraphs/name/stage-int1" graph_health_check_timeout_in_sec = 60 int1_address = "0x5dfa05aAdbE75a92f6153508950533fC1bed98BE" minter_address = "0xeF9CBc6F2f602AF19b0fEc2cc4F217177730858E" diff --git a/config/config.mainnet.toml b/config/config.mainnet.toml index 53dbf18..063b3a0 100644 --- a/config/config.mainnet.toml +++ b/config/config.mainnet.toml @@ -12,7 +12,7 @@ gnark_get_proof_cooldown_in_sec = 60 [blockchain] chain_id = 1 -graph_url = "http://localhost:8000/subgraphs/name/legacy-int1" +graph_url = "https://mainnet.graph.intmax.xyz/subgraphs/name/legacy-int1" graph_health_check_timeout_in_sec = 60 int1_address = "0x0Ac498bCA32B00E2584171844fb9A5943398D9c1" minter_address = "0x38DE07d2526Ae929f1903E5F109B70C50e12A8E0" From 7117190781ccbf2c748dcd9a61cc6edd99dd92bc Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:27:52 +0700 Subject: [PATCH 26/27] fix: fix compile error for windows --- Cargo.lock | 3020 ++++++++++++++++++++++++++++++++++++++++++---------- Cargo.toml | 38 +- 2 files changed, 2472 insertions(+), 586 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1ea1543..2b63639 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,16 @@ # It is not intended for manual editing. version = 4 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + [[package]] name = "addchain" version = "0.2.0" @@ -43,33 +53,64 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if", - "cipher", + "cfg-if 1.0.0", + "cipher 0.3.0", "cpufeatures", "opaque-debug", ] +[[package]] +name = "aes" +version = "0.8.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" +dependencies = [ + "cfg-if 1.0.0", + "cipher 0.4.4", + "cpufeatures", +] + [[package]] name = "aes-gcm" -version = "0.9.2" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc3be92e19a7ef47457b8e6f90707e12b6ac5d20c6f3866584fa3be0787d839f" +checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ "aead", - "aes", - "cipher", - "ctr", + "aes 0.7.5", + "cipher 0.3.0", + "ctr 0.8.0", "ghash", "subtle", ] +[[package]] +name = "ahash" +version = "0.2.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb" +dependencies = [ + "const-random", +] + +[[package]] +name = "ahash" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" +dependencies = [ + "getrandom 0.2.15", + "once_cell", + "version_check", +] + [[package]] name = "ahash" version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "const-random", "once_cell", "version_check", @@ -93,9 +134,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca940218f168ba7dd97c22fccd3055e9f2ff463bd5aededf614f1fba71c90648" +checksum = "0093d23bf026b580c1f66ed3a053d8209c104a446c5264d3ad99587f6edef24e" dependencies = [ "alloy-consensus", "alloy-contract", @@ -126,9 +167,9 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7329eb72d95576dfb8813175bcf671198fb24266b0b3e520052a513e30c284df" +checksum = "ad451f9a70c341d951bca4e811d74dbe1e193897acd17e9dbac1353698cc430b" dependencies = [ "alloy-eips", "alloy-primitives", @@ -137,7 +178,7 @@ dependencies = [ "alloy-trie", "auto_impl", "c-kzg", - "derive_more", + "derive_more 2.0.1", "either", "k256", "once_cell", @@ -150,9 +191,9 @@ dependencies = [ [[package]] name = "alloy-consensus-any" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31b286aeef04a32720c10defd21c3aa6c626154ac442b55f6d472caeb1c6741" +checksum = "142daffb15d5be1a2b20d2cd540edbcef03037b55d4ff69dc06beb4d06286dba" dependencies = [ "alloy-consensus", "alloy-eips", @@ -164,9 +205,9 @@ dependencies = [ [[package]] name = "alloy-contract" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1658352ca9425d7b5bbb3ae364bc276ab18d4afae06f5faf00377b6964fdf68" +checksum = "ebf25443920ecb9728cb087fe4dc04a0b290bd6ac85638c58fe94aba70f1a44e" dependencies = [ "alloy-consensus", "alloy-dyn-abi", @@ -209,7 +250,7 @@ dependencies = [ "itoa", "serde", "serde_json", - "winnow", + "winnow 0.7.10", ] [[package]] @@ -250,9 +291,9 @@ dependencies = [ [[package]] name = "alloy-eips" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fa190bfa5340aee544ac831114876fa73bc8da487095b49a5ea153a6a4656ea" +checksum = "3056872f6da48046913e76edb5ddced272861f6032f09461aea1a2497be5ae5d" dependencies = [ "alloy-eip2124", "alloy-eip2930", @@ -262,7 +303,7 @@ dependencies = [ "alloy-serde", "auto_impl", "c-kzg", - "derive_more", + "derive_more 2.0.1", "either", "serde", "sha2", @@ -270,9 +311,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b81b2dfd278d58af8bfde8753fa4685407ba8fbad8bc88a2bb0e065eed48478" +checksum = "c98fb40f07997529235cc474de814cd7bd9de561e101716289095696c0e4639d" dependencies = [ "alloy-eips", "alloy-primitives", @@ -295,9 +336,9 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89ab2dba5dca01ad4281b4d4726a18e2012a20e3950bfc2a90c5376840555366" +checksum = "dc08b31ebf9273839bd9a01f9333cbb7a3abb4e820c312ade349dd18bdc79581" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -309,9 +350,9 @@ dependencies = [ [[package]] name = "alloy-network" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0ed07e76fbc72790a911ea100cdfbe85b1f12a097c91b948042e854959d140e" +checksum = "ed117b08f0cc190312bf0c38c34cf4f0dabfb4ea8f330071c587cd7160a88cb2" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -326,7 +367,7 @@ dependencies = [ "alloy-sol-types", "async-trait", "auto_impl", - "derive_more", + "derive_more 2.0.1", "futures-utils-wasm", "serde", "serde_json", @@ -335,9 +376,9 @@ dependencies = [ [[package]] name = "alloy-network-primitives" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f05aa52713c376f797b3c7077708585f22a5c3053a7b1b2b355ea98edeb2052d" +checksum = "c7162ff7be8649c0c391f4e248d1273e85c62076703a1f3ec7daf76b283d886d" dependencies = [ "alloy-consensus", "alloy-eips", @@ -354,9 +395,9 @@ checksum = "18c35fc4b03ace65001676358ffbbaefe2a2b27ee50fe777c345082c7c888be8" dependencies = [ "alloy-rlp", "bytes", - "cfg-if", + "cfg-if 1.0.0", "const-hex", - "derive_more", + "derive_more 2.0.1", "foldhash", "getrandom 0.3.3", "hashbrown 0.15.3", @@ -371,14 +412,14 @@ dependencies = [ "rustc-hash", "serde", "sha3", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] name = "alloy-provider" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05a3f7a59c276c6e410267e77a166f9297dbe74e4605f1abf625e29d85c53144" +checksum = "d84eba1fd8b6fe8b02f2acd5dd7033d0f179e304bd722d11e817db570d1fa6c4" dependencies = [ "alloy-chains", "alloy-consensus", @@ -400,10 +441,10 @@ dependencies = [ "either", "futures", "futures-utils-wasm", - "lru", - "parking_lot", + "lru 0.13.0", + "parking_lot 0.12.3", "pin-project", - "reqwest", + "reqwest 0.12.8", "serde", "serde_json", "thiserror 2.0.12", @@ -420,7 +461,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" dependencies = [ "alloy-rlp-derive", - "arrayvec", + "arrayvec 0.7.6", "bytes", ] @@ -437,9 +478,9 @@ dependencies = [ [[package]] name = "alloy-rpc-client" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5f185483536cbcbf55971077140e03548dad4f3a4ddb35044bcdc01b8f02ce1" +checksum = "518a699422a3eab800f3dac2130d8f2edba8e4fff267b27a9c7dc6a2b0d313ee" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -448,7 +489,7 @@ dependencies = [ "async-stream", "futures", "pin-project", - "reqwest", + "reqwest 0.12.8", "serde", "serde_json", "tokio", @@ -462,9 +503,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "347dfd77ba4d74886dba9e2872ff64fb246001b08868d27baec94e7248503e08" +checksum = "c000cab4ec26a4b3e29d144e999e1c539c2fa0abed871bf90311eb3466187ca8" dependencies = [ "alloy-primitives", "alloy-rpc-types-eth", @@ -474,9 +515,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-any" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67971a228100ac65bd86e90439028853435f21796330ef08f00a70a918a84126" +checksum = "508b2fbe66d952089aa694e53802327798806498cd29ff88c75135770ecaabfc" dependencies = [ "alloy-consensus-any", "alloy-rpc-types-eth", @@ -485,9 +526,9 @@ dependencies = [ [[package]] name = "alloy-rpc-types-eth" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d9b4293dfd4721781d33ee40de060376932d4a55d421cf6618ad66ff97cc52" +checksum = "fcaf7dff0fdd756a714d58014f4f8354a1706ebf9fa2cf73431e0aeec3c9431e" dependencies = [ "alloy-consensus", "alloy-consensus-any", @@ -497,7 +538,7 @@ dependencies = [ "alloy-rlp", "alloy-serde", "alloy-sol-types", - "itertools 0.14.0", + "itertools 0.13.0", "serde", "serde_json", "thiserror 2.0.12", @@ -505,9 +546,9 @@ dependencies = [ [[package]] name = "alloy-serde" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b7d927aa39ca51545ae4c9cf4bdb2cbc1f6b46ab4b54afc3ed9255f93eedbce" +checksum = "730e8f2edf2fc224cabd1c25d090e1655fa6137b2e409f92e5eec735903f1507" dependencies = [ "alloy-primitives", "serde", @@ -516,9 +557,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c63771b50008d2b079187e9e74a08235ab16ecaf4609b4eb895e2890a3bcd465" +checksum = "6b0d2428445ec13edc711909e023d7779618504c4800be055a5b940025dbafe3" dependencies = [ "alloy-primitives", "async-trait", @@ -531,9 +572,9 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db906294ee7876bd332cd760f460d30de183554434e07fc19d7d54e16a7aeaf0" +checksum = "e14fe6fedb7fe6e0dfae47fe020684f1d8e063274ef14bca387ddb7a6efa8ec1" dependencies = [ "alloy-consensus", "alloy-network", @@ -575,7 +616,7 @@ dependencies = [ "quote", "syn 2.0.101", "syn-solidity", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] @@ -603,7 +644,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86ddeb70792c7ceaad23e57d52250107ebbb86733e52f4a25d8dc1abc931837" dependencies = [ "serde", - "winnow", + "winnow 0.7.10", ] [[package]] @@ -620,17 +661,17 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca9b645fe4f4e6582cfbb4a8d20cedcf5aa23548e92eacbdacac6278b425e023" +checksum = "a712bdfeff42401a7dd9518f72f617574c36226a9b5414537fedc34350b73bf9" dependencies = [ "alloy-json-rpc", "alloy-primitives", "base64 0.22.1", - "derive_more", + "derive_more 2.0.1", "futures", "futures-utils-wasm", - "parking_lot", + "parking_lot 0.12.3", "serde", "serde_json", "thiserror 2.0.12", @@ -643,13 +684,13 @@ dependencies = [ [[package]] name = "alloy-transport-http" -version = "1.0.7" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee18869ecabe658ff6316e7db7c25d958c7d10f0a1723c2f7447d4f402920b66" +checksum = "7ea5a76d7f2572174a382aedf36875bedf60bcc41116c9f031cf08040703a2dc" dependencies = [ "alloy-json-rpc", "alloy-transport", - "reqwest", + "reqwest 0.12.8", "serde_json", "tower", "tracing", @@ -664,11 +705,11 @@ checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" dependencies = [ "alloy-primitives", "alloy-rlp", - "arrayvec", - "derive_more", + "arrayvec 0.7.6", + "derive_more 2.0.1", "nybbles", "serde", - "smallvec", + "smallvec 1.13.2", "tracing", ] @@ -738,9 +779,21 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.89" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" + +[[package]] +name = "app_dirs" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" +dependencies = [ + "ole32-sys", + "shell32-sys", + "winapi 0.2.8", + "xdg", +] [[package]] name = "arbitrary" @@ -929,10 +982,10 @@ dependencies = [ ] [[package]] -name = "arraydeque" -version = "0.5.1" +name = "arrayvec" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d902e3d592a523def97af8f317b08ce16b7ab854c1985a0c671e6f15cebc236" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" [[package]] name = "arrayvec" @@ -943,6 +996,15 @@ dependencies = [ "serde", ] +[[package]] +name = "ascii-canvas" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" +dependencies = [ + "term", +] + [[package]] name = "async-stream" version = "0.3.6" @@ -977,22 +1039,36 @@ dependencies = [ ] [[package]] -name = "atomic-waker" -version = "1.1.2" +name = "async_io_stream" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version 0.4.1", +] [[package]] name = "auto_impl" -version = "1.3.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffdcb70bdbc4d478427380519163274ac86e52916e10f0a8889adf0f96d3fee7" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", "syn 2.0.101", ] +[[package]] +name = "autocfg" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.4.0", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -1006,7 +1082,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", "miniz_oxide", "object", @@ -1020,6 +1096,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base64" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[package]] name = "base64" version = "0.21.7" @@ -1038,6 +1120,12 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bech32" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" + [[package]] name = "bincode" version = "1.3.3" @@ -1047,15 +1135,30 @@ dependencies = [ "serde", ] +[[package]] +name = "bit-set" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +dependencies = [ + "bit-vec 0.6.3", +] + [[package]] name = "bit-set" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec", + "bit-vec 0.8.0", ] +[[package]] +name = "bit-vec" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" + [[package]] name = "bit-vec" version = "0.8.0" @@ -1078,13 +1181,26 @@ dependencies = [ "hex-conservative", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" + +[[package]] +name = "bitvec" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" dependencies = [ - "serde", + "either", + "radium 0.3.0", ] [[package]] @@ -1094,7 +1210,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", - "radium", + "radium 0.7.0", "tap", "wyz", ] @@ -1120,6 +1236,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "bs58" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" +dependencies = [ + "sha2", + "tinyvec", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -1128,9 +1254,15 @@ checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "byte-slice-cast" -version = "1.2.3" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" +checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" + +[[package]] +name = "byte-slice-cast" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] name = "byteorder" @@ -1147,6 +1279,27 @@ dependencies = [ "serde", ] +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "c-kzg" version = "2.1.1" @@ -1162,32 +1315,66 @@ dependencies = [ "serde", ] +[[package]] +name = "camino" +version = "1.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo_metadata" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +dependencies = [ + "camino", + "cargo-platform", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror 1.0.64", +] + [[package]] name = "cc" -version = "1.2.24" +version = "1.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16595d3be041c03b09d08d0858631facccee9221e579704070e6e9e4915d3bc7" +checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" dependencies = [ + "jobserver", + "libc", "shlex", ] [[package]] name = "cfg-if" -version = "1.0.0" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" [[package]] -name = "cfg_aliases" -version = "0.2.1" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.41" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ "android-tzdata", "iana-time-zone", @@ -1195,7 +1382,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-targets 0.52.6", ] [[package]] @@ -1207,11 +1394,21 @@ dependencies = [ "generic-array", ] +[[package]] +name = "cipher" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "clap" -version = "4.5.39" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd60e63e9be68e5fb56422e397cf9baddded06dae1d2e523401542383bc72a9f" +checksum = "7be5744db7978a28d9df86a214130d106a89ce49644cbc4e3f0c22c3fba30615" dependencies = [ "clap_builder", "clap_derive", @@ -1219,9 +1416,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.39" +version = "4.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89cc6392a1f72bbeb820d71f32108f61fdaf18bc526e1d23954168a67759ef51" +checksum = "a5fbc17d3ef8278f55b282b2a2e75ae6f6c7d4bb70ed3d0382375104bfafdb4b" dependencies = [ "anstream", "anstyle", @@ -1231,9 +1428,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "4ac6a0c7b1a9e9a5186361f67dfa1b88213572f427fb9ab038efb2bd8c582dab" dependencies = [ "heck", "proc-macro2", @@ -1243,9 +1440,70 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" + +[[package]] +name = "cloudabi" +version = "0.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "coins-bip32" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +dependencies = [ + "bs58", + "coins-core", + "digest 0.10.7", + "hmac", + "k256", + "serde", + "sha2", + "thiserror 1.0.64", +] + +[[package]] +name = "coins-bip39" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +dependencies = [ + "bitvec 1.0.1", + "coins-bip32", + "hmac", + "once_cell", + "pbkdf2 0.12.2", + "rand 0.8.5", + "sha2", + "thiserror 1.0.64", +] + +[[package]] +name = "coins-core" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +dependencies = [ + "base64 0.21.7", + "bech32", + "bs58", + "digest 0.10.7", + "generic-array", + "hex", + "ripemd", + "serde", + "serde_derive", + "sha2", + "sha3", + "thiserror 1.0.64", +] [[package]] name = "colorchoice" @@ -1255,34 +1513,34 @@ checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "config" -version = "0.15.11" +version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "595aae20e65c3be792d05818e8c63025294ac3cb7e200f11459063a352a6ef80" +checksum = "23738e11972c7643e4ec947840fc463b6a571afcd3e735bdfce7d03c7a784aca" dependencies = [ "async-trait", - "convert_case", "json5", + "lazy_static", + "nom", "pathdiff", "ron", "rust-ini", "serde", "serde_json", - "toml", - "winnow", - "yaml-rust2", + "toml 0.5.11", + "yaml-rust", ] [[package]] name = "console" -version = "0.15.11" +version = "0.15.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" dependencies = [ "encode_unicode", + "lazy_static", "libc", - "once_cell", - "unicode-width 0.2.0", - "windows-sys 0.59.0", + "unicode-width", + "windows-sys 0.52.0", ] [[package]] @@ -1291,7 +1549,7 @@ version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "hex", "proptest", @@ -1321,17 +1579,14 @@ checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom 0.2.15", "once_cell", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] -name = "convert_case" -version = "0.6.0" +name = "constant_time_eq" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] +checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "core-foundation" @@ -1379,7 +1634,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -1437,11 +1692,20 @@ dependencies = [ [[package]] name = "ctr" -version = "0.7.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a232f92a03f37dd7d7dd2adc67166c77e9cd88de5b019b9a9eecfaeaf7bfd481" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher", + "cipher 0.3.0", +] + +[[package]] +name = "ctr" +version = "0.9.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" +dependencies = [ + "cipher 0.4.4", ] [[package]] @@ -1450,7 +1714,7 @@ version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", @@ -1512,14 +1776,20 @@ version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "hashbrown 0.14.5", - "lock_api", + "lock_api 0.4.12", "once_cell", - "parking_lot_core", + "parking_lot_core 0.9.10", ] +[[package]] +name = "data-encoding" +version = "2.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" + [[package]] name = "der" version = "0.7.9" @@ -1562,6 +1832,17 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "derive_more" +version = "0.99.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "derive_more" version = "2.0.1" @@ -1618,14 +1899,36 @@ dependencies = [ ] [[package]] -name = "dirs" -version = "5.0.1" +name = "dir" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "dbaaafd76867bdccfab7c7a5cc98b9321b515f8663072fd4b0fd9e2ceac3911e" +dependencies = [ + "app_dirs", + "home 0.3.4", + "journaldb", + "vapory-types", +] + +[[package]] +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ "dirs-sys", ] +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", +] + [[package]] name = "dirs-sys" version = "0.4.1" @@ -1638,6 +1941,17 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi 0.3.9", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1651,12 +1965,9 @@ dependencies = [ [[package]] name = "dlv-list" -version = "0.5.2" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "442039f5147480ba31067cb00ada1adae6892028e40e45fc5de7b7df6dcc1b5f" -dependencies = [ - "const-random", -] +checksum = "0688c2a7f92e427f44895cd63841bff7b29f8d7a1648b9e7e07a4a365b2e1257" [[package]] name = "dotenv" @@ -1739,11 +2050,20 @@ dependencies = [ "zeroize", ] +[[package]] +name = "ena" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" +dependencies = [ + "log", +] + [[package]] name = "encode_unicode" -version = "1.0.0" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" +checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" @@ -1751,7 +2071,25 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", +] + +[[package]] +name = "enr" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" +dependencies = [ + "base64 0.21.7", + "bytes", + "hex", + "k256", + "log", + "rand 0.8.5", + "rlp", + "serde", + "sha3", + "zeroize", ] [[package]] @@ -1793,6 +2131,344 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "eth-keystore" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +dependencies = [ + "aes 0.8.4", + "ctr 0.9.2", + "digest 0.10.7", + "hex", + "hmac", + "pbkdf2 0.11.0", + "rand 0.8.5", + "scrypt", + "serde", + "serde_json", + "sha2", + "sha3", + "thiserror 1.0.64", + "uuid", +] + +[[package]] +name = "ethabi" +version = "18.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +dependencies = [ + "ethereum-types", + "hex", + "once_cell", + "regex", + "serde", + "serde_json", + "sha3", + "thiserror 1.0.64", + "uint", +] + +[[package]] +name = "ethbloom" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" +dependencies = [ + "crunchy", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", + "tiny-keccak 2.0.2", +] + +[[package]] +name = "ethereum-types" +version = "0.14.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +dependencies = [ + "ethbloom", + "fixed-hash 0.8.0", + "impl-codec", + "impl-rlp", + "impl-serde", + "primitive-types 0.12.2", + "scale-info", + "uint", +] + +[[package]] +name = "ethers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" +dependencies = [ + "ethers-addressbook", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-middleware", + "ethers-providers", + "ethers-signers", + "ethers-solc", +] + +[[package]] +name = "ethers-addressbook" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" +dependencies = [ + "ethers-core", + "once_cell", + "serde", + "serde_json", +] + +[[package]] +name = "ethers-contract" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" +dependencies = [ + "const-hex", + "ethers-contract-abigen", + "ethers-contract-derive", + "ethers-core", + "ethers-providers", + "futures-util", + "once_cell", + "pin-project", + "serde", + "serde_json", + "thiserror 1.0.64", +] + +[[package]] +name = "ethers-contract-abigen" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" +dependencies = [ + "Inflector", + "const-hex", + "dunce", + "ethers-core", + "ethers-etherscan", + "eyre", + "prettyplease", + "proc-macro2", + "quote", + "regex", + "reqwest 0.11.27", + "serde", + "serde_json", + "syn 2.0.101", + "toml 0.8.19", + "walkdir", +] + +[[package]] +name = "ethers-contract-derive" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" +dependencies = [ + "Inflector", + "const-hex", + "ethers-contract-abigen", + "ethers-core", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.101", +] + +[[package]] +name = "ethers-core" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" +dependencies = [ + "arrayvec 0.7.6", + "bytes", + "cargo_metadata", + "chrono", + "const-hex", + "elliptic-curve", + "ethabi", + "generic-array", + "k256", + "num_enum", + "once_cell", + "open-fastrlp", + "rand 0.8.5", + "rlp", + "serde", + "serde_json", + "strum 0.26.3", + "syn 2.0.101", + "tempfile", + "thiserror 1.0.64", + "tiny-keccak 2.0.2", + "unicode-xid", +] + +[[package]] +name = "ethers-etherscan" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" +dependencies = [ + "chrono", + "ethers-core", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "thiserror 1.0.64", + "tracing", +] + +[[package]] +name = "ethers-middleware" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" +dependencies = [ + "async-trait", + "auto_impl", + "ethers-contract", + "ethers-core", + "ethers-etherscan", + "ethers-providers", + "ethers-signers", + "futures-channel", + "futures-locks", + "futures-util", + "instant", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.64", + "tokio", + "tracing", + "tracing-futures", + "url", +] + +[[package]] +name = "ethers-providers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" +dependencies = [ + "async-trait", + "auto_impl", + "base64 0.21.7", + "bytes", + "const-hex", + "enr", + "ethers-core", + "futures-core", + "futures-timer", + "futures-util", + "hashers", + "http 0.2.12", + "instant", + "jsonwebtoken", + "once_cell", + "pin-project", + "reqwest 0.11.27", + "serde", + "serde_json", + "thiserror 1.0.64", + "tokio", + "tokio-tungstenite", + "tracing", + "tracing-futures", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "ws_stream_wasm", +] + +[[package]] +name = "ethers-signers" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" +dependencies = [ + "async-trait", + "coins-bip32", + "coins-bip39", + "const-hex", + "elliptic-curve", + "eth-keystore", + "ethers-core", + "rand 0.8.5", + "sha2", + "thiserror 1.0.64", + "tracing", +] + +[[package]] +name = "ethers-solc" +version = "2.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" +dependencies = [ + "cfg-if 1.0.0", + "const-hex", + "dirs", + "dunce", + "ethers-core", + "glob", + "home 0.5.9", + "md-5", + "num_cpus", + "once_cell", + "path-slash", + "rayon", + "regex", + "semver 1.0.23", + "serde", + "serde_json", + "solang-parser", + "svm-rs", + "thiserror 1.0.64", + "tiny-keccak 2.0.2", + "tokio", + "tracing", + "walkdir", + "yansi", +] + +[[package]] +name = "eyre" +version = "0.6.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" +dependencies = [ + "indenter", + "once_cell", +] + +[[package]] +name = "fastmap" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59ea69bd8c9a9aa331b38daa335f7a672183c5281514c0d5c5c48ef63ef09a66" +dependencies = [ + "tetsy-plain-hasher", + "vapory-types", +] + [[package]] name = "fastrand" version = "2.1.1" @@ -1805,7 +2481,7 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "auto_impl", "bytes", ] @@ -1816,7 +2492,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", "auto_impl", "bytes", ] @@ -1827,7 +2503,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec", + "bitvec 1.0.1", "byteorder", "ff_derive", "rand_core 0.6.4", @@ -1841,7 +2517,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" dependencies = [ "addchain", - "cfg-if", + "cfg-if 1.0.0", "num-bigint 0.3.3", "num-integer", "num-traits", @@ -1877,6 +2553,12 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "fixedbitset" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" + [[package]] name = "flate2" version = "1.0.34" @@ -1923,6 +2605,16 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", +] + [[package]] name = "funty" version = "2.0.0" @@ -1977,6 +2669,16 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" +[[package]] +name = "futures-locks" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" +dependencies = [ + "futures-channel", + "futures-task", +] + [[package]] name = "futures-macro" version = "0.3.31" @@ -2000,6 +2702,16 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" +[[package]] +name = "futures-timer" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" +dependencies = [ + "gloo-timers", + "send_wrapper 0.4.0", +] + [[package]] name = "futures-util" version = "0.3.31" @@ -2024,6 +2736,15 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" +[[package]] +name = "fxhash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +dependencies = [ + "byteorder", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -2035,13 +2756,24 @@ dependencies = [ "zeroize", ] +[[package]] +name = "getrandom" +version = "0.1.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", +] + [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2054,12 +2786,10 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ - "cfg-if", - "js-sys", + "cfg-if 1.0.0", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", - "wasm-bindgen", ] [[package]] @@ -2080,9 +2810,21 @@ checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] name = "glob" -version = "0.3.2" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" + +[[package]] +name = "gloo-timers" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" +dependencies = [ + "futures-channel", + "futures-core", + "js-sys", + "wasm-bindgen", +] [[package]] name = "group" @@ -2097,16 +2839,16 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.10" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9421a676d1b147b16b82c9225157dc629087ef8ec4d5e2960f9437a90dac0a5" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" dependencies = [ - "atomic-waker", "bytes", "fnv", "futures-core", "futures-sink", - "http", + "futures-util", + "http 0.2.12", "indexmap 2.6.0", "slab", "tokio", @@ -2114,11 +2856,24 @@ dependencies = [ "tracing", ] +[[package]] +name = "hashbrown" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" +dependencies = [ + "ahash 0.2.19", + "autocfg 0.1.8", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] [[package]] name = "hashbrown" @@ -2126,7 +2881,7 @@ version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash", + "ahash 0.8.11", ] [[package]] @@ -2135,7 +2890,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash", + "ahash 0.8.11", "allocator-api2", "rayon", "serde", @@ -2154,12 +2909,12 @@ dependencies = [ ] [[package]] -name = "hashlink" -version = "0.10.0" +name = "hashers" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7382cf6263419f2d8df38c55d7da83da5c18aef87fc7a7fc1fb1e344edfe14c1" +checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" dependencies = [ - "hashbrown 0.15.3", + "fxhash", ] [[package]] @@ -2189,7 +2944,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "arrayvec", + "arrayvec 0.7.6", ] [[package]] @@ -2201,6 +2956,36 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "home" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29302b90cfa76231a757a887d1e3153331a63c7f80b6c75f86366334cbe70708" +dependencies = [ + "scopeguard 0.3.3", + "winapi 0.3.9", +] + +[[package]] +name = "home" +version = "0.5.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +dependencies = [ + "windows-sys 0.52.0", +] + +[[package]] +name = "http" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + [[package]] name = "http" version = "1.1.0" @@ -2212,6 +2997,17 @@ dependencies = [ "itoa", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http 0.2.12", + "pin-project-lite", +] + [[package]] name = "http-body" version = "1.0.1" @@ -2219,7 +3015,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" dependencies = [ "bytes", - "http", + "http 1.1.0", ] [[package]] @@ -2230,8 +3026,8 @@ checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" dependencies = [ "bytes", "futures-util", - "http", - "http-body", + "http 1.1.0", + "http-body 1.0.1", "pin-project-lite", ] @@ -2241,41 +3037,80 @@ version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + [[package]] name = "hyper" -version = "1.6.0" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", + "futures-core", "futures-util", "h2", - "http", - "http-body", + "http 0.2.12", + "http-body 0.4.6", "httparse", + "httpdate", "itoa", "pin-project-lite", - "smallvec", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50dfd22e0e76d0f662d429a5f80fcaf3855009297eab6a0a9f8543834744ba05" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "httparse", + "itoa", + "pin-project-lite", + "smallvec 1.13.2", "tokio", "want", ] [[package]] name = "hyper-rustls" -version = "0.27.6" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a01595e11bdcec50946522c32dde3fc6914743000a68b93000965f2f02406d" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "http", - "hyper", - "hyper-util", + "futures-util", + "http 0.2.12", + "hyper 0.14.30", "rustls", - "rustls-pki-types", "tokio", "tokio-rustls", - "tower-service", - "webpki-roots", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper 0.14.30", + "native-tls", + "tokio", + "tokio-native-tls", ] [[package]] @@ -2286,7 +3121,7 @@ checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" dependencies = [ "bytes", "http-body-util", - "hyper", + "hyper 1.4.1", "hyper-util", "native-tls", "tokio", @@ -2296,28 +3131,21 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.13" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c293b6b3d21eca78250dc7dbebd6b9210ec5530e038cbfe0661b5c47ab06e8" +checksum = "41296eb09f183ac68eec06e03cdbea2e759633d4067b2f6552fc2e009bcad08b" dependencies = [ - "base64 0.22.1", "bytes", "futures-channel", - "futures-core", "futures-util", - "http", - "http-body", - "hyper", - "ipnet", - "libc", - "percent-encoding", + "http 1.1.0", + "http-body 1.0.1", + "hyper 1.4.1", "pin-project-lite", "socket2", - "system-configuration", "tokio", "tower-service", "tracing", - "windows-registry", ] [[package]] @@ -2368,24 +3196,59 @@ dependencies = [ "parity-scale-codec", ] +[[package]] +name = "impl-rlp" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" +dependencies = [ + "rlp", +] + +[[package]] +name = "impl-serde" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" +dependencies = [ + "serde", +] + +[[package]] +name = "impl-trait-for-tuples" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "impl-trait-for-tuples" -version = "0.2.3" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" +checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.101", + "syn 1.0.109", ] +[[package]] +name = "indenter" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + [[package]] name = "indexmap" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg", + "autocfg 1.4.0", "hashbrown 0.12.3", "serde", ] @@ -2411,7 +3274,16 @@ dependencies = [ "instant", "number_prefix", "portable-atomic", - "unicode-width 0.1.14", + "unicode-width", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", ] [[package]] @@ -2420,7 +3292,7 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -2457,16 +3329,6 @@ version = "2.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" -[[package]] -name = "iri-string" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbc5ebe9c3a1a7a5127f920a418f7585e9e758e911d0466ed004f393b0e380b2" -dependencies = [ - "memchr", - "serde", -] - [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -2502,9 +3364,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.14.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" +checksum = "413ee7dfc52ee1a4949ceeb7dbc8a33f2d6c088194d9f922fb8318faf1f01186" dependencies = [ "either", ] @@ -2539,13 +3401,40 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "jobserver" +version = "0.1.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" +dependencies = [ + "libc", +] + +[[package]] +name = "journaldb" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b76a0abc6ebe6b53a2af01026ec5b2e56fa4579ac14a91acfa0a33858ce079c3" +dependencies = [ + "fastmap", + "log", + "parking_lot 0.9.0", + "tetsy-bytes", + "tetsy-hash-db", + "tetsy-keccak-hasher", + "tetsy-kvdb", + "tetsy-memory-db", + "tetsy-rlp", + "tetsy-util-mem 0.3.0", + "vapory-types", +] + [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ - "once_cell", "wasm-bindgen", ] @@ -2560,18 +3449,33 @@ dependencies = [ "serde", ] +[[package]] +name = "jsonwebtoken" +version = "8.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" +dependencies = [ + "base64 0.21.7", + "pem", + "ring 0.16.20", + "serde", + "serde_json", + "simple_asn1", +] + [[package]] name = "k256" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ecdsa", "elliptic-curve", "once_cell", "serdect", "sha2", + "signature", ] [[package]] @@ -2600,7 +3504,37 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce2bd4c29270e724d3eaadf7bdc8700af4221fc0ed771b855eadcd1b98d52851" dependencies = [ "primitive-types 0.10.1", - "tiny-keccak", + "tiny-keccak 2.0.2", +] + +[[package]] +name = "lalrpop" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" +dependencies = [ + "ascii-canvas", + "bit-set 0.5.3", + "ena", + "itertools 0.11.0", + "lalrpop-util", + "petgraph", + "regex", + "regex-syntax", + "string_cache", + "term", + "tiny-keccak 2.0.2", + "unicode-xid", + "walkdir", +] + +[[package]] +name = "lalrpop-util" +version = "0.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" +dependencies = [ + "regex-automata", ] [[package]] @@ -2611,15 +3545,15 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.172" +version = "0.2.159" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" [[package]] name = "libm" -version = "0.2.15" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libredox" @@ -2627,24 +3561,39 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags", + "bitflags 2.6.0", "libc", ] +[[package]] +name = "linked-hash-map" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f" + [[package]] name = "linux-raw-sys" version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" +[[package]] +name = "lock_api" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" +dependencies = [ + "scopeguard 1.2.0", +] + [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg", - "scopeguard", + "autocfg 1.4.0", + "scopeguard 1.2.0", ] [[package]] @@ -2655,24 +3604,27 @@ checksum = "9374ef4228402d4b7e403e5838cb880d9ee663314b0a900d5a6aabf0c213552e" [[package]] name = "log" -version = "0.4.27" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" -version = "0.13.0" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" dependencies = [ - "hashbrown 0.15.3", + "hashbrown 0.6.3", ] [[package]] -name = "lru-slab" -version = "0.1.2" +name = "lru" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.3", +] [[package]] name = "macro-string" @@ -2685,6 +3637,22 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "maybe-uninit" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" + +[[package]] +name = "md-5" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +dependencies = [ + "cfg-if 1.0.0", + "digest 0.10.7", +] + [[package]] name = "memchr" version = "2.7.4" @@ -2697,9 +3665,15 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + [[package]] name = "mining-cli" -version = "1.3.0" +version = "1.2.2" dependencies = [ "aes-gcm", "alloy", @@ -2710,20 +3684,25 @@ dependencies = [ "config", "console", "dialoguer", + "dir", "dirs", "dotenv", "env_logger", + "ethers", "futures", "hex", "intmax2-zkp", "log", "mining_circuit_v1", "num-bigint 0.4.6", + "openssl", + "openssl-sys", "plonky2", "rand 0.8.5", "rand_chacha 0.3.1", "regex", - "reqwest", + "reqwest 0.11.27", + "rpassword", "self_update", "serde", "serde_json", @@ -2732,8 +3711,8 @@ dependencies = [ "sha3", "simplelog", "strum 0.26.3", - "strum_macros", - "thiserror 2.0.12", + "strum_macros 0.26.4", + "thiserror 1.0.64", "tokio", "tower", ] @@ -2792,6 +3771,22 @@ dependencies = [ "tempfile", ] +[[package]] +name = "new_debug_unreachable" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" + +[[package]] +name = "nom" +version = "7.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +dependencies = [ + "memchr", + "minimal-lexical", +] + [[package]] name = "num" version = "0.4.3" @@ -2812,7 +3807,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ - "autocfg", + "autocfg 1.4.0", "num-integer", "num-traits", ] @@ -2859,7 +3854,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ - "autocfg", + "autocfg 1.4.0", "num-integer", "num-traits", ] @@ -2881,7 +3876,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg", + "autocfg 1.4.0", "libm", ] @@ -2910,6 +3905,7 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ + "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.101", @@ -2940,7 +3936,7 @@ dependencies = [ "const-hex", "proptest", "serde", - "smallvec", + "smallvec 1.13.2", ] [[package]] @@ -2952,6 +3948,16 @@ dependencies = [ "memchr", ] +[[package]] +name = "ole32-sys" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "once_cell" version = "1.21.3" @@ -2964,14 +3970,39 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" +[[package]] +name = "open-fastrlp" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +dependencies = [ + "arrayvec 0.7.6", + "auto_impl", + "bytes", + "ethereum-types", + "open-fastrlp-derive", +] + +[[package]] +name = "open-fastrlp-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" +dependencies = [ + "bytes", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "openssl" version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ - "bitflags", - "cfg-if", + "bitflags 2.6.0", + "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", @@ -2996,6 +4027,15 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" +[[package]] +name = "openssl-src" +version = "300.3.2+3.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.103" @@ -3004,6 +4044,7 @@ checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -3016,12 +4057,12 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "ordered-multimap" -version = "0.7.3" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49203cdcae0030493bad186b28da2fa25645fa276a51b6fec8010d281e02ef79" +checksum = "ccd746e37177e1711c20dd619a1620f34f5c8b569c53590a72dedd5344d8924a" dependencies = [ "dlv-list", - "hashbrown 0.14.5", + "hashbrown 0.12.3", ] [[package]] @@ -3030,10 +4071,10 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", + "arrayvec 0.7.6", + "bitvec 1.0.1", + "byte-slice-cast 1.2.2", + "impl-trait-for-tuples 0.2.2", "parity-scale-codec-derive", "serde", ] @@ -3050,14 +4091,40 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "parking_lot" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" +dependencies = [ + "lock_api 0.3.4", + "parking_lot_core 0.6.3", + "rustc_version 0.2.3", +] + [[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ - "lock_api", - "parking_lot_core", + "lock_api 0.4.12", + "parking_lot_core 0.9.10", +] + +[[package]] +name = "parking_lot_core" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda66b810a62be75176a80873726630147a5ca780cd33921e0b5709033e66b0a" +dependencies = [ + "cfg-if 0.1.10", + "cloudabi", + "libc", + "redox_syscall 0.1.57", + "rustc_version 0.2.3", + "smallvec 0.6.14", + "winapi 0.3.9", ] [[package]] @@ -3066,90 +4133,209 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "redox_syscall", - "smallvec", + "redox_syscall 0.5.7", + "smallvec 1.13.2", "windows-targets 0.52.6", ] +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "path-slash" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" + [[package]] name = "pathdiff" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", + "hmac", + "password-hash", + "sha2", +] + +[[package]] +name = "pbkdf2" +version = "0.12.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" +dependencies = [ + "digest 0.10.7", + "hmac", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + [[package]] name = "percent-encoding" version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pest" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +dependencies = [ + "memchr", + "thiserror 1.0.64", + "ucd-trie", +] + +[[package]] +name = "pest_derive" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +dependencies = [ + "pest", + "pest_generator", +] + +[[package]] +name = "pest_generator" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +dependencies = [ + "pest", + "pest_meta", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "pest_meta" +version = "2.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +dependencies = [ + "once_cell", + "pest", + "sha2", +] + +[[package]] +name = "petgraph" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" +dependencies = [ + "fixedbitset", + "indexmap 2.6.0", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version 0.4.1", +] [[package]] -name = "pest" -version = "2.7.13" +name = "phf" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdbef9d1d47087a895abd220ed25eb4ad973a5e26f6a4367b038c25e28dfc2d9" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" dependencies = [ - "memchr", - "thiserror 1.0.64", - "ucd-trie", + "phf_macros", + "phf_shared 0.11.2", ] [[package]] -name = "pest_derive" -version = "2.7.13" +name = "phf_generator" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a6e3394ec80feb3b6393c725571754c6188490265c61aaf260810d6b95aa0" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" dependencies = [ - "pest", - "pest_generator", + "phf_shared 0.11.2", + "rand 0.8.5", ] [[package]] -name = "pest_generator" -version = "2.7.13" +name = "phf_macros" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94429506bde1ca69d1b5601962c73f4172ab4726571a59ea95931218cb0e930e" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "pest", - "pest_meta", + "phf_generator", + "phf_shared 0.11.2", "proc-macro2", "quote", "syn 2.0.101", ] [[package]] -name = "pest_meta" -version = "2.7.13" +name = "phf_shared" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac8a071862e93690b6e34e9a5fb8e33ff3734473ac0245b27232222c4906a33f" +checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" dependencies = [ - "once_cell", - "pest", - "sha2", + "siphasher", +] + +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", ] [[package]] name = "pin-project" -version = "1.1.10" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +checksum = "baf123a161dde1e524adf36f90bc5d8d3462824a9c43553ad07a8183161189ec" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "1.1.10" +version = "1.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +checksum = "a4502d8515ca9f32f1fb543d987f63d95a14934883db45bdb48060b6b69257f8" dependencies = [ "proc-macro2", "quote", @@ -3189,7 +4375,7 @@ name = "plonky2" version = "0.2.2" source = "git+https://github.com/InternetMaximalism/polygon-plonky2.git?branch=intmax2-dev#8dbbe5142aea5a05bcbf948b63935f204e40f646" dependencies = [ - "ahash", + "ahash 0.8.11", "anyhow", "getrandom 0.2.15", "hashbrown 0.14.5", @@ -3260,7 +4446,7 @@ dependencies = [ "plonky2", "rand 0.8.5", "starky", - "tiny-keccak", + "tiny-keccak 2.0.2", ] [[package]] @@ -3294,7 +4480,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "opaque-debug", "universal-hash", @@ -3330,6 +4516,22 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "precomputed-hash" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" + +[[package]] +name = "prettyplease" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +dependencies = [ + "proc-macro2", + "syn 2.0.101", +] + [[package]] name = "primitive-types" version = "0.10.1" @@ -3348,14 +4550,17 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", + "impl-rlp", + "impl-serde", + "scale-info", "uint", ] [[package]] name = "proc-macro-crate" -version = "3.3.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ "toml_edit", ] @@ -3397,9 +4602,9 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ - "bit-set", - "bit-vec", - "bitflags", + "bit-set 0.8.0", + "bit-vec 0.8.0", + "bitflags 2.6.0", "lazy_static", "num-traits", "rand 0.8.5", @@ -3419,68 +4624,13 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quick-xml" -version = "0.37.5" +version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "331e97a1af0bf59823e6eadffe373d7b27f485be8748f71471c662c1f269b7fb" +checksum = "11bafc859c6815fbaffbbbf4229ecb767ac913fecb27f9ad4343662e9ef099ea" dependencies = [ "memchr", ] -[[package]] -name = "quinn" -version = "0.11.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "626214629cda6781b6dc1d316ba307189c85ba657213ce642d9c77670f8202c8" -dependencies = [ - "bytes", - "cfg_aliases", - "pin-project-lite", - "quinn-proto", - "quinn-udp", - "rustc-hash", - "rustls", - "socket2", - "thiserror 2.0.12", - "tokio", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-proto" -version = "0.11.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49df843a9161c85bb8aae55f101bc0bac8bcafd637a620d9122fd7e0b2f7422e" -dependencies = [ - "bytes", - "getrandom 0.3.3", - "lru-slab", - "rand 0.9.1", - "ring", - "rustc-hash", - "rustls", - "rustls-pki-types", - "slab", - "thiserror 2.0.12", - "tinyvec", - "tracing", - "web-time", -] - -[[package]] -name = "quinn-udp" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee4e529991f949c5e25755532370b8af5d114acae52326361d68d47af64aa842" -dependencies = [ - "cfg_aliases", - "libc", - "once_cell", - "socket2", - "tracing", - "windows-sys 0.59.0", -] - [[package]] name = "quote" version = "1.0.40" @@ -3496,12 +4646,31 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +[[package]] +name = "radium" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" + [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + [[package]] name = "rand" version = "0.8.5" @@ -3525,6 +4694,16 @@ dependencies = [ "serde", ] +[[package]] +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + [[package]] name = "rand_chacha" version = "0.3.1" @@ -3545,6 +4724,15 @@ dependencies = [ "rand_core 0.9.3", ] +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + [[package]] name = "rand_core" version = "0.6.4" @@ -3564,6 +4752,15 @@ dependencies = [ "serde", ] +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + [[package]] name = "rand_xorshift" version = "0.3.0" @@ -3593,13 +4790,19 @@ dependencies = [ "crossbeam-utils", ] +[[package]] +name = "redox_syscall" +version = "0.1.57" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" + [[package]] name = "redox_syscall" version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags", + "bitflags 2.6.0", ] [[package]] @@ -3615,9 +4818,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.11.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "38200e5ee88914975b69f657f0801b6f6dccafd44fd9326302a4aaeecfacb1d8" dependencies = [ "aho-corasick", "memchr", @@ -3644,24 +4847,21 @@ checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "reqwest" -version = "0.12.17" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3f27698fc5799d2a281528a908bd874973953ca2e7bc2311637e10c263c723b" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "base64 0.22.1", + "base64 0.21.7", "bytes", "encoding_rs", - "futures-channel", "futures-core", "futures-util", "h2", - "http", - "http-body", - "http-body-util", - "hyper", + "http 0.2.12", + "http-body 0.4.6", + "hyper 0.14.30", "hyper-rustls", - "hyper-tls", - "hyper-util", + "hyper-tls 0.5.0", "ipnet", "js-sys", "log", @@ -3670,24 +4870,63 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "quinn", "rustls", - "rustls-pki-types", + "rustls-pemfile 1.0.4", "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 0.1.2", + "system-configuration", "tokio", "tokio-native-tls", "tokio-rustls", - "tower", - "tower-http", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", "webpki-roots", + "winreg", +] + +[[package]] +name = "reqwest" +version = "0.12.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f713147fbe92361e52392c73b8c9e48c04c6625bce969ef54dc901e58e042a7b" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "http 1.1.0", + "http-body 1.0.1", + "http-body-util", + "hyper 1.4.1", + "hyper-tls 0.6.0", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile 2.2.0", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper 1.0.1", + "tokio", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", ] [[package]] @@ -3702,18 +4941,43 @@ dependencies = [ [[package]] name = "ring" -version = "0.17.14" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin 0.5.2", + "untrusted 0.7.1", + "web-sys", + "winapi 0.3.9", +] + +[[package]] +name = "ring" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", "getrandom 0.2.15", "libc", - "untrusted", + "spin 0.9.8", + "untrusted 0.9.0", "windows-sys 0.52.0", ] +[[package]] +name = "ripemd" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" +dependencies = [ + "digest 0.10.7", +] + [[package]] name = "rlp" version = "0.5.2" @@ -3721,19 +4985,40 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", + "rlp-derive", "rustc-hex", ] +[[package]] +name = "rlp-derive" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "ron" -version = "0.8.1" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +checksum = "88073939a61e5b7680558e6be56b419e208420c2adb92be54921fa6b72283f1a" dependencies = [ - "base64 0.21.7", - "bitflags", + "base64 0.13.1", + "bitflags 1.3.2", "serde", - "serde_derive", +] + +[[package]] +name = "rpassword" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" +dependencies = [ + "libc", + "winapi 0.3.9", ] [[package]] @@ -3771,13 +5056,12 @@ checksum = "48fd7bd8a6377e15ad9d42a8ec25371b94ddc67abe7c8b9127bec79bebaaae18" [[package]] name = "rust-ini" -version = "0.21.1" +version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e310ef0e1b6eeb79169a1171daf9abcb87a2e17c03bee2c4bb100b55c75409f" +checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "ordered-multimap", - "trim-in-place", ] [[package]] @@ -3801,6 +5085,15 @@ 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 0.9.0", +] + [[package]] name = "rustc_version" version = "0.3.3" @@ -3825,7 +5118,7 @@ version = "0.38.37" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" dependencies = [ - "bitflags", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3834,16 +5127,32 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.14" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "415d9944693cb90382053259f89fbb077ea730ad7273047ec63b19bc9b160ba8" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ - "once_cell", - "ring", - "rustls-pki-types", + "log", + "ring 0.17.8", "rustls-webpki", - "subtle", - "zeroize", + "sct", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", ] [[package]] @@ -3851,19 +5160,15 @@ name = "rustls-pki-types" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" -dependencies = [ - "web-time", -] [[package]] name = "rustls-webpki" -version = "0.102.8" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "ring", - "rustls-pki-types", - "untrusted", + "ring 0.17.8", + "untrusted 0.9.0", ] [[package]] @@ -3888,7 +5193,49 @@ dependencies = [ name = "ryu" version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "salsa20" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" +dependencies = [ + "cipher 0.4.4", +] + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "scale-info" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" +dependencies = [ + "cfg-if 1.0.0", + "derive_more 0.99.18", + "parity-scale-codec", + "scale-info-derive", +] + +[[package]] +name = "scale-info-derive" +version = "2.11.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" +dependencies = [ + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "schannel" @@ -3899,12 +5246,40 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "scopeguard" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" + [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +[[package]] +name = "scrypt" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +dependencies = [ + "hmac", + "pbkdf2 0.11.0", + "salsa20", + "sha2", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.8", + "untrusted 0.9.0", +] + [[package]] name = "sec1" version = "0.7.3" @@ -3947,7 +5322,7 @@ version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3977,32 +5352,41 @@ dependencies = [ [[package]] name = "self_update" -version = "0.42.0" +version = "0.41.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d832c086ece0dacc29fb2947bb4219b8f6e12fe9e40b7108f9e57c4224e47b5c" +checksum = "469a3970061380c19852269f393e74c0fe607a4e23d85267382cf25486aa8de5" dependencies = [ - "hyper", + "hyper 1.4.1", "indicatif", "log", "quick-xml", "regex", - "reqwest", + "reqwest 0.12.8", "self-replace", "semver 1.0.23", "serde_json", "tempfile", "urlencoding", - "zip", + "zip 2.2.0", "zipsign-api", ] +[[package]] +name = "semver" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +dependencies = [ + "semver-parser 0.7.0", +] + [[package]] name = "semver" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "semver-parser", + "semver-parser 0.10.3", ] [[package]] @@ -4010,6 +5394,15 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +dependencies = [ + "serde", +] + +[[package]] +name = "semver-parser" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "semver-parser" @@ -4020,6 +5413,18 @@ dependencies = [ "pest", ] +[[package]] +name = "send_wrapper" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" + +[[package]] +name = "send_wrapper" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" + [[package]] name = "serde" version = "1.0.210" @@ -4042,9 +5447,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.128" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" dependencies = [ "itoa", "memchr", @@ -4124,13 +5529,24 @@ dependencies = [ "serde", ] +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest 0.10.7", +] + [[package]] name = "sha2" version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "cpufeatures", "digest 0.10.7", ] @@ -4152,7 +5568,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" dependencies = [ "cc", - "cfg-if", + "cfg-if 1.0.0", ] [[package]] @@ -4161,6 +5577,16 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" +[[package]] +name = "shell32-sys" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" +dependencies = [ + "winapi 0.2.8", + "winapi-build", +] + [[package]] name = "shlex" version = "1.3.0" @@ -4192,6 +5618,18 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simple_asn1" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "thiserror 1.0.64", + "time", +] + [[package]] name = "simplelog" version = "0.12.2" @@ -4203,13 +5641,28 @@ dependencies = [ "time", ] +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg", + "autocfg 1.4.0", +] + +[[package]] +name = "smallvec" +version = "0.6.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" +dependencies = [ + "maybe-uninit", ] [[package]] @@ -4223,14 +5676,40 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.10" +version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "solang-parser" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" +dependencies = [ + "itertools 0.11.0", + "lalrpop", + "lalrpop-util", + "phf", + "thiserror 1.0.64", + "unicode-xid", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + [[package]] name = "spki" version = "0.7.3" @@ -4246,7 +5725,7 @@ name = "starky" version = "0.4.0" source = "git+https://github.com/InternetMaximalism/polygon-plonky2.git?branch=intmax2-dev#8dbbe5142aea5a05bcbf948b63935f204e40f646" dependencies = [ - "ahash", + "ahash 0.8.11", "anyhow", "hashbrown 0.14.5", "itertools 0.11.0", @@ -4263,6 +5742,19 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "string_cache" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" +dependencies = [ + "new_debug_unreachable", + "once_cell", + "parking_lot 0.12.3", + "phf_shared 0.10.0", + "precomputed-hash", +] + [[package]] name = "strsim" version = "0.11.1" @@ -4274,6 +5766,9 @@ name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" +dependencies = [ + "strum_macros 0.26.4", +] [[package]] name = "strum" @@ -4281,7 +5776,20 @@ version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ - "strum_macros", + "strum_macros 0.27.1", +] + +[[package]] +name = "strum_macros" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +dependencies = [ + "heck", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.101", ] [[package]] @@ -4299,9 +5807,29 @@ dependencies = [ [[package]] name = "subtle" -version = "2.6.1" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "svm-rs" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" +checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" +dependencies = [ + "dirs", + "fs2", + "hex", + "once_cell", + "reqwest 0.11.27", + "semver 1.0.23", + "serde", + "serde_json", + "sha2", + "thiserror 1.0.64", + "url", + "zip 0.6.6", +] [[package]] name = "syn" @@ -4337,6 +5865,12 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sync_wrapper" version = "1.0.1" @@ -4346,22 +5880,34 @@ dependencies = [ "futures-core", ] +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "unicode-xid", +] + [[package]] name = "system-configuration" -version = "0.6.1" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "bitflags", + "bitflags 1.3.2", "core-foundation", "system-configuration-sys", ] [[package]] name = "system-configuration-sys" -version = "0.6.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ "core-foundation-sys", "libc", @@ -4379,13 +5925,24 @@ version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "fastrand", "once_cell", "rustix", "windows-sys 0.59.0", ] +[[package]] +name = "term" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" +dependencies = [ + "dirs-next", + "rustversion", + "winapi 0.3.9", +] + [[package]] name = "termcolor" version = "1.4.1" @@ -4395,6 +5952,181 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "tetsy-bytes" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b126714a30c5abc3fd13af622369d65945a91bf315ed555db109a7050abc9440" + +[[package]] +name = "tetsy-fixed-hash" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1ed8b78ac3c63bc64d5f0ea6ef5841ccd214f4f007386ffe214086fa6eb803d" +dependencies = [ + "byteorder", + "rand 0.7.3", + "rustc-hex", + "static_assertions", +] + +[[package]] +name = "tetsy-hash-db" +version = "0.15.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63bdafe780365bec794d716a51eb589d84c360514a125e9508c973f14991f4f5" + +[[package]] +name = "tetsy-impl-codec" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf9fd308572d831c4b2fa619a617d2c6c6ec3ff34edae98266f9ee7c2815a05f" +dependencies = [ + "tetsy-scale-codec", +] + +[[package]] +name = "tetsy-impl-rlp" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d9894e9174ee77ec06e122256349fcccad3c1b0b3d34ed741c38fde7974c9a" +dependencies = [ + "tetsy-rlp", +] + +[[package]] +name = "tetsy-impl-serde" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73849bf47bb3ea3423e6e6b53091cdbf6e47252b4be0ff83cb7e9eb47b0ab1e5" +dependencies = [ + "serde", +] + +[[package]] +name = "tetsy-keccak-hasher" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d628ecb0ccb5bf172a39084cf7e1e76173900485dd3db486e13672a411730e24" +dependencies = [ + "tetsy-hash-db", + "tetsy-plain-hasher", + "tiny-keccak 1.5.0", + "vapory-types", +] + +[[package]] +name = "tetsy-kvdb" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd005ae5a328e0ad832898850929b1a703c1c196989744eb894b34669fbcc061" +dependencies = [ + "smallvec 1.13.2", + "tetsy-bytes", + "tetsy-util-mem 0.4.2", +] + +[[package]] +name = "tetsy-memory-db" +version = "0.18.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9788a83f194d7eaff56a334af01fa832d833f4d5fa60271592ac0933b0f11253" +dependencies = [ + "ahash 0.2.19", + "hashbrown 0.6.3", + "tetsy-hash-db", + "tetsy-util-mem 0.3.0", +] + +[[package]] +name = "tetsy-plain-hasher" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26df2c3d8f8ffd558f0ac4ac592f2b3f43350b8f333573eefd55a54fe2ace738" +dependencies = [ + "crunchy", +] + +[[package]] +name = "tetsy-primitive-types" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bab7bd08ec411a022351f271cc69721ac7ce6be9f3cefaca201ade5b8f5b05fc" +dependencies = [ + "tetsy-fixed-hash", + "tetsy-impl-codec", + "tetsy-impl-rlp", + "tetsy-impl-serde", + "uint-crate", +] + +[[package]] +name = "tetsy-rlp" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7aa29cb060e6f816433b8a2956a27034059452a5d8c7493306f1e2e9d11a1a7b" +dependencies = [ + "rustc-hex", +] + +[[package]] +name = "tetsy-scale-codec" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afe48c9474a98c5af2796dccc6a228e9752ba87ad5912dacf23a0c8e696896ff" +dependencies = [ + "arrayvec 0.5.2", + "bitvec 0.17.4", + "byte-slice-cast 0.3.5", + "serde", +] + +[[package]] +name = "tetsy-util-mem" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dcb4de95856e89362585321f053820f3aaae0cda29ecda57af2654f6dd1e5f3" +dependencies = [ + "cfg-if 0.1.10", + "hashbrown 0.6.3", + "impl-trait-for-tuples 0.1.3", + "lru 0.4.3", + "parking_lot 0.9.0", + "smallvec 1.13.2", + "tetsy-util-mem-derive", + "vapory-types", + "winapi 0.3.9", +] + +[[package]] +name = "tetsy-util-mem" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5247c86d5290b9aa3b126f7993b0b561b1419ca3fa1dab334a0c74ebdd8f5d" +dependencies = [ + "cfg-if 0.1.10", + "hashbrown 0.6.3", + "impl-trait-for-tuples 0.1.3", + "lru 0.4.3", + "parking_lot 0.9.0", + "smallvec 1.13.2", + "tetsy-primitive-types", + "tetsy-util-mem-derive", + "vapory-types", + "winapi 0.3.9", +] + +[[package]] +name = "tetsy-util-mem-derive" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a5ba230d73eac389b2a43327e90e857ccee06c2c734726067555708164cbd19" +dependencies = [ + "proc-macro2", + "syn 1.0.109", + "synstructure", +] + [[package]] name = "thiserror" version = "1.0.64" @@ -4477,6 +6209,15 @@ dependencies = [ "time-core", ] +[[package]] +name = "tiny-keccak" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" +dependencies = [ + "crunchy", +] + [[package]] name = "tiny-keccak" version = "2.0.2" @@ -4511,7 +6252,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot", + "parking_lot 0.12.3", "pin-project-lite", "signal-hook-registry", "socket2", @@ -4542,12 +6283,11 @@ dependencies = [ [[package]] name = "tokio-rustls" -version = "0.26.0" +version = "0.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" dependencies = [ "rustls", - "rustls-pki-types", "tokio", ] @@ -4563,6 +6303,21 @@ dependencies = [ "tokio-util", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots", +] + [[package]] name = "tokio-util" version = "0.7.12" @@ -4578,9 +6333,18 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.22" +version = "0.5.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" +dependencies = [ + "serde", +] + +[[package]] +name = "toml" +version = "0.8.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" dependencies = [ "serde", "serde_spanned", @@ -4590,24 +6354,24 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.9" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.26" +version = "0.22.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" +checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.20", ] [[package]] @@ -4619,26 +6383,7 @@ dependencies = [ "futures-core", "futures-util", "pin-project-lite", - "sync_wrapper", - "tokio", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-http" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdb0c213ca27a9f57ab69ddb290fd80d970922355b83ae380b395d3986b8a2e" -dependencies = [ - "bitflags", - "bytes", - "futures-util", - "http", - "http-body", - "iri-string", - "pin-project-lite", - "tower", + "sync_wrapper 1.0.1", "tower-layer", "tower-service", ] @@ -4668,9 +6413,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", @@ -4698,18 +6443,32 @@ dependencies = [ "tracing", ] -[[package]] -name = "trim-in-place" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "343e926fc669bc8cde4fa3129ab681c63671bae288b1f1081ceee6d9d37904fc" - [[package]] name = "try-lock" version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http 0.2.12", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror 1.0.64", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.17.0" @@ -4734,6 +6493,18 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "uint-crate" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a54e7d173b20bb6938b878aa29ccdf294c23202c384bd096bc5cfd162eee77a2" +dependencies = [ + "byteorder", + "crunchy", + "rustc-hex", + "static_assertions", +] + [[package]] name = "unarray" version = "0.1.4" @@ -4761,24 +6532,12 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-segmentation" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" - [[package]] name = "unicode-width" version = "0.1.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" -[[package]] -name = "unicode-width" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" - [[package]] name = "unicode-xid" version = "0.2.6" @@ -4787,9 +6546,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "universal-hash" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8326b2c654932e3e4f9196e69d08fdf7cfd718e1dc6f66b347e6024a0c961402" +checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" dependencies = [ "generic-array", "subtle", @@ -4805,6 +6564,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + [[package]] name = "untrusted" version = "0.9.0" @@ -4828,18 +6593,61 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" +[[package]] +name = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" +[[package]] +name = "uuid" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" +dependencies = [ + "getrandom 0.2.15", + "serde", +] + [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" +[[package]] +name = "vapbloom" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae5cf5523abfbbc0ee98ac9ec1c8e8339dede2963bf82bdb8e84d4c8251e4091" +dependencies = [ + "crunchy", + "tetsy-fixed-hash", + "tetsy-impl-rlp", + "tetsy-impl-serde", + "tiny-keccak 1.5.0", +] + +[[package]] +name = "vapory-types" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06968740059dd4ddf354280f706f2a207b49537b79b0341b765d1bceeaf8d7c4" +dependencies = [ + "tetsy-fixed-hash", + "tetsy-impl-rlp", + "tetsy-impl-serde", + "tetsy-primitive-types", + "uint-crate", + "vapbloom", +] + [[package]] name = "vcpkg" version = "0.2.15" @@ -4861,6 +6669,16 @@ dependencies = [ "libc", ] +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -4870,6 +6688,12 @@ dependencies = [ "try-lock", ] +[[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.11.0+wasi-snapshot-preview1" @@ -4887,24 +6711,24 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "once_cell", - "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", + "once_cell", "proc-macro2", "quote", "syn 2.0.101", @@ -4917,7 +6741,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "js-sys", "wasm-bindgen", "web-sys", @@ -4925,9 +6749,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4935,9 +6759,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", @@ -4948,12 +6772,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" -dependencies = [ - "unicode-ident", -] +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "wasmtimer" @@ -4963,7 +6784,7 @@ checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" dependencies = [ "futures", "js-sys", - "parking_lot", + "parking_lot 0.12.3", "pin-utils", "slab", "wasm-bindgen", @@ -4991,13 +6812,38 @@ dependencies = [ [[package]] name = "webpki-roots" -version = "1.0.0" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" + +[[package]] +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2853738d1cc4f2da3a225c18ec6c3721abb31961096e9dbf5ab35fa88b19cfdb" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "rustls-pki-types", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-build" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" + +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-util" version = "0.1.9" @@ -5007,6 +6853,12 @@ dependencies = [ "windows-sys 0.59.0", ] +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + [[package]] name = "windows-core" version = "0.52.0" @@ -5016,39 +6868,34 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-link" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" - [[package]] name = "windows-registry" -version = "0.4.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" dependencies = [ "windows-result", "windows-strings", - "windows-targets 0.53.0", + "windows-targets 0.52.6", ] [[package]] name = "windows-result" -version = "0.3.4" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" dependencies = [ - "windows-link", + "windows-targets 0.52.6", ] [[package]] name = "windows-strings" -version = "0.3.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87fa48cc5d406560701792be122a10132491cff9d0aeb23583cc2dcafc847319" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" dependencies = [ - "windows-link", + "windows-result", + "windows-targets 0.52.6", ] [[package]] @@ -5102,29 +6949,13 @@ dependencies = [ "windows_aarch64_gnullvm 0.52.6", "windows_aarch64_msvc 0.52.6", "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", + "windows_i686_gnullvm", "windows_i686_msvc 0.52.6", "windows_x86_64_gnu 0.52.6", "windows_x86_64_gnullvm 0.52.6", "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-targets" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e4c7e8ceaaf9cb7d7507c974735728ab453b67ef8f18febdd7c11fe59dca8b" -dependencies = [ - "windows_aarch64_gnullvm 0.53.0", - "windows_aarch64_msvc 0.53.0", - "windows_i686_gnu 0.53.0", - "windows_i686_gnullvm 0.53.0", - "windows_i686_msvc 0.53.0", - "windows_x86_64_gnu 0.53.0", - "windows_x86_64_gnullvm 0.53.0", - "windows_x86_64_msvc 0.53.0", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -5137,12 +6968,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" - [[package]] name = "windows_aarch64_msvc" version = "0.48.5" @@ -5155,12 +6980,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_aarch64_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" - [[package]] name = "windows_i686_gnu" version = "0.48.5" @@ -5173,24 +6992,12 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" -[[package]] -name = "windows_i686_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" - [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" - [[package]] name = "windows_i686_msvc" version = "0.48.5" @@ -5203,12 +7010,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_i686_msvc" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" - [[package]] name = "windows_x86_64_gnu" version = "0.48.5" @@ -5221,12 +7022,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnu" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" - [[package]] name = "windows_x86_64_gnullvm" version = "0.48.5" @@ -5239,12 +7034,6 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.53.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" - [[package]] name = "windows_x86_64_msvc" version = "0.48.5" @@ -5258,10 +7047,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] -name = "windows_x86_64_msvc" -version = "0.53.0" +name = "winnow" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" +checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b" +dependencies = [ + "memchr", +] [[package]] name = "winnow" @@ -5272,13 +7064,42 @@ dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if 1.0.0", + "windows-sys 0.48.0", +] + [[package]] name = "wit-bindgen-rt" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" dependencies = [ - "bitflags", + "bitflags 2.6.0", +] + +[[package]] +name = "ws_stream_wasm" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version 0.4.1", + "send_wrapper 0.6.0", + "thiserror 1.0.64", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", ] [[package]] @@ -5291,16 +7112,26 @@ dependencies = [ ] [[package]] -name = "yaml-rust2" -version = "0.10.2" +name = "xdg" +version = "2.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" + +[[package]] +name = "yaml-rust" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18b783b2c2789414f8bb84ca3318fc9c2d7e7be1c22907d37839a58dedb369d3" +checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" dependencies = [ - "arraydeque", - "encoding_rs", - "hashlink", + "linked-hash-map", ] +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zerocopy" version = "0.7.35" @@ -5342,6 +7173,26 @@ dependencies = [ "syn 2.0.101", ] +[[package]] +name = "zip" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +dependencies = [ + "aes 0.8.4", + "byteorder", + "bzip2", + "constant_time_eq", + "crc32fast", + "crossbeam-utils", + "flate2", + "hmac", + "pbkdf2 0.11.0", + "sha1", + "time", + "zstd", +] + [[package]] name = "zip" version = "2.2.0" @@ -5383,3 +7234,32 @@ dependencies = [ "once_cell", "simd-adler32", ] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.13+zstd.1.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" +dependencies = [ + "cc", + "pkg-config", +] diff --git a/Cargo.toml b/Cargo.toml index 549fab7..ee6ce63 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,46 +1,52 @@ [package] name = "mining-cli" -version = "1.3.0" +version = "1.2.2" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -anyhow = "1.0.98" +anyhow = "1.0.88" bincode = "1.3.3" plonky2 = { git = "https://github.com/InternetMaximalism/polygon-plonky2.git", branch = "intmax2-dev" } intmax2-zkp = { git = "https://github.com/InternetMaximalism/intmax2-zkp", branch = "dev" } mining_circuit_v1 = { git = "https://github.com/InternetMaximalism/intmax2-mining.git" } num-bigint = "0.4.6" serde = { version = "1.0.210", features = ["derive"] } -serde_json = "1.0.140" -config = "0.15.11" -reqwest = { version = "0.12.17", features = ["json"] } +serde_json = "1.0.128" +config = "0.13" +reqwest = { version = "0.11", features = ["json"] } +ethers = "2.0" tokio = { version = "1", features = ["full"] } +rpassword = "5.0" aes-gcm = "0.9" sha3 = "0.10.0" dialoguer = "0.11.0" -console = "0.15.11" +console = "0.15.8" rand = "0.8.5" simplelog = "0.12.2" -log = "0.4.27" -chrono = "0.4.41" -regex = "1.11.1" +log = "0.4.22" +chrono = "0.4.38" +regex = "1.10.6" +dir = "0.1.2" dirs = "5.0.1" -clap = { version = "4.5.39", features = ["derive"] } +clap = { version = "4.5.18", features = ["derive"] } dotenv = "0.15.0" hex = "0.4.3" -thiserror = "2.0.2" +thiserror = "1.0.64" strum = "0.26.3" -strum_macros = "0.27.1" -self_update = { version = "0.42.0", features = [ +strum_macros = "0.26.4" +openssl = { version = "0.10", features = ["vendored"] } +openssl-sys = { version = "0.9", features = ["vendored"] } +self_update = { version = "0.41.0", features = [ "archive-zip", "compression-zip-deflate", ] } rand_chacha = "0.3.1" -alloy = { version = "1.0.8", features = ["rand"] } -tower = "0.5.2" -serde_qs = "0.15.0" +alloy = { version = "1.0.1", features = ["rand"] } futures = "0.3.31" serde_with = "3.12.0" +tower = "0.5.2" +serde_qs = "0.15.0" env_logger = "0.11.8" + From 0cd7a4215e74dea9b7f6d9921b0717a85d1ef874 Mon Sep 17 00:00:00 2001 From: kbizikav <132550763+kbizikav@users.noreply.github.com> Date: Tue, 3 Jun 2025 10:40:53 +0700 Subject: [PATCH 27/27] chore: delete unused deps --- Cargo.lock | 2306 ++++------------------------------------------------ Cargo.toml | 3 - 2 files changed, 150 insertions(+), 2159 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2b63639..e67a116 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addchain" version = "0.2.0" @@ -53,23 +43,12 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", - "cipher 0.3.0", + "cfg-if", + "cipher", "cpufeatures", "opaque-debug", ] -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if 1.0.0", - "cipher 0.4.4", - "cpufeatures", -] - [[package]] name = "aes-gcm" version = "0.9.4" @@ -77,22 +56,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "df5f85a83a7d8b0442b6aa7b504b8212c1733da07b98aae43d4bc21b2cb3cdf6" dependencies = [ "aead", - "aes 0.7.5", - "cipher 0.3.0", - "ctr 0.8.0", + "aes", + "cipher", + "ctr", "ghash", "subtle", ] -[[package]] -name = "ahash" -version = "0.2.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29661b60bec623f0586702976ff4d0c9942dcb6723161c2df0eea78455cfedfb" -dependencies = [ - "const-random", -] - [[package]] name = "ahash" version = "0.7.8" @@ -110,7 +80,7 @@ version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "const-random", "once_cell", "version_check", @@ -178,7 +148,7 @@ dependencies = [ "alloy-trie", "auto_impl", "c-kzg", - "derive_more 2.0.1", + "derive_more", "either", "k256", "once_cell", @@ -303,7 +273,7 @@ dependencies = [ "alloy-serde", "auto_impl", "c-kzg", - "derive_more 2.0.1", + "derive_more", "either", "serde", "sha2", @@ -367,7 +337,7 @@ dependencies = [ "alloy-sol-types", "async-trait", "auto_impl", - "derive_more 2.0.1", + "derive_more", "futures-utils-wasm", "serde", "serde_json", @@ -395,9 +365,9 @@ checksum = "18c35fc4b03ace65001676358ffbbaefe2a2b27ee50fe777c345082c7c888be8" dependencies = [ "alloy-rlp", "bytes", - "cfg-if 1.0.0", + "cfg-if", "const-hex", - "derive_more 2.0.1", + "derive_more", "foldhash", "getrandom 0.3.3", "hashbrown 0.15.3", @@ -412,7 +382,7 @@ dependencies = [ "rustc-hash", "serde", "sha3", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] @@ -441,8 +411,8 @@ dependencies = [ "either", "futures", "futures-utils-wasm", - "lru 0.13.0", - "parking_lot 0.12.3", + "lru", + "parking_lot", "pin-project", "reqwest 0.12.8", "serde", @@ -461,7 +431,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f70d83b765fdc080dbcd4f4db70d8d23fe4761f2f02ebfa9146b833900634b4" dependencies = [ "alloy-rlp-derive", - "arrayvec 0.7.6", + "arrayvec", "bytes", ] @@ -616,7 +586,7 @@ dependencies = [ "quote", "syn 2.0.101", "syn-solidity", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] @@ -668,10 +638,10 @@ dependencies = [ "alloy-json-rpc", "alloy-primitives", "base64 0.22.1", - "derive_more 2.0.1", + "derive_more", "futures", "futures-utils-wasm", - "parking_lot 0.12.3", + "parking_lot", "serde", "serde_json", "thiserror 2.0.12", @@ -705,11 +675,11 @@ checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" dependencies = [ "alloy-primitives", "alloy-rlp", - "arrayvec 0.7.6", - "derive_more 2.0.1", + "arrayvec", + "derive_more", "nybbles", "serde", - "smallvec 1.13.2", + "smallvec", "tracing", ] @@ -783,18 +753,6 @@ version = "1.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "86fdf8605db99b54d3cd748a44c6d04df638eb5dafb219b135d0149bd0db01f6" -[[package]] -name = "app_dirs" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e73a24bad9bd6a94d6395382a6c69fe071708ae4409f763c5475e14ee896313d" -dependencies = [ - "ole32-sys", - "shell32-sys", - "winapi 0.2.8", - "xdg", -] - [[package]] name = "arbitrary" version = "1.3.2" @@ -981,12 +939,6 @@ dependencies = [ "rand 0.8.5", ] -[[package]] -name = "arrayvec" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" - [[package]] name = "arrayvec" version = "0.7.6" @@ -996,15 +948,6 @@ dependencies = [ "serde", ] -[[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", -] - [[package]] name = "async-stream" version = "0.3.6" @@ -1038,17 +981,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ - "futures", - "pharos", - "rustc_version 0.4.1", -] - [[package]] name = "auto_impl" version = "1.2.0" @@ -1060,15 +992,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.4.0", -] - [[package]] name = "autocfg" version = "1.4.0" @@ -1082,7 +1005,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" dependencies = [ "addr2line", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -1120,12 +1043,6 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" -[[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" - [[package]] name = "bincode" version = "1.3.3" @@ -1135,30 +1052,15 @@ dependencies = [ "serde", ] -[[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" -dependencies = [ - "bit-vec 0.6.3", -] - [[package]] name = "bit-set" version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ - "bit-vec 0.8.0", + "bit-vec", ] -[[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" - [[package]] name = "bit-vec" version = "0.8.0" @@ -1193,16 +1095,6 @@ version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", -] - [[package]] name = "bitvec" version = "1.0.1" @@ -1210,7 +1102,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", - "radium 0.7.0", + "radium", "tap", "wyz", ] @@ -1236,28 +1128,12 @@ dependencies = [ "zeroize", ] -[[package]] -name = "bs58" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" -dependencies = [ - "sha2", - "tinyvec", -] - [[package]] name = "bumpalo" version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" -[[package]] -name = "byte-slice-cast" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0a5e3906bcbf133e33c1d4d95afc664ad37fbdb9f6568d8043e7ea8c27d93d3" - [[package]] name = "byte-slice-cast" version = "1.2.2" @@ -1279,27 +1155,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "c-kzg" version = "2.1.1" @@ -1315,55 +1170,15 @@ dependencies = [ "serde", ] -[[package]] -name = "camino" -version = "1.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24b1f0365a6c6bb4020cd05806fd0d33c44d38046b8bd7f0e40814b9763cabfc" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror 1.0.64", -] - [[package]] name = "cc" version = "1.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0fc897dc1e865cc67c0e05a836d9d3f1df3cbe442aa4a9473b18e12624a4951" dependencies = [ - "jobserver", - "libc", "shlex", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -1394,16 +1209,6 @@ dependencies = [ "generic-array", ] -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - [[package]] name = "clap" version = "4.5.19" @@ -1444,67 +1249,6 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1462739cb27611015575c0c11df5df7601141071f07518d56fcc1be504cbec97" -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "coins-bip32" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" -dependencies = [ - "bs58", - "coins-core", - "digest 0.10.7", - "hmac", - "k256", - "serde", - "sha2", - "thiserror 1.0.64", -] - -[[package]] -name = "coins-bip39" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" -dependencies = [ - "bitvec 1.0.1", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand 0.8.5", - "sha2", - "thiserror 1.0.64", -] - -[[package]] -name = "coins-core" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" -dependencies = [ - "base64 0.21.7", - "bech32", - "bs58", - "digest 0.10.7", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror 1.0.64", -] - [[package]] name = "colorchoice" version = "1.0.2" @@ -1526,7 +1270,7 @@ dependencies = [ "rust-ini", "serde", "serde_json", - "toml 0.5.11", + "toml", "yaml-rust", ] @@ -1549,7 +1293,7 @@ version = "1.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "83e22e0ed40b96a48d3db274f72fd365bd78f67af39b6bbd47e8a15e1c6207ff" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "hex", "proptest", @@ -1579,15 +1323,9 @@ checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" dependencies = [ "getrandom 0.2.15", "once_cell", - "tiny-keccak 2.0.2", + "tiny-keccak", ] -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - [[package]] name = "core-foundation" version = "0.9.4" @@ -1634,7 +1372,7 @@ version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -1696,16 +1434,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" dependencies = [ - "cipher 0.3.0", -] - -[[package]] -name = "ctr" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher 0.4.4", + "cipher", ] [[package]] @@ -1714,7 +1443,7 @@ version = "4.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97fb8b7c4503de7d6ae7b42ab72a5a59857b4c937ec27a3d4539dba95b5ab2be" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "curve25519-dalek-derive", "digest 0.10.7", @@ -1776,20 +1505,14 @@ version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "crossbeam-utils", "hashbrown 0.14.5", - "lock_api 0.4.12", + "lock_api", "once_cell", - "parking_lot_core 0.9.10", + "parking_lot_core", ] -[[package]] -name = "data-encoding" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8566979429cf69b49a5c740c60791108e86440e8be149bbea4fe54d2c32d6e2" - [[package]] name = "der" version = "0.7.9" @@ -1832,17 +1555,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "derive_more" -version = "0.99.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.101", -] - [[package]] name = "derive_more" version = "2.0.1" @@ -1898,18 +1610,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "dir" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbaaafd76867bdccfab7c7a5cc98b9321b515f8663072fd4b0fd9e2ceac3911e" -dependencies = [ - "app_dirs", - "home 0.3.4", - "journaldb", - "vapory-types", -] - [[package]] name = "dirs" version = "5.0.1" @@ -1919,16 +1619,6 @@ dependencies = [ "dirs-sys", ] -[[package]] -name = "dirs-next" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" -dependencies = [ - "cfg-if 1.0.0", - "dirs-sys-next", -] - [[package]] name = "dirs-sys" version = "0.4.1" @@ -1941,17 +1631,6 @@ dependencies = [ "windows-sys 0.48.0", ] -[[package]] -name = "dirs-sys-next" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi 0.3.9", -] - [[package]] name = "displaydoc" version = "0.2.5" @@ -2050,15 +1729,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "ena" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" -dependencies = [ - "log", -] - [[package]] name = "encode_unicode" version = "0.3.6" @@ -2071,25 +1741,7 @@ version = "0.8.34" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "enr" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3d8dc56e02f954cac8eb489772c552c473346fc34f67412bb6244fd647f7e4" -dependencies = [ - "base64 0.21.7", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", + "cfg-if", ] [[package]] @@ -2132,356 +1784,18 @@ dependencies = [ ] [[package]] -name = "eth-keystore" -version = "0.5.0" +name = "fastrand" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" + +[[package]] +name = "fastrlp" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" dependencies = [ - "aes 0.8.4", - "ctr 0.9.2", - "digest 0.10.7", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand 0.8.5", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror 1.0.64", - "uuid", -] - -[[package]] -name = "ethabi" -version = "18.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" -dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror 1.0.64", - "uint", -] - -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak 2.0.2", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash 0.8.0", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types 0.12.2", - "scale-info", - "uint", -] - -[[package]] -name = "ethers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "816841ea989f0c69e459af1cf23a6b0033b19a55424a1ea3a30099becdb8dec0" -dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", -] - -[[package]] -name = "ethers-addressbook" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5495afd16b4faa556c3bba1f21b98b4983e53c1755022377051a975c3b021759" -dependencies = [ - "ethers-core", - "once_cell", - "serde", - "serde_json", -] - -[[package]] -name = "ethers-contract" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fceafa3578c836eeb874af87abacfb041f92b4da0a78a5edd042564b8ecdaaa" -dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror 1.0.64", -] - -[[package]] -name = "ethers-contract-abigen" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04ba01fbc2331a38c429eb95d4a570166781f14290ef9fdb144278a90b5a739b" -dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "reqwest 0.11.27", - "serde", - "serde_json", - "syn 2.0.101", - "toml 0.8.19", - "walkdir", -] - -[[package]] -name = "ethers-contract-derive" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87689dcabc0051cde10caaade298f9e9093d65f6125c14575db3fd8c669a168f" -dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", - "proc-macro2", - "quote", - "serde_json", - "syn 2.0.101", -] - -[[package]] -name = "ethers-core" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d80cc6ad30b14a48ab786523af33b37f28a8623fc06afd55324816ef18fb1f" -dependencies = [ - "arrayvec 0.7.6", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", - "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand 0.8.5", - "rlp", - "serde", - "serde_json", - "strum 0.26.3", - "syn 2.0.101", - "tempfile", - "thiserror 1.0.64", - "tiny-keccak 2.0.2", - "unicode-xid", -] - -[[package]] -name = "ethers-etherscan" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79e5973c26d4baf0ce55520bd732314328cabe53193286671b47144145b9649" -dependencies = [ - "chrono", - "ethers-core", - "reqwest 0.11.27", - "semver 1.0.23", - "serde", - "serde_json", - "thiserror 1.0.64", - "tracing", -] - -[[package]] -name = "ethers-middleware" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48f9fdf09aec667c099909d91908d5eaf9be1bd0e2500ba4172c1d28bfaa43de" -dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.64", - "tokio", - "tracing", - "tracing-futures", - "url", -] - -[[package]] -name = "ethers-providers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6434c9a33891f1effc9c75472e12666db2fa5a0fec4b29af6221680a6fe83ab2" -dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.7", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http 0.2.12", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest 0.11.27", - "serde", - "serde_json", - "thiserror 1.0.64", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", -] - -[[package]] -name = "ethers-signers" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "228875491c782ad851773b652dd8ecac62cda8571d3bc32a5853644dd26766c2" -dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", - "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand 0.8.5", - "sha2", - "thiserror 1.0.64", - "tracing", -] - -[[package]] -name = "ethers-solc" -version = "2.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66244a771d9163282646dbeffe0e6eca4dda4146b6498644e678ac6089b11edd" -dependencies = [ - "cfg-if 1.0.0", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home 0.5.9", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver 1.0.23", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror 1.0.64", - "tiny-keccak 2.0.2", - "tokio", - "tracing", - "walkdir", - "yansi", -] - -[[package]] -name = "eyre" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" -dependencies = [ - "indenter", - "once_cell", -] - -[[package]] -name = "fastmap" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59ea69bd8c9a9aa331b38daa335f7a672183c5281514c0d5c5c48ef63ef09a66" -dependencies = [ - "tetsy-plain-hasher", - "vapory-types", -] - -[[package]] -name = "fastrand" -version = "2.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" - -[[package]] -name = "fastrlp" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" -dependencies = [ - "arrayvec 0.7.6", + "arrayvec", "auto_impl", "bytes", ] @@ -2492,7 +1806,7 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" dependencies = [ - "arrayvec 0.7.6", + "arrayvec", "auto_impl", "bytes", ] @@ -2503,7 +1817,7 @@ version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "bitvec 1.0.1", + "bitvec", "byteorder", "ff_derive", "rand_core 0.6.4", @@ -2517,7 +1831,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e9f54704be45ed286151c5e11531316eaef5b8f5af7d597b806fdb8af108d84a" dependencies = [ "addchain", - "cfg-if 1.0.0", + "cfg-if", "num-bigint 0.3.3", "num-integer", "num-traits", @@ -2553,12 +1867,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - [[package]] name = "flate2" version = "1.0.34" @@ -2605,16 +1913,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fs2" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "funty" version = "2.0.0" @@ -2669,16 +1967,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" -[[package]] -name = "futures-locks" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45ec6fe3675af967e67c5536c0b9d44e34e6c52f86bedc4ea49c5317b8e94d06" -dependencies = [ - "futures-channel", - "futures-task", -] - [[package]] name = "futures-macro" version = "0.3.31" @@ -2702,16 +1990,6 @@ version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" -[[package]] -name = "futures-timer" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f288b0a4f20f9a56b5d1da57e2227c661b7b16168e2f72365f57b63326e29b24" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.31" @@ -2736,15 +2014,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" -[[package]] -name = "fxhash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" -dependencies = [ - "byteorder", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2756,24 +2025,13 @@ dependencies = [ "zeroize", ] -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", -] - [[package]] name = "getrandom" version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", @@ -2786,7 +2044,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "r-efi", "wasi 0.14.2+wasi-0.2.4", @@ -2814,18 +2072,6 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" -[[package]] -name = "gloo-timers" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b995a66bb87bebce9a0f4a95aed01daca4872c050bfcb21653361c03bc35e5c" -dependencies = [ - "futures-channel", - "futures-core", - "js-sys", - "wasm-bindgen", -] - [[package]] name = "group" version = "0.13.0" @@ -2856,16 +2102,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "hashbrown" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e6073d0ca812575946eb5f35ff68dbe519907b25c42530389ff946dc84c6ead" -dependencies = [ - "ahash 0.2.19", - "autocfg 0.1.8", -] - [[package]] name = "hashbrown" version = "0.12.3" @@ -2908,15 +2144,6 @@ dependencies = [ "serde", ] -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" -dependencies = [ - "fxhash", -] - [[package]] name = "heck" version = "0.5.0" @@ -2944,7 +2171,7 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "arrayvec 0.7.6", + "arrayvec", ] [[package]] @@ -2956,25 +2183,6 @@ dependencies = [ "digest 0.10.7", ] -[[package]] -name = "home" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29302b90cfa76231a757a887d1e3153331a63c7f80b6c75f86366334cbe70708" -dependencies = [ - "scopeguard 0.3.3", - "winapi 0.3.9", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - [[package]] name = "http" version = "0.2.12" @@ -3081,25 +2289,11 @@ dependencies = [ "httparse", "itoa", "pin-project-lite", - "smallvec 1.13.2", + "smallvec", "tokio", "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.30", - "rustls", - "tokio", - "tokio-rustls", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -3196,35 +2390,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - -[[package]] -name = "impl-trait-for-tuples" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef5550a42e3740a0e71f909d4c861056a284060af885ae7aa6242820f920d9d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -3236,19 +2401,13 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "indenter" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" - [[package]] name = "indexmap" version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "autocfg 1.4.0", + "autocfg", "hashbrown 0.12.3", "serde", ] @@ -3277,22 +2436,13 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - [[package]] name = "instant" version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -3401,34 +2551,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - -[[package]] -name = "journaldb" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b76a0abc6ebe6b53a2af01026ec5b2e56fa4579ac14a91acfa0a33858ce079c3" -dependencies = [ - "fastmap", - "log", - "parking_lot 0.9.0", - "tetsy-bytes", - "tetsy-hash-db", - "tetsy-keccak-hasher", - "tetsy-kvdb", - "tetsy-memory-db", - "tetsy-rlp", - "tetsy-util-mem 0.3.0", - "vapory-types", -] - [[package]] name = "js-sys" version = "0.3.70" @@ -3449,33 +2571,18 @@ dependencies = [ "serde", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.7", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6e3919bbaa2945715f0bb6d3934a173d1e9a59ac23767fbaaef277265a7411b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ecdsa", "elliptic-curve", "once_cell", "serdect", "sha2", - "signature", ] [[package]] @@ -3504,37 +2611,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ce2bd4c29270e724d3eaadf7bdc8700af4221fc0ed771b855eadcd1b98d52851" dependencies = [ "primitive-types 0.10.1", - "tiny-keccak 2.0.2", -] - -[[package]] -name = "lalrpop" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" -dependencies = [ - "ascii-canvas", - "bit-set 0.5.3", - "ena", - "itertools 0.11.0", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax", - "string_cache", - "term", - "tiny-keccak 2.0.2", - "unicode-xid", - "walkdir", -] - -[[package]] -name = "lalrpop-util" -version = "0.20.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" -dependencies = [ - "regex-automata", + "tiny-keccak", ] [[package]] @@ -3577,23 +2654,14 @@ version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard 1.2.0", -] - [[package]] name = "lock_api" version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ - "autocfg 1.4.0", - "scopeguard 1.2.0", + "autocfg", + "scopeguard", ] [[package]] @@ -3608,15 +2676,6 @@ version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" -[[package]] -name = "lru" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0609345ddee5badacf857d4f547e0e5a2e987db77085c24cd887f73573a04237" -dependencies = [ - "hashbrown 0.6.3", -] - [[package]] name = "lru" version = "0.13.0" @@ -3637,22 +2696,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if 1.0.0", - "digest 0.10.7", -] - [[package]] name = "memchr" version = "2.7.4" @@ -3684,11 +2727,9 @@ dependencies = [ "config", "console", "dialoguer", - "dir", "dirs", "dotenv", "env_logger", - "ethers", "futures", "hex", "intmax2-zkp", @@ -3702,7 +2743,6 @@ dependencies = [ "rand_chacha 0.3.1", "regex", "reqwest 0.11.27", - "rpassword", "self_update", "serde", "serde_json", @@ -3771,12 +2811,6 @@ dependencies = [ "tempfile", ] -[[package]] -name = "new_debug_unreachable" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" - [[package]] name = "nom" version = "7.1.3" @@ -3807,7 +2841,7 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" dependencies = [ - "autocfg 1.4.0", + "autocfg", "num-integer", "num-traits", ] @@ -3854,7 +2888,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ - "autocfg 1.4.0", + "autocfg", "num-integer", "num-traits", ] @@ -3876,7 +2910,7 @@ version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ - "autocfg 1.4.0", + "autocfg", "libm", ] @@ -3905,7 +2939,6 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate", "proc-macro2", "quote", "syn 2.0.101", @@ -3936,7 +2969,7 @@ dependencies = [ "const-hex", "proptest", "serde", - "smallvec 1.13.2", + "smallvec", ] [[package]] @@ -3948,16 +2981,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "ole32-sys" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2c49021782e5233cd243168edfa8037574afed4eba4bbaf538b3d8d1789d8c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "once_cell" version = "1.21.3" @@ -3966,34 +2989,9 @@ checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "open-fastrlp" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" -dependencies = [ - "arrayvec 0.7.6", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", -] - -[[package]] -name = "open-fastrlp-derive" -version = "0.1.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c" -dependencies = [ - "bytes", - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" @@ -4002,7 +3000,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.6.0", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -4029,9 +3027,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "300.3.2+3.3.2" +version = "300.5.0+3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a211a18d945ef7e648cc6e0058f4c548ee46aab922ea203e0d30e966ea23647b" +checksum = "e8ce546f549326b0e6052b649198487d91320875da901e7bd11a06d1ee3f9c2f" dependencies = [ "cc", ] @@ -4071,10 +3069,10 @@ version = "3.6.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "306800abfa29c7f16596b5970a588435e3d5b3149683d00c12b699cc19f895ee" dependencies = [ - "arrayvec 0.7.6", - "bitvec 1.0.1", - "byte-slice-cast 1.2.2", - "impl-trait-for-tuples 0.2.2", + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", "parity-scale-codec-derive", "serde", ] @@ -4091,40 +3089,14 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.3", - "rustc_version 0.2.3", -] - [[package]] name = "parking_lot" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ - "lock_api 0.4.12", - "parking_lot_core 0.9.10", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda66b810a62be75176a80873726630147a5ca780cd33921e0b5709033e66b0a" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version 0.2.3", - "smallvec 0.6.14", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -4133,73 +3105,25 @@ version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.5.7", - "smallvec 1.13.2", + "redox_syscall", + "smallvec", "windows-targets 0.52.6", ] -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core 0.6.4", - "subtle", -] - [[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - [[package]] name = "pathdiff" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8835116a5c179084a830efb3adc117ab007512b535bc1a21c991d3b32a6b44dd" -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", - "hmac", - "password-hash", - "sha2", -] - -[[package]] -name = "pbkdf2" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" -dependencies = [ - "digest 0.10.7", - "hmac", -] - -[[package]] -name = "pem" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" -dependencies = [ - "base64 0.13.1", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -4251,77 +3175,6 @@ dependencies = [ "sha2", ] -[[package]] -name = "petgraph" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" -dependencies = [ - "fixedbitset", - "indexmap 2.6.0", -] - -[[package]] -name = "pharos" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" -dependencies = [ - "futures", - "rustc_version 0.4.1", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_macros", - "phf_shared 0.11.2", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared 0.11.2", - "rand 0.8.5", -] - -[[package]] -name = "phf_macros" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" -dependencies = [ - "phf_generator", - "phf_shared 0.11.2", - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "phf_shared" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - [[package]] name = "pin-project" version = "1.1.6" @@ -4446,7 +3299,7 @@ dependencies = [ "plonky2", "rand 0.8.5", "starky", - "tiny-keccak 2.0.2", + "tiny-keccak", ] [[package]] @@ -4480,7 +3333,7 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "opaque-debug", "universal-hash", @@ -4516,22 +3369,6 @@ dependencies = [ "zerocopy", ] -[[package]] -name = "precomputed-hash" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" - -[[package]] -name = "prettyplease" -version = "0.2.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" -dependencies = [ - "proc-macro2", - "syn 2.0.101", -] - [[package]] name = "primitive-types" version = "0.10.1" @@ -4550,9 +3387,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash 0.8.0", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] @@ -4602,8 +3436,8 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ - "bit-set 0.8.0", - "bit-vec 0.8.0", + "bit-set", + "bit-vec", "bitflags 2.6.0", "lazy_static", "num-traits", @@ -4646,31 +3480,12 @@ version = "5.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - [[package]] name = "radium" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - [[package]] name = "rand" version = "0.8.5" @@ -4694,16 +3509,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - [[package]] name = "rand_chacha" version = "0.3.1" @@ -4724,15 +3529,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - [[package]] name = "rand_core" version = "0.6.4" @@ -4752,15 +3548,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - [[package]] name = "rand_xorshift" version = "0.3.0" @@ -4790,12 +3577,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "redox_syscall" -version = "0.1.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" - [[package]] name = "redox_syscall" version = "0.5.7" @@ -4860,7 +3641,6 @@ dependencies = [ "http 0.2.12", "http-body 0.4.6", "hyper 0.14.30", - "hyper-rustls", "hyper-tls 0.5.0", "ipnet", "js-sys", @@ -4870,7 +3650,6 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", "rustls-pemfile 1.0.4", "serde", "serde_json", @@ -4879,13 +3658,11 @@ dependencies = [ "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", "winreg", ] @@ -4939,45 +3716,6 @@ dependencies = [ "subtle", ] -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi 0.3.9", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if 1.0.0", - "getrandom 0.2.15", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "ripemd" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd124222d17ad93a644ed9d011a40f4fb64aa54275c08cc216524a9ea82fb09f" -dependencies = [ - "digest 0.10.7", -] - [[package]] name = "rlp" version = "0.5.2" @@ -4985,21 +3723,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" dependencies = [ "bytes", - "rlp-derive", "rustc-hex", ] -[[package]] -name = "rlp-derive" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "ron" version = "0.7.1" @@ -5011,16 +3737,6 @@ dependencies = [ "serde", ] -[[package]] -name = "rpassword" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc936cf8a7ea60c58f030fd36a612a48f440610214dc54bc36431f9ea0c3efb" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "ruint" version = "1.15.0" @@ -5060,7 +3776,7 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6d5f2436026b4f6e79dc829837d467cc7e9a55ee40e750d716713540715a2df" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "ordered-multimap", ] @@ -5085,15 +3801,6 @@ 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 0.9.0", -] - [[package]] name = "rustc_version" version = "0.3.3" @@ -5125,18 +3832,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -5161,16 +3856,6 @@ version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0e696e35370c65c9c541198af4543ccd580cf17fc25d8e05c5a242b202488c55" -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - [[package]] name = "rustversion" version = "1.0.17" @@ -5195,48 +3880,6 @@ version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher 0.4.4", -] - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "scale-info" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eca070c12893629e2cc820a9761bedf6ce1dcddc9852984d1dc734b8bd9bd024" -dependencies = [ - "cfg-if 1.0.0", - "derive_more 0.99.18", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.11.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d35494501194174bda522a32605929eefc9ecf7e0a326c26db1fdd85881eb62" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "schannel" version = "0.1.24" @@ -5246,39 +3889,11 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - [[package]] name = "scopeguard" version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "scrypt" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" -dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", -] - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "sec1" @@ -5367,26 +3982,17 @@ dependencies = [ "serde_json", "tempfile", "urlencoding", - "zip 2.2.0", + "zip", "zipsign-api", ] -[[package]] -name = "semver" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" -dependencies = [ - "semver-parser 0.7.0", -] - [[package]] name = "semver" version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "semver-parser 0.10.3", + "semver-parser", ] [[package]] @@ -5394,15 +4000,6 @@ name = "semver" version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" -dependencies = [ - "serde", -] - -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "semver-parser" @@ -5413,18 +4010,6 @@ dependencies = [ "pest", ] -[[package]] -name = "send_wrapper" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" - -[[package]] -name = "send_wrapper" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" - [[package]] name = "serde" version = "1.0.210" @@ -5468,15 +4053,6 @@ dependencies = [ "thiserror 2.0.12", ] -[[package]] -name = "serde_spanned" -version = "0.6.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -5529,24 +4105,13 @@ dependencies = [ "serde", ] -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if 1.0.0", - "cpufeatures", - "digest 0.10.7", -] - [[package]] name = "sha2" version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest 0.10.7", ] @@ -5568,7 +4133,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c28efc5e327c837aa837c59eae585fc250715ef939ac32881bcc11677cd02d46" dependencies = [ "cc", - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -5577,16 +4142,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" -[[package]] -name = "shell32-sys" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee04b46101f57121c9da2b151988283b6beb79b34f5bb29a58ee48cb695122c" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "shlex" version = "1.3.0" @@ -5618,18 +4173,6 @@ version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint 0.4.6", - "num-traits", - "thiserror 1.0.64", - "time", -] - [[package]] name = "simplelog" version = "0.12.2" @@ -5641,28 +4184,13 @@ dependencies = [ "time", ] -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - [[package]] name = "slab" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ - "autocfg 1.4.0", -] - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", + "autocfg", ] [[package]] @@ -5684,32 +4212,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "solang-parser" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" -dependencies = [ - "itertools 0.11.0", - "lalrpop", - "lalrpop-util", - "phf", - "thiserror 1.0.64", - "unicode-xid", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - [[package]] name = "spki" version = "0.7.3" @@ -5742,19 +4244,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" -[[package]] -name = "string_cache" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f91138e76242f575eb1d3b38b4f1362f10d3a43f47d182a5b359af488a02293b" -dependencies = [ - "new_debug_unreachable", - "once_cell", - "parking_lot 0.12.3", - "phf_shared 0.10.0", - "precomputed-hash", -] - [[package]] name = "strsim" version = "0.11.1" @@ -5766,9 +4255,6 @@ name = "strum" version = "0.26.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8fec0f0aef304996cf250b31b5a10dee7980c85da9d759361292b8bca5a18f06" -dependencies = [ - "strum_macros 0.26.4", -] [[package]] name = "strum" @@ -5799,332 +4285,114 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" dependencies = [ "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.101", -] - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "svm-rs" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11297baafe5fa0c99d5722458eac6a5e25c01eb1b8e5cd137f54079093daa7a4" -dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest 0.11.27", - "semver 1.0.23", - "serde", - "serde_json", - "sha2", - "thiserror 1.0.64", - "url", - "zip 0.6.6", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.101" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn-solidity" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d879005cc1b5ba4e18665be9e9501d9da3a9b95f625497c4cb7ee082b532e" -dependencies = [ - "paste", - "proc-macro2", - "quote", - "syn 2.0.101", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "sync_wrapper" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" -dependencies = [ - "futures-core", -] - -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "unicode-xid", -] - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - -[[package]] -name = "tempfile" -version = "3.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" -dependencies = [ - "cfg-if 1.0.0", - "fastrand", - "once_cell", - "rustix", - "windows-sys 0.59.0", -] - -[[package]] -name = "term" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" -dependencies = [ - "dirs-next", - "rustversion", - "winapi 0.3.9", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "tetsy-bytes" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b126714a30c5abc3fd13af622369d65945a91bf315ed555db109a7050abc9440" - -[[package]] -name = "tetsy-fixed-hash" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1ed8b78ac3c63bc64d5f0ea6ef5841ccd214f4f007386ffe214086fa6eb803d" -dependencies = [ - "byteorder", - "rand 0.7.3", - "rustc-hex", - "static_assertions", -] - -[[package]] -name = "tetsy-hash-db" -version = "0.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63bdafe780365bec794d716a51eb589d84c360514a125e9508c973f14991f4f5" - -[[package]] -name = "tetsy-impl-codec" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf9fd308572d831c4b2fa619a617d2c6c6ec3ff34edae98266f9ee7c2815a05f" -dependencies = [ - "tetsy-scale-codec", -] - -[[package]] -name = "tetsy-impl-rlp" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d9894e9174ee77ec06e122256349fcccad3c1b0b3d34ed741c38fde7974c9a" -dependencies = [ - "tetsy-rlp", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.101", ] [[package]] -name = "tetsy-impl-serde" -version = "0.2.2" +name = "subtle" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73849bf47bb3ea3423e6e6b53091cdbf6e47252b4be0ff83cb7e9eb47b0ab1e5" -dependencies = [ - "serde", -] +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] -name = "tetsy-keccak-hasher" -version = "0.1.1" +name = "syn" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d628ecb0ccb5bf172a39084cf7e1e76173900485dd3db486e13672a411730e24" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ - "tetsy-hash-db", - "tetsy-plain-hasher", - "tiny-keccak 1.5.0", - "vapory-types", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "tetsy-kvdb" -version = "0.3.2" +name = "syn" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd005ae5a328e0ad832898850929b1a703c1c196989744eb894b34669fbcc061" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ - "smallvec 1.13.2", - "tetsy-bytes", - "tetsy-util-mem 0.4.2", + "proc-macro2", + "quote", + "unicode-ident", ] [[package]] -name = "tetsy-memory-db" -version = "0.18.1" +name = "syn-solidity" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9788a83f194d7eaff56a334af01fa832d833f4d5fa60271592ac0933b0f11253" +checksum = "1b5d879005cc1b5ba4e18665be9e9501d9da3a9b95f625497c4cb7ee082b532e" dependencies = [ - "ahash 0.2.19", - "hashbrown 0.6.3", - "tetsy-hash-db", - "tetsy-util-mem 0.3.0", + "paste", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] -name = "tetsy-plain-hasher" -version = "0.2.1" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26df2c3d8f8ffd558f0ac4ac592f2b3f43350b8f333573eefd55a54fe2ace738" -dependencies = [ - "crunchy", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] -name = "tetsy-primitive-types" -version = "0.6.0" +name = "sync_wrapper" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab7bd08ec411a022351f271cc69721ac7ce6be9f3cefaca201ade5b8f5b05fc" +checksum = "a7065abeca94b6a8a577f9bd45aa0867a2238b74e8eb67cf10d492bc39351394" dependencies = [ - "tetsy-fixed-hash", - "tetsy-impl-codec", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "uint-crate", + "futures-core", ] [[package]] -name = "tetsy-rlp" -version = "0.4.5" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aa29cb060e6f816433b8a2956a27034059452a5d8c7493306f1e2e9d11a1a7b" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "rustc-hex", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", ] [[package]] -name = "tetsy-scale-codec" -version = "1.3.0" +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afe48c9474a98c5af2796dccc6a228e9752ba87ad5912dacf23a0c8e696896ff" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "arrayvec 0.5.2", - "bitvec 0.17.4", - "byte-slice-cast 0.3.5", - "serde", + "core-foundation-sys", + "libc", ] [[package]] -name = "tetsy-util-mem" -version = "0.3.0" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9dcb4de95856e89362585321f053820f3aaae0cda29ecda57af2654f6dd1e5f3" -dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.6.3", - "impl-trait-for-tuples 0.1.3", - "lru 0.4.3", - "parking_lot 0.9.0", - "smallvec 1.13.2", - "tetsy-util-mem-derive", - "vapory-types", - "winapi 0.3.9", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "tetsy-util-mem" -version = "0.4.2" +name = "tempfile" +version = "3.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb5247c86d5290b9aa3b126f7993b0b561b1419ca3fa1dab334a0c74ebdd8f5d" +checksum = "f0f2c9fc62d0beef6951ccffd757e241266a2c833136efbe35af6cd2567dca5b" dependencies = [ - "cfg-if 0.1.10", - "hashbrown 0.6.3", - "impl-trait-for-tuples 0.1.3", - "lru 0.4.3", - "parking_lot 0.9.0", - "smallvec 1.13.2", - "tetsy-primitive-types", - "tetsy-util-mem-derive", - "vapory-types", - "winapi 0.3.9", + "cfg-if", + "fastrand", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] -name = "tetsy-util-mem-derive" -version = "0.1.1" +name = "termcolor" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a5ba230d73eac389b2a43327e90e857ccee06c2c734726067555708164cbd19" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ - "proc-macro2", - "syn 1.0.109", - "synstructure", + "winapi-util", ] [[package]] @@ -6209,15 +4477,6 @@ dependencies = [ "time-core", ] -[[package]] -name = "tiny-keccak" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8a021c69bb74a44ccedb824a046447e2c84a01df9e5c20779750acb38e11b2" -dependencies = [ - "crunchy", -] - [[package]] name = "tiny-keccak" version = "2.0.2" @@ -6252,7 +4511,7 @@ dependencies = [ "bytes", "libc", "mio", - "parking_lot 0.12.3", + "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", @@ -6281,16 +4540,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.17" @@ -6303,21 +4552,6 @@ dependencies = [ "tokio-util", ] -[[package]] -name = "tokio-tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" -dependencies = [ - "futures-util", - "log", - "rustls", - "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", -] - [[package]] name = "tokio-util" version = "0.7.12" @@ -6340,26 +4574,11 @@ dependencies = [ "serde", ] -[[package]] -name = "toml" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit", -] - [[package]] name = "toml_datetime" version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" @@ -6368,8 +4587,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" dependencies = [ "indexmap 2.6.0", - "serde", - "serde_spanned", "toml_datetime", "winnow 0.6.20", ] @@ -6449,26 +4666,6 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" -[[package]] -name = "tungstenite" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" -dependencies = [ - "byteorder", - "bytes", - "data-encoding", - "http 0.2.12", - "httparse", - "log", - "rand 0.8.5", - "rustls", - "sha1", - "thiserror 1.0.64", - "url", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" @@ -6493,18 +4690,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "uint-crate" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a54e7d173b20bb6938b878aa29ccdf294c23202c384bd096bc5cfd162eee77a2" -dependencies = [ - "byteorder", - "crunchy", - "rustc-hex", - "static_assertions", -] - [[package]] name = "unarray" version = "0.1.4" @@ -6564,18 +4749,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.2" @@ -6593,61 +4766,18 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" -[[package]] -name = "utf-8" -version = "0.7.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" - [[package]] name = "utf8parse" version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom 0.2.15", - "serde", -] - [[package]] name = "valuable" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" -[[package]] -name = "vapbloom" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae5cf5523abfbbc0ee98ac9ec1c8e8339dede2963bf82bdb8e84d4c8251e4091" -dependencies = [ - "crunchy", - "tetsy-fixed-hash", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "tiny-keccak 1.5.0", -] - -[[package]] -name = "vapory-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06968740059dd4ddf354280f706f2a207b49537b79b0341b765d1bceeaf8d7c4" -dependencies = [ - "tetsy-fixed-hash", - "tetsy-impl-rlp", - "tetsy-impl-serde", - "tetsy-primitive-types", - "uint-crate", - "vapbloom", -] - [[package]] name = "vcpkg" version = "0.2.15" @@ -6669,16 +4799,6 @@ dependencies = [ "libc", ] -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - [[package]] name = "want" version = "0.3.1" @@ -6688,12 +4808,6 @@ dependencies = [ "try-lock", ] -[[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.11.0+wasi-snapshot-preview1" @@ -6715,7 +4829,7 @@ version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "once_cell", "wasm-bindgen-macro", ] @@ -6741,7 +4855,7 @@ version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "js-sys", "wasm-bindgen", "web-sys", @@ -6784,7 +4898,7 @@ checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" dependencies = [ "futures", "js-sys", - "parking_lot 0.12.3", + "parking_lot", "pin-utils", "slab", "wasm-bindgen", @@ -6810,40 +4924,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - [[package]] name = "winapi-util" version = "0.1.9" @@ -6853,12 +4933,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - [[package]] name = "windows-core" version = "0.52.0" @@ -7070,7 +5144,7 @@ version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "windows-sys 0.48.0", ] @@ -7083,25 +5157,6 @@ dependencies = [ "bitflags 2.6.0", ] -[[package]] -name = "ws_stream_wasm" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" -dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version 0.4.1", - "send_wrapper 0.6.0", - "thiserror 1.0.64", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "wyz" version = "0.5.1" @@ -7111,12 +5166,6 @@ dependencies = [ "tap", ] -[[package]] -name = "xdg" -version = "2.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "213b7324336b53d2414b2db8537e56544d981803139155afa84f76eeebb7a546" - [[package]] name = "yaml-rust" version = "0.4.5" @@ -7126,12 +5175,6 @@ dependencies = [ "linked-hash-map", ] -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - [[package]] name = "zerocopy" version = "0.7.35" @@ -7173,26 +5216,6 @@ dependencies = [ "syn 2.0.101", ] -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes 0.8.4", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd", -] - [[package]] name = "zip" version = "2.2.0" @@ -7234,32 +5257,3 @@ dependencies = [ "once_cell", "simd-adler32", ] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.13+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index ee6ce63..b20bf40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,9 +16,7 @@ serde = { version = "1.0.210", features = ["derive"] } serde_json = "1.0.128" config = "0.13" reqwest = { version = "0.11", features = ["json"] } -ethers = "2.0" tokio = { version = "1", features = ["full"] } -rpassword = "5.0" aes-gcm = "0.9" sha3 = "0.10.0" dialoguer = "0.11.0" @@ -28,7 +26,6 @@ simplelog = "0.12.2" log = "0.4.22" chrono = "0.4.38" regex = "1.10.6" -dir = "0.1.2" dirs = "5.0.1" clap = { version = "4.5.18", features = ["derive"] } dotenv = "0.15.0"