diff --git a/Cargo.lock b/Cargo.lock index 19d6f3afa..f3d2b823f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -59,6 +59,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom", "once_cell", "version_check", "zerocopy", @@ -81,9 +82,9 @@ checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" [[package]] name = "alloy" -version = "0.1.4" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ba1c79677c9ce51c8d45e20845b05e6fb070ea2c863fba03ad6af2c778474bd" +checksum = "44ab65cb6104c389b46df77b7990cab08780f57e41b412b46d6d12baf7e8c716" dependencies = [ "alloy-consensus", "alloy-contract", @@ -113,27 +114,45 @@ dependencies = [ [[package]] name = "alloy-consensus" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f63a6c9eb45684a5468536bc55379a2af0f45ffa5d756e4e4964532737e1836" +checksum = "3a1ff8439834ab71a4b0ecd1a8ff80b3921c87615f158940c3364f399c732786" dependencies = [ "alloy-eips", "alloy-primitives", "alloy-rlp", "alloy-serde", + "alloy-trie", + "auto_impl", "c-kzg", + "derive_more", + "serde", +] + +[[package]] +name = "alloy-consensus-any" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "519a86faaa6729464365a90c04eba68539b6d3a30f426edb4b3dafd78920d42f" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-rlp", + "alloy-serde", "serde", ] [[package]] name = "alloy-contract" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c26b7d34cb76f826558e9409a010e25257f7bfb5aa5e3dd0042c564664ae159" +checksum = "cca2b353d8b7f160dc930dfa174557acefece6deab5ecd7e6230d38858579eea" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-provider", "alloy-rpc-types-eth", @@ -146,21 +165,22 @@ dependencies = [ [[package]] name = "alloy-core" -version = "0.7.6" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5af3faff14c12c8b11037e0a093dd157c3702becb8435577a2408534d0758315" +checksum = "e8d22df68fa7d9744be0b1a9be3260e9aa089fbf41903ab182328333061ed186" dependencies = [ "alloy-dyn-abi", "alloy-json-abi", "alloy-primitives", + "alloy-rlp", "alloy-sol-types", ] [[package]] name = "alloy-dyn-abi" -version = "0.7.6" +version = "0.8.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6e6436a9530f25010d13653e206fab4c9feddacf21a54de8d7311b275bc56b" +checksum = "1cf633ae9a1f0c82fdb9e559ed2be1c8e415c3e48fc47e1feaf32c6078ec0cdd" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -173,16 +193,42 @@ dependencies = [ "winnow 0.6.13", ] +[[package]] +name = "alloy-eip2930" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0069cf0642457f87a01a014f6dc29d5d893cd4fd8fddf0c3cdfad1bb3ebafc41" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "serde", +] + +[[package]] +name = "alloy-eip7702" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c986539255fb839d1533c128e190e557e52ff652c9ef62939e233a81dd93f7e" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "derive_more", + "serde", +] + [[package]] name = "alloy-eips" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4b0fc6a572ef2eebda0a31a5e393d451abda703fec917c75d9615d8c978cf2" +checksum = "8dedb328c2114284f767e075589ca9de8d5e9c8a91333402f4804a584ed71a38" dependencies = [ + "alloy-eip2930", + "alloy-eip7702", "alloy-primitives", "alloy-rlp", "alloy-serde", "c-kzg", + "derive_more", "once_cell", "serde", "sha2", @@ -190,9 +236,9 @@ dependencies = [ [[package]] name = "alloy-genesis" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48450f9c6f0821c1eee00ed912942492ed4f11dd69532825833de23ecc7a2256" +checksum = "4841e8dd4e0f53d76b501fd4c6bc21d95d688bc8ebf0ea359fc6c7ab65b48742" dependencies = [ "alloy-primitives", "alloy-serde", @@ -201,9 +247,9 @@ dependencies = [ [[package]] name = "alloy-json-abi" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aaeaccd50238126e3a0ff9387c7c568837726ad4f4e399b528ca88104d6c25ef" +checksum = "ac4b22b3e51cac09fd2adfcc73b55f447b4df669f983c13f7894ec82b607c63f" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -213,11 +259,12 @@ dependencies = [ [[package]] name = "alloy-json-rpc" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d484c2a934d0a4d86f8ad4db8113cb1d607707a6c54f6e78f4f1b4451b47aa70" +checksum = "254f770918f96dc4ec88a15e6e2e243358e1719d66b40ef814428e7697079d25" dependencies = [ "alloy-primitives", + "alloy-sol-types", "serde", "serde_json", "thiserror", @@ -226,14 +273,17 @@ dependencies = [ [[package]] name = "alloy-network" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a20eba9bc551037f0626d6d29e191888638d979943fa4e842e9e6fc72bf0565" +checksum = "931dd176c6e33355f3dc0170ec69cf5b951f4d73870b276e2c837ab35f9c5136" 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", @@ -241,14 +291,29 @@ dependencies = [ "async-trait", "auto_impl", "futures-utils-wasm", + "serde", + "serde_json", "thiserror", ] +[[package]] +name = "alloy-network-primitives" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa6ec0f23be233e851e31c5e4badfedfa9c7bc177bc37f4e03616072cd40a806" +dependencies = [ + "alloy-consensus", + "alloy-eips", + "alloy-primitives", + "alloy-serde", + "serde", +] + [[package]] name = "alloy-primitives" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f783611babedbbe90db3478c120fb5f5daacceffc210b39adc0af4fe0da70bad" +checksum = "9db948902dfbae96a73c2fbf1f7abec62af034ab883e4c777c3fd29702bd6e2c" dependencies = [ "alloy-rlp", "arbitrary", @@ -257,31 +322,37 @@ dependencies = [ "const-hex", "derive_arbitrary", "derive_more", - "ethereum_ssz", + "foldhash", "getrandom", + "hashbrown 0.15.2", "hex-literal", + "indexmap 2.6.0", "itoa", "k256", "keccak-asm", + "paste", "proptest", "proptest-derive", "rand", "ruint", + "rustc-hash", "serde", + "sha3", "tiny-keccak", ] [[package]] name = "alloy-provider" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad5d89acb7339fad13bc69e7b925232f242835bfd91c82fcb9326b36481bd0f0" +checksum = "5545e2cbf2f8f24c68bb887ba0294fa12a2f816b9e72c4f226cd137b77d0e294" dependencies = [ "alloy-chains", "alloy-consensus", "alloy-eips", "alloy-json-rpc", "alloy-network", + "alloy-network-primitives", "alloy-primitives", "alloy-rpc-client", "alloy-rpc-types-eth", @@ -290,24 +361,28 @@ dependencies = [ "async-stream", "async-trait", "auto_impl", - "dashmap 5.5.3", + "dashmap 6.1.0", "futures", "futures-utils-wasm", "lru", + "parking_lot", "pin-project", "reqwest", + "schnellru", "serde", "serde_json", + "thiserror", "tokio", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-rlp" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a43b18702501396fa9bcdeecd533bc85fac75150d308fc0f6800a01e6234a003" +checksum = "da0822426598f95e45dd1ea32a738dac057529a709ee645fcc516ffa4cbde08f" dependencies = [ "alloy-rlp-derive", "arrayvec", @@ -316,22 +391,23 @@ dependencies = [ [[package]] name = "alloy-rlp-derive" -version = "0.3.7" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83524c1f6162fcb5b0decf775498a125066c86dda6066ed609531b0e912f85a" +checksum = "2b09cae092c27b6f1bde952653a22708691802e57bfef4a2973b80bea21efd3f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] name = "alloy-rpc-client" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479ce003e8c74bbbc7d4235131c1d6b7eaf14a533ae850295b90d240340989cb" +checksum = "aed9e40c2a73265ebf70f1e48303ee55920282e1ea5971e832873fb2d32cea74" dependencies = [ "alloy-json-rpc", + "alloy-primitives", "alloy-transport", "alloy-transport-http", "futures", @@ -341,44 +417,61 @@ dependencies = [ "serde_json", "tokio", "tokio-stream", - "tower", + "tower 0.5.1", "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-rpc-types" -version = "0.1.3" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42dea20fa715a6f39ec7adc735cfd9567342870737270ac67795d55896527772" +dependencies = [ + "alloy-primitives", + "alloy-rpc-types-eth", + "alloy-serde", + "serde", +] + +[[package]] +name = "alloy-rpc-types-any" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dfa1dd3e0bc3a3d89744fba8d1511216e83257160da2cd028a18b7d9c026030" +checksum = "79d7620e22d6ed7c58451dd303d0501ade5a8bec9dc8daef0fbc48ceffabbae1" dependencies = [ + "alloy-consensus", + "alloy-consensus-any", "alloy-rpc-types-eth", "alloy-serde", ] [[package]] name = "alloy-rpc-types-eth" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bd7aa9ff9e67f1ba7ee0dd8cebfc95831d1649b0e4eeefae940dc3681079fa" +checksum = "df34b88df4deeac9ecfc80ad7cbb26a33e57437b9db8be5b952792feef6134bc" dependencies = [ "alloy-consensus", + "alloy-consensus-any", "alloy-eips", + "alloy-network-primitives", "alloy-primitives", "alloy-rlp", "alloy-serde", "alloy-sol-types", + "derive_more", "itertools 0.13.0", "serde", "serde_json", - "thiserror", ] [[package]] name = "alloy-serde" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8913f9e825068d77c516188c221c44f78fd814fce8effe550a783295a2757d19" +checksum = "43a89fd4cc3f96b3c5c0dd1cebeb63323e4659bbdc837117fa3fd5ac168df7d9" dependencies = [ "alloy-primitives", "serde", @@ -387,9 +480,9 @@ dependencies = [ [[package]] name = "alloy-signer" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f740e13eb4c6a0e4d0e49738f1e86f31ad2d7ef93be499539f492805000f7237" +checksum = "532010243a96d1f8593c2246ec3971bc52303884fa1e43ca0a776798ba178910" dependencies = [ "alloy-primitives", "async-trait", @@ -401,16 +494,15 @@ dependencies = [ [[package]] name = "alloy-signer-local" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87db68d926887393a1d0f9c43833b44446ea29d603291e7b20e5d115f31aa4e3" +checksum = "e8080c0ab2dc729b0cbb183843d08e78d2a1629140c9fc16234d2272abb483bd" dependencies = [ "alloy-consensus", "alloy-network", "alloy-primitives", "alloy-signer", "async-trait", - "elliptic-curve", "eth-keystore", "k256", "rand", @@ -419,42 +511,42 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bad41a7c19498e3f6079f7744656328699f8ea3e783bdd10d85788cd439f572" +checksum = "3bfd7853b65a2b4f49629ec975fee274faf6dff15ab8894c620943398ef283c0" dependencies = [ "alloy-sol-macro-expander", "alloy-sol-macro-input", - "proc-macro-error", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] name = "alloy-sol-macro-expander" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd9899da7d011b4fe4c406a524ed3e3f963797dbc93b45479d60341d3a27b252" +checksum = "82ec42f342d9a9261699f8078e57a7a4fda8aaa73c1a212ed3987080e6a9cd13" dependencies = [ "alloy-json-abi", "alloy-sol-macro-input", "const-hex", "heck", - "indexmap 2.2.6", - "proc-macro-error", + "indexmap 2.6.0", + "proc-macro-error2", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", "syn-solidity", "tiny-keccak", ] [[package]] name = "alloy-sol-macro-input" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32d595768fdc61331a132b6f65db41afae41b9b97d36c21eb1b955c422a7e60" +checksum = "ed2c50e6a62ee2b4f7ab3c6d0366e5770a21cad426e109c2f40335a1b3aff3df" dependencies = [ "alloy-json-abi", "const-hex", @@ -463,24 +555,25 @@ dependencies = [ "proc-macro2", "quote", "serde_json", - "syn 2.0.68", + "syn 2.0.89", "syn-solidity", ] [[package]] name = "alloy-sol-type-parser" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baa2fbd22d353d8685bd9fee11ba2d8b5c3b1d11e56adb3265fcf1f32bfdf404" +checksum = "ac17c6e89a50fb4a758012e4b409d9a0ba575228e69b539fe37d7a1bd507ca4a" dependencies = [ + "serde", "winnow 0.6.13", ] [[package]] name = "alloy-sol-types" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49042c6d3b66a9fe6b2b5a8bf0d39fc2ae1ee0310a2a26ffedd79fb097878dd" +checksum = "c9dc0fffe397aa17628160e16b89f704098bf3c9d74d5d369ebc239575936de5" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -491,9 +584,9 @@ dependencies = [ [[package]] name = "alloy-transport" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd9773e4ec6832346171605c776315544bd06e40f803e7b5b7824b325d5442ca" +checksum = "b6f295f4b745fb9e4e663d70bc57aed991288912c7aaaf25767def921050ee43" dependencies = [ "alloy-json-rpc", "base64", @@ -503,25 +596,42 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tower", + "tower 0.5.1", + "tracing", "url", + "wasmtimer", ] [[package]] name = "alloy-transport-http" -version = "0.1.3" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff8ef947b901c0d4e97370f9fa25844cf8b63b1a58fd4011ee82342dc8a9fc6b" +checksum = "39139015a5ec127d9c895b49b484608e27fe4538544f84cdf5eae0bd36339bc6" dependencies = [ "alloy-json-rpc", "alloy-transport", "reqwest", "serde_json", - "tower", + "tower 0.5.1", "tracing", "url", ] +[[package]] +name = "alloy-trie" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b2e366c0debf0af77766c23694a3f863b02633050e71e096e257ffbd395e50" +dependencies = [ + "alloy-primitives", + "alloy-rlp", + "arrayvec", + "derive_more", + "nybbles", + "smallvec", + "tracing", +] + [[package]] name = "anstream" version = "0.6.14" @@ -726,7 +836,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -737,7 +847,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -748,7 +858,7 @@ checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1029,7 +1139,7 @@ dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1046,9 +1156,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", @@ -1063,12 +1173,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 = "convert_case" version = "0.6.0" @@ -1294,7 +1398,7 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1305,7 +1409,7 @@ checksum = "733cabb43482b1a1b53eee8583c2b9e8684d592215ea83efd305dd31bc2f0178" dependencies = [ "darling_core", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1364,20 +1468,28 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] name = "derive_more" -version = "0.99.18" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a9b99b9cbbe49445b21764dc0625032a89b145a2642e67603e1c936f5458d05" +dependencies = [ + "derive_more-impl", +] + +[[package]] +name = "derive_more-impl" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f33878137e4dafd7fa914ad4e259e18a4e8e532b9617a2d0150262bf53abfce" +checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ - "convert_case 0.4.0", "proc-macro2", "quote", - "rustc_version 0.4.0", - "syn 2.0.68", + "syn 2.0.89", + "unicode-xid", ] [[package]] @@ -1409,7 +1521,7 @@ checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" [[package]] name = "e2e" -version = "0.1.0" +version = "0.2.0" dependencies = [ "alloy", "e2e-proc", @@ -1427,7 +1539,7 @@ version = "0.1.0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1453,7 +1565,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1518,7 +1630,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1539,7 +1651,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1688,44 +1800,6 @@ dependencies = [ "uuid 0.8.2", ] -[[package]] -name = "ethbloom" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c22d4b5885b6aa2fe5e8b9329fb8d232bf739e434e6b87347c63bdd00c120f60" -dependencies = [ - "crunchy", - "fixed-hash", - "impl-rlp", - "impl-serde", - "tiny-keccak", -] - -[[package]] -name = "ethereum-types" -version = "0.14.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02d215cbf040552efcbe99a38372fe80ab9d00268e20012b79fcd0f073edd8ee" -dependencies = [ - "ethbloom", - "fixed-hash", - "impl-rlp", - "impl-serde", - "primitive-types", - "uint", -] - -[[package]] -name = "ethereum_ssz" -version = "0.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d3627f83d8b87b432a5fad9934b4565260722a141a2c40f371f8080adec9425" -dependencies = [ - "ethereum-types", - "itertools 0.10.5", - "smallvec", -] - [[package]] name = "eyre" version = "0.6.12" @@ -1775,7 +1849,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ - "arbitrary", "byteorder", "rand", "rustc-hex", @@ -1788,6 +1861,12 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "foldhash" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" + [[package]] name = "foreign-types" version = "0.3.2" @@ -1874,7 +1953,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -1987,6 +2066,12 @@ dependencies = [ "ahash 0.7.8", ] +[[package]] +name = "hashbrown" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" + [[package]] name = "hashbrown" version = "0.14.5" @@ -1997,6 +2082,16 @@ dependencies = [ "allocator-api2", ] +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +dependencies = [ + "foldhash", + "serde", +] + [[package]] name = "heck" version = "0.5.0" @@ -2123,7 +2218,7 @@ dependencies = [ "pin-project-lite", "socket2", "tokio", - "tower", + "tower 0.4.13", "tower-service", "tracing", ] @@ -2153,24 +2248,6 @@ dependencies = [ "parity-scale-codec", ] -[[package]] -name = "impl-rlp" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28220f89297a075ddc7245cd538076ee98b01f2a9c23a53a4f1105d5a322808" -dependencies = [ - "rlp", -] - -[[package]] -name = "impl-serde" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc88fc67028ae3db0c853baa36269d398d5f45b6982f95549ff5def78c935cd" -dependencies = [ - "serde", -] - [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -2200,12 +2277,14 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "707907fe3c25f5424cce2cb7e1cbcafee6bdbe735ca90ef77c29e84591e5b9da" dependencies = [ + "arbitrary", "equivalent", - "hashbrown 0.14.5", + "hashbrown 0.15.2", + "serde", ] [[package]] @@ -2302,9 +2381,9 @@ checksum = "57d8d8ce877200136358e0bbff3a77965875db3af755a11e1fa6b1b3e2df13ea" [[package]] name = "koba" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80e92e1148d087df999396266311bece9e5311c352821872cccaf5dc67117cfc" +checksum = "648bf93c7aff36defcf825c5a42d32503eb617c85f057a989f34ebfebed99f45" dependencies = [ "alloy", "brotli2", @@ -2435,9 +2514,8 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mini-alloc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14eacc4bfcf10da9b6d5185ef51b2dc75434afac34b4d8aabe40f6b141ee071c" +version = "0.7.0-rc.1" +source = "git+https://github.com/OffchainLabs/stylus-sdk-rs?branch=rel%2F0.7.0-rc.1#754c69be04c0017a1d2573f2aa5b0c5f2483288a" dependencies = [ "cfg-if", ] @@ -2471,8 +2549,7 @@ checksum = "7843ec2de400bcbc6a6328c958dc38e5359da6e93e72e37bc5246bf1ae776389" [[package]] name = "motsu" version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc9f12a78b4ce861c6a73758b137200a7139b402bc3fd8baa0477e936a572605" +source = "git+https://github.com/OpenZeppelin/stylus-test-helpers?branch=build%2Fstylus-v0.7.0-rc.1#23e8451ca9988caddab3b878cb3b53d343ffa18c" dependencies = [ "const-hex", "dashmap 6.1.0", @@ -2485,12 +2562,11 @@ dependencies = [ [[package]] name = "motsu-proc" version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e477b432a80b129a0ecb1da2ba257140e73655bd922f2fd02a7b13e76216374" +source = "git+https://github.com/OpenZeppelin/stylus-test-helpers?branch=build%2Fstylus-v0.7.0-rc.1#23e8451ca9988caddab3b878cb3b53d343ffa18c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -2566,7 +2642,17 @@ checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", +] + +[[package]] +name = "nybbles" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95f06be0417d97f81fe4e5c86d7d01b392655a9cac9c19a848aa033e18937b23" +dependencies = [ + "const-hex", + "smallvec", ] [[package]] @@ -2607,7 +2693,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -2662,10 +2748,10 @@ dependencies = [ name = "openzeppelin-stylus-proc" version = "0.1.0" dependencies = [ - "convert_case 0.6.0", + "convert_case", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -2798,7 +2884,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -2843,8 +2929,6 @@ checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" dependencies = [ "fixed-hash", "impl-codec", - "impl-rlp", - "impl-serde", "uint", ] @@ -2881,11 +2965,33 @@ dependencies = [ "version_check", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn 2.0.89", +] + [[package]] name = "proc-macro2" -version = "1.0.86" +version = "1.0.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" +checksum = "37d3544b3f2748c54e147655edb5025752e2303145b5aefb3c3ea2c78b973bb0" dependencies = [ "unicode-ident", ] @@ -2912,13 +3018,13 @@ dependencies = [ [[package]] name = "proptest-derive" -version = "0.4.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cf16337405ca084e9c78985114633b6827711d22b9e6ef6c6c0d665eb3f0b6e" +checksum = "6ff7ff745a347b87471d859a377a9a404361e7efc2a971d73424a6d183c0fc77" dependencies = [ "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.89", ] [[package]] @@ -2971,6 +3077,7 @@ dependencies = [ "libc", "rand_chacha", "rand_core", + "serde", ] [[package]] @@ -3044,9 +3151,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" dependencies = [ "aho-corasick", "memchr", @@ -3056,9 +3163,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" dependencies = [ "aho-corasick", "memchr", @@ -3067,9 +3174,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.4" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] name = "region" @@ -3120,7 +3227,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "sync_wrapper", + "sync_wrapper 1.0.1", "tokio", "tokio-native-tls", "tower-service", @@ -3218,6 +3325,12 @@ version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +[[package]] +name = "rustc-hash" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583034fd73374156e66797ed8e5b0d5690409c9226b22d87cb7f19821c05d152" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -3326,6 +3439,17 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "schnellru" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9a8ef13a93c54d20580de1e5c413e624e53121d42fc7e2c11d10ef7f8b02367" +dependencies = [ + "ahash 0.8.11", + "cfg-if", + "hashbrown 0.13.2", +] + [[package]] name = "scopeguard" version = "1.2.0" @@ -3439,7 +3563,7 @@ checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -3608,33 +3732,33 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] name = "stylus-proc" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd02e91dffe7b73df84a861c992494d6b72054bc9a17fe73e147e34e9a64ef3" +version = "0.7.0-rc.1" +source = "git+https://github.com/OffchainLabs/stylus-sdk-rs?branch=rel%2F0.7.0-rc.1#754c69be04c0017a1d2573f2aa5b0c5f2483288a" dependencies = [ "alloy-primitives", "alloy-sol-types", "cfg-if", - "convert_case 0.6.0", + "convert_case", "lazy_static", + "proc-macro-error", "proc-macro2", "quote", "regex", "sha3", - "syn 1.0.109", + "syn 2.0.89", "syn-solidity", + "trybuild", ] [[package]] name = "stylus-sdk" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26042693706e29fb7e3cf3d71c99534ac97fca98b6f81ba77ab658022ab2e210" +version = "0.7.0-rc.1" +source = "git+https://github.com/OffchainLabs/stylus-sdk-rs?branch=rel%2F0.7.0-rc.1#754c69be04c0017a1d2573f2aa5b0c5f2483288a" dependencies = [ "alloy-primitives", "alloy-sol-types", @@ -3666,9 +3790,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "44d46482f1c1c87acd84dea20c1bf5ebff4c757009ed6bf19cfd36fb10e92c4e" dependencies = [ "proc-macro2", "quote", @@ -3677,16 +3801,22 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.7.6" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d71e19bca02c807c9faa67b5a47673ff231b6e7449b251695188522f1dc44b2" +checksum = "da0523f59468a2696391f2a772edc089342aacd53c3caa2ac3264e598edf119b" dependencies = [ "paste", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + [[package]] name = "sync_wrapper" version = "1.0.1" @@ -3705,6 +3835,12 @@ version = "0.12.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" +[[package]] +name = "target-triple" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "42a4d50cdb458045afc8131fd91b64904da29548bcb63c7236e0844936c13078" + [[package]] name = "tempfile" version = "3.10.1" @@ -3717,6 +3853,15 @@ dependencies = [ "windows-sys 0.52.0", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.61" @@ -3734,7 +3879,7 @@ checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -3797,7 +3942,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -3862,7 +4007,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "toml_datetime", "winnow 0.5.40", ] @@ -3873,7 +4018,7 @@ version = "0.22.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.6.0", "serde", "serde_spanned", "toml_datetime", @@ -3893,20 +4038,33 @@ dependencies = [ "tokio", "tower-layer", "tower-service", - "tracing", +] + +[[package]] +name = "tower" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2873938d487c3cfb9aed7546dc9f2711d867c9f90c46b889989a2cb84eba6b4f" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper 0.1.2", + "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" @@ -3914,7 +4072,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", @@ -3928,7 +4085,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -3946,6 +4103,21 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "trybuild" +version = "1.0.101" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8dcd332a5496c026f1e14b7f3d2b7bd98e509660c04239c58b0ba38a12daded4" +dependencies = [ + "glob", + "serde", + "serde_derive", + "serde_json", + "target-triple", + "termcolor", + "toml", +] + [[package]] name = "typenum" version = "1.17.0" @@ -3964,7 +4136,6 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ - "arbitrary", "byteorder", "crunchy", "hex", @@ -4010,6 +4181,12 @@ version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "url" version = "2.5.2" @@ -4119,7 +4296,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", "wasm-bindgen-shared", ] @@ -4176,7 +4353,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4331,6 +4508,20 @@ dependencies = [ "url", ] +[[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 = "wast" version = "212.0.0" @@ -4379,6 +4570,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -4621,7 +4821,7 @@ checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] [[package]] @@ -4641,5 +4841,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.89", ] diff --git a/Cargo.toml b/Cargo.toml index 0357aeef7..24c9445b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -70,10 +70,10 @@ pedantic = "warn" all = "warn" [workspace.dependencies] -# stylus-related -stylus-sdk = "0.6.0" +# Stylus SDK related +stylus-sdk = "0.7.0-rc.1" -alloy = { version = "=0.1.4", features = [ +alloy = { version = "=0.7.2", features = [ "contract", "network", "providers", @@ -86,16 +86,16 @@ alloy = { version = "=0.1.4", features = [ # Even though `alloy` includes `alloy-primitives` and `alloy-sol-types` we need # to keep both versions for compatibility with the Stylus SDK. Once they start # using `alloy` we can remove these. -alloy-primitives = { version = "=0.7.6", default-features = false } -alloy-sol-types = { version = "=0.7.6", default-features = false } -alloy-sol-macro = { version = "=0.7.6", default-features = false } -alloy-sol-macro-expander = { version = "=0.7.6", default-features = false } -alloy-sol-macro-input = { version = "=0.7.6", default-features = false } +alloy-primitives = { version = "=0.8.14", default-features = false } +alloy-sol-types = { version = "=0.8.14", default-features = false } +alloy-sol-macro = { version = "=0.8.14", default-features = false } +alloy-sol-macro-expander = { version = "=0.8.14", default-features = false } +alloy-sol-macro-input = { version = "=0.8.14", default-features = false } const-hex = { version = "1.11.1", default-features = false } eyre = "0.6.8" keccak-const = "0.2.0" -koba = "0.2.0" +koba = "0.3.0" once_cell = "1.19.0" rand = "0.8.5" regex = "1.10.4" @@ -147,3 +147,17 @@ default = { extend-ignore-identifiers-re = [ "[0-9a-fA-F][0-9a-fA-F]", ] } files = { extend-exclude = [] } + +# TODO#q: remove stylus sdk patch once the fix is released +[patch.crates-io.stylus-sdk] +git = "https://github.com/OffchainLabs/stylus-sdk-rs" +branch = "rel/0.7.0-rc.1" + +[patch.crates-io.stylus-proc] +git = "https://github.com/OffchainLabs/stylus-sdk-rs" +branch = "rel/0.7.0-rc.1" + +# TODO#q: remove motsu patch once update is released +[patch.crates-io.motsu] +git = "https://github.com/OpenZeppelin/stylus-test-helpers" +branch = "build/stylus-v0.7.0-rc.1" \ No newline at end of file diff --git a/benches/src/lib.rs b/benches/src/lib.rs index bdad0189c..4f15bc25e 100644 --- a/benches/src/lib.rs +++ b/benches/src/lib.rs @@ -3,7 +3,7 @@ use std::process::Command; use alloy::{ primitives::Address, rpc::types::{ - serde_helpers::WithOtherFields, AnyReceiptEnvelope, Log, + serde_helpers::WithOtherFields, AnyReceiptEnvelope, Log, Receipt, TransactionReceipt, }, }; @@ -42,7 +42,7 @@ pub enum CacheOpt { } type ArbTxReceipt = - WithOtherFields>>; + WithOtherFields>>>; async fn deploy( account: &Account, diff --git a/contracts/src/access/control.rs b/contracts/src/access/control.rs index 216b794f5..b14199ae5 100644 --- a/contracts/src/access/control.rs +++ b/contracts/src/access/control.rs @@ -41,6 +41,8 @@ //! accounts that have been granted it. We recommend using //! `AccessControlDefaultAdminRules` to enforce additional security measures for //! this role. +use alloc::vec::Vec; + use alloy_primitives::{Address, FixedBytes, B256}; pub use sol::*; use stylus_sdk::{ @@ -124,9 +126,6 @@ pub struct AccessControl { #[public] impl AccessControl { - /// The default admin role. `[0; 32]` by default. - pub const DEFAULT_ADMIN_ROLE: [u8; 32] = [0; 32]; - /// Returns `true` if `account` has been granted `role`. /// /// # Arguments @@ -278,6 +277,9 @@ impl AccessControl { } impl AccessControl { + /// The default admin role. `[0; 32]` by default. + pub const DEFAULT_ADMIN_ROLE: [u8; 32] = [0; 32]; + /// Sets `admin_role` as `role`'s admin role. /// /// # Arguments diff --git a/contracts/src/access/ownable.rs b/contracts/src/access/ownable.rs index 7caf659d7..9f1177c4c 100644 --- a/contracts/src/access/ownable.rs +++ b/contracts/src/access/ownable.rs @@ -8,6 +8,8 @@ //! This module is used through inheritance. It will make available the //! [`Ownable::only_owner`] function, which can be called to restrict operations //! to the owner. +use alloc::vec::Vec; + use alloy_primitives::Address; use openzeppelin_stylus_proc::interface_id; pub use sol::*; diff --git a/contracts/src/access/ownable_two_step.rs b/contracts/src/access/ownable_two_step.rs index c3f8543ea..042dec21d 100644 --- a/contracts/src/access/ownable_two_step.rs +++ b/contracts/src/access/ownable_two_step.rs @@ -16,6 +16,8 @@ //! This module uses [`Ownable`] as a member, and makes all its public functions //! available. +use alloc::vec::Vec; + use alloy_primitives::Address; pub use sol::*; use stylus_sdk::{ diff --git a/contracts/src/finance/vesting_wallet.rs b/contracts/src/finance/vesting_wallet.rs index e065c7b76..23864878e 100644 --- a/contracts/src/finance/vesting_wallet.rs +++ b/contracts/src/finance/vesting_wallet.rs @@ -25,6 +25,8 @@ //! adjustment in the vesting schedule to ensure the vested amount is as //! intended. +use alloc::{vec, vec::Vec}; + use alloy_primitives::{Address, U256, U64}; use openzeppelin_stylus_proc::interface_id; pub use sol::*; @@ -32,7 +34,7 @@ use stylus_sdk::{ block, call::{self, call, Call}, contract, evm, function_selector, - prelude::storage, + prelude::{sol_interface, storage}, storage::{StorageMap, StorageU256, StorageU64, TopLevelStorage}, stylus_proc::{public, SolidityError}, }; @@ -89,15 +91,11 @@ pub enum Error { InvalidToken(InvalidToken), } -pub use token::IErc20; -mod token { - #![allow(missing_docs)] - #![cfg_attr(coverage_nightly, coverage(off))] - stylus_sdk::stylus_proc::sol_interface! { - /// Interface of the ERC-20 token. - interface IErc20 { - function balanceOf(address account) external view returns (uint256); - } +sol_interface! { + /// Interface of the ERC-20 token. + #[allow(missing_docs)] + interface IErc20 { + function balanceOf(address account) external view returns (uint256); } } diff --git a/contracts/src/token/erc1155/extensions/metadata_uri.rs b/contracts/src/token/erc1155/extensions/metadata_uri.rs index a77eaa0ff..2def28487 100644 --- a/contracts/src/token/erc1155/extensions/metadata_uri.rs +++ b/contracts/src/token/erc1155/extensions/metadata_uri.rs @@ -3,7 +3,7 @@ //! //! [ERC]: https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions -use alloc::string::String; +use alloc::{string::String, vec::Vec}; use alloy_primitives::{FixedBytes, U256}; use openzeppelin_stylus_proc::interface_id; diff --git a/contracts/src/token/erc1155/mod.rs b/contracts/src/token/erc1155/mod.rs index c0dd5dcfd..138e069f7 100644 --- a/contracts/src/token/erc1155/mod.rs +++ b/contracts/src/token/erc1155/mod.rs @@ -7,7 +7,7 @@ use stylus_sdk::{ abi::Bytes, call::{self, Call, MethodError}, evm, function_selector, msg, - prelude::{public, storage, AddressVM, SolidityError}, + prelude::{public, sol_interface, storage, AddressVM, SolidityError}, storage::{StorageBool, StorageMap, StorageU256, TopLevelStorage}, }; @@ -18,9 +18,6 @@ use crate::utils::{ pub mod extensions; -mod receiver; -pub use receiver::IERC1155Receiver; - const SINGLE_TRANSFER_FN_SELECTOR: [u8; 4] = function_selector!( "onERC1155Received", Address, @@ -184,6 +181,61 @@ impl MethodError for Error { } } +sol_interface! { + /// Interface that must be implemented by smart contracts + /// in order to receive ERC-1155 token transfers. + #[allow(missing_docs)] + interface IERC1155Receiver { + /// Handles the receipt of a single ERC-1155 token type. + /// This function is called at the end of a + /// [`IErc1155::safe_batch_transfer_from`] + /// after the balance has been updated. + /// + /// NOTE: To accept the transfer, + /// this must return [`SINGLE_TRANSFER_FN_SELECTOR`], + /// or its own function selector. + /// + /// * `operator` - The address which initiated the transfer. + /// * `from` - The address which previously owned the token. + /// * `id` - The ID of the token being transferred. + /// * `value` - The amount of tokens being transferred. + /// * `data` - Additional data with no specified format. + #[allow(missing_docs)] + function onERC1155Received( + address operator, + address from, + uint256 id, + uint256 value, + bytes calldata data + ) external returns (bytes4); + + /// Handles the receipt of multiple ERC-1155 token types. + /// This function is called at the end of a + /// [`IErc1155::safe_batch_transfer_from`] + /// after the balances have been updated. + /// + /// NOTE: To accept the transfer(s), + /// this must return [`BATCH_TRANSFER_FN_SELECTOR`], + /// or its own function selector. + /// + /// * `operator` - The address which initiated the batch transfer. + /// * `from` - The address which previously owned the token. + /// * `ids` - An array containing ids of each token being transferred + /// (order and length must match values array). + /// * `values` - An array containing amounts of each token + /// being transferred (order and length must match ids array). + /// * `data` - Additional data with no specified format. + #[allow(missing_docs)] + function onERC1155BatchReceived( + address operator, + address from, + uint256[] calldata ids, + uint256[] calldata values, + bytes calldata data + ) external returns (bytes4); + } +} + /// State of an [`Erc1155`] token. #[storage] pub struct Erc1155 { diff --git a/contracts/src/token/erc1155/receiver.rs b/contracts/src/token/erc1155/receiver.rs index 0a78dc556..e69de29bb 100644 --- a/contracts/src/token/erc1155/receiver.rs +++ b/contracts/src/token/erc1155/receiver.rs @@ -1,60 +0,0 @@ -#![allow(missing_docs)] -#![cfg_attr(coverage_nightly, coverage(off))] -//! Module with an interface required for smart contract -//! in order to receive ERC-1155 token transfers. - -use stylus_sdk::stylus_proc::sol_interface; - -sol_interface! { - /// Interface that must be implemented by smart contracts - /// in order to receive ERC-1155 token transfers. - interface IERC1155Receiver { - /// Handles the receipt of a single ERC-1155 token type. - /// This function is called at the end of a - /// [`IErc1155::safe_batch_transfer_from`] - /// after the balance has been updated. - /// - /// NOTE: To accept the transfer, - /// this must return [`SINGLE_TRANSFER_FN_SELECTOR`], - /// or its own function selector. - /// - /// * `operator` - The address which initiated the transfer. - /// * `from` - The address which previously owned the token. - /// * `id` - The ID of the token being transferred. - /// * `value` - The amount of tokens being transferred. - /// * `data` - Additional data with no specified format. - #[allow(missing_docs)] - function onERC1155Received( - address operator, - address from, - uint256 id, - uint256 value, - bytes calldata data - ) external returns (bytes4); - - /// Handles the receipt of multiple ERC-1155 token types. - /// This function is called at the end of a - /// [`IErc1155::safe_batch_transfer_from`] - /// after the balances have been updated. - /// - /// NOTE: To accept the transfer(s), - /// this must return [`BATCH_TRANSFER_FN_SELECTOR`], - /// or its own function selector. - /// - /// * `operator` - The address which initiated the batch transfer. - /// * `from` - The address which previously owned the token. - /// * `ids` - An array containing ids of each token being transferred - /// (order and length must match values array). - /// * `values` - An array containing amounts of each token - /// being transferred (order and length must match ids array). - /// * `data` - Additional data with no specified format. - #[allow(missing_docs)] - function onERC1155BatchReceived( - address operator, - address from, - uint256[] calldata ids, - uint256[] calldata values, - bytes calldata data - ) external returns (bytes4); - } -} diff --git a/contracts/src/token/erc20/extensions/capped.rs b/contracts/src/token/erc20/extensions/capped.rs index 1e38e7f40..de574bf5e 100644 --- a/contracts/src/token/erc20/extensions/capped.rs +++ b/contracts/src/token/erc20/extensions/capped.rs @@ -5,6 +5,8 @@ //! Note that they will not be capped by simply including this module, //! but only once the checks are put in place. +use alloc::vec::Vec; + use alloy_primitives::U256; pub use sol::*; use stylus_sdk::{ diff --git a/contracts/src/token/erc20/extensions/metadata.rs b/contracts/src/token/erc20/extensions/metadata.rs index 20f8f99fc..5128e26b4 100644 --- a/contracts/src/token/erc20/extensions/metadata.rs +++ b/contracts/src/token/erc20/extensions/metadata.rs @@ -11,6 +11,8 @@ use crate::utils::introspection::erc165::IErc165; /// Number of decimals used by default on implementors of [`Metadata`]. pub const DEFAULT_DECIMALS: u8 = 18; +use alloc::vec::Vec; + use crate::utils::Metadata; /// Metadata of the [`super::super::Erc20`] token. diff --git a/contracts/src/token/erc20/extensions/permit.rs b/contracts/src/token/erc20/extensions/permit.rs index 28d7bcf46..918d780fe 100644 --- a/contracts/src/token/erc20/extensions/permit.rs +++ b/contracts/src/token/erc20/extensions/permit.rs @@ -12,6 +12,8 @@ //! //! [ERC]: https://eips.ethereum.org/EIPS/eip-2612 +use alloc::vec::Vec; + use alloy_primitives::{b256, keccak256, Address, B256, U256}; use alloy_sol_types::SolType; use stylus_sdk::{ diff --git a/contracts/src/token/erc20/mod.rs b/contracts/src/token/erc20/mod.rs index dca8fd755..3979f7762 100644 --- a/contracts/src/token/erc20/mod.rs +++ b/contracts/src/token/erc20/mod.rs @@ -4,6 +4,8 @@ //! revert instead of returning `false` on failure. This behavior is //! nonetheless conventional and does not conflict with the expectations of //! [`Erc20`] applications. +use alloc::vec::Vec; + use alloy_primitives::{Address, FixedBytes, U256}; use openzeppelin_stylus_proc::interface_id; use stylus_sdk::{ diff --git a/contracts/src/token/erc20/utils/safe_erc20.rs b/contracts/src/token/erc20/utils/safe_erc20.rs index 20bb84e9e..0e1c156e2 100644 --- a/contracts/src/token/erc20/utils/safe_erc20.rs +++ b/contracts/src/token/erc20/utils/safe_erc20.rs @@ -9,6 +9,8 @@ //! your contract, which allows you to call the safe operations as //! `contract.safe_transfer(token_addr, ...)`, etc. +use alloc::vec::Vec; + use alloy_primitives::{Address, U256}; use alloy_sol_types::SolCall; pub use sol::*; diff --git a/contracts/src/token/erc721/extensions/consecutive.rs b/contracts/src/token/erc721/extensions/consecutive.rs index c0c458fa6..00261b7b0 100644 --- a/contracts/src/token/erc721/extensions/consecutive.rs +++ b/contracts/src/token/erc721/extensions/consecutive.rs @@ -24,7 +24,7 @@ //! //! [ERC]: https://eips.ethereum.org/EIPS/eip-2309 -use alloc::vec; +use alloc::{vec, vec::Vec}; use alloy_primitives::{uint, Address, U256}; use stylus_sdk::{ diff --git a/contracts/src/token/erc721/extensions/enumerable.rs b/contracts/src/token/erc721/extensions/enumerable.rs index 936009e12..bd8260593 100644 --- a/contracts/src/token/erc721/extensions/enumerable.rs +++ b/contracts/src/token/erc721/extensions/enumerable.rs @@ -9,6 +9,8 @@ //! interfere with enumerability and should not be used together with //! [`Erc721Enumerable`]. +use alloc::vec::Vec; + use alloy_primitives::{uint, Address, FixedBytes, U256}; use openzeppelin_stylus_proc::interface_id; pub use sol::*; diff --git a/contracts/src/token/erc721/extensions/metadata.rs b/contracts/src/token/erc721/extensions/metadata.rs index f85efb331..3186a391e 100644 --- a/contracts/src/token/erc721/extensions/metadata.rs +++ b/contracts/src/token/erc721/extensions/metadata.rs @@ -1,6 +1,9 @@ //! Optional Metadata of the ERC-721 standard. -use alloc::string::{String, ToString}; +use alloc::{ + string::{String, ToString}, + vec::Vec, +}; use alloy_primitives::{FixedBytes, U256}; use openzeppelin_stylus_proc::interface_id; diff --git a/contracts/src/token/erc721/mod.rs b/contracts/src/token/erc721/mod.rs index 2747366cd..e93648d89 100644 --- a/contracts/src/token/erc721/mod.rs +++ b/contracts/src/token/erc721/mod.rs @@ -1,5 +1,5 @@ //! Implementation of the [`Erc721`] token standard. -use alloc::vec; +use alloc::{vec, vec::Vec}; use alloy_primitives::{uint, Address, FixedBytes, U128, U256}; use openzeppelin_stylus_proc::interface_id; @@ -166,30 +166,26 @@ impl MethodError for Error { } } -pub use receiver::IERC721Receiver; -mod receiver { - #![allow(missing_docs)] - #![cfg_attr(coverage_nightly, coverage(off))] - stylus_sdk::stylus_proc::sol_interface! { - /// [`Erc721`] token receiver interface. +sol_interface! { + /// [`Erc721`] token receiver interface. + /// + /// Interface for any contract that wants to support `safe_transfers` + /// from [`Erc721`] asset contracts. + #[allow(missing_docs)] + interface IERC721Receiver { + /// Whenever an [`Erc721`] `token_id` token is transferred + /// to this contract via [`Erc721::safe_transfer_from`]. /// - /// Interface for any contract that wants to support `safe_transfers` - /// from [`Erc721`] asset contracts. - interface IERC721Receiver { - /// Whenever an [`Erc721`] `token_id` token is transferred - /// to this contract via [`Erc721::safe_transfer_from`]. - /// - /// It must return its function selector to confirm the token transfer. - /// If any other value is returned or the interface is not implemented - /// by the recipient, the transfer will be reverted. - #[allow(missing_docs)] - function onERC721Received( - address operator, - address from, - uint256 token_id, - bytes calldata data - ) external returns (bytes4); - } + /// It must return its function selector to confirm the token transfer. + /// If any other value is returned or the interface is not implemented + /// by the recipient, the transfer will be reverted. + #[allow(missing_docs)] + function onERC721Received( + address operator, + address from, + uint256 token_id, + bytes calldata data + ) external returns (bytes4); } } diff --git a/contracts/src/utils/math/storage.rs b/contracts/src/utils/math/storage.rs index a0a762e0b..5e709c002 100644 --- a/contracts/src/utils/math/storage.rs +++ b/contracts/src/utils/math/storage.rs @@ -1,5 +1,6 @@ //! Simple math operations missing in `stylus_sdk::storage`. use alloy_primitives::Uint; +use alloy_sol_types::sol_data::{IntBitCount, SupportedInt}; use stylus_sdk::storage::StorageUint; /// Adds value and assign the result to `self`, ignoring overflow. @@ -10,6 +11,8 @@ pub(crate) trait AddAssignUnchecked { impl AddAssignUnchecked> for StorageUint +where + IntBitCount: SupportedInt, { fn add_assign_unchecked(&mut self, rhs: Uint) { let new_balance = self.get() + rhs; @@ -25,6 +28,8 @@ pub(crate) trait SubAssignUnchecked { impl SubAssignUnchecked> for StorageUint +where + IntBitCount: SupportedInt, { fn sub_assign_unchecked(&mut self, rhs: Uint) { let new_balance = self.get() - rhs; diff --git a/contracts/src/utils/metadata.rs b/contracts/src/utils/metadata.rs index fe42e017c..500029b78 100644 --- a/contracts/src/utils/metadata.rs +++ b/contracts/src/utils/metadata.rs @@ -1,5 +1,5 @@ //! Common Metadata Smart Contract. -use alloc::string::String; +use alloc::{string::String, vec::Vec}; use stylus_sdk::{ prelude::storage, storage::StorageString, stylus_proc::public, diff --git a/contracts/src/utils/nonces.rs b/contracts/src/utils/nonces.rs index 4627b4ea5..168225270 100644 --- a/contracts/src/utils/nonces.rs +++ b/contracts/src/utils/nonces.rs @@ -2,6 +2,8 @@ //! //! Nonces will only increment. +use alloc::vec::Vec; + use alloy_primitives::{uint, Address, U256}; use stylus_sdk::{ prelude::storage, diff --git a/contracts/src/utils/pausable.rs b/contracts/src/utils/pausable.rs index 33e0421c6..3ff800dee 100644 --- a/contracts/src/utils/pausable.rs +++ b/contracts/src/utils/pausable.rs @@ -14,6 +14,8 @@ //! exposed by default. //! You should expose them manually in your contract's abi. +use alloc::vec::Vec; + pub use sol::*; use stylus_sdk::{ evm, msg, diff --git a/contracts/src/utils/structs/checkpoints/generic_size.rs b/contracts/src/utils/structs/checkpoints/generic_size.rs index 033700c66..aee10a65e 100644 --- a/contracts/src/utils/structs/checkpoints/generic_size.rs +++ b/contracts/src/utils/structs/checkpoints/generic_size.rs @@ -2,6 +2,7 @@ use core::ops::{Add, Div, Mul, Sub}; +use alloy_sol_types::sol_data::{IntBitCount, SupportedInt}; use stylus_sdk::{alloy_primitives::Uint, prelude::*}; /// Trait that associates types of specific size for checkpoints key and value. @@ -87,6 +88,8 @@ pub trait Accessor { impl Accessor for stylus_sdk::storage::StorageUint +where + IntBitCount: SupportedInt, { type Wraps = Uint; diff --git a/examples/access-control/src/lib.rs b/examples/access-control/src/lib.rs index 81d8777e0..2da80e2b4 100644 --- a/examples/access-control/src/lib.rs +++ b/examples/access-control/src/lib.rs @@ -28,8 +28,6 @@ pub const TRANSFER_ROLE: [u8; 32] = [ #[public] #[inherit(Erc20, AccessControl)] impl AccessControlExample { - pub const TRANSFER_ROLE: [u8; 32] = TRANSFER_ROLE; - pub fn make_admin(&mut self, account: Address) -> Result<(), Vec> { self.access.only_role(AccessControl::DEFAULT_ADMIN_ROLE.into())?; self.access @@ -54,3 +52,7 @@ impl AccessControlExample { self.access._set_role_admin(role, new_admin_role) } } + +impl AccessControlExample { + pub const TRANSFER_ROLE: [u8; 32] = TRANSFER_ROLE; +} diff --git a/examples/ecdsa/tests/ecdsa.rs b/examples/ecdsa/tests/ecdsa.rs index 9380fd9bb..1673a6c90 100644 --- a/examples/ecdsa/tests/ecdsa.rs +++ b/examples/ecdsa/tests/ecdsa.rs @@ -1,7 +1,7 @@ #![cfg(feature = "e2e")] use abi::ECDSA; -use alloy::primitives::{address, b256, uint, Address, B256}; +use alloy::primitives::{address, b256, uint, Address, Parity, B256}; use e2e::{Account, ReceiptExt, Revert}; use eyre::Result; use openzeppelin_stylus::utils::cryptography::ecdsa::SIGNATURE_S_UPPER_BOUND; @@ -108,17 +108,13 @@ async fn recovers_from_v_r_s(alice: Account) -> Result<()> { let contract = ECDSA::new(contract_addr, &alice.wallet); let signature = alice.sign_hash(&HASH).await; + let parity: Parity = signature.v().into(); + let v_byte = parity + .y_parity_byte_non_eip155() + .expect("should be non-EIP155 signature"); let ECDSA::recoverReturn { recovered } = contract - .recover( - HASH, - signature - .v() - .y_parity_byte_non_eip155() - .expect("should be non-EIP155 signature"), - signature.r().into(), - signature.s().into(), - ) + .recover(HASH, v_byte, signature.r().into(), signature.s().into()) .call() .await?; diff --git a/examples/erc20-permit/tests/erc20permit.rs b/examples/erc20-permit/tests/erc20permit.rs index d831c3f43..ab0e155a5 100644 --- a/examples/erc20-permit/tests/erc20permit.rs +++ b/examples/erc20-permit/tests/erc20permit.rs @@ -2,14 +2,14 @@ use abi::Erc20Permit; use alloy::{ - primitives::{b256, keccak256, Address, B256, U256}, + primitives::{b256, keccak256, Address, Parity, B256, U256}, + signers::Signature, sol, sol_types::SolType, }; use alloy_primitives::uint; use e2e::{receipt, send, watch, Account, EventExt, ReceiptExt, Revert}; use eyre::Result; - mod abi; // Saturday, 1 January 2000 00:00:00 @@ -65,6 +65,11 @@ fn permit_struct_hash( ))) } +fn extract_signature_v(signature: &Signature) -> u8 { + let parity: Parity = signature.v().into(); + parity.y_parity_byte_non_eip155().expect("should be non-EIP155 signature") +} + // ============================================================================ // Integration Tests: ERC-20 Permit Extension // ============================================================================ @@ -103,7 +108,7 @@ async fn error_when_expired_deadline_for_permit( bob_addr, balance, EXPIRED_DEADLINE, - signature.v().y_parity_byte_non_eip155().unwrap(), + extract_signature_v(&signature), signature.r().into(), signature.s().into() )) @@ -152,7 +157,7 @@ async fn permit_works(alice: Account, bob: Account) -> Result<()> { bob_addr, balance, FAIR_DEADLINE, - signature.v().y_parity_byte_non_eip155().unwrap(), + extract_signature_v(&signature), signature.r().into(), signature.s().into() ))?; @@ -237,7 +242,7 @@ async fn permit_rejects_reused_signature( bob_addr, balance, FAIR_DEADLINE, - signature.v().y_parity_byte_non_eip155().unwrap(), + extract_signature_v(&signature), signature.r().into(), signature.s().into() ))?; @@ -247,7 +252,7 @@ async fn permit_rejects_reused_signature( bob_addr, balance, FAIR_DEADLINE, - signature.v().y_parity_byte_non_eip155().unwrap(), + extract_signature_v(&signature), signature.r().into(), signature.s().into() )) @@ -312,7 +317,7 @@ async fn permit_rejects_invalid_signature( bob_addr, balance, FAIR_DEADLINE, - signature.v().y_parity_byte_non_eip155().unwrap(), + extract_signature_v(&signature), signature.r().into(), signature.s().into() )) diff --git a/examples/erc721-consecutive/tests/erc721-consecutive.rs b/examples/erc721-consecutive/tests/erc721-consecutive.rs index 1f50f78c5..740779a42 100644 --- a/examples/erc721-consecutive/tests/erc721-consecutive.rs +++ b/examples/erc721-consecutive/tests/erc721-consecutive.rs @@ -4,7 +4,7 @@ use alloy::{ primitives::{Address, U256}, sol, }; -use alloy_primitives::uint; +use alloy_primitives::{aliases::U96, uint}; use e2e::{receipt, watch, Account, EventExt, ReceiptExt, Revert}; use crate::{abi::Erc721, Erc721ConsecutiveExample::constructorCall}; @@ -24,9 +24,9 @@ fn random_token_id() -> U256 { fn ctr(receivers: Vec
, amounts: Vec) -> constructorCall { constructorCall { receivers, - amounts, - firstConsecutiveId: FIRST_CONSECUTIVE_ID, - maxBatchSize: MAX_BATCH_SIZE, + amounts: amounts.iter().map(|v| U96::from(*v)).collect(), + firstConsecutiveId: U96::from(FIRST_CONSECUTIVE_ID), + maxBatchSize: U96::from(MAX_BATCH_SIZE), } } diff --git a/examples/vesting-wallet/tests/vesting-wallet.rs b/examples/vesting-wallet/tests/vesting-wallet.rs index 50f0b48e8..d292b8b7f 100644 --- a/examples/vesting-wallet/tests/vesting-wallet.rs +++ b/examples/vesting-wallet/tests/vesting-wallet.rs @@ -39,7 +39,7 @@ fn ctr( async fn block_timestamp(account: &Account) -> eyre::Result { let timestamp = account .wallet - .get_block(BlockId::latest(), BlockTransactionsKind::Full) + .get_block(BlockId::latest(), BlockTransactionsKind::Hashes) .await? .expect("latest block should exist") .header @@ -311,9 +311,10 @@ mod erc20_vesting { assert_in_delta(old_alice_balance + released, alice_balance); assert_in_delta(old_contract_balance - released, contract_balance); - assert!( - receipt.emits(VestingWallet::EtherReleased { amount: released }) - ); + assert!(receipt.emits(VestingWallet::ERC20Released { + token: erc20_address, + amount: released + })); Ok(()) } diff --git a/lib/e2e/Cargo.toml b/lib/e2e/Cargo.toml index 84a9c6df0..fc8b8ab51 100644 --- a/lib/e2e/Cargo.toml +++ b/lib/e2e/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "e2e" description = "End-to-end Testing for Stylus" -version = "0.1.0" +version = "0.2.0" categories = ["development-tools::testing", "cryptography::cryptocurrencies"] keywords = ["arbitrum", "ethereum", "stylus", "integration-testing", "tests"] authors.workspace = true diff --git a/lib/e2e/src/lib.rs b/lib/e2e/src/lib.rs index 8c35d7e62..8878ee197 100644 --- a/lib/e2e/src/lib.rs +++ b/lib/e2e/src/lib.rs @@ -13,7 +13,7 @@ pub use e2e_proc::test; pub use error::{Panic, PanicCode, Revert}; pub use event::Ext as EventExt; pub use receipt::Ext as ReceiptExt; -pub use system::{fund_account, provider, Provider, Wallet}; +pub use system::{fund_account, Wallet}; /// This macro provides a shorthand for broadcasting the transaction to the /// network. diff --git a/lib/e2e/src/system.rs b/lib/e2e/src/system.rs index 4803b9436..f58591e53 100644 --- a/lib/e2e/src/system.rs +++ b/lib/e2e/src/system.rs @@ -3,10 +3,10 @@ use alloy::{ primitives::Address, providers::{ fillers::{ - ChainIdFiller, FillProvider, GasFiller, JoinFill, NonceFiller, - WalletFiller, + BlobGasFiller, ChainIdFiller, FillProvider, GasFiller, JoinFill, + NonceFiller, WalletFiller, }, - Identity, ProviderBuilder, RootProvider, + Identity, RootProvider, }, transports::http::{Client, Http}, }; @@ -20,8 +20,11 @@ pub(crate) const RPC_URL_ENV_VAR_NAME: &str = "RPC_URL"; pub type Wallet = FillProvider< JoinFill< JoinFill< - JoinFill, NonceFiller>, - ChainIdFiller, + Identity, + JoinFill< + GasFiller, + JoinFill>, + >, >, WalletFiller, >, @@ -30,36 +33,6 @@ pub type Wallet = FillProvider< Ethereum, >; -/// Convenience type alias that represents an alloy provider. -pub type Provider = FillProvider< - JoinFill< - JoinFill, NonceFiller>, - ChainIdFiller, - >, - RootProvider>, - Http, - Ethereum, ->; - -/// Load the `name` environment variable. -fn env(name: &str) -> eyre::Result { - std::env::var(name).wrap_err(format!("failed to load {name}")) -} - -/// Returns an alloy provider connected to the `RPC_URL` rpc endpoint. -/// -/// # Panics -/// -/// May panic if unable to load the `RPC_URL` environment variable. -#[must_use] -pub fn provider() -> Provider { - let rpc_url = env(RPC_URL_ENV_VAR_NAME) - .expect("failed to load RPC_URL var from env") - .parse() - .expect("failed to parse RPC_URL string into a URL"); - ProviderBuilder::new().with_recommended_fillers().on_http(rpc_url) -} - /// Send `amount` eth to `address` in the nitro-tesnode. /// /// # Errors