diff --git a/README-CN.md b/README-CN.md index 0a031c83c..8330464ab 100644 --- a/README-CN.md +++ b/README-CN.md @@ -167,7 +167,7 @@ DAPP架构请参考文章--[从架构维度看Web2.0与Web3.0应用之别](https 46. [NFT Floor Perps](https://www.paradigm.xyz/2021/08/floor-perps/) ⬜ 47. [TWAMM: Time-Weighted Average Market Maker](https://www.paradigm.xyz/2021/07/twamm/) ⬜ 48. [ZK Voting](basic/48-ZK-Voting) ⌛ -49. [Account Abstraction](basic/49-aa) ✅ +49. [Account Abstraction](basic/49-Account-Abstraction) ✅ 50. [solidity security](basic/50-solidity-security) ✅ 51. [sniper](https://github.com/Supercycled/cake_sniper.git) ⬜ 52. [Governace](https://github.com/withtally/safeguard) ⬜ diff --git a/README.md b/README.md index 617b027f9..5e5997c6e 100644 --- a/README.md +++ b/README.md @@ -160,7 +160,7 @@ You are welcome to PR improvements to existing tutorial projects or to create mo 46. [NFT Floor Perps](https://www.paradigm.xyz/2021/08/floor-perps/) ⬜ 47. [TWAMM: Time-Weighted Average Market Maker](https://www.paradigm.xyz/2021/07/twamm/) ⬜ 48. [ZK Voting](basic/48-ZK-Voting) ⌛ -49. [Account Abstraction](basic/49-aa) ✅ +49. [Account Abstraction](basic/49-Account-Abstraction) ✅ 50. [solidity security](basic/50-solidity-security) ✅ 51. [sniper](https://github.com/Supercycled/cake_sniper.git) ⬜ 52. [Governance](https://github.com/withtally/safeguard) ⬜ diff --git a/basic/38-alloy-rust/Cargo.lock b/basic/38-alloy-rust/Cargo.lock index 3878f5568..72b2ccfb4 100644 --- a/basic/38-alloy-rust/Cargo.lock +++ b/basic/38-alloy-rust/Cargo.lock @@ -17,18 +17,6 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -46,9 +34,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bcb4400a1939e5633939a58500c67123ef5f2e8920e5009d6949552f191be7f" +checksum = "3287a60462d933cbc753a1a87439016d4eb717401f3052ff72742c6dd0dbce3f" dependencies = [ "alloy-consensus", "alloy-contract", @@ -67,42 +55,67 @@ dependencies = [ "alloy-transport-http", "alloy-transport-ipc", "alloy-transport-ws", - "reqwest", ] [[package]] name = "alloy-chains" -version = "0.1.20" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2feb5f466b3a786d5a622d8926418bc6a0d38bf632909f6ee9298a4a1d8c6e0" +checksum = "7734aecfc58a597dde036e4c5cace2ae43e2f8bf3d406b022a1ef34da178dd49" dependencies = [ + "alloy-primitives", "num_enum", "strum", ] [[package]] name = "alloy-consensus" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cc7579e4fb5558af44810f542c90d1145dba8b92c08211c215196160c48d2ea" +checksum = "94ee204a7795e56b8e78013f5824d6ea6e4da457a4aaf6c72e4800c4d4987fce" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-serde", + "alloy-trie", + "auto_impl", "c-kzg", + "derive_more", + "either", + "k256", + "once_cell", + "rand 0.8.5", + "serde", + "serde_with", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a16df75c656be4465ab411b88c5ec6bae4931ce806834efbf375ca85b8db6f9a" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", "serde", ] [[package]] name = "alloy-contract" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "860887f0f7e1e17db33ada75c3c516164a5e11aa89f0311f4d23b82abcf2d807" +checksum = "258feff52f1e3be58b4d235ef85f5c0224905e371fb023dfbf758d5a7e027672" dependencies = [ + "alloy-consensus", "alloy-dyn-abi", "alloy-json-abi", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-provider", "alloy-pubsub", @@ -111,26 +124,27 @@ dependencies = [ "alloy-transport", "futures", "futures-util", - "thiserror", + "thiserror 2.0.12", ] [[package]] name = "alloy-core" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315" +checksum = "9d020a85ae8cf79b9c897a86d617357817bbc9a7d159dd7e6fedf1bc90f64d35" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-primitives", + "alloy-rlp", "alloy-sol-types", ] [[package]] name = "alloy-dyn-abi" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b" +checksum = "884a5d4560f7e5e34ec3c5e54a60223c56352677dd049b495fbb59384cf72a90" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -140,42 +154,84 @@ dependencies = [ "itoa", "serde", "serde_json", - "winnow 0.6.13", + "winnow 0.7.7", +] + +[[package]] +name = "alloy-eip2124" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "741bdd7499908b3aa0b159bba11e71c8cddd009a2c2eb7a06e825f1ec87900a5" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "crc", + "serde", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-eip2930" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbe3e16484669964c26ac48390245d84c410b1a5f968976076c17184725ef235" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "804cefe429015b4244966c006d25bda5545fa9db5990e9c9079faf255052f50a" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "k256", + "serde", + "thiserror 2.0.12", ] [[package]] name = "alloy-eips" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdbc8d98cc36ebe17bb5b42d0873137bc76628a4ee0f7e7acad5b8fc59d3597" +checksum = "fd8ce6197b2cc38968c80c676372f383ed46051fb8600a421b5259f3f2d13a15" dependencies = [ + "alloy-eip2124", + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", + "auto_impl", "c-kzg", "derive_more", - "once_cell", + "either", "serde", "sha2", ] [[package]] name = "alloy-genesis" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e10a047066076b32d52b3228e95a4f7793db7a204f648aa1a1ea675085bffd8" +checksum = "bc13f76f34587a9d5efd1d141dd6a596983be715922ccc488209e58dc643ec65" dependencies = [ + "alloy-eips", "alloy-primitives", "alloy-serde", + "alloy-trie", "serde", - "serde_json", ] [[package]] name = "alloy-json-abi" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef" +checksum = "5189fa9a8797e92396bc4b4454c5f2073a4945f7c2b366af9af60f9536558f7a" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -185,74 +241,106 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06d33b79246313c4103ef9596c721674a926f1ddc8b605aa2bac4d8ba94ee34" +checksum = "3593ce03c82601517eee458f67bb5dc642b9baff7016063f03a4ccbcfb52a387" dependencies = [ "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", - "thiserror", + "thiserror 2.0.12", "tracing", ] [[package]] name = "alloy-network" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef742b478a2db5c27063cde82128dfbecffcd38237d7f682a91d3ecf6aa1836c" +checksum = "36be8015a205bf2e6784b0367c0f29e87f901f5f9b80b0a9bb4e1411c65242fd" dependencies = [ "alloy-consensus", + "alloy-consensus-any", "alloy-eips", "alloy-json-rpc", + "alloy-network-primitives", "alloy-primitives", + "alloy-rpc-types-any", "alloy-rpc-types-eth", "alloy-serde", "alloy-signer", "alloy-sol-types", "async-trait", "auto_impl", + "derive_more", "futures-utils-wasm", - "thiserror", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-network-primitives" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3449fdd0908f50fb68eef8c43201d73d4ff51882b36e2adaadab277a7539ce4f" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", ] [[package]] name = "alloy-primitives" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" +checksum = "70b98b99c1dcfbe74d7f0b31433ff215e7d1555e367d90e62db904f3c9d4ff53" dependencies = [ "alloy-rlp", "bytes", "cfg-if", "const-hex", "derive_more", - "hex-literal", + "foldhash", + "hashbrown 0.15.2", + "indexmap 2.9.0", "itoa", "k256", "keccak-asm", + "paste", "proptest", - "rand", + "rand 0.9.1", "ruint", + "rustc-hash", "serde", + "sha3", "tiny-keccak", ] [[package]] name = "alloy-provider" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "200b786259a17acf318b9c423afe9669bec24ce9cdf59de153ff9a4009914bb6" +checksum = "16db7e6c225828a4540b1cce6047f06777c057df58386db9641827a2d1afb4f5" dependencies = [ "alloy-chains", "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-pubsub", "alloy-rpc-client", + "alloy-rpc-types-anvil", + "alloy-rpc-types-debug", "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", + "alloy-signer", + "alloy-sol-types", "alloy-transport", "alloy-transport-http", "alloy-transport-ipc", @@ -261,42 +349,48 @@ dependencies = [ "async-trait", "auto_impl", "dashmap", + "either", "futures", "futures-utils-wasm", "lru", + "parking_lot", "pin-project", "reqwest", "serde", "serde_json", + "thiserror 2.0.12", "tokio", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-pubsub" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47e6e6c1eab938a18a8e88d430cc9d548edf54c850a550873888285c85428eca" +checksum = "2fbf7f3b22f7d34eb9aedf637bcdc5d4f47f5e028d3f7520f6ecc7fc75a7a027" dependencies = [ "alloy-json-rpc", "alloy-primitives", "alloy-transport", "bimap", "futures", + "parking_lot", "serde", "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.2", "tracing", + "wasmtimer", ] [[package]] name = "alloy-rlp" -version = "0.3.5" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b155716bab55763c95ba212806cf43d05bcc70e5f35b02bad20cf5ec7fe11fed" +checksum = "3d6c1d995bff8d011f7cd6c81820d51825e6e06d6db73914c1630ecf544d83d6" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -305,20 +399,20 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.5" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8037e03c7f462a063f28daec9fda285a9a89da003c552f8637a80b9c8fd96241" +checksum = "a40e1ef334153322fd878d07e86af7a529bcb86b2439525920a88eba87bcf943" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] name = "alloy-rpc-client" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "328a6a14aba6152ddf6d01bac5e17a70dbe9d6f343bf402b995c30bac63a1fbf" +checksum = "821fca097f02720cd2a53e785776e265f36288f8210aa9177c9de05e2c2724c3" dependencies = [ "alloy-json-rpc", "alloy-primitives", @@ -327,6 +421,7 @@ dependencies = [ "alloy-transport-http", "alloy-transport-ipc", "alloy-transport-ws", + "async-stream", "futures", "pin-project", "reqwest", @@ -334,48 +429,89 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.2", "tracing", + "tracing-futures", "url", + "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3164e7d8a718a22ede70b2c1d2bb554a8b4bd8e56c07ab630b75c74c06c53752" +checksum = "30890a9856721a376e989283a17b2698acc3e1a612415abbca980aa4d29d7367" dependencies = [ + "alloy-primitives", + "alloy-rpc-types-anvil", "alloy-rpc-types-engine", "alloy-rpc-types-eth", + "alloy-rpc-types-trace", + "alloy-rpc-types-txpool", "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-anvil" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8702ccf7d241cb52fc6730561f7429c15158dacffe68c9127d2ab79d1657b862" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93017fb350fe2c0cccda41f9be45352012696a5fbd08c5fef4be0df838999bfa" +dependencies = [ + "alloy-consensus-any", + "alloy-rpc-types-eth", + "alloy-serde", +] + +[[package]] +name = "alloy-rpc-types-debug" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0b7976ba2e770e085389c8f9ffa81812700254c36e5cc35bca496e9491d1e3" +dependencies = [ + "alloy-primitives", + "serde", ] [[package]] name = "alloy-rpc-types-engine" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90c3de574f90d9b939e3ee666a74bea29fb1a2ae66f1569b111bb6a922b1c762" +checksum = "4f09bac3a6651e3e9e292e946a1fc393128aa1a572254e2ff641e9911f024f61" dependencies = [ "alloy-consensus", "alloy-eips", "alloy-primitives", "alloy-rlp", - "alloy-rpc-types-eth", "alloy-serde", - "jsonwebtoken", - "rand", + "derive_more", + "rand 0.8.5", "serde", - "thiserror", + "strum", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bce0676f144be1eae71122d1d417885a3b063add0353b35e46cdf1440d6b33b1" +checksum = "d9f96bc409dee49f68d70bf1303c3b34d7153e185dda75caa8b72919a28cd6ac" dependencies = [ "alloy-consensus", + "alloy-consensus-any", "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", "alloy-serde", @@ -383,7 +519,33 @@ dependencies = [ "itertools 0.13.0", "serde", "serde_json", - "thiserror", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-rpc-types-trace" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c24a733a999bbfa706d03f54332ad03697e745ed27c25bdeebac39586f184d8" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", + "serde_json", + "thiserror 2.0.12", +] + +[[package]] +name = "alloy-rpc-types-txpool" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac6d62259b6e1469042a21807d5f24002a7a0f30f69e945ded82ed6009fd1e50" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", ] [[package]] @@ -391,18 +553,20 @@ name = "alloy-rust" version = "0.1.0" dependencies = [ "alloy", + "bigdecimal", "dotenv", "env_logger", "eyre", + "futures", "log", "tokio", ] [[package]] name = "alloy-serde" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c224916316519558d8c2b6a60dc7626688c08f1b8951774702562dbcb8666ee" +checksum = "3fa2fc7f82a9884ff1632d2a2137d35fef4db9270c85668634a603be5948fcdc" dependencies = [ "alloy-primitives", "serde", @@ -411,23 +575,24 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "227c5fd0ed6e06e1ccc30593f8ff6d9fb907ac5f03a709a6d687f0943494a229" +checksum = "44eaf520bbb527ba90a3dd963aadf0c339595932169fb10f7330fe779336436e" dependencies = [ "alloy-primitives", "async-trait", "auto_impl", + "either", "elliptic-curve", "k256", - "thiserror", + "thiserror 2.0.12", ] [[package]] name = "alloy-signer-local" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66c44057ac1e8707f8c6a983db9f83ac1265c9e05be81d432acf2aad2880e1c0" +checksum = "1f8d1f2edc446b52985a5af71cdbce86e8646865b889e38410594eea97804380" dependencies = [ "alloy-consensus", "alloy-network", @@ -435,74 +600,76 @@ dependencies = [ "alloy-signer", "async-trait", "k256", - "rand", - "thiserror", + "rand 0.8.5", + "thiserror 2.0.12", ] [[package]] name = "alloy-sol-macro" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" +checksum = "60fcfa26956bcb22f66ab13407115197f26ef23abca5b48d39a1946897382d74" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" +checksum = "72a9b402f0013f1ff8c24066eeafc2207a8e52810a2b18b77776ce7fead5af41" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", - "indexmap", - "proc-macro-error", + "indexmap 2.9.0", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" +checksum = "d02d61741337bb6b3f4899c2e3173fe17ffa2810e143d3b28acd953197c8dd79" dependencies = [ "alloy-json-abi", "const-hex", "dunce", "heck", + "macro-string", "proc-macro2", "quote", "serde_json", - "syn 2.0.66", + "syn 2.0.101", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" +checksum = "d2b5f5f9f561c29f78ea521ebe2e5ac1633f1b1442dae582f68ecd57c6350042" dependencies = [ - "winnow 0.6.13", + "serde", + "winnow 0.7.7", ] [[package]] name = "alloy-sol-types" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" +checksum = "c02635bce18205ff8149fb752c753b0a91ea3f3c8ee04c58846448be4811a640" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -513,42 +680,46 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3628d81530263fe837a09cd527022f5728202a669973f04270942f4d390b5f5" +checksum = "609f69c9153df716e7e6ef002cba69f94b7635eb2c603fff69b664aa6acea93a" dependencies = [ "alloy-json-rpc", - "base64 0.22.1", - "futures-util", + "base64", + "derive_more", + "futures", "futures-utils-wasm", + "parking_lot", "serde", "serde_json", - "thiserror", + "thiserror 2.0.12", "tokio", - "tower", + "tower 0.5.2", + "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-transport-http" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f35d34e7a51503c9ff267404a5850bd58f991b7ab524b892f364901e3576376" +checksum = "c2e60987afbc49b8719578355726059579a1a197741a2adae52f860d5d7464cc" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest", "serde_json", - "tower", + "tower 0.5.2", "tracing", "url", ] [[package]] name = "alloy-transport-ipc" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7d2f106151a583f7d258fe8cc846c5196da90a9f502d4b3516c56d63e1f25a2" +checksum = "0a0cad5f19f718b83d4a52ebc12f3b691b245111e50403d2adfd46674bc73da8" dependencies = [ "alloy-json-rpc", "alloy-pubsub", @@ -557,6 +728,7 @@ dependencies = [ "futures", "interprocess", "pin-project", + "serde", "serde_json", "tokio", "tokio-util", @@ -565,9 +737,9 @@ dependencies = [ [[package]] name = "alloy-transport-ws" -version = "0.1.1" +version = "0.15.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20a80da44d3709c4ceaf47745ad820eae8f121404b9ffd8e285522ac4eb06681" +checksum = "f48cc4f88d59463992251b89381760be901c4789a4721c657b832994331aff05" dependencies = [ "alloy-pubsub", "alloy-transport", @@ -581,6 +753,37 @@ dependencies = [ "ws_stream_wasm", ] +[[package]] +name = "alloy-trie" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "983d99aa81f586cef9dae38443245e585840fcf0fc58b09aee0b1f27aed1d500" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more", + "nybbles", + "serde", + "smallvec", + "tracing", +] + +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "anstream" version = "0.6.14" @@ -630,6 +833,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dde20b3d026af13f561bdd0f15edf01fc734f0dafcedbaf42bba506a9517f223" +dependencies = [ + "derive_arbitrary", +] + [[package]] name = "ark-ff" version = "0.3.0" @@ -741,7 +953,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -751,7 +963,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" dependencies = [ "num-traits", - "rand", + "rand 0.8.5", ] [[package]] @@ -759,6 +971,9 @@ name = "arrayvec" version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +dependencies = [ + "serde", +] [[package]] name = "async-stream" @@ -779,7 +994,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -790,7 +1005,7 @@ checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -812,7 +1027,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -842,12 +1057,6 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - [[package]] name = "base64" version = "0.22.1" @@ -860,6 +1069,19 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bigdecimal" +version = "0.4.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a22f228ab7a1b23027ccc6c350b72868017af7ea8356fbdf19f8d991c690013" +dependencies = [ + "autocfg", + "libm", + "num-bigint", + "num-integer", + "num-traits", +] + [[package]] name = "bimap" version = "0.6.3" @@ -868,18 +1090,18 @@ checksum = "230c5f1ca6a325a32553f8640d31ac9b49f2411e901e427570154868b46da4f7" [[package]] name = "bit-set" -version = "0.5.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" dependencies = [ "bit-vec", ] [[package]] name = "bit-vec" -version = "0.6.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" [[package]] name = "bitflags" @@ -910,9 +1132,9 @@ dependencies = [ [[package]] name = "blst" -version = "0.3.12" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62dc83a094a71d43eeadd254b1ec2d24cb6a0bb6cadce00df51f0db594711a32" +checksum = "47c79a94619fade3c0b887670333513a67ac28a6a7e653eb260bf0d4103db38d" dependencies = [ "cc", "glob", @@ -940,24 +1162,26 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" dependencies = [ "serde", ] [[package]] name = "c-kzg" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdf100c4cea8f207e883ff91ca886d621d8a166cb04971dfaa9bb8fd99ed95df" +checksum = "4e7e3c397401eb76228c89561cf22f85f41c95aa799ee9d860de3ea1cbc728fc" dependencies = [ + "arbitrary", "blst", "cc", "glob", "hex", "libc", + "once_cell", "serde", ] @@ -976,6 +1200,19 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c469d952047f47f91b68d1cba3f10d63c11d73e4636f24f08daf0278abf01c4d" +dependencies = [ + "android-tzdata", + "iana-time-zone", + "num-traits", + "serde", + "windows-link", +] + [[package]] name = "colorchoice" version = "1.0.1" @@ -984,9 +1221,9 @@ checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" [[package]] name = "const-hex" -version = "1.12.0" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8a24a26d37e1ffd45343323dc9fe6654ceea44c12f2fcb3d7ac29e610bc6" +checksum = "4b0485bab839b018a8f1723fc5391819fea5f8f0f32288ef8a735fd096b6160c" dependencies = [ "cfg-if", "cpufeatures", @@ -1001,12 +1238,6 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - [[package]] name = "core-foundation" version = "0.9.4" @@ -1032,6 +1263,27 @@ dependencies = [ "libc", ] +[[package]] +name = "crc" +version = "3.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "69e6e4d7b33a94f0991c26729976b10ebde1d34c3ee82408fb536164fa10d636" +dependencies = [ + "crc-catalog", +] + +[[package]] +name = "crc-catalog" +version = "2.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5" + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "crunchy" version = "0.2.2" @@ -1045,7 +1297,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76" dependencies = [ "generic-array", - "rand_core", + "rand_core 0.6.4", "subtle", "zeroize", ] @@ -1060,14 +1312,50 @@ dependencies = [ "typenum", ] +[[package]] +name = "darling" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc7f46116c46ff9ab3eb1597a45688b6715c6e628b5c133e288e709a29bcb4ee" +dependencies = [ + "darling_core", + "darling_macro", +] + +[[package]] +name = "darling_core" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d00b9596d185e565c2207a0b01f8bd1a135483d02d9b7b0a54b11da8d53412e" +dependencies = [ + "fnv", + "ident_case", + "proc-macro2", + "quote", + "strsim", + "syn 2.0.101", +] + +[[package]] +name = "darling_macro" +version = "0.20.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" +dependencies = [ + "darling_core", + "quote", + "syn 2.0.101", +] + [[package]] name = "dashmap" -version = "5.5.3" +version = "6.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +checksum = "5041cc499144891f3790297212f32a74fb938e5136a14943f338ef9e0ae276cf" dependencies = [ "cfg-if", - "hashbrown", + "crossbeam-utils", + "hashbrown 0.14.5", "lock_api", "once_cell", "parking_lot_core", @@ -1096,6 +1384,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ "powerfmt", + "serde", ] [[package]] @@ -1109,17 +1398,36 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "derive_arbitrary" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + [[package]] name = "derive_more" -version = "0.99.18" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" dependencies = [ - "convert_case", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.66", + "syn 2.0.101", + "unicode-xid", ] [[package]] @@ -1151,7 +1459,7 @@ checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1182,15 +1490,19 @@ dependencies = [ "digest 0.10.7", "elliptic-curve", "rfc6979", + "serdect", "signature", "spki", ] [[package]] name = "either" -version = "1.12.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" +dependencies = [ + "serde", +] [[package]] name = "elliptic-curve" @@ -1205,8 +1517,9 @@ dependencies = [ "generic-array", "group", "pkcs8", - "rand_core", + "rand_core 0.6.4", "sec1", + "serdect", "subtle", "zeroize", ] @@ -1277,13 +1590,24 @@ dependencies = [ "bytes", ] +[[package]] +name = "fastrlp" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ce8dba4714ef14b8274c371879b175aa55b16b30f269663f19d576f380018dc4" +dependencies = [ + "arrayvec", + "auto_impl", + "bytes", +] + [[package]] name = "ff" version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ded41244b729663b1e574f1b4fb731469f69f79c17667b5d776b16cda0479449" dependencies = [ - "rand_core", + "rand_core 0.6.4", "subtle", ] @@ -1294,7 +1618,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ "byteorder", - "rand", + "rand 0.8.5", "rustc-hex", "static_assertions", ] @@ -1305,6 +1629,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1391,7 +1721,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -1448,10 +1778,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", - "js-sys", "libc", - "wasi", - "wasm-bindgen", + "wasi 0.11.0+wasi-snapshot-preview1", +] + +[[package]] +name = "getrandom" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +dependencies = [ + "cfg-if", + "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] @@ -1473,18 +1813,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63" dependencies = [ "ff", - "rand_core", + "rand_core 0.6.4", "subtle", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" dependencies = [ - "ahash", "allocator-api2", + "equivalent", + "foldhash", + "serde", ] [[package]] @@ -1508,12 +1862,6 @@ 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" version = "0.12.1" @@ -1619,11 +1967,35 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] +[[package]] +name = "iana-time-zone" +version = "0.1.63" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "icu_collections" version = "1.5.0" @@ -1739,9 +2111,15 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + [[package]] name = "idna" version = "1.0.0" @@ -1778,16 +2156,28 @@ dependencies = [ name = "indenter" version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" + +[[package]] +name = "indexmap" +version = "1.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" +dependencies = [ + "autocfg", + "hashbrown 0.12.3", + "serde", +] [[package]] name = "indexmap" -version = "2.2.6" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", - "hashbrown", + "hashbrown 0.15.2", + "serde", ] [[package]] @@ -1850,21 +2240,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "jsonwebtoken" -version = "9.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ae10193d25051e74945f1ea2d0b42e03cc3b890f7e4cc5faa44997d808193f" -dependencies = [ - "base64 0.21.7", - "js-sys", - "pem", - "ring", - "serde", - "serde_json", - "simple_asn1", -] - [[package]] name = "k256" version = "0.13.3" @@ -1875,9 +2250,19 @@ dependencies = [ "ecdsa", "elliptic-curve", "once_cell", + "serdect", "sha2", ] +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + [[package]] name = "keccak-asm" version = "0.1.1" @@ -1936,11 +2321,22 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "lru" -version = "0.12.3" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" +dependencies = [ + "hashbrown 0.15.2", +] + +[[package]] +name = "macro-string" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3262e75e648fce39813cb56ac41f3c3e3f65217ebf3844d818d1f9398cfb0dc" +checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ - "hashbrown", + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] @@ -1971,7 +2367,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" dependencies = [ "libc", - "wasi", + "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.48.0", ] @@ -2054,7 +2450,20 @@ checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", +] + +[[package]] +name = "nybbles" +version = "0.3.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8983bb634df7248924ee0c4c3a749609b5abcb082c28fffe3254b3eb3602b307" +dependencies = [ + "alloy-rlp", + "const-hex", + "proptest", + "serde", + "smallvec", ] [[package]] @@ -2068,9 +2477,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.19.0" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "openssl" @@ -2095,7 +2504,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2171,16 +2580,6 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" -[[package]] -name = "pem" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e459365e590736a54c3fa561947c84837534b8e9af6fc5bf781307e82658fae" -dependencies = [ - "base64 0.22.1", - "serde", -] - [[package]] name = "percent-encoding" version = "2.3.1" @@ -2194,7 +2593,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "560131c633294438da9f7c4b08189194b20946c8274c6b9e38881a7874dc8ee8" dependencies = [ "memchr", - "thiserror", + "thiserror 1.0.61", "ucd-trie", ] @@ -2225,7 +2624,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2289,51 +2688,49 @@ dependencies = [ ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "proc-macro-error-attr2" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" dependencies = [ - "proc-macro-error-attr", "proc-macro2", "quote", - "syn 1.0.109", - "version_check", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "proc-macro-error2" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" dependencies = [ + "proc-macro-error-attr2", "proc-macro2", "quote", - "version_check", + "syn 2.0.101", ] [[package]] name = "proc-macro2" -version = "1.0.85" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.4.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ "bit-set", "bit-vec", "bitflags", "lazy_static", "num-traits", - "rand", - "rand_chacha", + "rand 0.8.5", + "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax", "rusty-fork", @@ -2356,6 +2753,12 @@ dependencies = [ "proc-macro2", ] +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + [[package]] name = "radium" version = "0.7.0" @@ -2369,8 +2772,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" dependencies = [ "libc", - "rand_chacha", - "rand_core", + "rand_chacha 0.3.1", + "rand_core 0.6.4", + "serde", +] + +[[package]] +name = "rand" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" +dependencies = [ + "rand_chacha 0.9.0", + "rand_core 0.9.3", + "serde", ] [[package]] @@ -2380,7 +2795,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_chacha" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" +dependencies = [ + "ppv-lite86", + "rand_core 0.9.3", ] [[package]] @@ -2389,7 +2814,17 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom", + "getrandom 0.2.15", +] + +[[package]] +name = "rand_core" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" +dependencies = [ + "getrandom 0.3.2", + "serde", ] [[package]] @@ -2398,7 +2833,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" dependencies = [ - "rand_core", + "rand_core 0.6.4", ] [[package]] @@ -2451,7 +2886,7 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c7d6d2a27d57148378eb5e111173f4276ad26340ecc5c49a4a2152167a2d6a37" dependencies = [ - "base64 0.22.1", + "base64", "bytes", "futures-core", "futures-util", @@ -2502,7 +2937,7 @@ checksum = "70ac5d832aa16abd7d1def883a8545280c20a60f523a370aa3a9617c2b8550ee" dependencies = [ "cc", "cfg-if", - "getrandom", + "getrandom 0.2.15", "libc", "untrusted", "windows-sys 0.52.0", @@ -2520,21 +2955,24 @@ dependencies = [ [[package]] name = "ruint" -version = "1.12.3" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c3cc4c2511671f327125da14133d0c5c5d137f006a1017a16f557bc85b16286" +checksum = "78a46eb779843b2c4f21fac5773e25d6d5b7c8f0922876c91541790d2ca27eef" dependencies = [ "alloy-rlp", "ark-ff 0.3.0", "ark-ff 0.4.2", "bytes", - "fastrlp", + "fastrlp 0.3.1", + "fastrlp 0.4.0", "num-bigint", + "num-integer", "num-traits", "parity-scale-codec", "primitive-types", "proptest", - "rand", + "rand 0.8.5", + "rand 0.9.1", "rlp", "ruint-macro", "serde", @@ -2554,6 +2992,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -2611,7 +3055,7 @@ version = "2.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "29993a25686778eb88d4189742cd713c9bce943bc54251a33509dc63cbacf73d" dependencies = [ - "base64 0.22.1", + "base64", "rustls-pki-types", ] @@ -2681,6 +3125,7 @@ dependencies = [ "der", "generic-array", "pkcs8", + "serdect", "subtle", "zeroize", ] @@ -2755,7 +3200,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2781,6 +3226,46 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_with" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" +dependencies = [ + "base64", + "chrono", + "hex", + "indexmap 1.9.3", + "indexmap 2.9.0", + "serde", + "serde_derive", + "serde_json", + "serde_with_macros", + "time", +] + +[[package]] +name = "serde_with_macros" +version = "3.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "serdect" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" +dependencies = [ + "base16ct", + "serde", +] + [[package]] name = "sha1" version = "0.10.6" @@ -2803,6 +3288,16 @@ dependencies = [ "digest 0.10.7", ] +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + [[package]] name = "sha3-asm" version = "0.1.1" @@ -2835,19 +3330,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ "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", + "rand_core 0.6.4", ] [[package]] @@ -2864,6 +3347,9 @@ name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +dependencies = [ + "serde", +] [[package]] name = "socket2" @@ -2897,26 +3383,32 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d8cec3501a5194c432b2b7976db6b7d10ec95c253208b45f83f7136aa985e29" +checksum = "f64def088c51c9510a8579e3c5d67c65349dcf755e5479ad3d010aa6454e2c32" dependencies = [ "strum_macros", ] [[package]] name = "strum_macros" -version = "0.26.4" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c6bee85a5a24955dc440386795aa378cd9cf82acd5f764469152d2270e581be" +checksum = "c77a8c5abcaf0f9ce05d62342b7d298c346515365c36b673df4ebe3ced01fde8" dependencies = [ "heck", "proc-macro2", "quote", "rustversion", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2938,9 +3430,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.66" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -2949,14 +3441,14 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" +checksum = "34c9c96de1f835488c1501092847b522be88c9ac6fb0d4c0fbea92992324c8f4" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -2973,7 +3465,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3000,7 +3492,16 @@ version = "1.0.61" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" dependencies = [ - "thiserror-impl", + "thiserror-impl 1.0.61", +] + +[[package]] +name = "thiserror" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +dependencies = [ + "thiserror-impl 2.0.12", ] [[package]] @@ -3011,7 +3512,18 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", +] + +[[package]] +name = "thiserror-impl" +version = "2.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", ] [[package]] @@ -3100,7 +3612,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3138,9 +3650,9 @@ dependencies = [ [[package]] name = "tokio-tungstenite" -version = "0.23.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6989540ced10490aaf14e6bad2e3d33728a2813310a0c71d1574304c49631cd" +checksum = "7a9daff607c6d2bf6c16fd681ccb7eecc83e4e2cdc1ca067ffaadfca5de7f084" dependencies = [ "futures-util", "log", @@ -3177,7 +3689,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap", + "indexmap 2.9.0", "toml_datetime", "winnow 0.5.40", ] @@ -3195,20 +3707,33 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tower-layer", + "tower-service", ] [[package]] name = "tower-layer" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -3216,7 +3741,6 @@ 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", @@ -3230,7 +3754,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3242,6 +3766,18 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tracing-futures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" +dependencies = [ + "futures", + "futures-task", + "pin-project", + "tracing", +] + [[package]] name = "try-lock" version = "0.2.5" @@ -3250,21 +3786,20 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "tungstenite" -version = "0.23.0" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e2ce1e47ed2994fd43b04c8f618008d4cabdd5ee34027cf14f9d918edd9c8" +checksum = "4793cb5e56680ecbb1d843515b23b6de9a75eb04b66643e256a396d43be33c13" dependencies = [ - "byteorder", "bytes", "data-encoding", "http", "httparse", "log", - "rand", + "rand 0.9.1", "rustls", "rustls-pki-types", "sha1", - "thiserror", + "thiserror 2.0.12", "utf-8", ] @@ -3304,6 +3839,12 @@ version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "untrusted" version = "0.9.0" @@ -3387,6 +3928,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.92" @@ -3408,7 +3958,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -3442,7 +3992,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3453,6 +4003,20 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +[[package]] +name = "wasmtimer" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0048ad49a55b9deb3953841fa1fc5858f0efbcb7a18868c899a360269fac1b23" +dependencies = [ + "futures", + "js-sys", + "parking_lot", + "pin-utils", + "slab", + "wasm-bindgen", +] + [[package]] name = "web-sys" version = "0.3.69" @@ -3478,6 +4042,65 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7219d36b6eac893fa81e84ebe06485e7dcbb616177469b142df14f1f4deb1311" +[[package]] +name = "windows-core" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +dependencies = [ + "windows-implement", + "windows-interface", + "windows-link", + "windows-result", + "windows-strings", +] + +[[package]] +name = "windows-implement" +version = "0.60.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "windows-interface" +version = "0.59.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.101", +] + +[[package]] +name = "windows-link" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" + +[[package]] +name = "windows-result" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +dependencies = [ + "windows-link", +] + +[[package]] +name = "windows-strings" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +dependencies = [ + "windows-link", +] + [[package]] name = "windows-sys" version = "0.48.0" @@ -3628,9 +4251,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.6.13" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59b5e5f6c299a3c7890b876a2a587f3115162487e704907d9b6cd29473052ba1" +checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" dependencies = [ "memchr", ] @@ -3645,6 +4268,15 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags", +] + [[package]] name = "write16" version = "1.0.0" @@ -3670,7 +4302,7 @@ dependencies = [ "pharos", "rustc_version 0.4.0", "send_wrapper", - "thiserror", + "thiserror 1.0.61", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", @@ -3705,30 +4337,10 @@ checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "synstructure", ] -[[package]] -name = "zerocopy" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.66", -] - [[package]] name = "zerofrom" version = "0.1.4" @@ -3746,7 +4358,7 @@ checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", "synstructure", ] @@ -3767,7 +4379,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] [[package]] @@ -3789,5 +4401,5 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.66", + "syn 2.0.101", ] diff --git a/basic/38-alloy-rust/Cargo.toml b/basic/38-alloy-rust/Cargo.toml index 9a2fc5946..0616c43f8 100644 --- a/basic/38-alloy-rust/Cargo.toml +++ b/basic/38-alloy-rust/Cargo.toml @@ -3,10 +3,20 @@ name = "alloy-rust" version = "0.1.0" edition = "2021" + +[[bin]] +name = "monitor" +path = "src/monitor.rs" + [dependencies] -alloy = { version = "0.1.1", features = ["full"] } +alloy = { version = "0.15", features = ["full"] } tokio = { version = "1.38.2", features = ["full"] } dotenv = "0.15" log = "0.4.21" env_logger = "0.11.3" eyre = "0.6.12" +bigdecimal = "0.4" +futures = "0.3" + + + diff --git a/basic/38-alloy-rust/readme.md b/basic/38-alloy-rust/readme.md index f84ba367a..cef2a81fb 100644 --- a/basic/38-alloy-rust/readme.md +++ b/basic/38-alloy-rust/readme.md @@ -2,6 +2,10 @@ 本文旨在介绍如何使用 Rust SDK([alloy-rs](https://github.com/alloy-rs/alloy)) 与链上合约进行交互,进而开发 DApp。 +参考文档:https://alloy.rs/examples/advanced/README + +更多demo: https://github.com/alloy-rs/examples/tree/main/examples + ## 1. 配置`.env`文件 在`.env`文件中添加必要的配置,包括且不限于: @@ -85,6 +89,7 @@ ``` 8. 启动本地节点 + ```shell anvil ``` @@ -92,5 +97,11 @@ 9. 运行项目 ```rust -cargo run src/main.rs -``` \ No newline at end of file +cargo run --bin alloy-rust +cargo run --bin main +``` + +## 3. Build a fast MEV bot with Alloy's Primitive Types + +todo +https://alloy.rs/guides/speed-up-using-u256 diff --git a/basic/38-alloy-rust/src/main.rs b/basic/38-alloy-rust/src/main.rs index 22020bf8e..406df5c8b 100644 --- a/basic/38-alloy-rust/src/main.rs +++ b/basic/38-alloy-rust/src/main.rs @@ -1,7 +1,21 @@ use std::env; use alloy::{providers::ProviderBuilder, sol}; use alloy::network::EthereumWallet; -use alloy::primitives::{U256}; +// use alloy::primitives::{U256, address, utils::{format_ether, Unit}}; +use bigdecimal::{ + num_bigint::{BigInt, Sign}, + BigDecimal, +}; + +use alloy::{ + primitives::{ + address, + utils::{format_ether, Unit}, + U256, + }, + rpc::types::TransactionRequest +}; + use alloy::providers::Provider; use alloy::signers::local::{PrivateKeySigner}; use dotenv::dotenv; @@ -20,27 +34,63 @@ async fn main() -> Result<(), Box> { dotenv().ok(); env_logger::init(); - let rpc_url = env::var("RPC_LOCAL")?.parse()?; + let rpc_url = env::var("RPC_LOCAL")?; let private_key = env::var("DEV_PRIVATE_KEY")?; let signer: PrivateKeySigner = private_key.parse().expect("Failed to parse private key"); let address = signer.address(); info!("Using address: {}", address); - let wallet = EthereumWallet::from(signer); let provider = - ProviderBuilder::new().with_recommended_fillers().wallet(wallet).on_http(rpc_url); + ProviderBuilder::new().wallet(signer).connect(rpc_url.as_str()).await?; + let chain_id = provider.get_chain_id().await?; info!("Connected to chain {}", chain_id); // let erc20_contract = SimpleToken::new("0xapple".parse()?, provider); - let erc20_contract = SimpleToken::deploy(provider).await?; + let erc20_contract = SimpleToken::deploy(provider.clone()).await?; + + // transfer token let amount = U256::from(100u64); let receipt = erc20_contract.transfer(address, amount).send().await?.get_receipt().await?; assert!(receipt.status()); info!("Transfer successful"); + let balance = erc20_contract.balanceOf(address).call().await?; + + + // println!("Balance: {:.3}", format_ether(balance)); + println!("Balance: {:?}", balance); + + + // send ether + + let alice = address!("0x70997970C51812dc3A010C7d01b50e0d17dc79C8"); + let value = Unit::ETHER.wei().saturating_mul(U256::from(100)); + let tx = TransactionRequest::default().to(alice).value(value); + + let pending_tx = provider.clone().send_transaction(tx).await?; + println!("Pending transaction... {}", pending_tx.tx_hash()); + + // Wait for the transaction to be included and get the receipt. + let receipt = pending_tx.get_receipt().await?; + println!( + "Transaction included in block {}", + receipt.block_number.expect("Failed to get block number") + ); + + println!("Transferred {:.5} ETH to {alice}", format_ether(value)); + Ok(()) -} \ No newline at end of file +} + + + +// pub fn get_balance(amount: U256) -> BigDecimal { +// BigDecimal::from(( +// BigInt::from_bytes_be(Sign::Plus, &amount.to_be_bytes::<{ U256::BYTES }>()), +// 18, +// )) +// } \ No newline at end of file diff --git a/basic/38-alloy-rust/src/monitor.rs b/basic/38-alloy-rust/src/monitor.rs new file mode 100644 index 000000000..eaab7ae0d --- /dev/null +++ b/basic/38-alloy-rust/src/monitor.rs @@ -0,0 +1,67 @@ +use alloy::{ + primitives::{address, utils::{format_ether, Unit}, U256, Address }, + providers::{Provider, ProviderBuilder, WsConnect}, + signers::local::PrivateKeySigner, + sol +}; +use std::error::Error; +use futures::StreamExt; +use dotenv::dotenv; + +use std::env; + +// Generate bindings for the WETH9 contract +sol! { + #[sol(rpc)] + contract WETH9 { + function deposit() public payable; + function balanceOf(address) public view returns (uint256); + function withdraw(uint amount) public; + } +} + + + +#[tokio::main] +async fn main() -> Result<(), Box> { + + dotenv().ok(); + // Connect to an Ethereum node via WebSocket + let provider = ProviderBuilder::new() + .connect_ws(WsConnect::new("wss://eth.drpc.org")) + .await?; + + // Uniswap V3 ETH-USDC Pool address + let uniswap_pool = "0x8ad599c3A0ff1De082011EFDDc58f1908eb6e6D8".parse::
()?; + + // Subscribe to new blocks + let mut block_stream = provider.subscribe_blocks().await?.into_stream(); + println!("🔄 Monitoring for new blocks..."); + + + + // weth load + let private_key = env::var("DEV_PRIVATE_KEY")?; + let signer: PrivateKeySigner = private_key.parse().expect("Failed to parse private key"); + let weth_address = address!("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"); + let weth = WETH9::new(weth_address, provider.clone()); + + let erc20_contract = WETH9::new("0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2".parse()?, provider); + + // Process each new block as it arrives + while let Some(block) = block_stream.next().await { + println!("🧱 Block #{}: {}", block.number, block.hash); + + // Get contract balance at this block + // let balance = provider + // .get_balance(uniswap_pool) + // .block_id(block.number.into()) + // .await?; + + let balance = erc20_contract.balanceOf(uniswap_pool).call().await?; + // Format the balance in ETH + println!("💰 Uniswap V3 ETH-USDC Pool balance: {} ETH", format_ether(balance)); + } + + Ok(()) +} \ No newline at end of file diff --git a/basic/43-EVM/EVM.md b/basic/43-EVM/EVM.md index 16e64cef1..d32cdeea2 100644 --- a/basic/43-EVM/EVM.md +++ b/basic/43-EVM/EVM.md @@ -96,6 +96,34 @@ Openzeppelin blog 的系列文章,非常棒的科普文。学习笔记参见 : https://ethereum.org/zh/developers/tutorials/downsizing-contracts-to-fight-the-contract-size-limit +## EOF(EVM OBJECT FORMAT) + +EOF通过EIPs引入了新的验证和操作码,旨在构建更友好的EVM。EOF的特性包括改进的代码结构、静态分析、更大的堆栈空间、代码验证、JUMPDEST分析、新的合约创建方式和改进的CALL指令,从而提高了开发者的体验和合约性能。 + +EOF 由一系列 EIP 组成: + +EIP-3540: EOF — EVM Object Format v1(EOF — EVM 对象格式 v1) +EIP-3670: EOF — Code Validation(EOF — 代码验证) +EIP-4200: EOF — Static relative jumps(EOF — 静态相对跳转) +EIP-4750: EOF — Functions(EOF — 函数) +EIP-5450: EOF — Stack Validation(EOF — 堆栈验证) +EIP-663: SWAPN, DUPN and EXCHANGE instructions(SWAPN、DUPN 和 EXCHANGE 指令) +EIP-6206: EOF — JUMPF and non-returning functions(EOF — JUMPF 和非返回函数) +EIP-7069: Revamped CALL instructions(改进的 CALL 指令) +EIP-7480: EOF — Data section access instructions(EOF — 数据段访问指令) +EIP-7620: EOF Contract Creation(EOF 合约创建) +EIP-7698: EOF — Creation transaction(EOF — 创建交易) + +这 11 个 EIP 背后的想法是构建一个对开发者更友好的 EVM,具有新的验证和操作码,所有这些 EIP 都计划包含在 Pectra 升级中,我们已经可以在 Ethereum Sepolia、Holesky 和最新的 Hoodi 测试网(3 月 19 日发布)中测试其中的一些功能。 + + +### Legacy EVM vs EOF EVM +当前的 EVM 或 Legacy EVM 没有结构,部署在其中的智能合约只是一组按顺序运行的操作码 +EOF EIP 3540: EOF — EVM Object Format v1,为 EVM 字节码引入了一种容器格式 +包含Header + Code + Data + +![EOF](image.png) + ## 参考链接 - [evm_illustrated-EVM图解](https://takenobu-hs.github.io/downloads/ethereum_evm_illustrated.pdf) - EVM 详解: https://learnblockchain.cn/2019/04/09/easy-evm diff --git a/basic/43-EVM/image.png b/basic/43-EVM/image.png new file mode 100644 index 000000000..5343d16bd Binary files /dev/null and b/basic/43-EVM/image.png differ diff --git a/basic/49-aa/.gitignore b/basic/49-Account-Abstraction/.gitignore similarity index 100% rename from basic/49-aa/.gitignore rename to basic/49-Account-Abstraction/.gitignore diff --git a/basic/49-aa/7702.md b/basic/49-Account-Abstraction/7702.md similarity index 100% rename from basic/49-aa/7702.md rename to basic/49-Account-Abstraction/7702.md diff --git a/basic/49-aa/README.md b/basic/49-Account-Abstraction/README.md similarity index 93% rename from basic/49-aa/README.md rename to basic/49-Account-Abstraction/README.md index 634715d00..f0cce629e 100644 --- a/basic/49-aa/README.md +++ b/basic/49-Account-Abstraction/README.md @@ -42,6 +42,8 @@ yarn hardhat run scripts/paymaster.js ## TODO 4337 7702 + https://github.com/quiknode-labs/qn-guide-examples/blob/main/ethereum/eip-7702/src/BatchCallAndSponsor.sol + 7579 ## 文档 - eip-4337文档:4337的规范。https://eips.ethereum.org/EIPS/eip-4337 diff --git a/basic/49-aa/demowallet/.gitignore b/basic/49-Account-Abstraction/demowallet/.gitignore similarity index 100% rename from basic/49-aa/demowallet/.gitignore rename to basic/49-Account-Abstraction/demowallet/.gitignore diff --git a/basic/49-aa/demowallet/README.md b/basic/49-Account-Abstraction/demowallet/README.md similarity index 64% rename from basic/49-aa/demowallet/README.md rename to basic/49-Account-Abstraction/demowallet/README.md index e9dd5f348..7066a7a66 100644 --- a/basic/49-aa/demowallet/README.md +++ b/basic/49-Account-Abstraction/demowallet/README.md @@ -9,5 +9,8 @@ npx hardhat help npx hardhat test REPORT_GAS=true npx hardhat test npx hardhat node -npx hardhat run scripts/deploy.js + + npx hardhat run scripts/7702/scripts/deployBatchCallDelegation.js --network sepolia + + npx hardhat run scripts/7702/scripts/executeBatchCallDelegation.js --network sepolia ``` diff --git a/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallAndSponsor.sol b/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallAndSponsor.sol new file mode 100644 index 000000000..fc5b8e911 --- /dev/null +++ b/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallAndSponsor.sol @@ -0,0 +1,104 @@ +// SPDX-License-Identifier: MIT +pragma solidity ^0.8.20; + +import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; +import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; + +/** + * @title BatchCallAndSponsor + * @notice An educational contract that allows batch execution of calls with nonce and signature verification. + * + * When an EOA upgrades via EIP‑7702, it delegates to this implementation. + * Off‑chain, the account signs a message authorizing a batch of calls. The message is the hash of: + * keccak256(abi.encodePacked(nonce, calls)) + * The signature must be generated with the EOA’s private key so that, once upgraded, the recovered signer equals the account’s own address (i.e. address(this)). + * + * This contract provides two ways to execute a batch: + * 1. With a signature: Any sponsor can submit the batch if it carries a valid signature. + * 2. Directly by the smart account: When the account itself (i.e. address(this)) calls the function, no signature is required. + * + * Replay protection is achieved by using a nonce that is included in the signed message. + */ +contract BatchCallAndSponsor { + using ECDSA for bytes32; + + /// @notice A nonce used for replay protection. + uint256 public nonce; + + /// @notice Represents a single call within a batch. + struct Call { + address to; + uint256 value; + bytes data; + } + + /// @notice Emitted for every individual call executed. + event CallExecuted(address indexed sender, address indexed to, uint256 value, bytes data); + /// @notice Emitted when a full batch is executed. + event BatchExecuted(uint256 indexed nonce, Call[] calls); + + /** + * @notice Executes a batch of calls using an off–chain signature. + * @param calls An array of Call structs containing destination, ETH value, and calldata. + * @param signature The ECDSA signature over the current nonce and the call data. + * + * The signature must be produced off–chain by signing: + * The signing key should be the account’s key (which becomes the smart account’s own identity after upgrade). + */ + function execute(Call[] calldata calls, bytes calldata signature) external payable { + // Compute the digest that the account was expected to sign. + bytes memory encodedCalls; + for (uint256 i = 0; i < calls.length; i++) { + encodedCalls = abi.encodePacked(encodedCalls, calls[i].to, calls[i].value, calls[i].data); + } + bytes32 digest = keccak256(abi.encodePacked(nonce, encodedCalls)); + + bytes32 ethSignedMessageHash = MessageHashUtils.toEthSignedMessageHash(digest); + + // Recover the signer from the provided signature. + address recovered = ECDSA.recover(ethSignedMessageHash, signature); + require(recovered == address(this), "Invalid signature"); + + _executeBatch(calls); + } + + /** + * @notice Executes a batch of calls directly. + * @dev This function is intended for use when the smart account itself (i.e. address(this)) + * calls the contract. It checks that msg.sender is the contract itself. + * @param calls An array of Call structs containing destination, ETH value, and calldata. + */ + function execute(Call[] calldata calls) external payable { + require(msg.sender == address(this), "Invalid authority"); + _executeBatch(calls); + } + + /** + * @dev Internal function that handles batch execution and nonce incrementation. + * @param calls An array of Call structs. + */ + function _executeBatch(Call[] calldata calls) internal { + uint256 currentNonce = nonce; + nonce++; // Increment nonce to protect against replay attacks + + for (uint256 i = 0; i < calls.length; i++) { + _executeCall(calls[i]); + } + + emit BatchExecuted(currentNonce, calls); + } + + /** + * @dev Internal function to execute a single call. + * @param callItem The Call struct containing destination, value, and calldata. + */ + function _executeCall(Call calldata callItem) internal { + (bool success,) = callItem.to.call{value: callItem.value}(callItem.data); + require(success, "Call reverted"); + emit CallExecuted(msg.sender, callItem.to, callItem.value, callItem.data); + } + + // Allow the contract to receive ETH (e.g. from DEX swaps or other transfers). + fallback() external payable {} + receive() external payable {} +} \ No newline at end of file diff --git a/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallDedegation.sol b/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallDedegation.sol new file mode 100644 index 000000000..eb75d5218 --- /dev/null +++ b/basic/49-Account-Abstraction/demowallet/contracts/7702/BatchCallDedegation.sol @@ -0,0 +1,22 @@ +pragma solidity ^0.8.20; + +contract BatchCallDelegation { + event CallExecuted(address indexed to, uint256 indexed value, bytes data, bool success); + + struct Call { + + address to; + uint256 value; + bytes data; + } + + function execute(Call[] calldata calls) external payable { + require(msg.sender == address(this), "Only the contract owner can execute the calls"); + for (uint256 i = 0; i < calls.length; i++) { + Call memory call = calls[i]; + (bool success, ) = call.to.call{value: call.value}(call.data); + require(success, "call reverted"); + emit CallExecuted(call.to, call.value, call.data, success); + } + } +} \ No newline at end of file diff --git a/basic/49-aa/demowallet/contracts/DemoAccount.sol b/basic/49-Account-Abstraction/demowallet/contracts/DemoAccount.sol similarity index 94% rename from basic/49-aa/demowallet/contracts/DemoAccount.sol rename to basic/49-Account-Abstraction/demowallet/contracts/DemoAccount.sol index 6ad678e64..22c4f4efd 100644 --- a/basic/49-aa/demowallet/contracts/DemoAccount.sol +++ b/basic/49-Account-Abstraction/demowallet/contracts/DemoAccount.sol @@ -4,6 +4,7 @@ import "@account-abstraction/contracts/interfaces/IAccount.sol"; import "@account-abstraction/contracts/interfaces/UserOperation.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; +import "@openzeppelin/contracts/utils/cryptography/MessageHashUtils.sol"; contract DemoAccount is Ownable, IAccount{ @@ -17,8 +18,7 @@ contract DemoAccount is Ownable, IAccount{ mapping(address=>bool) public signers; - constructor(address payable _entryPoint, uint8 _threshold, address _owner, address[] memory _signers) { - _transferOwnership(_owner); + constructor(address payable _entryPoint, uint8 _threshold, address _owner, address[] memory _signers) Ownable(_owner) { entryPoint = _entryPoint; threshold = _threshold; for (uint256 i=0; i<_signers.length;i++){ @@ -42,7 +42,7 @@ contract DemoAccount is Ownable, IAccount{ if (signatures.length < 85*uint256(threshold)) { return SIG_VALIDATION_FAILED; } - bytes32 ethHash = requestId.toEthSignedMessageHash(); + bytes32 ethHash = MessageHashUtils.toEthSignedMessageHash(requestId); for (uint256 i=0;i { + // Initialize wallet instance with private key and provider + // const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, ethers.provider); + const [deployer] = await ethers.getSigners(); + + console.log('Deploying contracts with the account:', deployer.address); + + // Get contract factory for BatchCallDelegation smart contract + const BatchCallDelegation = await ethers.getContractFactory("BatchCallAndSponsor", deployer); + + // Deploy BatchCallDelegation contract + console.log("Deploying BatchCallDelegation contract..."); + const batchCallDelegation = await BatchCallDelegation.deploy(); + + // Wait until the contract is fully deployed on the blockchain + await batchCallDelegation.waitForDeployment(); + + const contractAddress = batchCallDelegation.target; + console.log("BatchCallDelegation deployed to:", contractAddress); + + // Create deployment info object + const deploymentInfo = { + contractAddress: contractAddress, + deploymentTime: new Date().toISOString(), + network: network.name, + deployer: deployer.address + }; + + // Ensure the deployments directory exists + const deploymentDir = path.join(__dirname, '../deployments'); + if (!fs.existsSync(deploymentDir)){ + fs.mkdirSync(deploymentDir, { recursive: true }); + } + + // Save deployment info to JSON file + const deploymentPath = path.join(deploymentDir, `${network.name}.json`); + fs.writeFileSync( + deploymentPath, + JSON.stringify(deploymentInfo, null, 2) + ); + console.log(`Deployment info saved to ${deploymentPath}`); +} + +main().then(() => { + console.log('Deployment completed'); + process.exit(0); +}).catch((error) => { + console.error(error); + process.exit(1); +}); \ No newline at end of file diff --git a/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation-signer.js b/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation-signer.js new file mode 100644 index 000000000..991e8f65f --- /dev/null +++ b/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation-signer.js @@ -0,0 +1,150 @@ +const { ethers } = require('hardhat'); +const fs = require('fs'); +const path = require('path'); + +const main = async () => { + const [deployer] = await ethers.getSigners(); + + // Read deployment info from JSON file + const deploymentPath = path.join(__dirname, '../deployments', `${network.name}.json`); + if (!fs.existsSync(deploymentPath)) { + throw new Error(`Deployment file not found for network: ${network.name}`); + } + + const deploymentInfo = JSON.parse(fs.readFileSync(deploymentPath, 'utf8')); + const BATCH_CALL_DELEGATION_ADDRESS = deploymentInfo.contractAddress; + + console.log(`Using BatchCallDelegation at: ${BATCH_CALL_DELEGATION_ADDRESS}`); + + // Define contract interface with execute function signature + const batchInterface = new ethers.Interface([ + "function execute(tuple(bytes data, address to, uint256 value)[] calls)" + ]); + + // Define sample transaction parameters for batch execution + const calls = [ + { + data: "0x", + to: "0x84286648B8252bee9BB4F56A1025913C12537E86", + value: ethers.parseEther("0.001") + } + ]; + + // Encode the execute function call with parameters + const calldata = batchInterface.encodeFunctionData("execute", [calls]); + + console.log('Calldata:', calldata); + + const currentNonce = await ethers.provider.getTransactionCount(deployer.address); + + console.log('Current nonce:', currentNonce); + + const authorizationData = { + chainId: '0xaa36a7', + address: BATCH_CALL_DELEGATION_ADDRESS, + nonce: ethers.toBeHex(currentNonce + 1), + } + + // Encode authorization data according to EIP-712 standard + const encodedAuthorizationData = ethers.concat([ + '0x05', // MAGIC code for EIP7702 + ethers.encodeRlp([ + authorizationData.chainId, + authorizationData.address, + authorizationData.nonce, + ]) + ]); + + // Generate and sign authorization data hash + const authorizationDataHash = ethers.keccak256(encodedAuthorizationData); + console.log('Authorization data hash:', authorizationDataHash); + const authorizationSignature = await deployer.signMessage(ethers.getBytes(authorizationDataHash)); + // const authorizationSignature = await deployer.signMessage((authorizationDataHash)); + console.log('Authorization signature:', authorizationSignature); + + + const { v, r, s } = ethers.Signature.from(authorizationSignature); + + console.log('V:', v); + + // Store signature components + let yParity = v === 27 ? '0x' : '0x01'; + authorizationData.r = r; + authorizationData.s = s; + + + // Get current gas fee data from the network + const feeData = await ethers.provider.getFeeData(); + + console.log('Fee data:', feeData); + + // Prepare complete transaction data structure + const txData = [ + authorizationData.chainId, + ethers.toBeHex(currentNonce), + ethers.toBeHex(feeData.maxPriorityFeePerGas), // Priority fee (tip) + ethers.toBeHex(feeData.maxFeePerGas), // Maximum total fee willing to pay + ethers.toBeHex(1000000), // Gas limit + deployer.address, // Sender address + '0x', // Value (in addition to batch transfers) + calldata, // Encoded function call + [], // Access list (empty for this transaction) + [ + [ + authorizationData.chainId, + authorizationData.address, + authorizationData.nonce, + yParity, + authorizationData.r, + authorizationData.s + ] + ] + ]; + + console.log('Tx data:', txData); + + // Encode final transaction data with version prefix + const encodedTxData = ethers.concat([ + '0x04', // Transaction type identifier + ethers.encodeRlp(txData) + ]); + + console.log('Tx data:', encodedTxData); + + // Sign the complete transaction + const txDataHash = ethers.keccak256(encodedTxData); + + console.log('Tx data hash:', txDataHash); + let txSignature = await deployer.signMessage(ethers.getBytes(txDataHash)); + + console.log('Tx signature:', txSignature); + + + txSignature = ethers.Signature.from(txSignature); + yParity = txSignature.v === 27 ? '0x' : '0x01'; + console.log('yParity:', yParity); + + // Construct the fully signed transaction + const signedTx = ethers.hexlify(ethers.concat([ + '0x04', + ethers.encodeRlp([ + ...txData, + yParity , + txSignature.r, + txSignature.s + ]) + ])); + + // Send the raw transaction to the network +// const tx = await ethers.provider.send('eth_sendRawTransaction', [signedTx]); + + console.log('tx sent: ', tx); +} + +main().then(() => { + console.log('Execution completed'); + process.exit(0); +}).catch((error) => { + console.error(error); + process.exit(1); +}); \ No newline at end of file diff --git a/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation.js b/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation.js new file mode 100644 index 000000000..15cec36ef --- /dev/null +++ b/basic/49-Account-Abstraction/demowallet/scripts/7702/scripts/executeBatchCallDelegation.js @@ -0,0 +1,129 @@ +const { ethers } = require('hardhat'); +const fs = require('fs'); +const path = require('path'); + +const main = async () => { + const wallet = new ethers.Wallet(process.env.PRIVATE_KEY, ethers.provider); + + // Read deployment info from JSON file + const deploymentPath = path.join(__dirname, '../deployments', `${network.name}.json`); + if (!fs.existsSync(deploymentPath)) { + throw new Error(`Deployment file not found for network: ${network.name}`); + } + + const deploymentInfo = JSON.parse(fs.readFileSync(deploymentPath, 'utf8')); + const BATCH_CALL_DELEGATION_ADDRESS = deploymentInfo.contractAddress; + + console.log(`Using BatchCallAndSponsorat: ${BATCH_CALL_DELEGATION_ADDRESS}`); + + // Define contract interface with execute function signature + const batchInterface = new ethers.Interface([ + "function execute(tuple(address to, uint256 value, bytes data)[] calls)" + ]); + + // Define sample transaction parameters for batch execution + const calls = [ + { + to: "0x84286648B8252bee9BB4F56A1025913C12537E86", + value: ethers.parseEther("0.001"), + data: "0x", + }, + { + to: "0xE9e4e7ee5187f8B6EDeB96c31De32A8594A97A53", + value: 0, + data: "0xa9059cbb000000000000000000000000ec22b01a5b7f05a4ffae86a1864176f86b05aa3c000000000000000000000000000000000000000000000000000000e8d4a51000", + + + } + ]; + + // Encode the execute function call with parameters + const calldata = batchInterface.encodeFunctionData("execute", [calls]); + + const currentNonce = await ethers.provider.getTransactionCount(wallet.address); + + const authorizationData = { + chainId: '0xaa36a7', + address: BATCH_CALL_DELEGATION_ADDRESS, + nonce: ethers.toBeHex(currentNonce + 1), + } + + // Encode authorization data according to EIP-712 standard + const encodedAuthorizationData = ethers.concat([ + '0x05', // MAGIC code for EIP7702 + ethers.encodeRlp([ + authorizationData.chainId, + authorizationData.address, + authorizationData.nonce, + ]) + ]); + + // Generate and sign authorization data hash + const authorizationDataHash = ethers.keccak256(encodedAuthorizationData); + const authorizationSignature = wallet.signingKey.sign(authorizationDataHash); + + // Store signature components + authorizationData.yParity = authorizationSignature.yParity == 0 ? '0x' : '0x01'; + authorizationData.r = authorizationSignature.r; + authorizationData.s = authorizationSignature.s; + + // Get current gas fee data from the network + const feeData = await ethers.provider.getFeeData(); + + // Prepare complete transaction data structure + const txData = [ + authorizationData.chainId, + ethers.toBeHex(currentNonce), + ethers.toBeHex(feeData.maxPriorityFeePerGas), // Priority fee (tip) + ethers.toBeHex(feeData.maxFeePerGas), // Maximum total fee willing to pay + ethers.toBeHex(1000000), // Gas limit + wallet.address, // Sender address + '0x', // Value (in addition to batch transfers) + calldata, // Encoded function call + [], // Access list (empty for this transaction) + [ + [ + authorizationData.chainId, + authorizationData.address, + authorizationData.nonce, + authorizationData.yParity, + authorizationData.r, + authorizationData.s + ] + ] + ]; + + // Encode final transaction data with version prefix + const encodedTxData = ethers.concat([ + '0x04', // Transaction type identifier + ethers.encodeRlp(txData) + ]); + + // Sign the complete transaction + const txDataHash = ethers.keccak256(encodedTxData); + const txSignature = wallet.signingKey.sign(txDataHash); + + // Construct the fully signed transaction + const signedTx = ethers.hexlify(ethers.concat([ + '0x04', + ethers.encodeRlp([ + ...txData, + txSignature.yParity == 0 ? '0x' : '0x01', + txSignature.r, + txSignature.s + ]) + ])); + + // Send the raw transaction to the network + const tx = await ethers.provider.send('eth_sendRawTransaction', [signedTx]); + + console.log('tx sent: ', tx); +} + +main().then(() => { + console.log('Execution completed'); + process.exit(0); +}).catch((error) => { + console.error(error); + process.exit(1); +}); \ No newline at end of file diff --git a/basic/49-aa/demowallet/scripts/basic.js b/basic/49-Account-Abstraction/demowallet/scripts/basic.js similarity index 100% rename from basic/49-aa/demowallet/scripts/basic.js rename to basic/49-Account-Abstraction/demowallet/scripts/basic.js diff --git a/basic/49-aa/demowallet/scripts/deploy.js b/basic/49-Account-Abstraction/demowallet/scripts/deploy.js similarity index 100% rename from basic/49-aa/demowallet/scripts/deploy.js rename to basic/49-Account-Abstraction/demowallet/scripts/deploy.js diff --git a/basic/49-aa/demowallet/scripts/eip2470.js b/basic/49-Account-Abstraction/demowallet/scripts/eip2470.js similarity index 100% rename from basic/49-aa/demowallet/scripts/eip2470.js rename to basic/49-Account-Abstraction/demowallet/scripts/eip2470.js diff --git a/basic/49-aa/demowallet/scripts/fac_and_paymaster.js b/basic/49-Account-Abstraction/demowallet/scripts/fac_and_paymaster.js similarity index 100% rename from basic/49-aa/demowallet/scripts/fac_and_paymaster.js rename to basic/49-Account-Abstraction/demowallet/scripts/fac_and_paymaster.js diff --git a/basic/49-aa/demowallet/src/api/msig_paymaster_api.js b/basic/49-Account-Abstraction/demowallet/src/api/msig_paymaster_api.js similarity index 100% rename from basic/49-aa/demowallet/src/api/msig_paymaster_api.js rename to basic/49-Account-Abstraction/demowallet/src/api/msig_paymaster_api.js diff --git a/basic/49-aa/demowallet/src/api/multi_sig_account_api.js b/basic/49-Account-Abstraction/demowallet/src/api/multi_sig_account_api.js similarity index 100% rename from basic/49-aa/demowallet/src/api/multi_sig_account_api.js rename to basic/49-Account-Abstraction/demowallet/src/api/multi_sig_account_api.js diff --git a/basic/49-aa/demowallet/src/paymaster/paymaster_api_naive.js b/basic/49-Account-Abstraction/demowallet/src/paymaster/paymaster_api_naive.js similarity index 100% rename from basic/49-aa/demowallet/src/paymaster/paymaster_api_naive.js rename to basic/49-Account-Abstraction/demowallet/src/paymaster/paymaster_api_naive.js diff --git a/basic/49-aa/demowallet/src/utils/create2.js b/basic/49-Account-Abstraction/demowallet/src/utils/create2.js similarity index 100% rename from basic/49-aa/demowallet/src/utils/create2.js rename to basic/49-Account-Abstraction/demowallet/src/utils/create2.js diff --git a/basic/49-aa/demowallet/test/Test.js b/basic/49-Account-Abstraction/demowallet/test/Test.js similarity index 100% rename from basic/49-aa/demowallet/test/Test.js rename to basic/49-Account-Abstraction/demowallet/test/Test.js diff --git a/basic/49-aa/demowallet/unhandled.js b/basic/49-Account-Abstraction/demowallet/unhandled.js similarity index 100% rename from basic/49-aa/demowallet/unhandled.js rename to basic/49-Account-Abstraction/demowallet/unhandled.js diff --git a/basic/49-aa/development.md b/basic/49-Account-Abstraction/development.md similarity index 100% rename from basic/49-aa/development.md rename to basic/49-Account-Abstraction/development.md diff --git a/basic/49-aa/demowallet/hardhat.config.js b/basic/49-aa/demowallet/hardhat.config.js deleted file mode 100644 index b7289584d..000000000 --- a/basic/49-aa/demowallet/hardhat.config.js +++ /dev/null @@ -1,15 +0,0 @@ -require("@nomicfoundation/hardhat-toolbox"); - - -/** @type import('hardhat/config').HardhatUserConfig */ -module.exports = { - solidity: "0.8.17", - networks:{ - hardhat:{ - allowUnlimitedContractSize: true - }, - localhost:{ - allowUnlimitedContractSize: true - }, - } -}; diff --git a/basic/83-FHEVM/README.md b/basic/83-FHEVM/README.md new file mode 100644 index 000000000..86f05542c --- /dev/null +++ b/basic/83-FHEVM/README.md @@ -0,0 +1,7 @@ +## ZAMA FHEVM + + + + +## 参考链接 +- https://docs.zama.ai/fhevm/getting-started/overview-1/hardhat/1.-setting-up-hardhat \ No newline at end of file