diff --git a/Cargo.lock b/Cargo.lock index a991e29..2eba237 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,16 +2,6 @@ # It is not intended for manual editing. version = 3 -[[package]] -name = "Inflector" -version = "0.11.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" -dependencies = [ - "lazy_static", - "regex", -] - [[package]] name = "addr2line" version = "0.21.0" @@ -28,986 +18,977 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] -name = "aes" -version = "0.8.3" +name = "ahash" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac1f845298e95f983ff1944b728ae08b8cebab80d684f0a832ed0fc74dfa27e2" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", + "once_cell", + "version_check", + "zerocopy", ] [[package]] -name = "arrayvec" -version = "0.7.4" +name = "allocator-api2" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" [[package]] -name = "ascii-canvas" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" -dependencies = [ - "term", +name = "alloy" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-contract", + "alloy-core", + "alloy-network", + "alloy-node-bindings", + "alloy-provider", + "alloy-rpc-client", + "alloy-rpc-types", + "alloy-signer", + "alloy-signer-wallet", + "alloy-transport", + "alloy-transport-http", + "reqwest", ] [[package]] -name = "async-trait" -version = "0.1.74" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" +name = "alloy-consensus" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.41", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "serde", + "sha2", ] [[package]] -name = "async_io_stream" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" -dependencies = [ +name = "alloy-contract" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-network", + "alloy-primitives", + "alloy-provider", + "alloy-rpc-types", + "alloy-sol-types", + "alloy-transport", "futures", - "pharos", - "rustc_version", + "futures-util", + "thiserror", ] [[package]] -name = "auto_impl" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fee3da8ef1276b0bee5dd1c7258010d8fffd31801447323115a25560e1327b89" +name = "alloy-core" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", ] [[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" +name = "alloy-dyn-abi" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-type-parser", + "alloy-sol-types", + "const-hex", + "itoa", + "serde", + "serde_json", + "winnow 0.6.5", ] [[package]] -name = "base16ct" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +name = "alloy-eips" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "c-kzg", + "once_cell", + "serde", +] [[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +name = "alloy-genesis" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-primitives", + "alloy-serde", + "serde", +] [[package]] -name = "base64" -version = "0.21.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" +name = "alloy-json-abi" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" +dependencies = [ + "alloy-primitives", + "alloy-sol-type-parser", + "serde", + "serde_json", +] [[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +name = "alloy-json-rpc" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", + "thiserror", +] [[package]] -name = "bech32" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" +name = "alloy-network" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-json-rpc", + "alloy-primitives", + "alloy-rpc-types", + "alloy-signer", + "async-trait", + "futures-utils-wasm", + "serde", + "thiserror", +] [[package]] -name = "bit-set" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +name = "alloy-node-bindings" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "bit-vec", + "alloy-genesis", + "alloy-primitives", + "k256", + "serde_json", + "tempfile", + "thiserror", + "tracing", + "url", ] [[package]] -name = "bit-vec" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +name = "alloy-primitives" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" +dependencies = [ + "alloy-rlp", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal", + "itoa", + "k256", + "keccak-asm", + "proptest", + "rand", + "ruint", + "serde", + "tiny-keccak", +] [[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +name = "alloy-provider" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-json-rpc", + "alloy-network", + "alloy-primitives", + "alloy-rpc-client", + "alloy-rpc-trace-types", + "alloy-rpc-types", + "alloy-transport", + "alloy-transport-http", + "async-stream", + "async-trait", + "auto_impl", + "dashmap", + "futures", + "lru", + "reqwest", + "serde_json", + "tokio", + "tracing", +] [[package]] -name = "bitflags" -version = "2.4.1" +name = "alloy-rlp" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" +checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" +dependencies = [ + "alloy-rlp-derive", + "arrayvec", + "bytes", +] [[package]] -name = "bitvec" -version = "1.0.1" +name = "alloy-rlp-derive" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" +checksum = "1a047897373be4bbb0224c1afdabca92648dc57a9c9ef6e7b0be3aff7a859c83" dependencies = [ - "funty", - "radium", - "tap", - "wyz", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" +name = "alloy-rpc-client" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "generic-array", + "alloy-json-rpc", + "alloy-transport", + "alloy-transport-http", + "futures", + "pin-project", + "reqwest", + "serde", + "serde_json", + "tokio", + "tokio-stream", + "tower", + "tracing", + "url", ] [[package]] -name = "bs58" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +name = "alloy-rpc-trace-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "sha2", - "tinyvec", + "alloy-primitives", + "alloy-rpc-types", + "alloy-serde", + "serde", + "serde_json", ] [[package]] -name = "bumpalo" -version = "3.14.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" +name = "alloy-rpc-types" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", + "itertools 0.12.1", + "serde", + "serde_json", + "thiserror", +] [[package]] -name = "byte-slice-cast" -version = "1.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" +name = "alloy-serde" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-primitives", + "serde", + "serde_json", +] [[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +name = "alloy-signer" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" +dependencies = [ + "alloy-primitives", + "async-trait", + "auto_impl", + "elliptic-curve", + "k256", + "thiserror", +] [[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +name = "alloy-signer-wallet" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "serde", + "alloy-consensus", + "alloy-network", + "alloy-primitives", + "alloy-signer", + "async-trait", + "k256", + "rand", + "thiserror", ] [[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +name = "alloy-sol-macro" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "bzip2-sys", - "libc", + "alloy-json-abi", + "alloy-sol-macro-input", + "const-hex", + "heck 0.4.1", + "indexmap", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.41", + "syn-solidity", + "tiny-keccak", ] [[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +name = "alloy-sol-macro-input" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "cc", - "libc", - "pkg-config", + "alloy-json-abi", + "const-hex", + "dunce", + "heck 0.5.0", + "proc-macro2", + "quote", + "serde_json", + "syn 2.0.41", + "syn-solidity", ] [[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +name = "alloy-sol-type-parser" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "serde", + "winnow 0.6.5", ] [[package]] -name = "cargo-platform" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e34637b3140142bdf929fb439e8aa4ebad7651ebf7b1080b3930aa16ac1459ff" +name = "alloy-sol-types" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-macro", + "const-hex", "serde", ] [[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" +name = "alloy-transport" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "camino", - "cargo-platform", - "semver", + "alloy-json-rpc", + "base64 0.22.0", + "futures-util", + "futures-utils-wasm", "serde", "serde_json", "thiserror", + "tokio", + "tower", + "url", + "wasm-bindgen-futures", ] [[package]] -name = "cc" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +name = "alloy-transport-http" +version = "0.1.0" +source = "git+https://github.com/alloy-rs/alloy?rev=66fa192#66fa1924a4f9165a0842838c5150260d0dd6de30" dependencies = [ - "jobserver", - "libc", + "alloy-json-rpc", + "alloy-transport", + "reqwest", + "serde_json", + "tower", + "url", ] [[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "chrono" -version = "0.4.31" +name = "ark-ff" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" +checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" dependencies = [ + "ark-ff-asm 0.3.0", + "ark-ff-macros 0.3.0", + "ark-serialize 0.3.0", + "ark-std 0.3.0", + "derivative", + "num-bigint", "num-traits", + "paste", + "rustc_version 0.3.3", + "zeroize", ] [[package]] -name = "cipher" -version = "0.4.4" +name = "ark-ff" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" +checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" dependencies = [ - "crypto-common", - "inout", + "ark-ff-asm 0.4.2", + "ark-ff-macros 0.4.2", + "ark-serialize 0.4.2", + "ark-std 0.4.0", + "derivative", + "digest 0.10.7", + "itertools 0.10.5", + "num-bigint", + "num-traits", + "paste", + "rustc_version 0.4.0", + "zeroize", ] [[package]] -name = "coins-bip32" -version = "0.8.7" +name = "ark-ff-asm" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" +checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" dependencies = [ - "bs58", - "coins-core", - "digest", - "hmac", - "k256", - "serde", - "sha2", - "thiserror", + "quote", + "syn 1.0.109", ] [[package]] -name = "coins-bip39" -version = "0.8.7" +name = "ark-ff-asm" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" +checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ - "bitvec", - "coins-bip32", - "hmac", - "once_cell", - "pbkdf2 0.12.2", - "rand", - "sha2", - "thiserror", + "quote", + "syn 1.0.109", ] [[package]] -name = "coins-core" -version = "0.8.7" +name = "ark-ff-macros" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" +checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" dependencies = [ - "base64 0.21.5", - "bech32", - "bs58", - "digest", - "generic-array", - "hex", - "ripemd", - "serde", - "serde_derive", - "sha2", - "sha3", - "thiserror", + "num-bigint", + "num-traits", + "quote", + "syn 1.0.109", ] [[package]] -name = "const-hex" -version = "1.10.0" +name = "ark-ff-macros" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" +checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "cfg-if", - "cpufeatures", - "hex", - "proptest", - "serde", + "num-bigint", + "num-traits", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "const-oid" -version = "0.9.6" +name = "ark-serialize" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" +dependencies = [ + "ark-std 0.3.0", + "digest 0.9.0", +] [[package]] -name = "constant_time_eq" -version = "0.1.5" +name = "ark-serialize" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" +checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" +dependencies = [ + "ark-std 0.4.0", + "digest 0.10.7", + "num-bigint", +] [[package]] -name = "core-foundation" -version = "0.9.4" +name = "ark-std" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ - "core-foundation-sys", - "libc", + "num-traits", + "rand", ] [[package]] -name = "core-foundation-sys" -version = "0.8.6" +name = "ark-std" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" +dependencies = [ + "num-traits", + "rand", +] [[package]] -name = "cpufeatures" -version = "0.2.11" +name = "arrayvec" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" -dependencies = [ - "libc", -] +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" [[package]] -name = "crc32fast" -version = "1.3.2" +name = "async-stream" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ - "cfg-if", + "async-stream-impl", + "futures-core", + "pin-project-lite", ] [[package]] -name = "crossbeam-deque" -version = "0.8.4" +name = "async-stream-impl" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fca89a0e215bab21874660c67903c5f143333cab1da83d041c7ded6053774751" +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ - "cfg-if", - "crossbeam-epoch", - "crossbeam-utils", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "crossbeam-epoch" -version = "0.9.16" +name = "async-trait" +version = "0.1.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d2fe95351b870527a5d09bf563ed3c97c0cffb87cf1c78a591bf48bb218d9aa" +checksum = "a66537f1bb974b254c98ed142ff995236e81b9d0fe4db0575f46612cb15eb0f9" dependencies = [ - "autocfg", - "cfg-if", - "crossbeam-utils", - "memoffset", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "crossbeam-utils" -version = "0.8.17" +name = "auto_impl" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d96137f14f244c37f989d9fff8f95e6c18b918e71f36638f8c49112e4c78f" +checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ - "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "crunchy" -version = "0.2.2" +name = "autocfg" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] -name = "crypto-bigint" -version = "0.5.5" +name = "backtrace" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ - "generic-array", - "rand_core", - "subtle", - "zeroize", + "addr2line", + "cc", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", ] [[package]] -name = "crypto-common" -version = "0.1.6" +name = "base16ct" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] +checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" [[package]] -name = "ctr" -version = "0.9.2" +name = "base64" +version = "0.21.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" -dependencies = [ - "cipher", -] +checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" [[package]] -name = "data-encoding" -version = "2.5.0" +name = "base64" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" +checksum = "9475866fec1451be56a3c2400fd081ff546538961565ccb5b7142cbd22bc7a51" [[package]] -name = "der" -version = "0.7.8" +name = "base64ct" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] -name = "deranged" -version = "0.3.10" +name = "bit-set" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" +checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "powerfmt", + "bit-vec", ] [[package]] -name = "derive_more" -version = "0.99.17" +name = "bit-vec" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] +checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] -name = "diff" -version = "0.1.13" +name = "bitflags" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "digest" -version = "0.10.7" +name = "bitflags" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", - "subtle", -] +checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" [[package]] -name = "dirs" -version = "5.0.1" +name = "bitvec" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" +checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ - "dirs-sys", + "funty", + "radium", + "tap", + "wyz", ] [[package]] -name = "dirs-next" -version = "2.0.0" +name = "block-buffer" +version = "0.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" dependencies = [ - "cfg-if", - "dirs-sys-next", + "generic-array", ] [[package]] -name = "dirs-sys" -version = "0.4.1" +name = "blst" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" +checksum = "c94087b935a822949d3291a9989ad2b2051ea141eda0fd4e478a75f6aa3e604b" dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", + "cc", + "glob", + "threadpool", + "zeroize", ] [[package]] -name = "dirs-sys-next" -version = "0.1.2" +name = "bumpalo" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" -dependencies = [ - "libc", - "redox_users", - "winapi", -] +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] -name = "dunce" -version = "1.0.4" +name = "byte-slice-cast" +version = "1.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" +checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" [[package]] -name = "ecdsa" -version = "0.16.9" +name = "byteorder" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" -dependencies = [ - "der", - "digest", - "elliptic-curve", - "rfc6979", - "signature", - "spki", -] +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] -name = "either" -version = "1.9.0" +name = "bytes" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" +dependencies = [ + "serde", +] [[package]] -name = "elliptic-curve" -version = "0.13.8" +name = "c-kzg" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" +checksum = "3130f3d8717cc02e668a896af24984d5d5d4e8bf12e278e982e0f1bd88a0f9af" dependencies = [ - "base16ct", - "crypto-bigint", - "digest", - "ff", - "generic-array", - "group", - "pkcs8", - "rand_core", - "sec1", - "subtle", - "zeroize", + "blst", + "cc", + "glob", + "hex", + "libc", + "serde", ] [[package]] -name = "ena" -version = "0.14.2" +name = "cc" +version = "1.0.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c533630cf40e9caa44bd91aadc88a75d75a4c3a12b4cfde353cbed41daa1e1f1" +checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" dependencies = [ - "log", + "libc", ] [[package]] -name = "encoding_rs" -version = "0.8.33" +name = "cfg-if" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] -name = "enr" -version = "0.9.1" +name = "const-hex" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe81b5c06ecfdbc71dd845216f225f53b62a10cb8a16c946836a3467f701d05b" +checksum = "a5104de16b218eddf8e34ffe2f86f74bfa4e61e95a1b89732fccf6325efd0557" dependencies = [ - "base64 0.21.5", - "bytes", + "cfg-if", + "cpufeatures", "hex", - "k256", - "log", - "rand", - "rlp", + "proptest", "serde", - "sha3", - "zeroize", ] [[package]] -name = "equivalent" -version = "1.0.1" +name = "const-oid" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" [[package]] -name = "errno" -version = "0.3.8" +name = "convert_case" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" dependencies = [ + "core-foundation-sys", "libc", - "windows-sys 0.52.0", ] [[package]] -name = "eth-keystore" -version = "0.5.0" +name = "core-foundation-sys" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fda3bf123be441da5260717e0661c25a2fd9cb2b2c1d20bf2e05580047158ab" -dependencies = [ - "aes", - "ctr", - "digest", - "hex", - "hmac", - "pbkdf2 0.11.0", - "rand", - "scrypt", - "serde", - "serde_json", - "sha2", - "sha3", - "thiserror", - "uuid", -] +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "ethabi" -version = "18.0.0" +name = "cpufeatures" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7413c5f74cc903ea37386a8965a936cbeb334bd270862fdece542c1b2dcbc898" +checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" dependencies = [ - "ethereum-types", - "hex", - "once_cell", - "regex", - "serde", - "serde_json", - "sha3", - "thiserror", - "uint", + "libc", ] [[package]] -name = "ethbloom" -version = "0.13.0" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", - "tiny-keccak", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] -name = "ethereum-types" -version = "0.14.1" +name = "crypto-bigint" +version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" +checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ - "ethbloom", - "fixed-hash", - "impl-codec", - "impl-rlp", - "impl-serde", - "primitive-types", - "scale-info", - "uint", + "generic-array", + "rand_core", + "subtle", + "zeroize", ] [[package]] -name = "ethers" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" dependencies = [ - "ethers-addressbook", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-middleware", - "ethers-providers", - "ethers-signers", - "ethers-solc", + "generic-array", + "typenum", ] [[package]] -name = "ethers-addressbook" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "dashmap" +version = "5.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ - "ethers-core", + "cfg-if", + "hashbrown", + "lock_api", "once_cell", - "serde", - "serde_json", + "parking_lot_core", ] [[package]] -name = "ethers-contract" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "der" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" dependencies = [ - "const-hex", - "ethers-contract-abigen", - "ethers-contract-derive", - "ethers-core", - "ethers-providers", - "futures-util", - "once_cell", - "pin-project", - "serde", - "serde_json", - "thiserror", + "const-oid", + "zeroize", ] [[package]] -name = "ethers-contract-abigen" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "derivative" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ - "Inflector", - "const-hex", - "dunce", - "ethers-core", - "ethers-etherscan", - "eyre", - "prettyplease", "proc-macro2", "quote", - "regex", - "reqwest", - "serde", - "serde_json", - "syn 2.0.41", - "toml", - "walkdir", + "syn 1.0.109", ] [[package]] -name = "ethers-contract-derive" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "derive_more" +version = "0.99.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" dependencies = [ - "Inflector", - "const-hex", - "ethers-contract-abigen", - "ethers-core", + "convert_case", "proc-macro2", "quote", - "serde_json", - "syn 2.0.41", + "rustc_version 0.4.0", + "syn 1.0.109", ] [[package]] -name = "ethers-core" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "digest" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "arrayvec", - "bytes", - "cargo_metadata", - "chrono", - "const-hex", - "elliptic-curve", - "ethabi", "generic-array", - "k256", - "num_enum", - "once_cell", - "open-fastrlp", - "rand", - "rlp", - "serde", - "serde_json", - "strum", - "syn 2.0.41", - "tempfile", - "thiserror", - "tiny-keccak", - "unicode-xid", ] [[package]] -name = "ethers-etherscan" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "digest" +version = "0.10.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "chrono", - "ethers-core", - "reqwest", - "semver", - "serde", - "serde_json", - "thiserror", - "tracing", + "block-buffer", + "const-oid", + "crypto-common", + "subtle", ] [[package]] -name = "ethers-middleware" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "dirs" +version = "5.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" dependencies = [ - "async-trait", - "auto_impl", - "ethers-contract", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "ethers-signers", - "futures-channel", - "futures-locks", - "futures-util", - "instant", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-futures", - "url", + "dirs-sys", ] [[package]] -name = "ethers-providers" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "dirs-sys" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" dependencies = [ - "async-trait", - "auto_impl", - "base64 0.21.5", - "bytes", - "const-hex", - "enr", - "ethers-core", - "futures-core", - "futures-timer", - "futures-util", - "hashers", - "http", - "instant", - "jsonwebtoken", - "once_cell", - "pin-project", - "reqwest", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-tungstenite", - "tracing", - "tracing-futures", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "ws_stream_wasm", + "libc", + "option-ext", + "redox_users", + "windows-sys 0.48.0", ] [[package]] -name = "ethers-signers" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "dunce" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" + +[[package]] +name = "ecdsa" +version = "0.16.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "async-trait", - "coins-bip32", - "coins-bip39", - "const-hex", + "der", + "digest 0.10.7", "elliptic-curve", - "eth-keystore", - "ethers-core", - "rand", - "sha2", - "thiserror", - "tracing", + "rfc6979", + "signature", + "spki", ] [[package]] -name = "ethers-solc" -version = "2.0.11" -source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" +name = "either" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" + +[[package]] +name = "elliptic-curve" +version = "0.13.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "cfg-if", - "const-hex", - "dirs", - "dunce", - "ethers-core", - "glob", - "home", - "md-5", - "num_cpus", - "once_cell", - "path-slash", - "rayon", - "regex", - "semver", - "serde", - "serde_json", - "solang-parser", - "svm-rs", - "thiserror", - "tiny-keccak", - "tokio", - "tracing", - "walkdir", - "yansi", + "base16ct", + "crypto-bigint", + "digest 0.10.7", + "ff", + "generic-array", + "group", + "pkcs8", + "rand_core", + "sec1", + "subtle", + "zeroize", ] [[package]] -name = "eyre" -version = "0.6.11" +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6267a1fa6f59179ea4afc8e50fd8612a3cc60bc858f786ff877a4a8cb042799" +checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" dependencies = [ - "indenter", - "once_cell", + "libc", + "windows-sys 0.52.0", ] [[package]] @@ -1016,6 +997,17 @@ version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" +[[package]] +name = "fastrlp" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "ff" version = "0.13.0" @@ -1039,26 +1031,25 @@ dependencies = [ ] [[package]] -name = "fixedbitset" -version = "0.4.2" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "flate2" -version = "1.0.28" +name = "foreign-types" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" dependencies = [ - "crc32fast", - "miniz_oxide", + "foreign-types-shared", ] [[package]] -name = "fnv" -version = "1.0.7" +name = "foreign-types-shared" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" @@ -1069,16 +1060,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", -] - [[package]] name = "funty" version = "2.0.0" @@ -1133,16 +1114,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa" -[[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.29" @@ -1166,16 +1137,6 @@ version = "0.3.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" -[[package]] -name = "futures-timer" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c" -dependencies = [ - "gloo-timers", - "send_wrapper 0.4.0", -] - [[package]] name = "futures-util" version = "0.3.29" @@ -1195,13 +1156,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" @@ -1237,18 +1195,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" @@ -1256,27 +1202,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", - "subtle", -] - -[[package]] -name = "h2" -version = "0.3.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", + "rand_core", + "subtle", ] [[package]] @@ -1284,14 +1211,9 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "hashers" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2bca93b15ea5a746f220e56587f71e73c6165eab783df9e26590069953e3c30" dependencies = [ - "fxhash", + "ahash", + "allocator-api2", ] [[package]] @@ -1300,6 +1222,12 @@ version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" +[[package]] +name = "heck" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" + [[package]] name = "hermit-abi" version = "0.3.3" @@ -1311,6 +1239,15 @@ name = "hex" version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +dependencies = [ + "serde", +] + +[[package]] +name = "hex-literal" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] name = "hmac" @@ -1318,37 +1255,40 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] -name = "home" -version = "0.5.9" +name = "http" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" dependencies = [ - "windows-sys 0.52.0", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "http" -version = "0.2.11" +name = "http-body" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" +checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" dependencies = [ "bytes", - "fnv", - "itoa", + "http", ] [[package]] -name = "http-body" -version = "0.4.6" +name = "http-body-util" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +checksum = "0475f8b2ac86659c21b64320d5d653f9efe42acd2a4e560073ec61a155a34f1d" dependencies = [ "bytes", + "futures-core", "http", + "http-body", "pin-project-lite", ] @@ -1358,48 +1298,58 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" -[[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.28" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "fb5aa53871fc917b1a9ed87b683a5d86db645e23acb32c2e0785a353e522fb75" dependencies = [ "bytes", "futures-channel", - "futures-core", "futures-util", - "h2", "http", "http-body", "httparse", - "httpdate", "itoa", "pin-project-lite", - "socket2", "tokio", - "tower-service", - "tracing", "want", ] [[package]] -name = "hyper-rustls" -version = "0.24.2" +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" +checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" dependencies = [ + "bytes", + "futures-channel", "futures-util", "http", + "http-body", "hyper", - "rustls", + "pin-project-lite", + "socket2", "tokio", - "tokio-rustls", + "tower", + "tower-service", + "tracing", ] [[package]] @@ -1421,24 +1371,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.2.2" @@ -1450,12 +1382,6 @@ 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 = "2.1.0" @@ -1466,41 +1392,12 @@ dependencies = [ "hashbrown", ] -[[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.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - [[package]] name = "ipnet" version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" -[[package]] -name = "is-terminal" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" -dependencies = [ - "hermit-abi", - "rustix", - "windows-sys 0.48.0", -] - [[package]] name = "itertools" version = "0.10.5" @@ -1512,9 +1409,9 @@ dependencies = [ [[package]] name = "itertools" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" dependencies = [ "either", ] @@ -1525,15 +1422,6 @@ version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" -[[package]] -name = "jobserver" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.66" @@ -1543,20 +1431,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "8.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6971da4d9c3aa03c3d8f3ff0f4155b534aad021292003895a469716b2a230378" -dependencies = [ - "base64 0.21.5", - "pem", - "ring 0.16.20", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.2" @@ -1568,46 +1442,18 @@ dependencies = [ "elliptic-curve", "once_cell", "sha2", - "signature", -] - -[[package]] -name = "keccak" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" -dependencies = [ - "cpufeatures", ] [[package]] -name = "lalrpop" -version = "0.20.0" +name = "keccak-asm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da4081d44f4611b66c6dd725e6de3169f9f63905421e8626fcb86b6a898998b8" +checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" dependencies = [ - "ascii-canvas", - "bit-set", - "diff", - "ena", - "is-terminal", - "itertools 0.10.5", - "lalrpop-util", - "petgraph", - "regex", - "regex-syntax 0.7.5", - "string_cache", - "term", - "tiny-keccak", - "unicode-xid", + "digest 0.10.7", + "sha3-asm", ] -[[package]] -name = "lalrpop-util" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f35c735096c0293d313e8f2a641627472b83d01b937177fe76e5e2708d31e0d" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1616,9 +1462,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.151" +version = "0.2.153" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" [[package]] name = "libm" @@ -1660,13 +1506,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "md-5" -version = "0.10.6" +name = "lru" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" +checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" dependencies = [ - "cfg-if", - "digest", + "hashbrown", ] [[package]] @@ -1675,15 +1520,6 @@ version = "2.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" -[[package]] -name = "memoffset" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" -dependencies = [ - "autocfg", -] - [[package]] name = "mime" version = "0.3.17" @@ -1711,10 +1547,22 @@ dependencies = [ ] [[package]] -name = "new_debug_unreachable" -version = "1.0.4" +name = "native-tls" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" +dependencies = [ + "lazy_static", + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] [[package]] name = "num-bigint" @@ -1757,27 +1605,6 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683751d591e6d81200c39fb0d1032608b77724f34114db54f571ff1317b337c0" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c11e44798ad209ccdd91fc192f0526a369a01234f7373e1b141c96d7cee4f0e" -dependencies = [ - "proc-macro-crate 2.0.1", - "proc-macro2", - "quote", - "syn 2.0.41", -] - [[package]] name = "object" version = "0.32.1" @@ -1794,208 +1621,125 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] -name = "open-fastrlp" -version = "0.1.4" +name = "openssl" +version = "0.10.64" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "786393f80485445794f6043fd3138854dd109cc6c4bd1a6383db304c9ce9b9ce" +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" dependencies = [ - "arrayvec", - "auto_impl", - "bytes", - "ethereum-types", - "open-fastrlp-derive", + "bitflags 2.4.1", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", ] [[package]] -name = "open-fastrlp-derive" +name = "openssl-macros" 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 = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "parity-scale-codec" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" -dependencies = [ - "arrayvec", - "bitvec", - "byte-slice-cast", - "impl-trait-for-tuples", - "parity-scale-codec-derive", - "serde", -] - -[[package]] -name = "parity-scale-codec-derive" -version = "3.6.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ - "proc-macro-crate 2.0.1", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.41", ] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "openssl-probe" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] -name = "parking_lot_core" -version = "0.9.9" +name = "openssl-sys" +version = "0.9.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "dda2b0f344e78efc2facf7d195d098df0dd72151b26ab98da807afc26c198dff" dependencies = [ - "cfg-if", + "cc", "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - -[[package]] -name = "path-slash" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e91099d4268b0e11973f036e885d652fb0b21fedcf69738c627f94db6a44f42" - -[[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", + "pkg-config", + "vcpkg", ] [[package]] -name = "percent-encoding" -version = "2.3.1" +name = "option-ext" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] -name = "petgraph" -version = "0.6.4" +name = "parity-scale-codec" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" +checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" dependencies = [ - "fixedbitset", - "indexmap", + "arrayvec", + "bitvec", + "byte-slice-cast", + "impl-trait-for-tuples", + "parity-scale-codec-derive", + "serde", ] [[package]] -name = "pharos" -version = "0.5.3" +name = "parity-scale-codec-derive" +version = "3.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" dependencies = [ - "futures", - "rustc_version", + "proc-macro-crate", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "phf" -version = "0.11.2" +name = "parking_lot" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "phf_macros", - "phf_shared 0.11.2", + "lock_api", + "parking_lot_core", ] [[package]] -name = "phf_generator" -version = "0.11.2" +name = "parking_lot_core" +version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" dependencies = [ - "phf_shared 0.11.2", - "rand", + "cfg-if", + "libc", + "redox_syscall", + "smallvec", + "windows-targets 0.48.5", ] [[package]] -name = "phf_macros" -version = "0.11.2" +name = "paste" +version = "1.0.14" 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.41", -] +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" [[package]] -name = "phf_shared" -version = "0.10.0" +name = "percent-encoding" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6796ad771acdc0123d2a88dc428b5e38ef24456743ddb1744ed628f9815c096" -dependencies = [ - "siphasher", -] +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] -name = "phf_shared" -version = "0.11.2" +name = "pest" +version = "2.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +checksum = "56f8023d0fb78c8e03784ea1c7f3fa36e68a723138990b8d5a47d916b651e7a8" dependencies = [ - "siphasher", + "memchr", + "thiserror", + "ucd-trie", ] [[package]] @@ -2046,34 +1790,12 @@ version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - [[package]] name = "ppv-lite86" version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" -[[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.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" -dependencies = [ - "proc-macro2", - "syn 2.0.41", -] - [[package]] name = "primitive-types" version = "0.12.2" @@ -2082,22 +1804,9 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", - "scale-info", "uint", ] -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - [[package]] name = "proc-macro-crate" version = "2.0.1" @@ -2105,7 +1814,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "97dc5fea232fc28d2f597b37c4876b348a40e33f3b02cc975c8d006d78d94b1a" dependencies = [ "toml_datetime", - "toml_edit 0.20.2", + "toml_edit", ] [[package]] @@ -2147,16 +1856,26 @@ version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" dependencies = [ + "bit-set", + "bit-vec", "bitflags 2.4.1", "lazy_static", "num-traits", "rand", "rand_chacha", "rand_xorshift", - "regex-syntax 0.8.2", + "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 = "quote" version = "1.0.33" @@ -2211,26 +1930,6 @@ dependencies = [ "rand_core", ] -[[package]] -name = "rayon" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - [[package]] name = "redox_syscall" version = "0.4.1" @@ -2251,35 +1950,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "regex" -version = "1.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-syntax" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" - [[package]] name = "regex-syntax" version = "0.8.2" @@ -2288,41 +1958,41 @@ checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" [[package]] name = "reqwest" -version = "0.11.23" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +checksum = "2d66674f2b6fb864665eea7a3c1ac4e3dfacd2fda83cf6f935a612e01b0e3338" dependencies = [ "base64 0.21.5", "bytes", - "encoding_rs", + "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", + "http-body-util", "hyper", - "hyper-rustls", + "hyper-tls", + "hyper-util", "ipnet", "js-sys", "log", "mime", + "native-tls", "once_cell", "percent-encoding", "pin-project-lite", - "rustls", "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", - "system-configuration", + "sync_wrapper", "tokio", - "tokio-rustls", + "tokio-native-tls", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", - "webpki-roots", "winreg", ] @@ -2336,44 +2006,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", -] - -[[package]] -name = "ring" -version = "0.17.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "688c63d65483050968b2a8937f7995f443e27041a0f7700aa59b0822aedebb74" -dependencies = [ - "cc", - "getrandom", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.48.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" @@ -2381,21 +2013,39 @@ 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" +name = "ruint" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e33d7b2abe0c340d8797fe2907d3f20d3b5ea5908683618bfe80df7f621f672a" +checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "alloy-rlp", + "ark-ff 0.3.0", + "ark-ff 0.4.2", + "bytes", + "fastrlp", + "num-bigint", + "num-traits", + "parity-scale-codec", + "primitive-types", + "proptest", + "rand", + "rlp", + "ruint-macro", + "serde", + "valuable", + "zeroize", ] +[[package]] +name = "ruint-macro" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" + [[package]] name = "rustc-demangle" version = "0.1.23" @@ -2408,20 +2058,29 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" +[[package]] +name = "rustc_version" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" +dependencies = [ + "semver 0.11.0", +] + [[package]] name = "rustc_version" version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ - "semver", + "semver 1.0.20", ] [[package]] name = "rustix" -version = "0.38.28" +version = "0.38.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72e572a5e8ca657d7366229cdde4bd14c4eb5499a9573d4d366fe1b599daa316" +checksum = "65e04861e65f21776e67888bfbea442b3642beaa0138fdb1dd7a84a52dffdb89" dependencies = [ "bitflags 2.4.1", "errno", @@ -2430,18 +2089,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring 0.17.7", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -2452,80 +2099,45 @@ dependencies = [ ] [[package]] -name = "rustls-webpki" -version = "0.101.7" +name = "rusty-fork" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ - "ring 0.17.7", - "untrusted 0.9.0", + "fnv", + "quick-error", + "tempfile", + "wait-timeout", ] -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - [[package]] name = "ryu" version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" -[[package]] -name = "salsa20" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a22f5af31f73a954c10289c93e8a50cc23d971e80ee446f1f6f7137a088213" -dependencies = [ - "cipher", -] - -[[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 = "sandbox" version = "0.1.0" dependencies = [ + "alloy", "dirs", - "ethers", "hex", + "reqwest", "serde_json", "starknet-core-contract-client", "thiserror", "tokio", + "url", ] [[package]] -name = "scale-info" -version = "2.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7d66a1128282b7ef025a8ead62a4a9fcf017382ec53b8ffbf4d7bf77bd3c60" -dependencies = [ - "cfg-if", - "derive_more", - "parity-scale-codec", - "scale-info-derive", -] - -[[package]] -name = "scale-info-derive" -version = "2.10.0" +name = "schannel" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf2c68b89cafb3b8d918dd07b42be0da66ff202cf1155c5739a4e0c1ea0dc19" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", + "windows-sys 0.52.0", ] [[package]] @@ -2535,61 +2147,65 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] -name = "scrypt" -version = "0.10.0" +name = "sec1" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f9e24d2b632954ded8ab2ef9fea0a0c769ea56ea98bddbafbad22caeeadf45d" +checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "hmac", - "pbkdf2 0.11.0", - "salsa20", - "sha2", + "base16ct", + "der", + "generic-array", + "pkcs8", + "subtle", + "zeroize", ] [[package]] -name = "sct" -version = "0.7.1" +name = "security-framework" +version = "2.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" dependencies = [ - "ring 0.17.7", - "untrusted 0.9.0", + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", ] [[package]] -name = "sec1" -version = "0.7.3" +name = "security-framework-sys" +version = "2.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" +checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" dependencies = [ - "base16ct", - "der", - "generic-array", - "pkcs8", - "subtle", - "zeroize", + "core-foundation-sys", + "libc", ] [[package]] name = "semver" -version = "1.0.20" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" dependencies = [ - "serde", + "semver-parser", ] [[package]] -name = "send_wrapper" -version = "0.4.0" +name = "semver" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f638d531eccd6e23b980caf34876660d38e265409d8e99b397ab71eb3612fad0" +checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" [[package]] -name = "send_wrapper" -version = "0.6.0" +name = "semver-parser" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] [[package]] name = "serde" @@ -2622,15 +2238,6 @@ dependencies = [ "serde", ] -[[package]] -name = "serde_spanned" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" -dependencies = [ - "serde", -] - [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -2638,20 +2245,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", + "itoa", + "ryu", + "serde", ] [[package]] @@ -2662,17 +2258,17 @@ checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", ] [[package]] -name = "sha3" -version = "0.10.8" +name = "sha3-asm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" dependencies = [ - "digest", - "keccak", + "cc", + "cfg-if", ] [[package]] @@ -2681,28 +2277,10 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core", ] -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "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" @@ -2728,32 +2306,6 @@ dependencies = [ "windows-sys 0.48.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" @@ -2768,11 +2320,13 @@ dependencies = [ name = "starknet-core-contract-client" version = "0.1.0" dependencies = [ + "alloy", "async-trait", - "ethers", "log", "num-traits", + "reqwest", "thiserror", + "tokio", ] [[package]] @@ -2781,67 +2335,12 @@ 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", - "phf_shared 0.10.0", - "precomputed-hash", -] - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros", -] - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.41", -] - [[package]] name = "subtle" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" -[[package]] -name = "svm-rs" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20689c7d03b6461b502d0b95d6c24874c7d24dea2688af80486a130a06af3b07" -dependencies = [ - "dirs", - "fs2", - "hex", - "once_cell", - "reqwest", - "semver", - "serde", - "serde_json", - "sha2", - "thiserror", - "url", - "zip", -] - [[package]] name = "syn" version = "1.0.109" @@ -2865,25 +2364,21 @@ dependencies = [ ] [[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +name = "syn-solidity" +version = "0.6.4" +source = "git+https://github.com/alloy-rs/core?rev=525a233#525a2339dfc963518a1350cf52e8928c50a49d66" dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", + "paste", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "system-configuration-sys" -version = "0.5.0" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" [[package]] name = "tap" @@ -2893,26 +2388,14 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.8.1" +version = "3.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef1adac450ad7f4b3c28589471ade84f25f731a7a0fe30d71dfa9f60fd808e5" +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" dependencies = [ "cfg-if", "fastrand", - "redox_syscall", "rustix", - "windows-sys 0.48.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", + "windows-sys 0.52.0", ] [[package]] @@ -2936,32 +2419,12 @@ dependencies = [ ] [[package]] -name = "time" -version = "0.3.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f657ba42c3f86e7680e53c8cd3af8abbe56b5491790b46e22e19c0d57463583e" -dependencies = [ - "deranged", - "itoa", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.16" +name = "threadpool" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26197e33420244aeb70c3e8c78376ca46571bc4e701e4791c2cd9f57dcb3a43f" +checksum = "d050e60b33d41c19108b32cea32164033a9013fe3b46cbd4457559bfbf77afaa" dependencies = [ - "time-core", + "num_cpus", ] [[package]] @@ -3018,28 +2481,25 @@ dependencies = [ ] [[package]] -name = "tokio-rustls" -version = "0.24.1" +name = "tokio-native-tls" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" dependencies = [ - "rustls", + "native-tls", "tokio", ] [[package]] -name = "tokio-tungstenite" -version = "0.20.1" +name = "tokio-stream" +version = "0.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" dependencies = [ - "futures-util", - "log", - "rustls", + "futures-core", + "pin-project-lite", "tokio", - "tokio-rustls", - "tungstenite", - "webpki-roots", + "tokio-util", ] [[package]] @@ -3053,19 +2513,6 @@ dependencies = [ "futures-sink", "pin-project-lite", "tokio", - "tracing", -] - -[[package]] -name = "toml" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" -dependencies = [ - "serde", - "serde_spanned", - "toml_datetime", - "toml_edit 0.20.2", ] [[package]] @@ -3073,34 +2520,40 @@ name = "toml_datetime" version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" -dependencies = [ - "serde", -] [[package]] name = "toml_edit" -version = "0.19.15" +version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ "indexmap", "toml_datetime", - "winnow", + "winnow 0.5.30", ] [[package]] -name = "toml_edit" -version = "0.20.2" +name = "tower" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" +checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" dependencies = [ - "indexmap", - "serde", - "serde_spanned", - "toml_datetime", - "winnow", + "futures-core", + "futures-util", + "pin-project", + "pin-project-lite", + "tokio", + "tower-layer", + "tower-service", + "tracing", ] +[[package]] +name = "tower-layer" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" + [[package]] name = "tower-service" version = "0.3.2" @@ -3113,6 +2566,7 @@ version = "0.1.40" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" dependencies = [ + "log", "pin-project-lite", "tracing-attributes", "tracing-core", @@ -3138,48 +2592,24 @@ dependencies = [ "once_cell", ] -[[package]] -name = "tracing-futures" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" -dependencies = [ - "pin-project", - "tracing", -] - [[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", - "httparse", - "log", - "rand", - "rustls", - "sha1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "typenum" version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" +[[package]] +name = "ucd-trie" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" + [[package]] name = "uint" version = "0.9.5" @@ -3219,24 +2649,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[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.0" @@ -3249,20 +2661,16 @@ dependencies = [ ] [[package]] -name = "utf-8" -version = "0.7.6" +name = "valuable" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" [[package]] -name = "uuid" -version = "0.8.2" +name = "vcpkg" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" -dependencies = [ - "getrandom", - "serde", -] +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" [[package]] name = "version_check" @@ -3271,13 +2679,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] -name = "walkdir" -version = "2.4.0" +name = "wait-timeout" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" dependencies = [ - "same-file", - "winapi-util", + "libc", ] [[package]] @@ -3371,43 +2778,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - -[[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-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.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[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-sys" version = "0.48.0" @@ -3550,32 +2920,22 @@ dependencies = [ ] [[package]] -name = "winreg" -version = "0.50.0" +name = "winnow" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +checksum = "dffa400e67ed5a4dd237983829e66475f0a4a26938c4b04c21baede6262215b8" dependencies = [ - "cfg-if", - "windows-sys 0.48.0", + "memchr", ] [[package]] -name = "ws_stream_wasm" -version = "0.7.4" +name = "winreg" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7999f5f4217fe3818726b66257a4475f71e74ffd190776ad053fa159e50737f5" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" dependencies = [ - "async_io_stream", - "futures", - "js-sys", - "log", - "pharos", - "rustc_version", - "send_wrapper 0.6.0", - "thiserror", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", + "cfg-if", + "windows-sys 0.48.0", ] [[package]] @@ -3588,62 +2948,41 @@ dependencies = [ ] [[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" - -[[package]] -name = "zip" -version = "0.6.6" +name = "zerocopy" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" +checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2 0.11.0", - "sha1", - "time", - "zstd", + "zerocopy-derive", ] [[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" +name = "zerocopy-derive" +version = "0.7.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ - "zstd-safe", + "proc-macro2", + "quote", + "syn 2.0.41", ] [[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" +name = "zeroize" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" dependencies = [ - "libc", - "zstd-sys", + "zeroize_derive", ] [[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" +name = "zeroize_derive" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ - "cc", - "pkg-config", + "proc-macro2", + "quote", + "syn 2.0.41", ] diff --git a/Cargo.toml b/Cargo.toml index 3c31b8c..d7affde 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,6 @@ repository = "https://github.com/keep-starknet-strange/zaun/" version = "0.1.0" [workspace.dependencies] -ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } log = "0.4.20" thiserror = "1.0.51" num-traits = "0.2.17" @@ -20,6 +19,28 @@ async-trait = "0.1.74" dirs = "5.0.1" serde_json = "1.0.108" hex = "0.4.3" +alloy = { git = "https://github.com/alloy-rs/alloy", rev = "66fa192", features = [ + "network", + "providers", + "rpc-types-eth", + "sol-types", + "contract", + "rpc", + "rpc-client", + "signers", + "signer-wallet", + "transport-http", + "node-bindings", +] } +reqwest = { version = "0.12", default-features = false } +url = "2.4.1" +tokio = "1" - - +[patch.crates-io] +alloy-core = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +alloy-dyn-abi = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +alloy-json-abi = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +alloy-primitives = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +alloy-sol-macro = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +alloy-sol-types = { git = "https://github.com/alloy-rs/core", rev = "525a233" } +syn-solidity = { git = "https://github.com/alloy-rs/core", rev = "525a233" } diff --git a/crates/sandbox/Cargo.toml b/crates/sandbox/Cargo.toml index b80fa72..e724cdb 100644 --- a/crates/sandbox/Cargo.toml +++ b/crates/sandbox/Cargo.toml @@ -6,11 +6,13 @@ authors.workspace = true [dependencies] starknet-core-contract-client = { path = "../starknet-core-contract-client" } -ethers = { workspace = true } dirs = { workspace = true } serde_json = { workspace = true } thiserror = { workspace = true } hex = { workspace = true } +alloy = { workspace = true } +url = { workspace = true } +reqwest = { workspace = true } [dev-dependencies] tokio = { version = "1.29.1", features = ["rt", "macros", "parking_lot"] } diff --git a/crates/sandbox/src/lib.rs b/crates/sandbox/src/lib.rs index dc39931..42b43ed 100644 --- a/crates/sandbox/src/lib.rs +++ b/crates/sandbox/src/lib.rs @@ -1,15 +1,13 @@ -use ethers::abi::Tokenize; -use ethers::contract::ContractError; -use ethers::prelude::SignerMiddleware; -use ethers::prelude::{ContractFactory, ContractInstance}; -use ethers::providers::{Http, Provider, ProviderError}; -use ethers::signers::{LocalWallet, Signer}; -use ethers::types::Bytes; -use ethers::utils::hex::FromHex; -use ethers::utils::{Anvil, AnvilInstance}; +use url::Url; +use alloy::{ + network::EthereumSigner, node_bindings::{Anvil, AnvilInstance}, providers::ProviderBuilder, rpc::client::RpcClient, signers::{ + wallet::{LocalWallet, WalletError}, + Signer, + }, transports::TransportError +}; + use std::path::PathBuf; use std::sync::Arc; -use std::time::Duration; /// Unsafe proxy is a straightforward implementation of the delegate proxy contract /// that is used to make Starknet core contract upgradeable. @@ -23,7 +21,7 @@ pub mod unsafe_proxy; pub use starknet_core_contract_client::LocalWalletSignerMiddleware; /// Sandbox is typically used for E2E scenarios so we need to speed things up -const POLLING_INTERVAL_MS: u64 = 10; +// const POLLING_INTERVAL_MS: u64 = 10; const ANVIL_DEFAULT_ENDPOINT: &str = "http://127.0.0.1:8545"; const ANVIL_DEFAULT_CHAIN_ID: u64 = 31337; const ANVIL_DEFAULT_PRIVATE_KEY: &str = @@ -37,14 +35,14 @@ pub enum Error { BytecodeObject, #[error(transparent)] Hex(#[from] hex::FromHexError), - #[error("Failed to parse URL")] - UrlParser, - #[error(transparent)] - EthersContract(#[from] ContractError), + #[error("Failed to parse provider URL: {0}")] + ProviderUrlParse(#[source] url::ParseError), #[error(transparent)] - EthersProvider(#[from] ProviderError), + EthersProvider(#[from] TransportError), #[error("Invalid contract build artifacts: missing field `{0}`")] ContractBuildArtifacts(&'static str), + #[error("Failed to parse private key: {0}")] + PrivateKeyParse(#[source] WalletError), } /// A convenient wrapper over an already running or spawned Anvil local devnet @@ -71,21 +69,15 @@ impl EthereumSandbox { .unwrap_or_else(|| ANVIL_DEFAULT_ENDPOINT.into()) }); - let provider = Provider::::try_from(anvil_endpoint) - .map_err(|_| Error::UrlParser)? - .interval(Duration::from_millis(POLLING_INTERVAL_MS)); - - let wallet: LocalWallet = ANVIL_DEFAULT_PRIVATE_KEY - .parse() - .expect("Failed to parse private key"); - let client = SignerMiddleware::new( - provider.clone(), - wallet.with_chain_id(ANVIL_DEFAULT_CHAIN_ID), - ); - + let wallet: LocalWallet = String::from(ANVIL_DEFAULT_PRIVATE_KEY).parse::().map_err(Error::PrivateKeyParse)?; + let wallet = wallet.with_chain_id(Some(ANVIL_DEFAULT_CHAIN_ID)); + let rpc_client = RpcClient::new_http(Url::parse(&anvil_endpoint).map_err(Error::ProviderUrlParse)?); + let provider_with_signer = ProviderBuilder::new() + .signer(EthereumSigner::from(wallet)) + .on_client(rpc_client); Ok(Self { _anvil: None, - client: Arc::new(client), + client: Arc::new(provider_with_signer), }) } @@ -94,7 +86,7 @@ impl EthereumSandbox { /// - `anvil_path` parameter (if specified) /// - ${ANVIL_PATH} environment variable (if set) /// - ~/.foundry/bin/anvil (default) - pub fn spawn(anvil_path: Option) -> Self { + pub fn spawn(anvil_path: Option) -> Result { let anvil_path: PathBuf = anvil_path.unwrap_or_else(|| { std::env::var("ANVIL_PATH") .map(Into::into) @@ -104,19 +96,16 @@ impl EthereumSandbox { // Will panic if invalid path let anvil = Anvil::at(anvil_path).spawn(); + let wallet: LocalWallet = anvil.keys()[0].clone().try_into().expect("Failed to parse private key"); + let rpc_client = RpcClient::new_http(Url::parse(&anvil.endpoint()).map_err(Error::ProviderUrlParse)?); + let provider_with_signer = ProviderBuilder::new() + .signer(EthereumSigner::from(wallet)) + .on_client(rpc_client); - let provider = Provider::::try_from(anvil.endpoint()) - .expect("Failed to connect to Anvil") - .interval(Duration::from_millis(POLLING_INTERVAL_MS)); - - let wallet: LocalWallet = anvil.keys()[0].clone().into(); - let client = - SignerMiddleware::new(provider.clone(), wallet.with_chain_id(anvil.chain_id())); - - Self { + Ok(Self { _anvil: Some(anvil), - client: Arc::new(client), - } + client: Arc::new(provider_with_signer), + }) } /// Returns local client configured for the running Anvil instance @@ -124,40 +113,3 @@ impl EthereumSandbox { self.client.clone() } } - -/// Deploys new smart contract using: -/// - Forge build artifacts (JSON file contents) -/// - Constructor args (use () if no args expected) -pub async fn deploy_contract( - client: Arc, - contract_build_artifacts: &str, - contructor_args: T, -) -> Result, LocalWalletSignerMiddleware>, Error> -{ - let (abi, bytecode) = { - let mut artifacts: serde_json::Value = serde_json::from_str(contract_build_artifacts)?; - let abi_value = artifacts - .get_mut("abi") - .ok_or_else(|| Error::ContractBuildArtifacts("abi"))? - .take(); - let bytecode_value = artifacts - .get_mut("bytecode") - .ok_or_else(|| Error::ContractBuildArtifacts("bytecode"))? - .get_mut("object") - .ok_or_else(|| Error::ContractBuildArtifacts("bytecode.object"))? - .take(); - - let abi = serde_json::from_value(abi_value)?; - let bytecode = Bytes::from_hex(bytecode_value.as_str().ok_or(Error::BytecodeObject)?)?; - (abi, bytecode) - }; - - let factory = ContractFactory::new(abi, bytecode, client.clone()); - - Ok(factory - .deploy(contructor_args) - .map_err(Into::>::into)? - .send() - .await - .map_err(Into::>::into)?) -} diff --git a/crates/sandbox/src/unsafe_proxy.rs b/crates/sandbox/src/unsafe_proxy.rs index 815911d..9933e18 100644 --- a/crates/sandbox/src/unsafe_proxy.rs +++ b/crates/sandbox/src/unsafe_proxy.rs @@ -1,30 +1,46 @@ use std::sync::Arc; - use starknet_core_contract_client::clients::StarknetSovereignContractClient; +use crate::{Error, LocalWalletSignerMiddleware}; +use alloy::{ + providers::Provider, sol, +}; -use crate::{deploy_contract, Error, LocalWalletSignerMiddleware}; +sol! { + #[allow(missing_docs)] + #[sol(rpc)] + StarknetSovereign, + "artifacts/Starknet.json" +} -const STARKNET_SOVEREIGN: &str = include_str!("../artifacts/Starknet.json"); -const UNSAFE_PROXY: &str = include_str!("../artifacts/UnsafeProxy.json"); +sol! { + #[allow(missing_docs)] + #[sol(rpc)] + UnsafeProxy, + "artifacts/UnsafeProxy.json" +} /// Deploy Starknet sovereign contract and unsafe proxy for it. /// Cached forge atrifacts are used for deployment, make sure they are up to date. pub async fn deploy_starknet_sovereign_behind_unsafe_proxy( client: Arc, ) -> Result { - // First we deploy the Starknet core contract (no explicit contructor) - let core_contract = deploy_contract(client.clone(), STARKNET_SOVEREIGN, ()).await?; + let base_fee = client.as_ref().get_gas_price().await?; + // First we deploy the Starknet core contract (no explicit contructor) + let core_contract_builder = StarknetSovereign::deploy_builder(&client); + let estimate = core_contract_builder.estimate_gas().await.unwrap(); + let core_contract_address = core_contract_builder.gas_price(base_fee).gas(estimate).nonce(0).deploy().await; // Once we know the Starknet core contract address (implementation address) // we can deploy and initialize our delegate proxy. // NOTE that real world proxies typically allow changing the implementation // address dynamically (this is basically how upgrades work). In our case, // for simplicity, the proxy is initialized only once during the deployment. - let proxy_contract = - deploy_contract(client.clone(), UNSAFE_PROXY, core_contract.address()).await?; + let proxy_contract_builder = UnsafeProxy::deploy_builder(&client, core_contract_address.unwrap()); + let estimate = proxy_contract_builder.estimate_gas().await.unwrap(); + let proxy_contract_address = proxy_contract_builder.gas_price(base_fee).gas(estimate).nonce(1).deploy().await; Ok(StarknetSovereignContractClient::new( - proxy_contract.address(), + proxy_contract_address.unwrap(), client.clone(), )) } @@ -33,47 +49,35 @@ pub async fn deploy_starknet_sovereign_behind_unsafe_proxy( mod tests { use super::deploy_starknet_sovereign_behind_unsafe_proxy; use crate::EthereumSandbox; + use alloy::{contract::Error, primitives::U256, providers::Provider, rpc::types::eth::TransactionReceipt, transports::{RpcError, TransportErrorKind}}; use starknet_core_contract_client::{ interfaces::{ - CoreContractInitData, OperatorTrait, ProxyInitializeData, ProxySupportTrait, - StarknetSovereignContractTrait, - }, - StarknetCoreContractClient, + CoreContractInitData, OperatorTrait, ProxyInitializeData, ProxySupportTrait, StarknetSovereignContractTrait + }, StarknetCoreContractClient }; #[tokio::test] async fn test_starknet_sovereign_contract_initialized_in_anvil() { let sandbox = EthereumSandbox::spawn(None); - let starknet = deploy_starknet_sovereign_behind_unsafe_proxy(sandbox.client()) + let sandbox_ref = sandbox.as_ref().clone(); + let starknet = deploy_starknet_sovereign_behind_unsafe_proxy(sandbox_ref.unwrap().client()) .await .expect("Failed to deploy"); - let data = ProxyInitializeData::<0> { sub_contract_addresses: [], eic_address: Default::default(), init_data: CoreContractInitData { - program_hash: 1u64.into(), // zero program hash would be deemed invalid + program_hash: U256::from(1_u64), // zero program hash would be deemed invalid ..Default::default() }, }; - // Initialize state & governance - starknet - .initialize_with(data) - .await - .expect("Failed to initialize"); - - // Register as operator - starknet - .register_operator(starknet.client().address()) - .await - .expect("Failed to register as operator"); - - // Check that contract is initialized - let program_hash = starknet - .program_hash() - .await - .expect("Failed to query program hash"); - assert_eq!(program_hash, 1u64.into()); + let _init: Result> = starknet.initialize(data.into()).await; + + let _register: Result> = starknet.register_operator(starknet.client().get_accounts().await.unwrap()[0]).await; + + let program_hash: Result = starknet.program_hash().await; + + assert_eq!(program_hash.unwrap(), U256::from(1_u64)); } } diff --git a/crates/starknet-core-contract-client/Cargo.toml b/crates/starknet-core-contract-client/Cargo.toml index 1065dc9..fb0fce6 100644 --- a/crates/starknet-core-contract-client/Cargo.toml +++ b/crates/starknet-core-contract-client/Cargo.toml @@ -5,8 +5,12 @@ version.workspace = true authors.workspace = true [dependencies] -ethers = { workspace = true } log = { workspace = true } thiserror = { workspace = true } num-traits = { workspace = true } async-trait = { workspace = true } +alloy = { workspace = true } +reqwest = { workspace = true, features = ["blocking", "json"] } + +[dev-dependencies] +tokio = { workspace = true, features = ["rt-multi-thread", "macros"] } diff --git a/crates/starknet-core-contract-client/src/clients/sovereign.rs b/crates/starknet-core-contract-client/src/clients/sovereign.rs index 8da2a6f..d45d3ec 100644 --- a/crates/starknet-core-contract-client/src/clients/sovereign.rs +++ b/crates/starknet-core-contract-client/src/clients/sovereign.rs @@ -7,16 +7,17 @@ use crate::{ }, LocalWalletSignerMiddleware, StarknetCoreContractClient, }; -use ethers::types::Address; - +use alloy::{ + network::Ethereum, primitives::Address, transports::http::Http +}; /// Client to interact with a Starknet core contract running in `Sovereign` mode pub struct StarknetSovereignContractClient { - core_contract: StarknetSovereignContract, - messaging: StarknetMessaging, - operator: Operator, - proxy_support: ProxySupport, - governance: StarknetGovernance, - governed_finalizable: GovernedFinalizable, + core_contract: StarknetSovereignContract::StarknetSovereignContractInstance, Arc>, + messaging: StarknetMessaging::StarknetMessagingInstance, Arc>, + operator: Operator::OperatorInstance, Arc>, + proxy_support: ProxySupport::ProxySupportInstance, Arc>, + governance: StarknetGovernance::StarknetGovernanceInstance, Arc>, + governed_finalizable: GovernedFinalizable::GovernedFinalizableInstance, Arc>, } impl StarknetSovereignContractClient { @@ -32,45 +33,45 @@ impl StarknetSovereignContractClient { } } -impl AsRef> +impl AsRef, Arc>> for StarknetSovereignContractClient { - fn as_ref(&self) -> &StarknetSovereignContract { + fn as_ref(&self) -> &StarknetSovereignContract::StarknetSovereignContractInstance, Arc> { &self.core_contract } } -impl AsRef> for StarknetSovereignContractClient { - fn as_ref(&self) -> &StarknetMessaging { +impl AsRef, Arc>> for StarknetSovereignContractClient { + fn as_ref(&self) -> &StarknetMessaging::StarknetMessagingInstance, Arc> { &self.messaging } } -impl AsRef> for StarknetSovereignContractClient { - fn as_ref(&self) -> &ProxySupport { +impl AsRef, Arc>> for StarknetSovereignContractClient { + fn as_ref(&self) -> &ProxySupport::ProxySupportInstance, Arc> { &self.proxy_support } } -impl AsRef> for StarknetSovereignContractClient { - fn as_ref(&self) -> &Operator { +impl AsRef, Arc>> for StarknetSovereignContractClient { + fn as_ref(&self) -> &Operator::OperatorInstance, Arc> { &self.operator } } -impl AsRef> for StarknetSovereignContractClient { - fn as_ref(&self) -> &StarknetGovernance { +impl AsRef, Arc>> for StarknetSovereignContractClient { + fn as_ref(&self) -> &StarknetGovernance::StarknetGovernanceInstance, Arc> { &self.governance } } -impl AsRef> for StarknetSovereignContractClient { - fn as_ref(&self) -> &GovernedFinalizable { +impl AsRef, Arc>> for StarknetSovereignContractClient { + fn as_ref(&self) -> &GovernedFinalizable::GovernedFinalizableInstance, Arc> { &self.governed_finalizable } } impl StarknetCoreContractClient for StarknetSovereignContractClient { fn address(&self) -> Address { - self.core_contract.address() + *self.core_contract.address() } fn client(&self) -> Arc { - self.core_contract.client() + self.core_contract.provider().clone() } } diff --git a/crates/starknet-core-contract-client/src/clients/validity.rs b/crates/starknet-core-contract-client/src/clients/validity.rs index 56a5ba0..3614d8e 100644 --- a/crates/starknet-core-contract-client/src/clients/validity.rs +++ b/crates/starknet-core-contract-client/src/clients/validity.rs @@ -1,6 +1,10 @@ use std::sync::Arc; -use ethers::abi::Address; +use alloy::{ + primitives::Address, + network::Ethereum, + transports::http::Http, +}; use crate::{ interfaces::{Operator, ProxySupport, StarknetMessaging, StarknetValidityContract}, @@ -9,10 +13,10 @@ use crate::{ /// Client to interact with a Starknet core contract running in `Validity` mode pub struct StarknetValidityContractClient { - core_contract: StarknetValidityContract, - messaging: StarknetMessaging, - operator: Operator, - proxy_support: ProxySupport, + core_contract: StarknetValidityContract::StarknetValidityContractInstance, Arc>, + messaging: StarknetMessaging::StarknetMessagingInstance, Arc>, + operator: Operator::OperatorInstance, Arc>, + proxy_support: ProxySupport::ProxySupportInstance, Arc>, } impl StarknetValidityContractClient { @@ -21,30 +25,30 @@ impl StarknetValidityContractClient { core_contract: StarknetValidityContract::new(address, client.clone()), messaging: StarknetMessaging::new(address, client.clone()), operator: Operator::new(address, client.clone()), - proxy_support: ProxySupport::new(address, client), + proxy_support: ProxySupport::new(address, client.clone()), } } } -impl AsRef> +impl AsRef, Arc>> for StarknetValidityContractClient { - fn as_ref(&self) -> &StarknetValidityContract { + fn as_ref(&self) -> &StarknetValidityContract::StarknetValidityContractInstance, Arc> { &self.core_contract } } -impl AsRef> for StarknetValidityContractClient { - fn as_ref(&self) -> &StarknetMessaging { +impl AsRef, Arc>> for StarknetValidityContractClient { + fn as_ref(&self) -> &StarknetMessaging::StarknetMessagingInstance, Arc> { &self.messaging } } -impl AsRef> for StarknetValidityContractClient { - fn as_ref(&self) -> &ProxySupport { +impl AsRef, Arc>> for StarknetValidityContractClient { + fn as_ref(&self) -> &ProxySupport::ProxySupportInstance, Arc> { &self.proxy_support } } -impl AsRef> for StarknetValidityContractClient { - fn as_ref(&self) -> &Operator { +impl AsRef, Arc>> for StarknetValidityContractClient { + fn as_ref(&self) -> &Operator::OperatorInstance, Arc> { &self.operator } } diff --git a/crates/starknet-core-contract-client/src/error.rs b/crates/starknet-core-contract-client/src/error.rs deleted file mode 100644 index 9be08b0..0000000 --- a/crates/starknet-core-contract-client/src/error.rs +++ /dev/null @@ -1,12 +0,0 @@ -use ethers::contract::ContractError; -use ethers::middleware::Middleware; -use ethers::providers::ProviderError; -use thiserror::Error; - -#[derive(Debug, Error)] -pub enum Error { - #[error(transparent)] - ContractError(#[from] ContractError), - #[error(transparent)] - ProviderError(#[from] ProviderError), -} diff --git a/crates/starknet-core-contract-client/src/interfaces/governance.rs b/crates/starknet-core-contract-client/src/interfaces/governance.rs index 40f2bd1..7723c7e 100644 --- a/crates/starknet-core-contract-client/src/interfaces/governance.rs +++ b/crates/starknet-core-contract-client/src/interfaces/governance.rs @@ -1,97 +1,112 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::{ - contract::ContractError, - prelude::abigen, - providers::Middleware, - types::{TransactionReceipt, H160}, -}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; -type Adress = H160; +use alloy::{ + contract::Error, network::Ethereum, primitives::Address, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; -abigen!( - StarknetGovernance, - r#"[ - function starknetIsGovernor(address user) external view returns (bool) - function starknetNominateNewGovernor(address newGovernor) external - function starknetRemoveGovernor(address governorForRemoval) external - function starknetAcceptGovernance() external - function starknetCancelNomination() external - ]"#, +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface StarknetGovernance { + function starknetIsGovernor(address user) external view returns (bool); + function starknetNominateNewGovernor(address newGovernor) external; + function starknetRemoveGovernor(address governorForRemoval) external; + function starknetAcceptGovernance() external; + function starknetCancelNomination() external; + } ); #[async_trait] -pub trait StarknetGovernanceTrait { - async fn starknet_is_governor(&self, user: Adress) -> Result>; +pub trait StarknetGovernanceTrait { + async fn starknet_is_governor(&self, user: Address) -> Result; async fn starknet_nominate_new_governor( &self, - new_governor: Adress, - ) -> Result, Error>; + new_governor: Address, + ) -> Result>; async fn starknet_remove_governor( &self, - governor_for_removal: Adress, - ) -> Result, Error>; - async fn starknet_accept_governance(&self) -> Result, Error>; - async fn starknet_cancel_nomination(&self) -> Result, Error>; + governor_for_removal: Address, + ) -> Result>; + async fn starknet_accept_governance(&self) -> Result>; + async fn starknet_cancel_nomination(&self) -> Result>; } #[async_trait] -impl StarknetGovernanceTrait for T +impl StarknetGovernanceTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { - async fn starknet_is_governor(&self, user: Adress) -> Result> { - self.as_ref() - .starknet_is_governor(user) - .call() - .await - .map_err(Into::into) + async fn starknet_is_governor(&self, user: Address) -> Result { + Ok(self.as_ref().starknetIsGovernor(user).call().await?._0) } async fn starknet_nominate_new_governor( &self, - new_governor: Adress, - ) -> Result, Error> { - self.as_ref() - .starknet_nominate_new_governor(new_governor) + new_governor: Address, + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().starknetNominateNewGovernor(new_governor); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn starknet_remove_governor( &self, - governor_for_removal: Adress, - ) -> Result, Error> { - self.as_ref() - .starknet_remove_governor(governor_for_removal) + governor_for_removal: Address, + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().starknetRemoveGovernor(governor_for_removal); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } - async fn starknet_accept_governance(&self) -> Result, Error> { - self.as_ref() - .starknet_accept_governance() + async fn starknet_accept_governance(&self) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().starknetAcceptGovernance(); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } - async fn starknet_cancel_nomination(&self) -> Result, Error> { - self.as_ref() - .starknet_cancel_nomination() + async fn starknet_cancel_nomination(&self) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().starknetCancelNomination(); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } } diff --git a/crates/starknet-core-contract-client/src/interfaces/governed_finalizable.rs b/crates/starknet-core-contract-client/src/interfaces/governed_finalizable.rs index a3f8507..357d112 100644 --- a/crates/starknet-core-contract-client/src/interfaces/governed_finalizable.rs +++ b/crates/starknet-core-contract-client/src/interfaces/governed_finalizable.rs @@ -1,44 +1,50 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::{ - contract::ContractError, prelude::abigen, providers::Middleware, types::TransactionReceipt, -}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; + +use alloy::{ + contract::Error, network::Ethereum, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; -abigen!( - GovernedFinalizable, - r#"[ - function isFinalized() public view returns (bool) - function finalize() external onlyGovernance notFinalized - ]"#, +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface GovernedFinalizable { + function isFinalized() public view returns (bool); + function finalize() external onlyGovernance notFinalized; + } ); #[async_trait] -pub trait GovernedFinalizableTrait { - async fn is_finalized(&self) -> Result>; - async fn finalize(&self) -> Result, Error>; +pub trait GovernedFinalizableTrait { + async fn is_finalized(&self) -> Result; + async fn finalize(&self) -> Result>; } #[async_trait] -impl GovernedFinalizableTrait for T +impl GovernedFinalizableTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { - async fn is_finalized(&self) -> Result> { - self.as_ref() - .is_finalized() - .call() - .await - .map_err(Into::into) + async fn is_finalized(&self) -> Result { + Ok(self.as_ref().isFinalized().call().await?._0) } - async fn finalize(&self) -> Result, Error> { - self.as_ref() - .finalize() + async fn finalize(&self) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().finalize().from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().finalize(); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } } diff --git a/crates/starknet-core-contract-client/src/interfaces/messaging.rs b/crates/starknet-core-contract-client/src/interfaces/messaging.rs index 49fdd1a..a8b7d74 100644 --- a/crates/starknet-core-contract-client/src/interfaces/messaging.rs +++ b/crates/starknet-core-contract-client/src/interfaces/messaging.rs @@ -1,90 +1,77 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::{ - contract::ContractError, - prelude::abigen, - providers::Middleware, - types::{TransactionReceipt, U256}, -}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; -type MessageHash = [u8; 32]; +use alloy::{ + contract::Error, network::Ethereum, primitives::{FixedBytes, U256}, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; // StarknetMessaging.sol -abigen!( - StarknetMessaging, - r#"[ - function l1ToL2Messages(bytes32 msgHash) external view returns (uint256) - function l2ToL1Messages(bytes32 msgHash) external view returns (uint256) - function l1ToL2MessageCancellations(bytes32 msgHash) external view returns (uint256) +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface StarknetMessaging { + function l1ToL2Messages(bytes32 msgHash) external view returns (uint256); + function l2ToL1Messages(bytes32 msgHash) external view returns (uint256); + function l1ToL2MessageCancellations(bytes32 msgHash) external view returns (uint256); - function sendMessageToL2(uint256 toAddress, uint256 selector, uint256[] calldata payload) external payable override returns (bytes32, uint256) - function consumeMessageFromL2(uint256 fromAddress, uint256[] calldata payload) external override returns (bytes32) + function sendMessageToL2(uint256 toAddress, uint256 selector, uint256[] calldata payload) external payable override returns (bytes32, uint256); + function consumeMessageFromL2(uint256 fromAddress, uint256[] calldata payload) external override returns (bytes32); - function startL1ToL2MessageCancellation(uint256 toAddress, uint256 selector, uint256[] calldata payload, uint256 nonce) external override returns (bytes32) - function cancelL1ToL2Message(uint256 toAddress, uint256 selector, uint256[] calldata payload, uint256 nonce) external override returns (bytes32) - ]"#, + function startL1ToL2MessageCancellation(uint256 toAddress, uint256 selector, uint256[] calldata payload, uint256 nonce) external override returns (bytes32); + function cancelL1ToL2Message(uint256 toAddress, uint256 selector, uint256[] calldata payload, uint256 nonce) external override returns (bytes32); + } ); #[async_trait] -pub trait StarknetMessagingTrait { - async fn l1_to_l2_messages(&self, msg_hash: MessageHash) -> Result>; - async fn l2_to_l1_messages(&self, msg_hash: MessageHash) -> Result>; - async fn l1_to_l2_message_cancellations(&self, msg_hash: MessageHash) - -> Result>; +pub trait StarknetMessagingTrait { + async fn l1_to_l2_messages(&self, msg_hash: FixedBytes<32>) -> Result; + async fn l2_to_l1_messages(&self, msg_hash: FixedBytes<32>) -> Result; + async fn l1_to_l2_message_cancellations(&self, msg_hash: FixedBytes<32>) + -> Result; async fn send_message_to_l2( &self, to_address: U256, selector: U256, payload: Vec, fee: U256, - ) -> Result, Error>; + ) -> Result>; async fn start_l1_to_l2_message_cancellation( &self, to_address: U256, selector: U256, payload: Vec, nonce: U256, - ) -> Result, Error>; + ) -> Result>; async fn cancel_l1_to_l2_message( &self, to_address: U256, selector: U256, payload: Vec, nonce: U256, - ) -> Result, Error>; + ) -> Result>; } #[async_trait] -impl StarknetMessagingTrait for T +impl StarknetMessagingTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { - async fn l1_to_l2_messages(&self, msg_hash: MessageHash) -> Result> { - self.as_ref() - .l_1_to_l2_messages(msg_hash) - .call() - .await - .map_err(Into::into) + async fn l1_to_l2_messages(&self, msg_hash: FixedBytes<32>) -> Result { + Ok(self.as_ref().l1ToL2Messages(msg_hash).call().await?._0) } - async fn l2_to_l1_messages(&self, msg_hash: MessageHash) -> Result> { - self.as_ref() - .l_2_to_l1_messages(msg_hash) - .call() - .await - .map_err(Into::into) + async fn l2_to_l1_messages(&self, msg_hash: FixedBytes<32>) -> Result { + Ok(self.as_ref().l2ToL1Messages(msg_hash).call().await?._0) } async fn l1_to_l2_message_cancellations( &self, - msg_hash: MessageHash, - ) -> Result> { - self.as_ref() - .l_1_to_l2_message_cancellations(msg_hash) - .call() - .await - .map_err(Into::into) + msg_hash: FixedBytes<32>, + ) -> Result { + Ok(self.as_ref().l1ToL2MessageCancellations(msg_hash).call().await?._0) } async fn send_message_to_l2( @@ -93,15 +80,20 @@ where selector: U256, payload: Vec, fee: U256, - ) -> Result, Error> { - self.as_ref() - .send_message_to_l2(to_address, selector, payload) - .value(fee) // L1 message fee must be between 0 and 1 ether + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().sendMessageToL2(to_address, selector, payload); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .value(fee) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn start_l1_to_l2_message_cancellation( @@ -110,14 +102,19 @@ where selector: U256, payload: Vec, nonce: U256, - ) -> Result, Error> { - self.as_ref() - .start_l1_to_l2_message_cancellation(to_address, selector, payload, nonce) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().startL1ToL2MessageCancellation(to_address, selector, payload, nonce); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn cancel_l1_to_l2_message( @@ -126,13 +123,18 @@ where selector: U256, payload: Vec, nonce: U256, - ) -> Result, Error> { - self.as_ref() - .cancel_l1_to_l2_message(to_address, selector, payload, nonce) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().cancelL1ToL2Message(to_address, selector, payload, nonce); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } } diff --git a/crates/starknet-core-contract-client/src/interfaces/messaging_events.rs b/crates/starknet-core-contract-client/src/interfaces/messaging_events.rs index 2518570..8b7848e 100644 --- a/crates/starknet-core-contract-client/src/interfaces/messaging_events.rs +++ b/crates/starknet-core-contract-client/src/interfaces/messaging_events.rs @@ -1,13 +1,14 @@ -use ethers::prelude::abigen; +use alloy::sol; -abigen!( - StarknetMessagingEvents, - r#"[ - event LogMessageToL1(uint256 indexed fromAddress, address indexed toAddress, uint256[] payload) - event LogMessageToL2(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce, uint256 fee) - event ConsumedMessageToL1(uint256 indexed fromAddress, address indexed toAddress, uint256[] payload) - event ConsumedMessageToL2(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce) - event MessageToL2CancellationStarted(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce) - event MessageToL2Canceled(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce) - ]"# +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface StarknetMessagingEvents { + event LogMessageToL1(uint256 indexed fromAddress, address indexed toAddress, uint256[] payload); + event LogMessageToL2(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce, uint256 fee); + event ConsumedMessageToL1(uint256 indexed fromAddress, address indexed toAddress, uint256[] payload); + event ConsumedMessageToL2(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce); + event MessageToL2CancellationStarted(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce); + event MessageToL2Canceled(address indexed fromAddress, uint256 indexed toAddress, uint256 indexed selector, uint256[] payload, uint256 nonce); + } ); diff --git a/crates/starknet-core-contract-client/src/interfaces/mod.rs b/crates/starknet-core-contract-client/src/interfaces/mod.rs index 7a6a035..514a809 100644 --- a/crates/starknet-core-contract-client/src/interfaces/mod.rs +++ b/crates/starknet-core-contract-client/src/interfaces/mod.rs @@ -10,10 +10,9 @@ mod validity_core_contract; pub use governance::{StarknetGovernance, StarknetGovernanceTrait}; pub use governed_finalizable::{GovernedFinalizable, GovernedFinalizableTrait}; pub use messaging::{StarknetMessaging, StarknetMessagingTrait}; -pub use messaging_events::{ - ConsumedMessageToL1Filter, ConsumedMessageToL2Filter, LogMessageToL1Filter, - LogMessageToL2Filter, MessageToL2CanceledFilter, MessageToL2CancellationStartedFilter, - StarknetMessagingEvents, +pub use messaging_events::StarknetMessagingEvents::{ + ConsumedMessageToL1, ConsumedMessageToL2, LogMessageToL1, LogMessageToL2, + MessageToL2Canceled, MessageToL2CancellationStarted, StarknetMessagingEventsInstance, }; pub use operator::{Operator, OperatorTrait}; pub use proxy_support::{ diff --git a/crates/starknet-core-contract-client/src/interfaces/operator.rs b/crates/starknet-core-contract-client/src/interfaces/operator.rs index e5d63b1..66d30de 100644 --- a/crates/starknet-core-contract-client/src/interfaces/operator.rs +++ b/crates/starknet-core-contract-client/src/interfaces/operator.rs @@ -1,69 +1,78 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::{ - contract::ContractError, - prelude::abigen, - providers::Middleware, - types::{Address, TransactionReceipt}, -}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; + +use alloy::{ + contract::Error, network::Ethereum, primitives::Address, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; -abigen!( - Operator, - r#"[ - function registerOperator(address newOperator) external override onlyGovernance - function unregisterOperator(address removedOperator) external override onlyGovernance +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface Operator { + function registerOperator(address newOperator) external override onlyGovernance; + function unregisterOperator(address removedOperator) external override onlyGovernance; - function isOperator(address user) public view override returns (bool) - ]"#, + function isOperator(address user) public view override returns (bool); + } ); #[async_trait] -pub trait OperatorTrait { +pub trait OperatorTrait { async fn register_operator( &self, new_operator: Address, - ) -> Result, Error>; + ) -> Result>; async fn unregister_operator( &self, removed_operator: Address, - ) -> Result, Error>; - async fn is_operator(&self, user: Address) -> Result>; + ) -> Result>; + async fn is_operator(&self, user: Address) -> Result; } #[async_trait] -impl OperatorTrait for T +impl OperatorTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { async fn register_operator( &self, new_operator: Address, - ) -> Result, Error> { - self.as_ref() - .register_operator(new_operator) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().registerOperator(new_operator).from(from_address).estimate_gas().await; + let builder = self.as_ref().registerOperator(new_operator); + builder + .from(from_address) + .nonce(3) + .gas(gas.unwrap()) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn unregister_operator( &self, removed_operator: Address, - ) -> Result, Error> { - self.as_ref() - .unregister_operator(removed_operator) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().unregisterOperator(removed_operator).from(from_address).estimate_gas().await; + let builder = self.as_ref().unregisterOperator(removed_operator); + builder + .from(from_address) + .nonce(3) + .gas(gas.unwrap()) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } - async fn is_operator(&self, user: Address) -> Result> { - self.as_ref() - .is_operator(user) - .call() - .await - .map_err(Into::into) + async fn is_operator(&self, user: Address) -> Result { + Ok(self.as_ref().isOperator(user).call().await?._0) } } diff --git a/crates/starknet-core-contract-client/src/interfaces/proxy_support.rs b/crates/starknet-core-contract-client/src/interfaces/proxy_support.rs index 046d8ff..0c5563e 100644 --- a/crates/starknet-core-contract-client/src/interfaces/proxy_support.rs +++ b/crates/starknet-core-contract-client/src/interfaces/proxy_support.rs @@ -1,67 +1,62 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::{ - abi::AbiEncode, - contract::{ContractError, EthAbiCodec, EthAbiType}, - prelude::abigen, - providers::Middleware, - types::{Address, Bytes, TransactionReceipt, I256, U256}, -}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; -abigen!( - ProxySupport, - r#"[ - function isFrozen() external view virtual returns (bool) - function initialize(bytes calldata data) external notCalledDirectly - ]"#, +use alloy::{ + contract::Error, network::Ethereum, primitives::{Address, Bytes, I256, U256}, providers::Provider, rpc::types::eth::TransactionReceipt, sol, sol_types::SolValue, transports::{http::Http, RpcError, TransportErrorKind} +}; + +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface ProxySupport { + function isFrozen() external view virtual returns (bool); + function initialize(bytes calldata data) external notCalledDirectly; + } ); #[async_trait] -pub trait ProxySupportTrait { - async fn is_frozen(&self) -> Result>; - async fn initialize(&self, data: Bytes) -> Result, Error>; - async fn initialize_with( - &self, - data: ProxyInitializeData, - ) -> Result, Error>; +pub trait ProxySupportTrait +{ + async fn is_frozen(&self) -> Result; + async fn initialize(&self, data: Bytes) -> Result>; } #[async_trait] -impl ProxySupportTrait for T +impl ProxySupportTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { - async fn is_frozen(&self) -> Result> { - self.as_ref().is_frozen().call().await.map_err(Into::into) + async fn is_frozen(&self) -> Result { + Ok(self.as_ref().isFrozen().call().await?._0) } - async fn initialize(&self, data: Bytes) -> Result, Error> { - self.as_ref() - .initialize(data) + async fn initialize(&self, data: Bytes) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let builder = self.as_ref().initialize(data); + let gas = builder.estimate_gas().await.unwrap(); + builder + .from(self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) - } - - async fn initialize_with( - &self, - data: ProxyInitializeData, - ) -> Result, Error> { - self.initialize(data.into()).await } } -#[derive(Debug, Clone, Default, PartialEq, EthAbiType, EthAbiCodec)] +#[derive(Debug, Clone, Default, PartialEq)] pub struct CoreContractState { pub state_root: U256, pub block_number: I256, pub block_hash: U256, } -#[derive(Debug, Clone, Default, PartialEq, EthAbiType, EthAbiCodec)] +#[derive(Debug, Clone, Default, PartialEq)] pub struct CoreContractInitData { pub program_hash: U256, pub verifier_address: Address, @@ -79,9 +74,14 @@ pub struct ProxyInitializeData { impl Into> for ProxyInitializeData { fn into(self) -> Vec { [ - self.sub_contract_addresses.encode(), - self.eic_address.encode(), - self.init_data.encode(), + self.sub_contract_addresses.abi_encode(), + self.eic_address.abi_encode(), + self.init_data.program_hash.abi_encode(), + self.init_data.verifier_address.abi_encode(), + self.init_data.config_hash.abi_encode(), + self.init_data.initial_state.state_root.abi_encode(), + self.init_data.initial_state.block_number.abi_encode(), + self.init_data.initial_state.block_hash.abi_encode(), ] .concat() } @@ -98,7 +98,7 @@ mod tests { use super::ProxyInitializeData; #[test] - fn test_initialize_calldata_encoding() { + fn test_calldata_encoding() { let calldata = ProxyInitializeData::<0> { sub_contract_addresses: [], eic_address: Default::default(), diff --git a/crates/starknet-core-contract-client/src/interfaces/sovereign_core_contract.rs b/crates/starknet-core-contract-client/src/interfaces/sovereign_core_contract.rs index 679f878..e79f515 100644 --- a/crates/starknet-core-contract-client/src/interfaces/sovereign_core_contract.rs +++ b/crates/starknet-core-contract-client/src/interfaces/sovereign_core_contract.rs @@ -1,150 +1,164 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::contract::ContractError; -use ethers::middleware::Middleware; -use ethers::prelude::abigen; -use ethers::types::{TransactionReceipt, I256, U256}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; -abigen!( - StarknetSovereignContract, - r#"[ - function setProgramHash(uint256 newProgramHash) external notFinalized onlyGovernance - function setConfigHash(uint256 newConfigHash) external notFinalized onlyGovernance - function setMessageCancellationDelay(uint256 delayInSeconds) external notFinalized onlyGovernance +use alloy::{ + contract::Error, network::Ethereum, primitives::{I256, U256}, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; - function programHash() public view returns (uint256) - function configHash() public view returns (uint256) +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface StarknetSovereignContract { + function setProgramHash(uint256 newProgramHash) external notFinalized onlyGovernance; + function setConfigHash(uint256 newConfigHash) external notFinalized onlyGovernance; + function setMessageCancellationDelay(uint256 delayInSeconds) external notFinalized onlyGovernance; - function identify() external pure override returns (string memory) - function stateRoot() external view returns (uint256) - function stateBlockNumber() external view returns (int256) - function stateBlockHash() external view returns (uint256) + function programHash() public view returns (uint256); + function configHash() public view returns (uint256); - function updateState(uint256[] calldata programOutput) external onlyOperator + function identify() external pure override returns (string memory); + function stateRoot() external view returns (uint256); + function stateBlockNumber() external view returns (int256); + function stateBlockHash() external view returns (uint256); - ]"#, + function updateState(uint256[] calldata programOutput) external onlyOperator; + } ); #[async_trait] -pub trait StarknetSovereignContractTrait { +pub trait StarknetSovereignContractTrait { async fn set_program_hash( &self, new_program_hash: U256, - ) -> Result, Error>; + ) -> Result>; async fn set_config_hash( &self, new_config_hash: U256, - ) -> Result, Error>; + ) -> Result>; async fn set_message_cancellation_delay( &self, delay_in_seconds: U256, - ) -> Result, Error>; + ) -> Result>; - async fn program_hash(&self) -> Result>; - async fn config_hash(&self) -> Result>; + async fn program_hash(&self) -> Result; + async fn config_hash(&self) -> Result; - async fn identify(&self) -> Result>; - async fn state_root(&self) -> Result>; - async fn state_block_number(&self) -> Result>; - async fn state_block_hash(&self) -> Result>; + async fn identify(&self) -> Result; + async fn state_root(&self) -> Result; + async fn state_block_number(&self) -> Result; + async fn state_block_hash(&self) -> Result; /// Update the L1 state async fn update_state( &self, program_output: Vec, - ) -> Result, Error>; + ) -> Result>; } #[async_trait] -impl StarknetSovereignContractTrait for T +impl StarknetSovereignContractTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { async fn set_program_hash( &self, new_program_hash: U256, - ) -> Result, Error> { - self.as_ref() - .set_program_hash(new_program_hash) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setProgramHash(new_program_hash).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setProgramHash(new_program_hash); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn set_config_hash( &self, new_config_hash: U256, - ) -> Result, Error> { - self.as_ref() - .set_config_hash(new_config_hash) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setConfigHash(new_config_hash).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setConfigHash(new_config_hash); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn set_message_cancellation_delay( &self, delay_in_seconds: U256, - ) -> Result, Error> { - self.as_ref() - .set_message_cancellation_delay(delay_in_seconds) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setMessageCancellationDelay(delay_in_seconds).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setMessageCancellationDelay(delay_in_seconds); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } - async fn program_hash(&self) -> Result> { - self.as_ref() - .program_hash() - .call() - .await - .map_err(Into::into) + async fn program_hash(&self) -> Result { + Ok(self.as_ref().programHash().call().await?._0) } - async fn config_hash(&self) -> Result> { - self.as_ref().config_hash().call().await.map_err(Into::into) + async fn config_hash(&self) -> Result { + Ok(self.as_ref().configHash().call().await?._0) } - async fn identify(&self) -> Result> { - self.as_ref().identify().call().await.map_err(Into::into) + async fn identify(&self) -> Result { + Ok(self.as_ref().identify().call().await?._0) } - async fn state_root(&self) -> Result> { - self.as_ref().state_root().call().await.map_err(Into::into) + async fn state_root(&self) -> Result { + Ok(self.as_ref().stateRoot().call().await?._0) } - async fn state_block_number(&self) -> Result> { - self.as_ref() - .state_block_number() - .call() - .await - .map_err(Into::into) + async fn state_block_number(&self) -> Result { + Ok(self.as_ref().stateBlockNumber().call().await?._0) } - async fn state_block_hash(&self) -> Result> { - self.as_ref() - .state_block_hash() - .call() - .await - .map_err(Into::into) + async fn state_block_hash(&self) -> Result { + Ok(self.as_ref().stateBlockHash().call().await?._0) } async fn update_state( &self, program_output: Vec, - ) -> Result, Error> { - self.as_ref() - .update_state(program_output) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().updateState(program_output.clone()).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().updateState(program_output); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } } diff --git a/crates/starknet-core-contract-client/src/interfaces/validity_core_contract.rs b/crates/starknet-core-contract-client/src/interfaces/validity_core_contract.rs index cba833e..f61bb0a 100644 --- a/crates/starknet-core-contract-client/src/interfaces/validity_core_contract.rs +++ b/crates/starknet-core-contract-client/src/interfaces/validity_core_contract.rs @@ -1,140 +1,148 @@ +use std::sync::Arc; + use async_trait::async_trait; -use ethers::contract::ContractError; -use ethers::middleware::Middleware; -use ethers::prelude::abigen; -use ethers::types::{TransactionReceipt, I256, U256}; -use crate::Error; +use crate::LocalWalletSignerMiddleware; -abigen!( - StarknetValidityContract, - r#"[ - function setProgramHash(uint256 newProgramHash) external notFinalized onlyGovernance - function setConfigHash(uint256 newConfigHash) external notFinalized onlyGovernance - function setMessageCancellationDelay(uint256 delayInSeconds) external notFinalized onlyGovernance +use alloy::{ + contract::Error, network::Ethereum, primitives::{I256, U256}, providers::Provider, rpc::types::eth::TransactionReceipt, sol, transports::{http::Http, RpcError, TransportErrorKind} +}; - function programHash() public view returns (uint256) - function configHash() public view returns (uint256) +sol!( + #[allow(missing_docs)] + #[sol(rpc)] + interface StarknetValidityContract { + function setProgramHash(uint256 newProgramHash) external notFinalized onlyGovernance; + function setConfigHash(uint256 newConfigHash) external notFinalized onlyGovernance; + function setMessageCancellationDelay(uint256 delayInSeconds) external notFinalized onlyGovernance; - function identify() external pure override returns (string memory) - function stateRoot() external view returns (uint256) - function stateBlockNumber() external view returns (int256) - function stateBlockHash() external view returns (uint256) + function programHash() public view returns (uint256); + function configHash() public view returns (uint256); - function updateState(uint256[] calldata programOutput, uint256 onchainDataHash, uint256 onchainDataSize) external onlyOperator + function identify() external pure override returns (string memory); + function stateRoot() external view returns (uint256); + function stateBlockNumber() external view returns (int256); + function stateBlockHash() external view returns (uint256); - ]"#, + function updateState(uint256[] calldata programOutput, uint256 onchainDataHash, uint256 onchainDataSize) external onlyOperator; + } ); #[async_trait] -pub trait StarknetValidityContractTrait { +pub trait StarknetValidityContractTrait { async fn set_program_hash( &self, new_program_hash: U256, - ) -> Result, Error>; + ) -> Result>; async fn set_config_hash( &self, new_config_hash: U256, - ) -> Result, Error>; + ) -> Result>; async fn set_message_cancellation_delay( &self, delay_in_seconds: U256, - ) -> Result, Error>; + ) -> Result>; - async fn program_hash(&self) -> Result>; - async fn config_hash(&self) -> Result>; + async fn program_hash(&self) -> Result; + async fn config_hash(&self) -> Result; - async fn identify(&self) -> Result>; - async fn state_root(&self) -> Result>; - async fn state_block_number(&self) -> Result>; - async fn state_block_hash(&self) -> Result>; + async fn identify(&self) -> Result; + async fn state_root(&self) -> Result; + async fn state_block_number(&self) -> Result; + async fn state_block_hash(&self) -> Result; /// Update the L1 state async fn update_state( &self, program_output: Vec, onchain_data_hash: U256, onchain_data_size: U256, - ) -> Result, Error>; + ) -> Result>; } #[async_trait] -impl StarknetValidityContractTrait for T +impl StarknetValidityContractTrait for T where - T: AsRef> + Send + Sync, + T: AsRef, Arc>> + Send + Sync, { async fn set_program_hash( &self, new_program_hash: U256, - ) -> Result, Error> { - self.as_ref() - .set_program_hash(new_program_hash) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setProgramHash(new_program_hash).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setProgramHash(new_program_hash); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn set_config_hash( &self, new_config_hash: U256, - ) -> Result, Error> { - self.as_ref() - .set_config_hash(new_config_hash) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setConfigHash(new_config_hash).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setConfigHash(new_config_hash); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } async fn set_message_cancellation_delay( &self, delay_in_seconds: U256, - ) -> Result, Error> { - self.as_ref() - .set_message_cancellation_delay(delay_in_seconds) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().setMessageCancellationDelay(delay_in_seconds).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().setMessageCancellationDelay(delay_in_seconds); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } - async fn program_hash(&self) -> Result> { - self.as_ref() - .program_hash() - .call() - .await - .map_err(Into::into) + async fn program_hash(&self) -> Result { + Ok(self.as_ref().programHash().call().await?._0) } - async fn config_hash(&self) -> Result> { - self.as_ref().config_hash().call().await.map_err(Into::into) + async fn config_hash(&self) -> Result { + Ok(self.as_ref().configHash().call().await?._0) } - async fn identify(&self) -> Result> { - self.as_ref().identify().call().await.map_err(Into::into) + async fn identify(&self) -> Result { + Ok(self.as_ref().identify().call().await?._0) } - async fn state_root(&self) -> Result> { - self.as_ref().state_root().call().await.map_err(Into::into) + async fn state_root(&self) -> Result { + Ok(self.as_ref().stateRoot().call().await?._0) } - async fn state_block_number(&self) -> Result> { - self.as_ref() - .state_block_number() - .call() - .await - .map_err(Into::into) + async fn state_block_number(&self) -> Result { + Ok(self.as_ref().stateBlockNumber().call().await?._0) } - async fn state_block_hash(&self) -> Result> { - self.as_ref() - .state_block_hash() - .call() - .await - .map_err(Into::into) + async fn state_block_hash(&self) -> Result { + Ok(self.as_ref().stateBlockHash().call().await?._0) } async fn update_state( @@ -142,13 +150,19 @@ where program_output: Vec, onchain_data_hash: U256, onchain_data_size: U256, - ) -> Result, Error> { - self.as_ref() - .update_state(program_output, onchain_data_hash, onchain_data_size) + ) -> Result> { + let base_fee = self.as_ref().provider().as_ref().get_gas_price().await.unwrap(); + let from_address = self.as_ref().provider().as_ref().get_accounts().await.unwrap()[0]; + let gas = self.as_ref().updateState(program_output.clone(), onchain_data_hash, onchain_data_size).from(from_address).estimate_gas().await.unwrap(); + let builder = self.as_ref().updateState(program_output, onchain_data_hash, onchain_data_size); + builder + .from(from_address) + .nonce(2) + .gas(gas) + .gas_price(base_fee) .send() + .await.unwrap() + .get_receipt() .await - .map_err(Into::>::into)? - .await - .map_err(Into::into) } } diff --git a/crates/starknet-core-contract-client/src/lib.rs b/crates/starknet-core-contract-client/src/lib.rs index 5f00a15..2297da2 100644 --- a/crates/starknet-core-contract-client/src/lib.rs +++ b/crates/starknet-core-contract-client/src/lib.rs @@ -1,17 +1,13 @@ pub mod clients; -mod error; pub mod interfaces; use std::sync::Arc; -pub use error::Error; +use alloy::{ + network::{Ethereum, EthereumSigner}, primitives::Address, providers::{layers::SignerProvider, RootProvider}, transports::http::Http +}; -use ethers::prelude::SignerMiddleware; -use ethers::providers::{Http, Provider}; -use ethers::signers::LocalWallet; -use ethers::types::Address; - -pub type LocalWalletSignerMiddleware = SignerMiddleware, LocalWallet>; +pub type LocalWalletSignerMiddleware = SignerProvider, RootProvider>, EthereumSigner>; pub trait StarknetCoreContractClient { fn address(&self) -> Address;