diff --git a/Cargo.lock b/Cargo.lock index 493ff0f5..ff54307b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.20.0" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4fa78e18c64fce05e902adecd7a5eed15a5e0a3439f7b0e169f0252214865e3" +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" dependencies = [ "gimli", ] @@ -86,6 +86,25 @@ dependencies = [ "tiny-keccak", ] +[[package]] +name = "alloy-primitives" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e416903084d3392ebd32d94735c395d6709415b76c7728e594d3f996f2b03e65" +dependencies = [ + "alloy-rlp 0.3.2", + "bytes", + "cfg-if", + "const-hex", + "derive_more", + "hex-literal 0.4.1", + "itoa", + "proptest", + "ruint", + "serde", + "tiny-keccak", +] + [[package]] name = "alloy-rlp" version = "0.2.0" @@ -116,7 +135,22 @@ dependencies = [ "proc-macro2", "quote", "syn 2.0.29", - "syn-solidity", + "syn-solidity 0.2.0", + "tiny-keccak", +] + +[[package]] +name = "alloy-sol-macro" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7720130c58db647103587b0c39aad4e669eea261e256040301d6c7983fdbb461" +dependencies = [ + "dunce", + "heck", + "proc-macro2", + "quote", + "syn 2.0.29", + "syn-solidity 0.3.2", "tiny-keccak", ] @@ -126,8 +160,20 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aa13e1e05d0f45f042f9f872a1ff71717d446e563fa9c5a29ab59c4a0afb4e7f" dependencies = [ - "alloy-primitives", - "alloy-sol-macro", + "alloy-primitives 0.2.0", + "alloy-sol-macro 0.2.0", + "const-hex", + "serde", +] + +[[package]] +name = "alloy-sol-types" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaa7c9a4354b1ff9f1c85adf22802af046e20e4bb55e19b9dc6ca8cbc6f7f4e5" +dependencies = [ + "alloy-primitives 0.3.3", + "alloy-sol-macro 0.3.2", "const-hex", "serde", ] @@ -149,24 +195,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a30da5c5f2d5e72842e00bcb57657162cdabef0931f40e2deb9b4140440cecd" +checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" [[package]] name = "anstyle-parse" @@ -188,9 +233,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys", @@ -492,9 +537,9 @@ dependencies = [ [[package]] name = "backtrace" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4319208da049c43661739c5fade2ba182f09d1dc2299b32298d3a31692b17e12" +checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" dependencies = [ "addr2line", "cc", @@ -531,9 +576,9 @@ checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" [[package]] name = "bech32" -version = "0.7.3" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dabbe35f96fb9507f7330793dc490461b2962659ac5d427181e451a623751d1" +checksum = "d86b93f97252c47b41663388e6d155714a9d0c398b99f1005cbc5f978b29f445" [[package]] name = "beef" @@ -544,15 +589,6 @@ dependencies = [ "serde", ] -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - [[package]] name = "bindgen" version = "0.61.0" @@ -600,16 +636,6 @@ version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4682ae6287fcf752ecaabbfcc7b6f9b72aa33933dc23a554d853aea8eea8635" -[[package]] -name = "bitvec" -version = "0.17.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" -dependencies = [ - "either", - "radium 0.3.0", -] - [[package]] name = "bitvec" version = "1.0.1" @@ -617,7 +643,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" dependencies = [ "funty", - "radium 0.7.0", + "radium", "serde", "tap", "wyz", @@ -652,11 +678,12 @@ dependencies = [ [[package]] name = "bs58" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" +checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" dependencies = [ - "sha2 0.9.9", + "sha2 0.10.7", + "tinyvec", ] [[package]] @@ -741,20 +768,6 @@ dependencies = [ "serde", ] -[[package]] -name = "cargo_metadata" -version = "0.15.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eee4243f1f26fc7a42710e7439c149e2b10b05472f88090acce52632f231a73a" -dependencies = [ - "camino", - "cargo-platform", - "semver 1.0.18", - "serde", - "serde_json", - "thiserror", -] - [[package]] name = "cargo_metadata" version = "0.17.0" @@ -833,9 +846,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.23" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03aef18ddf7d879c15ce20f04826ef8418101c7e528014c3eeea13321047dca3" +checksum = "1d5f1946157a96594eb2d2c10eb7ad9a2b27518cb3000209dec700c35df9197d" dependencies = [ "clap_builder", "clap_derive", @@ -844,9 +857,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.3.23" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8ce6fffb678c9b80a70b6b6de0aad31df727623a70fd9a842c30cd573e2fa98" +checksum = "78116e32a042dd73c2901f0dc30790d20ff3447f3e3472fad359e8c3d282bcd6" dependencies = [ "anstream", "anstyle", @@ -856,9 +869,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "c9fd1a5729c4548118d7d70ff234a44868d00489a4b6597b0b020918a0e91a1a" dependencies = [ "heck", "proc-macro2", @@ -868,9 +881,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cobs" @@ -893,18 +906,15 @@ dependencies = [ [[package]] name = "coins-bip32" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30a84aab436fcb256a2ab3c80663d8aec686e6bae12827bb05fef3e1e439c9f" +checksum = "3b6be4a5df2098cd811f3194f64ddb96c267606bffd9689ac7b0160097b01ad3" dependencies = [ - "bincode", "bs58", "coins-core", "digest 0.10.7", - "getrandom", "hmac", "k256", - "lazy_static", "serde", "sha2 0.10.7", "thiserror", @@ -912,13 +922,12 @@ dependencies = [ [[package]] name = "coins-bip39" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f4d04ee18e58356accd644896aeb2094ddeafb6a713e056cef0c0a8e468c15" +checksum = "3db8fba409ce3dc04f7d804074039eb68b960b0829161f8e06c95fea3f122528" dependencies = [ - "bitvec 0.17.4", + "bitvec", "coins-bip32", - "getrandom", "hmac", "once_cell", "pbkdf2 0.12.2", @@ -929,9 +938,9 @@ dependencies = [ [[package]] name = "coins-core" -version = "0.8.3" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b949a1c63fb7eb591eb7ba438746326aedf0ae843e51ec92ba6bec5bb382c4f" +checksum = "5286a0843c21f8367f7be734f89df9b822e0321d8bcce8d6e735aadff7d74979" dependencies = [ "base64 0.21.2", "bech32", @@ -1387,31 +1396,13 @@ dependencies = [ [[package]] name = "encoding_rs" -version = "0.8.32" +version = "0.8.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "071a31f4ee85403370b58aca746f01041ede6f0da2730960ad001edc2b71b394" +checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" dependencies = [ "cfg-if", ] -[[package]] -name = "enr" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf56acd72bb22d2824e66ae8e9e5ada4d0de17a69c7fd35569dde2ada8ec9116" -dependencies = [ - "base64 0.13.1", - "bytes", - "hex", - "k256", - "log", - "rand 0.8.5", - "rlp", - "serde", - "sha3", - "zeroize", -] - [[package]] name = "enr" version = "0.9.0" @@ -1576,41 +1567,40 @@ dependencies = [ [[package]] name = "ethers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96b4026b97da8281276744741fac7eb385da905f6093c583331fa2953fdd4253" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ - "ethers-addressbook 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-middleware 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-solc 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-addressbook 2.0.8", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-middleware 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", + "ethers-solc 2.0.8", ] [[package]] name = "ethers" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ba3fd516c15a9a587135229466dbbfc85796de55c5660afbbb1b1c78517d85c" dependencies = [ - "ethers-addressbook 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-middleware 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-solc 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-addressbook 2.0.9", + "ethers-contract 2.0.9", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.9", + "ethers-middleware 2.0.9", + "ethers-providers 2.0.9", + "ethers-signers 2.0.9", + "ethers-solc 2.0.9", ] [[package]] name = "ethers-addressbook" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edcb6ffefc230d8c42874c51b28dc11dbb8de50b27a8fdf92648439d6baa68dc" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", "once_cell", "serde", "serde_json", @@ -1618,10 +1608,11 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0245617f11b8178fa50b52e433e2c34ac69f39116b62c8be2437decf2edf1986" dependencies = [ - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "once_cell", "serde", "serde_json", @@ -1630,16 +1621,15 @@ dependencies = [ [[package]] name = "ethers-contract" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d4719a44c3d37ab07c6dea99ab174068d8c35e441b60b6c20ce4e48357273e8" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ - "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-contract-derive 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "const-hex", + "ethers-contract-abigen 2.0.8", + "ethers-contract-derive 2.0.8", + "ethers-core 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", "futures-util", - "hex", "once_cell", "pin-project", "serde", @@ -1649,15 +1639,15 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02bb80fd2c22631a5eb8a02cbf373cc5fd86937fc966bb670b9a884580c8e71c" dependencies = [ "const-hex", - "ethers-contract-abigen 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-contract-derive 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-contract-abigen 2.0.9", + "ethers-contract-derive 2.0.9", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-providers 2.0.9", "futures-util", "once_cell", "pin-project", @@ -1669,15 +1659,14 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "155ea1b84d169d231317ed86e307af6f2bed6b40dd17e5e94bc84da21cadb21c" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "Inflector", + "const-hex", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", "eyre", - "hex", "prettyplease 0.2.12", "proc-macro2", "quote", @@ -1686,20 +1675,23 @@ dependencies = [ "serde", "serde_json", "syn 2.0.29", + "tokio", "toml", + "url", "walkdir", ] [[package]] name = "ethers-contract-abigen" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22c54db0d393393e732a5b20273e4f8ab89f0cce501c84e75fab9c126799a6e6" dependencies = [ "Inflector", "const-hex", "dunce", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.9", "eyre", "prettyplease 0.2.12", "proc-macro2", @@ -1709,22 +1701,19 @@ dependencies = [ "serde", "serde_json", "syn 2.0.29", - "tokio", "toml", - "url", "walkdir", ] [[package]] name = "ethers-contract-derive" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8567ff196c4a37c1a8c90ec73bda0ad2062e191e4f0a6dc4d943e2ec4830fc88" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "Inflector", - "ethers-contract-abigen 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hex", + "const-hex", + "ethers-contract-abigen 2.0.8", + "ethers-core 2.0.8", "proc-macro2", "quote", "serde_json", @@ -1733,13 +1722,14 @@ dependencies = [ [[package]] name = "ethers-contract-derive" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62ee4f216184a1304b707ed258f4f70aa40bf7e1522ab8963d127a8d516eaa1a" dependencies = [ "Inflector", "const-hex", - "ethers-contract-abigen 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-contract-abigen 2.0.9", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2", "quote", "serde_json", @@ -1749,19 +1739,18 @@ dependencies = [ [[package]] name = "ethers-core" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60ca2514feb98918a0a31de7e1983c29f2267ebf61b2dc5d4294f91e5b866623" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "arrayvec", "bytes", - "cargo_metadata 0.15.4", + "cargo_metadata", "chrono", + "const-hex", "elliptic-curve", "ethabi", "generic-array", - "hex", "k256", - "num_enum 0.6.1", + "num_enum", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -1778,19 +1767,20 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c29523f73c12753165781c6e5dc11c84d3e44c080a15f7c6cfbd70b514cb6f1" dependencies = [ "arrayvec", "bytes", - "cargo_metadata 0.17.0", + "cargo_metadata", "chrono", "const-hex", "elliptic-curve", "ethabi", "generic-array", "k256", - "num_enum 0.7.0", + "num_enum", "once_cell", "open-fastrlp", "rand 0.8.5", @@ -1807,8 +1797,8 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs#7603af021be920ca39b610f88c0012328b337cd6" +version = "2.0.9" +source = "git+https://github.com/gakonst/ethers-rs#f2d412c8cf732167288f68aee826eb6615b4b2e4" dependencies = [ "arrayvec", "bytes", @@ -1818,7 +1808,7 @@ dependencies = [ "ethabi", "generic-array", "k256", - "num_enum 0.7.0", + "num_enum", "open-fastrlp", "rand 0.8.5", "rlp", @@ -1834,10 +1824,9 @@ dependencies = [ [[package]] name = "ethers-etherscan" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22b3a8269d3df0ed6364bc05b4735b95f4bf830ce3aef87d5e760fb0e93e5b91" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", "reqwest", "semver 1.0.18", "serde", @@ -1848,10 +1837,11 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4aab5af432b3fe5b7756b60df5c9ddeb85a13414575ad8a9acd707c24f0a77a5" dependencies = [ - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest", "semver 1.0.18", "serde", @@ -1867,7 +1857,7 @@ source = "git+https://github.com/qi-protocol/ethers-flashbots.git?branch=master# dependencies = [ "async-trait", "chrono", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "futures-core", "futures-util", "pin-project", @@ -1885,7 +1875,7 @@ source = "git+https://github.com/da-bao-jian/ethers-flashbots.git?branch=master# dependencies = [ "async-trait", "chrono", - "ethers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers 2.0.9", "futures-core", "futures-util", "pin-project", @@ -1899,16 +1889,15 @@ dependencies = [ [[package]] name = "ethers-middleware" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c339aad74ae5c451d27e0e49c7a3c7d22620b119b4f9291d7aa21f72d7f366" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-etherscan 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-providers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "ethers-signers 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-contract 2.0.8", + "ethers-core 2.0.8", + "ethers-etherscan 2.0.8", + "ethers-providers 2.0.8", + "ethers-signers 2.0.8", "futures-channel", "futures-locks", "futures-util", @@ -1925,16 +1914,17 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356151d5ded56d4918146366abc9dfc9df367cf0096492a7a5477b21b7693615" dependencies = [ "async-trait", "auto_impl", - "ethers-contract 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-etherscan 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-providers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-signers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-contract 2.0.9", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-etherscan 2.0.9", + "ethers-providers 2.0.9", + "ethers-signers 2.0.9", "futures-channel", "futures-locks", "futures-util", @@ -1952,22 +1942,22 @@ dependencies = [ [[package]] name = "ethers-providers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b411b119f1cf0efb69e2190883dee731251882bb21270f893ee9513b3a697c48" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", "bytes", - "enr 0.8.1", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "const-hex", + "enr", + "ethers-core 2.0.8", "futures-core", "futures-timer", "futures-util", "hashers", - "hex", "http", "instant", + "jsonwebtoken", "once_cell", "pin-project", "reqwest", @@ -1975,7 +1965,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.19.0", "tracing", "tracing-futures", "url", @@ -1987,16 +1977,17 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00c84664b294e47fc2860d6db0db0246f79c4c724e552549631bb9505b834bee" dependencies = [ "async-trait", "auto_impl", "base64 0.21.2", "bytes", "const-hex", - "enr 0.9.0", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "enr", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core", "futures-timer", "futures-util", @@ -2011,7 +2002,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tokio-tungstenite", + "tokio-tungstenite 0.20.0", "tracing", "tracing-futures", "url", @@ -2024,16 +2015,15 @@ dependencies = [ [[package]] name = "ethers-signers" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4864d387456a9c09a1157fa10e1528b29d90f1d859443acf06a1b23365fb518c" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "async-trait", "coins-bip32", "coins-bip39", + "const-hex", "elliptic-curve", "eth-keystore", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", - "hex", + "ethers-core 2.0.8", "rand 0.8.5", "sha2 0.10.7", "thiserror", @@ -2042,8 +2032,9 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "170b299698702ef1f53d2275af7d6d97409cfa4f9398ee9ff518f6bc9102d0ad" dependencies = [ "async-trait", "coins-bip32", @@ -2051,7 +2042,7 @@ dependencies = [ "const-hex", "elliptic-curve", "eth-keystore", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.8.5", "sha2 0.10.7", "thiserror", @@ -2061,14 +2052,15 @@ dependencies = [ [[package]] name = "ethers-solc" version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6c2b9625a2c639d46625f88acc2092a3cb35786c37f7c2128b3ca20f639b3c" +source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" dependencies = [ "cfg-if", + "const-hex", + "dirs 5.0.1", "dunce", - "ethers-core 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers-core 2.0.8", + "futures-util", "glob", - "hex", "home", "md-5", "num_cpus", @@ -2079,8 +2071,10 @@ dependencies = [ "semver 1.0.18", "serde", "serde_json", + "sha2 0.10.7", "solang-parser", - "svm-rs 0.2.23", + "svm-rs", + "svm-rs-builds", "thiserror", "tiny-keccak", "tokio", @@ -2091,15 +2085,15 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.8" -source = "git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc#fa3017715a298728d9fb341933818a5d0d84c2dc" +version = "2.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66559c8f774712df303c907d087275a52a2046b256791aaa566d5abc8ea66731" dependencies = [ "cfg-if", "const-hex", "dirs 5.0.1", "dunce", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "futures-util", + "ethers-core 2.0.9 (registry+https://github.com/rust-lang/crates.io-index)", "glob", "home", "md-5", @@ -2111,10 +2105,8 @@ dependencies = [ "semver 1.0.18", "serde", "serde_json", - "sha2 0.10.7", "solang-parser", - "svm-rs 0.3.0", - "svm-rs-builds", + "svm-rs", "thiserror", "tiny-keccak", "tokio", @@ -2393,17 +2385,15 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "be4136b2a15dd319360be1c07d9933517ccf0be8f16bf62a3bee4f0d618df427" dependencies = [ "cfg-if", - "js-sys", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", ] [[package]] name = "gimli" -version = "0.27.3" +version = "0.28.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6c80984affa11d98d1b88b66ac8853f143217b399d3c74116778ff8fdb4ed2e" +checksum = "6fb8d784f27acf97159b40fc4db5ecd8aa23b9ad5ef69cdd136d3bc80665f0c0" [[package]] name = "git-version" @@ -2629,6 +2619,12 @@ version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ebdb29d2ea9ed0083cd8cece49bbd968021bd99b0849edb4a9a7ee0fdf6a4e0" +[[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" @@ -3168,9 +3164,9 @@ dependencies = [ [[package]] name = "jsonrpsee-types" -version = "0.16.2" +version = "0.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bd522fe1ce3702fd94812965d7bb7a3364b1c9aba743944c5a00529aae80f8c" +checksum = "245ba8e5aa633dd1c1e4fae72bce06e71f42d34c14a2767c6b4d173b57bee5e5" dependencies = [ "anyhow", "beef", @@ -3563,9 +3559,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ "autocfg", "num-integer", @@ -3602,34 +3598,13 @@ dependencies = [ "libc", ] -[[package]] -name = "num_enum" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" -dependencies = [ - "num_enum_derive 0.6.1", -] - [[package]] name = "num_enum" version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70bf6736f74634d299d00086f02986875b3c2d924781a6a2cb6c201e73da0ceb" dependencies = [ - "num_enum_derive 0.7.0", -] - -[[package]] -name = "num_enum_derive" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.29", + "num_enum_derive", ] [[package]] @@ -3646,9 +3621,9 @@ dependencies = [ [[package]] name = "object" -version = "0.31.1" +version = "0.32.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bda667d9f2b5051b8833f59f3bf748b28ef54f850f4fcb389a252aa383866d1" +checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" dependencies = [ "memchr", ] @@ -3773,7 +3748,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dd8e946cc0cc711189c0b0249fb8b599cbeeab9784d83c415719368bb8d4ac64" dependencies = [ "arrayvec", - "bitvec 1.0.1", + "bitvec", "byte-slice-cast", "bytes", "impl-trait-for-tuples", @@ -4239,12 +4214,6 @@ dependencies = [ "proc-macro2", ] -[[package]] -name = "radium" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" - [[package]] name = "radium" version = "0.7.0" @@ -4433,9 +4402,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.19" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b9b67e2ca7dd9e9f9285b759de30ff538aab981abaaf7bc9bd90b84a0126c3" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ "base64 0.21.2", "bytes", @@ -4544,7 +4513,7 @@ source = "git+https://github.com/paradigmxyz/reth.git?rev=aa6f2cb0610fb4fa0926b4 dependencies = [ "async-trait", "bytes", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.9 (git+https://github.com/gakonst/ethers-rs)", "futures", "metrics", "pin-project", @@ -4641,11 +4610,11 @@ dependencies = [ "crc", "crunchy", "derive_more", - "ethers-core 2.0.8 (git+https://github.com/gakonst/ethers-rs)", + "ethers-core 2.0.9 (git+https://github.com/gakonst/ethers-rs)", "fixed-hash", "hash-db", "hex", - "hex-literal", + "hex-literal 0.3.4", "impl-serde", "modular-bitfield", "once_cell", @@ -4695,7 +4664,7 @@ name = "reth-rpc-types" version = "0.1.0" source = "git+https://github.com/paradigmxyz/reth.git?rev=aa6f2cb0610fb4fa0926b42cfed7f8ff51e0db8a#aa6f2cb0610fb4fa0926b42cfed7f8ff51e0db8a" dependencies = [ - "jsonrpsee-types 0.16.2", + "jsonrpsee-types 0.16.3", "lru", "reth-network-api", "reth-primitives", @@ -4712,14 +4681,14 @@ version = "1.0.0" source = "git+https://github.com/bluealloy/revm?rev=3d8ca6641d2e72448c23f4596f769c8fd1c784d1#3d8ca6641d2e72448c23f4596f769c8fd1c784d1" dependencies = [ "auto_impl", - "bitvec 1.0.1", + "bitvec", "bytes", "derive_more", "enumn", "fixed-hash", "hashbrown 0.13.2", "hex", - "hex-literal", + "hex-literal 0.3.4", "primitive-types", "rlp", "ruint", @@ -4893,7 +4862,7 @@ checksum = "1d1feddffcfcc0b33f5c6ce9a29e341e4cd59c3f78e7ee45f4a40c038b1d6cbb" dependencies = [ "log", "ring", - "rustls-webpki 0.101.3", + "rustls-webpki 0.101.4", "sct", ] @@ -4920,9 +4889,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.100.1" +version = "0.100.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6207cd5ed3d8dca7816f8f3725513a34609c0c765bf652b8c3cb4cfd87db46b" +checksum = "e98ff011474fa39949b7e5c0428f9b4937eda7da7848bbb947786b7be0b27dab" dependencies = [ "ring", "untrusted", @@ -4930,9 +4899,9 @@ dependencies = [ [[package]] name = "rustls-webpki" -version = "0.101.3" +version = "0.101.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "261e9e0888cba427c3316e6322805653c9425240b6fd96cee7cb671ab70ab8d0" +checksum = "7d93931baf2d282fff8d3a532bbfd7653f734643161b87e3e01e59a04439bf0d" dependencies = [ "ring", "untrusted", @@ -5138,9 +5107,9 @@ checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73" [[package]] name = "serde" -version = "1.0.185" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "9f5db24220c009de9bd45e69fb2938f4b6d2df856aa9304ce377b3180f83b7c1" dependencies = [ "serde_derive", ] @@ -5158,9 +5127,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.186" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "5ad697f7e0b65af4983a4ce8f56ed5b357e8d3c36651bf6a7e13639c17b8e670" dependencies = [ "proc-macro2", "quote", @@ -5212,7 +5181,7 @@ dependencies = [ "serde", "serde_json", "serde_with_macros", - "time 0.3.25", + "time 0.3.27", ] [[package]] @@ -5335,7 +5304,7 @@ dependencies = [ "anyhow", "clap", "dirs 4.0.0", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "expanded-pathbuf", "log", "pin-utils", @@ -5352,13 +5321,13 @@ dependencies = [ name = "silius-bundler" version = "0.1.0" dependencies = [ - "alloy-primitives", - "alloy-sol-types", + "alloy-primitives 0.2.0", + "alloy-sol-types 0.2.0", "anyhow", "async-trait", "bytes", "dotenv", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "ethers-flashbots", "ethers-flashbots-test", "jsonrpsee 0.20.0", @@ -5377,8 +5346,8 @@ name = "silius-contracts" version = "0.1.0" dependencies = [ "anyhow", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", - "ethers-solc 2.0.8 (registry+https://github.com/rust-lang/crates.io-index)", + "ethers 2.0.8", + "ethers-solc 2.0.9", "lazy_static", "serde", "serde_json", @@ -5391,9 +5360,16 @@ dependencies = [ name = "silius-examples" version = "0.1.0" dependencies = [ + "alloy-primitives 0.3.3", + "alloy-sol-types 0.3.2", "anyhow", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", + "reqwest", + "serde", + "serde_json", + "silius-contracts", "silius-primitives", + "silius-tests", "tokio", ] @@ -5405,7 +5381,7 @@ dependencies = [ "arrayref", "async-trait", "dashmap", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "parking_lot", "prost", "prost-build", @@ -5427,7 +5403,7 @@ version = "0.1.0" dependencies = [ "anyhow", "educe", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "expanded-pathbuf", "lazy_static", "rustc-hex", @@ -5447,7 +5423,7 @@ version = "0.1.0" dependencies = [ "anyhow", "async-trait", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "git-version", "hyper", "jsonrpsee 0.18.2", @@ -5466,7 +5442,7 @@ name = "silius-tests" version = "0.1.0" dependencies = [ "anyhow", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "silius-contracts", "silius-primitives", "silius-uopool", @@ -5482,7 +5458,7 @@ dependencies = [ "async-trait", "educe", "enumset", - "ethers 2.0.8 (git+https://github.com/gakonst/ethers-rs?rev=fa3017715a298728d9fb341933818a5d0d84c2dc)", + "ethers 2.0.8", "page_size 0.5.0", "prost", "reth-db", @@ -5505,20 +5481,20 @@ dependencies = [ "num-bigint", "num-traits", "thiserror", - "time 0.3.25", + "time 0.3.27", ] [[package]] name = "siphasher" -version = "0.3.10" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" [[package]] name = "slab" -version = "0.4.8" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6528351c9bc8ab22353f9d776db39a20288e8d6c37ef8cfe3317cf875eecfc2d" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" dependencies = [ "autocfg", ] @@ -5643,7 +5619,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f923762d556417668b192ac2fdc9827ea21e6df011d8a0a7e68f3d5da095a675" dependencies = [ - "bitvec 1.0.1", + "bitvec", "hex", "num-bigint", "serde", @@ -5753,26 +5729,6 @@ dependencies = [ "anyhow", ] -[[package]] -name = "svm-rs" -version = "0.2.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a04fc4f5cd35c700153b233f5575ccb3237e0f941fa5049d9e98254d10bf2fe" -dependencies = [ - "fs2", - "hex", - "home", - "once_cell", - "reqwest", - "semver 1.0.18", - "serde", - "serde_json", - "sha2 0.10.7", - "thiserror", - "url", - "zip", -] - [[package]] name = "svm-rs" version = "0.3.0" @@ -5803,7 +5759,7 @@ dependencies = [ "hex", "semver 1.0.18", "serde_json", - "svm-rs 0.3.0", + "svm-rs", ] [[package]] @@ -5839,6 +5795,18 @@ dependencies = [ "syn 2.0.29", ] +[[package]] +name = "syn-solidity" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "397f229dc34c7b8231b6ef85502f9ca4e3425b8625e6d403bb74779e6b1917b5" +dependencies = [ + "paste", + "proc-macro2", + "quote", + "syn 2.0.29", +] + [[package]] name = "sync_wrapper" version = "0.1.2" @@ -5928,9 +5896,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.25" +version = "0.3.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fdd63d58b18d663fbdf70e049f00a22c8e42be082203be7f26589213cd75ea" +checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" dependencies = [ "deranged", "itoa", @@ -5947,9 +5915,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb71511c991639bb078fd5bf97757e03914361c48100d52878b8e52b46fb92cd" +checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" dependencies = [ "time-core", ] @@ -6062,10 +6030,24 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls", - "tungstenite", + "tungstenite 0.19.0", "webpki-roots 0.23.1", ] +[[package]] +name = "tokio-tungstenite" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b2dbec703c26b00d74844519606ef15d09a7d6857860f84ad223dec002ddea2" +dependencies = [ + "futures-util", + "log", + "native-tls", + "tokio", + "tokio-native-tls", + "tungstenite 0.20.0", +] + [[package]] name = "tokio-util" version = "0.7.8" @@ -6321,6 +6303,26 @@ dependencies = [ "webpki", ] +[[package]] +name = "tungstenite" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e862a1c4128df0112ab625f55cd5c934bcb4312ba80b39ae4b4835a3fd58e649" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "native-tls", + "rand 0.8.5", + "sha1", + "thiserror", + "url", + "utf-8", +] + [[package]] name = "typenum" version = "1.16.0" @@ -6573,7 +6575,7 @@ version = "0.23.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03058f88386e5ff5310d9111d53f48b17d732b401aeb83a8d5190f2ac459338" dependencies = [ - "rustls-webpki 0.100.1", + "rustls-webpki 0.100.2", ] [[package]] @@ -6701,9 +6703,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -6788,7 +6790,7 @@ dependencies = [ "hmac", "pbkdf2 0.11.0", "sha1", - "time 0.3.25", + "time 0.3.27", "zstd", ] diff --git a/crates/contracts/src/entry_point.rs b/crates/contracts/src/entry_point.rs index b9d221c8..2b6a5d73 100644 --- a/crates/contracts/src/entry_point.rs +++ b/crates/contracts/src/entry_point.rs @@ -200,6 +200,13 @@ impl EntryPoint { } } + pub async fn get_nonce(&self, address: &Address, key: U256) -> Result { + self.entry_point_api + .get_nonce(*address, key) + .await + .map_err(|e| EntryPointErr::UnknownErr(format!("Error getting nonce: {e:?}"))) + } + pub async fn get_sender_address( &self, init_code: Bytes, diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 3d07d4c3..f89a78b4 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -11,15 +11,36 @@ description = """ AA (ERC-4337) bundler examples """ -[dev-dependencies] - +[dependencies] +alloy-primitives = "0.3" +alloy-sol-types = "0.3" anyhow = "1" ethers = { workspace = true } +reqwest = { version = "0.11.4", features = ["json"] } +serde = "1" +serde_json = "1" +silius-contracts = { path = "../crates/contracts" } silius-primitives = { path = "../crates/primitives" } +silius-tests = { path = "../tests" } tokio = { workspace = true } +[package.metadata.cargo-udeps.ignore] +normal = ["anyhow", "silius-contracts", "silius-primitives", "silius-tests"] + [[example]] name = "user-operation" path = "user_operation.rs" +[[example]] +name = "simple_account_create" +path = "simple_account/simple_account_create.rs" + +[[example]] +name = "simple_account_deposit" +path = "simple_account/deposit.rs" + +[[example]] +name = "simple_account_transfer" +path = "simple_account/transfer.rs" + diff --git a/examples/README.md b/examples/README.md index 7242004a..cb2ee005 100644 --- a/examples/README.md +++ b/examples/README.md @@ -2,4 +2,24 @@ ```bash cargo run --example user-operation +``` + +### Create simple account + + +```bash +SEED_PHRASE="test test test test test test test test test test test junk" BUNDLER_URL="http://127.0.0.1:3000" cargo run --example simple_account_create +``` + +### Deposit funds to entrypoint + +```bash +SEED_PHRASE="test test test test test test test test test test test junk" PROVIDER_URL="http://127.0.0.1:3000" cargo run --example deposit +``` + + +### Simple Account Transfer + +```bash +SEED_PHRASE="test test test test test test test test test test test junk" BUNDLER_URL="http://127.0.0.1:3000" cargo run --example transfer ``` \ No newline at end of file diff --git a/examples/simple_account/deposit.rs b/examples/simple_account/deposit.rs new file mode 100644 index 00000000..9af0ac88 --- /dev/null +++ b/examples/simple_account/deposit.rs @@ -0,0 +1,55 @@ +use std::{env, sync::Arc, time::Duration}; + +use ethers::{ + prelude::{gas_oracle::ProviderOracle, MiddlewareBuilder, SignerMiddleware}, + providers::{Http, Middleware, Provider}, + signers::{coins_bip39::English, MnemonicBuilder, Signer}, + types::{transaction::eip2718::TypedTransaction, Address, U256}, + utils::parse_ether, +}; +use silius_contracts::entry_point::EntryPointAPI; +use silius_primitives::consts::entry_point::ADDRESS; +use silius_tests::common::gen::SimpleAccountFactory; + +// stackup simple account factory +const SIMPLE_ACCOUNT_FACTORY: &str = "0x9406Cc6185a346906296840746125a0E44976454"; +const CREATE_INDEX: u64 = 1; +const SEND_VALUE: &str = "0.01"; // ether unit + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let seed_phrase = env::var("SEED_PHRASE").unwrap(); + let provider_url = env::var("PROVIDER_URL").unwrap(); + let wallet = MnemonicBuilder::::default() + .phrase(seed_phrase.as_str()) + .build()?; + let provider = Provider::::try_from(provider_url)?.interval(Duration::from_millis(10u64)); + let client = SignerMiddleware::new(provider.clone(), wallet.clone().with_chain_id(5u64)) + .nonce_manager(wallet.address()) + .gas_oracle(ProviderOracle::new(provider.clone())); + let provider = Arc::new(client); + + let simple_account_factory_address = SIMPLE_ACCOUNT_FACTORY.to_string().parse::
()?; + let simple_account_factory = + SimpleAccountFactory::new(simple_account_factory_address, provider.clone()); + + let owner_address = wallet.address(); + println!("simple_account_factory: {:?}", simple_account_factory); + println!("Signer address: {:x}", owner_address); + let address = simple_account_factory + .get_address(owner_address, U256::from(CREATE_INDEX)) + .call() + .await?; + println!("Smart account addresss: {:?}", address); + + let entrypoint = EntryPointAPI::new(ADDRESS.parse::
()?, provider.clone()); + let call = entrypoint.deposit_to(address); + let mut tx: TypedTransaction = call.tx; + tx.set_value(parse_ether(SEND_VALUE)?); + println!("tx: {:?}", tx); + let pending_tx = provider.send_transaction(tx, None).await?; + println!("pending_tx: {:?}", pending_tx); + let receipt = pending_tx.await?; + println!("receipt: {:?}", receipt); + Ok(()) +} diff --git a/examples/simple_account/simple_account_create.rs b/examples/simple_account/simple_account_create.rs new file mode 100644 index 00000000..262e5c5b --- /dev/null +++ b/examples/simple_account/simple_account_create.rs @@ -0,0 +1,144 @@ +use std::{env, sync::Arc, time::Duration}; + +use ethers::{ + prelude::{MiddlewareBuilder, SignerMiddleware}, + providers::{Http, Middleware, Provider}, + signers::{coins_bip39::English, MnemonicBuilder, Signer}, + types::{transaction::eip2718::TypedTransaction, Address, Bytes, U256}, +}; +use reqwest; +use silius_examples::{simple_account::SimpleAccountExecute, EstimateResult, Request, Response}; +use silius_primitives::consts::entry_point::ADDRESS; +use silius_primitives::UserOperation; +use silius_primitives::Wallet as UoWallet; +use silius_tests::common::gen::SimpleAccountFactory; + +// stackup simple account factory +const SIMPLE_ACCOUNT_FACTORY: &str = "0x9406Cc6185a346906296840746125a0E44976454"; +const CREATE_INDEX: u64 = 2; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let seed_phrase = env::var("SEED_PHRASE").unwrap(); + let bundler_url = env::var("BUNDLER_URL").unwrap(); + let wallet = MnemonicBuilder::::default() + .phrase(seed_phrase.as_str()) + .build()?; + let provider = + Provider::::try_from(bundler_url.as_str())?.interval(Duration::from_millis(10u64)); + let client = SignerMiddleware::new(provider.clone(), wallet.clone().with_chain_id(5u64)) + .nonce_manager(wallet.address()); + let provider = Arc::new(client); + + let simple_account_factory_address = SIMPLE_ACCOUNT_FACTORY.to_string().parse::
()?; + let simple_account_factory = + SimpleAccountFactory::new(simple_account_factory_address, provider.clone()); + + let owner_address = wallet.address(); + println!("simple_account_factory: {:?}", simple_account_factory); + println!("Signer address: {:x}", owner_address); + let address = simple_account_factory + .get_address(owner_address, U256::from(CREATE_INDEX)) + .call() + .await?; + println!("Smart account addresss: {:?}", address); + let nonce = provider.get_transaction_count(address, None).await?; + let call = simple_account_factory.create_account(owner_address, U256::from(CREATE_INDEX)); + let tx: TypedTransaction = call.tx; + println!("tx: {:?}", tx); + let mut init_code = Vec::new(); + init_code.extend_from_slice(simple_account_factory_address.as_bytes()); + init_code.extend_from_slice(tx.data().unwrap().to_vec().as_slice()); + println!("init_code: {:?}", init_code); + + let (gas_price, priority_fee) = provider.estimate_eip1559_fees(None).await?; + println!( + "gas_price: {:?}, priority_fee: {:?}", + gas_price, priority_fee + ); + + let execution = SimpleAccountExecute::new(Address::zero(), U256::from(0), Bytes::default()); + println!("{:}", Bytes::from(execution.encode())); + let user_op = UserOperation { + sender: address, + nonce, + init_code: Bytes::from(init_code), + call_data: Bytes::from(execution.encode()), + call_gas_limit: U256::from(1), + verification_gas_limit: U256::from(1000000u64), + pre_verification_gas: U256::from(1), + max_fee_per_gas: U256::from(1), + max_priority_fee_per_gas: priority_fee, + paymaster_and_data: Bytes::new(), + signature: Bytes::default(), + }; + let uo_wallet = UoWallet::from_phrase(seed_phrase.as_str(), &U256::from(5), false)?; + let user_op = uo_wallet + .sign_uo( + &user_op, + &ADDRESS.to_string().parse::
()?, + &U256::from(5), + ) + .await?; + + let value = serde_json::to_value(&user_op).unwrap(); + + let req_body = Request { + jsonrpc: "2.0".to_string(), + id: 1, + method: "eth_estimateUserOperationGas".to_string(), + params: vec![value, ADDRESS.to_string().into()], + }; + println!("req_body: {:?}", serde_json::to_string(&req_body)?); + let post = reqwest::Client::builder() + .build()? + .post(bundler_url.as_str()) + .json(&req_body) + .send() + .await?; + println!("post: {:?}", post); + let res = post.text().await?; + println!("res: {:?}", res); + let v = serde_json::from_str::>(&res)?; + println!("json: {:?}", v); + + let user_op = UserOperation { + pre_verification_gas: v + .result + .pre_verification_gas + .saturating_add(U256::from(1000)), + verification_gas_limit: v.result.verification_gas_limit, + call_gas_limit: v.result.call_gas_limit.saturating_add(U256::from(2000)), + max_priority_fee_per_gas: priority_fee, + max_fee_per_gas: gas_price, + ..user_op + }; + let user_op = uo_wallet + .sign_uo( + &user_op, + &ADDRESS.to_string().parse::
()?, + &U256::from(5), + ) + .await?; + + let send_body = Request { + jsonrpc: "2.0".to_string(), + id: 1, + method: "eth_sendUserOperation".to_string(), + params: vec![ + serde_json::to_value(&user_op).unwrap(), + ADDRESS.to_string().into(), + ], + }; + let post = reqwest::Client::builder() + .build()? + .post(bundler_url.as_str()) + .json(&send_body) + .send() + .await?; + + println!("post: {:?}", post); + let res = post.text().await?; + println!("res: {:?}", res); + Ok(()) +} diff --git a/examples/simple_account/transfer.rs b/examples/simple_account/transfer.rs new file mode 100644 index 00000000..aed1445f --- /dev/null +++ b/examples/simple_account/transfer.rs @@ -0,0 +1,147 @@ +use std::{env, str::FromStr, sync::Arc, time::Duration}; + +use ethers::{ + prelude::{MiddlewareBuilder, SignerMiddleware}, + providers::{Http, Middleware, Provider}, + signers::{coins_bip39::English, MnemonicBuilder, Signer}, + types::{Address, Bytes, U256}, +}; +use reqwest; +use silius_contracts::EntryPoint; +use silius_examples::{simple_account::SimpleAccountExecute, EstimateResult, Request, Response}; +use silius_primitives::consts::entry_point::ADDRESS; +use silius_primitives::UserOperation; +use silius_primitives::Wallet as UoWallet; +use silius_tests::common::gen::SimpleAccountFactory; + +// stackup simple account factory +const SIMPLE_ACCOUNT_FACTORY: &str = "0x9406Cc6185a346906296840746125a0E44976454"; +// 0.6.0 entrypoint address +const CREATE_INDEX: u64 = 1; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + let seed_phrase = env::var("SEED_PHRASE").unwrap(); + let bundler_url = env::var("BUNDLER_URL").unwrap(); + let wallet = MnemonicBuilder::::default() + .phrase(seed_phrase.as_str()) + .build()?; + let provider = + Provider::::try_from(bundler_url.as_str())?.interval(Duration::from_millis(10u64)); + let client = SignerMiddleware::new(provider.clone(), wallet.clone().with_chain_id(5u64)) + .nonce_manager(wallet.address()); + let provider = Arc::new(client); + + let simple_account_factory_address = SIMPLE_ACCOUNT_FACTORY.to_string().parse::
()?; + let simple_account_factory = + SimpleAccountFactory::new(simple_account_factory_address, provider.clone()); + + let owner_address = wallet.address(); + println!("simple_account_factory: {:?}", simple_account_factory); + println!("Signer address: {:x}", owner_address); + let address = simple_account_factory + .get_address(owner_address, U256::from(CREATE_INDEX)) + .call() + .await?; + println!("Smart account addresss: {:?}", address); + + let nonce = EntryPoint::new(provider.clone(), ADDRESS.parse::
()?) + .get_nonce(&address, U256::zero()) + .await?; + println!("nonce: {:?}", nonce); + let (gas_price, priority_fee) = provider.estimate_eip1559_fees(None).await?; + println!( + "gas_price: {:?}, priority_fee: {:?}", + gas_price, priority_fee + ); + + let execution = SimpleAccountExecute::new( + Address::from_str("0x21A14e061fe67A3060ef238DDD8Bf90c81829F7d")?, + U256::from(1), + Bytes::default(), + ); + + let user_op = UserOperation { + sender: address, + nonce, + init_code: Bytes::default(), + call_data: Bytes::from(execution.encode()), + call_gas_limit: U256::from(10000u64), + verification_gas_limit: U256::from(10000u64), + pre_verification_gas: U256::from(1u64), + max_fee_per_gas: U256::from(1), + max_priority_fee_per_gas: priority_fee, + paymaster_and_data: Bytes::new(), + signature: Bytes::default(), + }; + let uo_wallet = UoWallet::from_phrase(seed_phrase.as_str(), &U256::from(5), false)?; + let user_op = uo_wallet + .sign_uo( + &user_op, + &ADDRESS.to_string().parse::
()?, + &U256::from(5), + ) + .await?; + + let value = serde_json::to_value(&user_op).unwrap(); + + let req_body = Request { + jsonrpc: "2.0".to_string(), + id: 1, + method: "eth_estimateUserOperationGas".to_string(), + params: vec![value, ADDRESS.to_string().into()], + }; + println!("req_body: {:?}", serde_json::to_string(&req_body)?); + let post = reqwest::Client::builder() + .build()? + .post(bundler_url.as_str()) + .json(&req_body) + .send() + .await?; + println!("post: {:?}", post); + let res = post.text().await?; + println!("res: {:?}", res); + let v = serde_json::from_str::>(&res)?; + println!("json: {:?}", v); + + let user_op = UserOperation { + pre_verification_gas: v + .result + .pre_verification_gas + .saturating_add(U256::from(1000)), + verification_gas_limit: v.result.verification_gas_limit, + call_gas_limit: v.result.call_gas_limit.saturating_mul(U256::from(2)), + max_priority_fee_per_gas: priority_fee, + max_fee_per_gas: gas_price, + ..user_op + }; + let user_op = uo_wallet + .sign_uo( + &user_op, + &ADDRESS.to_string().parse::
()?, + &U256::from(5), + ) + .await?; + + let send_body = Request { + jsonrpc: "2.0".to_string(), + id: 1, + method: "eth_sendUserOperation".to_string(), + params: vec![ + serde_json::to_value(&user_op).unwrap(), + ADDRESS.to_string().into(), + ], + }; + let post = reqwest::Client::builder() + .build()? + .post(bundler_url) + .json(&send_body) + .send() + .await?; + + println!("post: {:?}", post); + let res = post.text().await?; + println!("res: {:?}", res); + + Ok(()) +} diff --git a/examples/src/lib.rs b/examples/src/lib.rs new file mode 100644 index 00000000..311838ca --- /dev/null +++ b/examples/src/lib.rs @@ -0,0 +1,49 @@ +use ethers::types::U256; +use serde::{Deserialize, Serialize}; + +#[derive(Debug, Serialize)] +pub struct Request { + pub jsonrpc: String, + pub id: u64, + pub method: String, + pub params: T, +} + +#[derive(Debug, Serialize, Deserialize)] +#[serde(rename_all = "camelCase")] +pub struct EstimateResult { + pub pre_verification_gas: U256, + pub verification_gas_limit: U256, + pub call_gas_limit: U256, +} + +#[derive(Debug, Deserialize)] +pub struct Response { + pub jsonrpc: String, + pub id: u64, + pub result: T, +} + +pub mod simple_account { + use alloy_primitives::{Address, U256}; + use alloy_sol_types::{sol, SolCall}; + use ethers::types::{Address as EAddress, Bytes as EBytes, U256 as EU256}; + + sol! {function execute(address dest, uint256 value, bytes calldata func);} + + pub struct SimpleAccountExecute(executeCall); + + impl SimpleAccountExecute { + pub fn new(address: EAddress, value: EU256, func: EBytes) -> Self { + Self(executeCall { + dest: Address::from(address.0), + value: U256::from_limbs(value.0), + func: func.to_vec(), + }) + } + + pub fn encode(&self) -> Vec { + self.0.encode() + } + } +} diff --git a/tests/Cargo.toml b/tests/Cargo.toml index f23037c8..bf90bf55 100644 --- a/tests/Cargo.toml +++ b/tests/Cargo.toml @@ -10,8 +10,7 @@ description = """ AA (ERC-4337) bundler integration tests """ -[dev-dependencies] - +[dependencies] anyhow = "1" ethers = { workspace = true } silius-contracts = { path = "../crates/contracts" } @@ -19,3 +18,6 @@ silius-primitives = { path = "../crates/primitives" } silius-uopool = { path = "../crates/uopool" } tempdir = "0.3.7" tokio = { workspace = true } + +[package.metadata.cargo-udeps.ignore] +normal = ["silius-contracts", "silius-primitives", "silius-uopool"] diff --git a/tests/src/common/mod.rs b/tests/src/common/mod.rs index a2d9590f..b821f016 100644 --- a/tests/src/common/mod.rs +++ b/tests/src/common/mod.rs @@ -15,7 +15,7 @@ use tempdir::TempDir; pub mod gen; -pub const KEY_PHRASE: &str = "test test test test test test test test test test test junk"; +pub const SEED_PHRASE: &str = "test test test test test test test test test test test junk"; pub type ClientType = NonceManagerMiddleware, LocalWallet>>; pub struct DeployedContract { @@ -41,7 +41,7 @@ pub async fn deploy_entry_point( let (ep, receipt) = EntryPointContract::deploy(client, ())? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(ep, addr)) } @@ -51,7 +51,7 @@ pub async fn deploy_test_opcode_account( let (acc, receipt) = TestOpcodesAccount::deploy(client, ())? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(acc, addr)) } @@ -61,7 +61,7 @@ pub async fn deploy_test_opcode_account_factory( let (factory, receipt) = TestOpcodesAccountFactory::deploy(client, ())? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(factory, addr)) } @@ -72,7 +72,7 @@ pub async fn deploy_test_storage_account_factory( let (factory, receipt) = TestStorageAccountFactory::deploy(client, test_coin_addr)? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(factory, addr)) } @@ -82,7 +82,7 @@ pub async fn deploy_test_storage_account( let (acc, receipt) = TestStorageAccount::deploy(client, ())? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(acc, addr)) } @@ -93,7 +93,7 @@ pub async fn deploy_test_recursion_account( let (acc, receipt) = TestRecursionAccount::deploy(client, ep)? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(acc, addr)) } @@ -103,7 +103,7 @@ pub async fn deploy_test_rules_account_factory( let (factory, receipt) = TestRulesAccountFactory::deploy(client, ())? .send_with_receipt() .await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(factory, addr)) } @@ -111,7 +111,7 @@ pub async fn deploy_tracer_test( client: Arc, ) -> anyhow::Result>> { let (factory, receipt) = TracerTest::deploy(client, ())?.send_with_receipt().await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(factory, addr)) } @@ -119,7 +119,7 @@ pub async fn deploy_test_coin( client: Arc, ) -> anyhow::Result>> { let (factory, receipt) = TestCoin::deploy(client, ())?.send_with_receipt().await?; - let addr = receipt.contract_address.unwrap(); + let addr = receipt.contract_address.unwrap_or(Address::zero()); Ok(DeployedContract::new(factory, addr)) } @@ -127,7 +127,7 @@ pub async fn setup_geth() -> anyhow::Result<(GethInstance, ClientType, Provider< let chain_id: u64 = 1337; let tmp_dir = TempDir::new("test_geth")?; let wallet = MnemonicBuilder::::default() - .phrase(KEY_PHRASE) + .phrase(SEED_PHRASE) .build()?; let geth = Geth::new().data_dir(tmp_dir.path().to_path_buf()).spawn(); diff --git a/tests/src/lib.rs b/tests/src/lib.rs index d666e6fc..e57e92a5 100644 --- a/tests/src/lib.rs +++ b/tests/src/lib.rs @@ -1,7 +1,6 @@ #![allow(dead_code)] -#[cfg(test)] -mod common; +pub mod common; #[cfg(test)] mod simulation_tests; #[cfg(test)]