From 739ec8bdd9af9672d4c6675049a295228cd32dfb Mon Sep 17 00:00:00 2001 From: Danil Date: Fri, 8 Dec 2023 20:32:13 +0100 Subject: [PATCH] Update from upstream Signed-off-by: Danil --- Cargo.lock | 992 ++++++++++++---------- Cargo.toml | 65 +- crates/chisel/src/executor.rs | 45 +- crates/common/src/zk_compile.rs | 17 +- crates/config/src/lib.rs | 87 +- crates/debugger/Cargo.toml | 3 +- crates/evm/core/Cargo.toml | 1 + crates/evm/evm/src/executors/tracing.rs | 2 +- crates/zkforge/bin/cmd/coverage.rs | 3 +- crates/zkforge/bin/cmd/script/executor.rs | 3 +- crates/zkforge/src/gas_report.rs | 3 +- crates/zkforge/src/result.rs | 3 +- crates/zkforge/tests/cli/multi_script.rs | 2 +- rust-toolchain | 2 +- rust-toolchain.toml | 2 +- 15 files changed, 618 insertions(+), 612 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 50f6ffcc7..c09263dc7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -364,11 +364,22 @@ version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" +[[package]] +name = "alloy-chains" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7f12f8177eddf9275fa9ae5fd73b50cee062f9b1eb95ef435f28354c79ba386" +dependencies = [ + "num_enum 0.7.0", + "serde", + "strum 0.25.0", +] + [[package]] name = "alloy-dyn-abi" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4e0daba57ddaba12dc9b21f608b843251f3de017f94a431dca4e7f4f72e5ba9" +checksum = "fafc3b20c6d069d9db47037f34acfb0e079c050fa5c1ff9e79855609b359b92b" dependencies = [ "alloy-json-abi", "alloy-primitives", @@ -377,17 +388,19 @@ dependencies = [ "arbitrary", "const-hex", "derive_arbitrary", + "derive_more", "itoa", "proptest", "serde", "serde_json", + "winnow", ] [[package]] name = "alloy-json-abi" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63c9319ad8b2b623c6a3ac15899f8ffb71479224762dbaedc385c16efbb6cfe3" +checksum = "8d32061da2f184e5defab8e65a3057f88b7017cfe1ea9e2d6b413edb5ca76a54" dependencies = [ "alloy-primitives", "alloy-sol-type-parser", @@ -397,9 +410,9 @@ dependencies = [ [[package]] name = "alloy-primitives" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0628ec0ba5b98b3370bb6be17b12f23bfce8ee4ad83823325a20546d9b03b78" +checksum = "08ca2c09d5911548a5cb620382ea0e1af99d3c898ce0efecbbd274a4676cf53e" dependencies = [ "alloy-rlp", "arbitrary", @@ -408,6 +421,7 @@ dependencies = [ "const-hex", "derive_arbitrary", "derive_more", + "ethereum_ssz", "getrandom 0.2.10", "hex-literal", "itoa", @@ -444,16 +458,19 @@ dependencies = [ [[package]] name = "alloy-sol-macro" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a98ad1696a2e17f010ae8e43e9f2a1e930ed176a8e3ff77acfeff6dfb07b42c" +checksum = "e40cea54ac58080a1b88ea6556866eac1902b321186c77d53ad2b5ebbbf0e038" dependencies = [ + "alloy-json-abi", "const-hex", "dunce", "heck 0.4.1", + "indexmap 2.0.2", "proc-macro-error", "proc-macro2 1.0.69", "quote 1.0.33", + "serde_json", "syn 2.0.38", "syn-solidity", "tiny-keccak 2.0.2", @@ -461,19 +478,20 @@ dependencies = [ [[package]] name = "alloy-sol-type-parser" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81c61ccc29e7c58bf16a2f780898852348183f58b127bde03ced6d07ad544787" +checksum = "f23cb462613b2046da46dbf69ebaee458b7bfd3e9d7fe05adcce38a8d4b8a14f" dependencies = [ "winnow", ] [[package]] name = "alloy-sol-types" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98d7107bed88e8f09f0ddcc3335622d87bfb6821f3e0c7473329fb1cfad5e015" +checksum = "f81aa34725607be118c395d62c1d8d97c8a343dd1ada5370ed508ed5232eab6a" dependencies = [ + "alloy-json-abi", "alloy-primitives", "alloy-sol-macro", "const-hex", @@ -581,7 +599,7 @@ dependencies = [ "anvil-server", "async-trait", "auto_impl", - "axum 0.5.17", + "axum", "bytes 1.5.0", "chrono", "clap 4.4.6", @@ -591,27 +609,29 @@ dependencies = [ "ctrlc", "ethereum-forkid", "ethers", + "ethers-core", "ethers-solc", "fdlimit", "flate2", "foundry-common", "foundry-config", "foundry-evm", - "foundry-utils", "futures 0.3.28", "hash-db", "hyper", "itertools 0.11.0", + "k256 0.13.1", "memory-db", "parking_lot 0.12.1", "pretty_assertions", + "rand 0.8.5", "serde", "serde_json", + "serde_repr", "tempfile", "thiserror", "tokio", "tower", - "tower-http 0.4.4", "tracing", "tracing-subscriber", "trie-db", @@ -624,10 +644,14 @@ name = "anvil-core" version = "0.2.0" dependencies = [ "alloy-primitives", + "anvil-core", "bytes 1.5.0", + "ethers-contract", "ethers-core", + "ethers-middleware", + "ethers-providers", + "foundry-common", "foundry-evm", - "foundry-utils", "hash-db", "hash256-std-hasher", "keccak-hasher", @@ -654,7 +678,7 @@ version = "0.2.0" dependencies = [ "anvil-rpc", "async-trait", - "axum 0.5.17", + "axum", "bytes 1.5.0", "clap 4.4.6", "futures 0.3.28", @@ -666,7 +690,7 @@ dependencies = [ "serde_json", "thiserror", "tokio-util 0.7.9", - "tower-http 0.4.4", + "tower-http", "tracing", ] @@ -997,6 +1021,16 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "aurora-engine-modexp" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfacad86e9e138fca0670949eb8ed4ffdf73a55bded8887efe0863cd1a3a6f70" +dependencies = [ + "hex", + "num 0.4.1", +] + [[package]] name = "auto_impl" version = "1.1.0" @@ -1024,40 +1058,6 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" -[[package]] -name = "axum" -version = "0.5.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acee9fd5073ab6b045a275b3e709c163dd36c90685219cb21804a147b58dba43" -dependencies = [ - "async-trait", - "axum-core 0.2.9", - "base64 0.13.1", - "bitflags 1.3.2", - "bytes 1.5.0", - "futures-util", - "http", - "http-body", - "hyper", - "itoa", - "matchit 0.5.0", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "sha-1 0.10.1", - "sync_wrapper", - "tokio", - "tokio-tungstenite 0.17.2", - "tower", - "tower-http 0.3.5", - "tower-layer", - "tower-service", -] - [[package]] name = "axum" version = "0.6.20" @@ -1065,7 +1065,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" dependencies = [ "async-trait", - "axum-core 0.3.4", + "axum-core", + "base64 0.21.4", "bitflags 1.3.2", "bytes 1.5.0", "futures-util", @@ -1073,7 +1074,7 @@ dependencies = [ "http-body", "hyper", "itoa", - "matchit 0.7.3", + "matchit", "memchr", "mime", "percent-encoding", @@ -1082,29 +1083,16 @@ dependencies = [ "serde", "serde_json", "serde_path_to_error", + "serde_urlencoded", + "sha1", "sync_wrapper", "tokio", + "tokio-tungstenite", "tower", "tower-layer", "tower-service", ] -[[package]] -name = "axum-core" -version = "0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" -dependencies = [ - "async-trait", - "bytes 1.5.0", - "futures-util", - "http", - "http-body", - "mime", - "tower-layer", - "tower-service", -] - [[package]] name = "axum-core" version = "0.3.4" @@ -1686,9 +1674,9 @@ dependencies = [ [[package]] name = "c-kzg" -version = "0.1.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac926d808fb72fe09ebf471a091d6d72918876ccf0b4989766093d2d0d24a0ef" +checksum = "32700dc7904064bb64e857d38a1766607372928e2466ee5f02a869829b3297d7" dependencies = [ "bindgen 0.66.1", "blst", @@ -1754,6 +1742,10 @@ checksum = "df8670b8c7b9dae1793364eafadf7239c40d669904660c5960d74cfd80b46a53" name = "cast" version = "0.2.0" dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-rlp", "async-trait", "chrono", "clap 4.4.6", @@ -1764,21 +1756,24 @@ dependencies = [ "criterion", "dunce", "eth-keystore", - "ethers", + "ethers-contract", "ethers-core", - "ethers-etherscan", + "ethers-middleware", "ethers-providers", + "ethers-signers", "evm-disassembler", "eyre", + "foundry-block-explorers", "foundry-cli", "foundry-common", + "foundry-compilers", "foundry-config", "foundry-evm", "foundry-test-utils", - "foundry-utils", "futures 0.3.28", "indicatif", "itertools 0.11.0", + "rand 0.8.5", "rayon", "regex", "rpassword", @@ -1865,15 +1860,14 @@ dependencies = [ "clap 4.4.6", "criterion", "dirs 5.0.1", - "ethers", - "ethers-solc", + "ethers-core", "eyre", "forge-fmt", "foundry-cli", "foundry-common", + "foundry-compilers", "foundry-config", "foundry-evm", - "foundry-utils", "once_cell", "regex", "reqwest", @@ -2175,26 +2169,22 @@ dependencies = [ [[package]] name = "coins-ledger" -version = "0.8.7" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fa6094030951ce3efad50fdba0efe088a93ffe05ec58c2f47cc60d9e90c715d" +checksum = "9b913b49d2e008b23cffb802f29b8051feddf7b2cc37336ab9a7a410f832395a" dependencies = [ "async-trait", "byteorder", "cfg-if 1.0.0", - "futures 0.3.28", "getrandom 0.2.10", "hex", "hidapi-rusb", "js-sys", - "lazy_static", - "libc", "log", - "matches", "nix 0.26.4", - "serde", - "tap", + "once_cell", "thiserror", + "tokio", "tracing", "wasm-bindgen", "wasm-bindgen-futures", @@ -3521,10 +3511,21 @@ dependencies = [ "uint", ] +[[package]] +name = "ethereum_ssz" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e61ffea29f26e8249d35128a82ec8d3bd4fbc80179ea5f5e5e3daafef6a80fcb" +dependencies = [ + "ethereum-types 0.14.1", + "itertools 0.10.5", + "smallvec", +] + [[package]] name = "ethers" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -3538,8 +3539,8 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "ethers-core", "once_cell", @@ -3549,8 +3550,8 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "const-hex", "ethers-contract-abigen", @@ -3567,8 +3568,8 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "Inflector", "const-hex", @@ -3590,8 +3591,8 @@ dependencies = [ [[package]] name = "ethers-contract-derive" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "Inflector", "const-hex", @@ -3605,8 +3606,8 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "arrayvec 0.7.4", "bytes 1.5.0", @@ -3634,11 +3635,11 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ + "chrono", "ethers-core", - "ethers-solc", "reqwest", "semver 1.0.20", "serde", @@ -3649,8 +3650,8 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "async-trait", "auto_impl", @@ -3675,8 +3676,8 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "async-trait", "auto_impl", @@ -3700,7 +3701,7 @@ dependencies = [ "serde_json", "thiserror", "tokio", - "tokio-tungstenite 0.20.1", + "tokio-tungstenite", "tracing", "tracing-futures", "url", @@ -3713,8 +3714,8 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "async-trait", "coins-bip32", @@ -3741,8 +3742,8 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.10" -source = "git+https://github.com/mm-zk/ethers-rs?tag=main_public_artifact#2b2c7312f328a431fa40a7b87a722eaf28e27061" +version = "2.0.11" +source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a686ddb9e5946ec107#f0e5b194f09c533feb10d1a686ddb9e5946ec107" dependencies = [ "cfg-if 1.0.0", "const-hex", @@ -3784,9 +3785,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "evm-disassembler" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "584e7334177d2dc76c4d618967e5ef102be68c35f454ac363d88b72b854db4a9" +checksum = "7ef8b778f0f7ba24aaa7c1d8fa7ec75db869f8a8508907be49eac899865ea52d" dependencies = [ "eyre", "hex", @@ -3858,13 +3859,25 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "fd-lock" +version = "4.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b93f7a0db71c99f68398f80653ed05afb0b00e062e1a20c7ff849c4edfabbbcc" +dependencies = [ + "cfg-if 1.0.0", + "rustix", + "windows-sys 0.52.0", +] + [[package]] name = "fdlimit" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c4c9e43643f5a3be4ca5b67d26b98031ff9db6806c3440ae32e02e3ceac3f1b" +checksum = "e182f7dbc2ef73d9ef67351c5fbbea084729c48362d3ce9dd44c28e32e277fe5" dependencies = [ "libc", + "thiserror", ] [[package]] @@ -3991,6 +4004,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" dependencies = [ + "arbitrary", "byteorder", "rand 0.8.5", "rustc-hex", @@ -4038,9 +4052,12 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" name = "forge" version = "0.2.0" dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", "alloy-primitives", "anvil", "async-trait", + "axum", "clap 4.4.6", "clap_complete", "clap_complete_fig", @@ -4049,23 +4066,31 @@ dependencies = [ "criterion", "dialoguer", "dunce", - "ethers", + "ethers-contract", + "ethers-core", + "ethers-middleware", + "ethers-providers", + "ethers-signers", "eyre", "forge-doc", "forge-fmt", + "foundry-block-explorers", "foundry-cli", "foundry-common", + "foundry-compilers", "foundry-config", "foundry-debugger", "foundry-evm", "foundry-test-utils", - "foundry-utils", "futures 0.3.28", "globset", + "hyper", "indicatif", "itertools 0.11.0", "once_cell", + "opener", "parking_lot 0.12.1", + "paste", "path-slash", "pretty_assertions", "proptest", @@ -4080,8 +4105,10 @@ dependencies = [ "solang-parser", "strum 0.25.0", "svm-rs", + "tempfile", "thiserror", "tokio", + "tower-http", "tracing", "tracing-subscriber", "vergen", @@ -4093,15 +4120,14 @@ dependencies = [ name = "forge-doc" version = "0.2.0" dependencies = [ + "alloy-primitives", "auto_impl", "derive_more", - "ethers-core", - "ethers-solc", "eyre", "forge-fmt", + "foundry-common", + "foundry-compilers", "foundry-config", - "foundry-utils", - "futures-util", "itertools 0.11.0", "mdbook", "once_cell", @@ -4110,10 +4136,8 @@ dependencies = [ "serde_json", "solang-parser", "thiserror", - "tokio", "toml 0.8.2", "tracing", - "warp", ] [[package]] @@ -4142,29 +4166,21 @@ dependencies = [ ] [[package]] -name = "foundry-abi" -version = "0.2.0" -dependencies = [ - "ethers-contract", - "ethers-contract-abigen", - "ethers-core", - "ethers-providers", - "eyre", - "foundry-macros", - "syn 2.0.38", -] - -[[package]] -name = "foundry-binder" -version = "0.2.0" +name = "foundry-block-explorers" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43408b384e5888fed99a5f25f86cef7e19dca10c750e948cbeb219f59847712f" dependencies = [ - "ethers-contract", - "eyre", - "foundry-config", - "git2", - "tempfile", + "alloy-chains", + "alloy-json-abi", + "alloy-primitives", + "foundry-compilers", + "reqwest", + "semver 1.0.20", + "serde", + "serde_json", + "thiserror", "tracing", - "url", ] [[package]] @@ -4176,41 +4192,56 @@ dependencies = [ "alloy-primitives", "alloy-sol-types", "const-hex", - "ethers", + "ethers-core", + "ethers-providers", + "ethers-signers", "eyre", + "foundry-cheatcodes-spec", "foundry-common", + "foundry-compilers", "foundry-config", - "foundry-macros", - "foundry-utils", - "futures 0.3.28", + "foundry-evm-core", "itertools 0.11.0", "jsonpath_lib", "revm", - "schemars", - "serde", "serde_json", - "thiserror", "tracing", "walkdir", ] +[[package]] +name = "foundry-cheatcodes-spec" +version = "0.2.0" +dependencies = [ + "alloy-sol-types", + "foundry-macros", + "schemars", + "serde", + "serde_json", +] + [[package]] name = "foundry-cli" version = "0.2.0" dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", "alloy-primitives", "async-trait", "clap 4.4.6", "color-eyre", "const-hex", "dotenvy", - "ethers", + "ethers-core", + "ethers-providers", + "ethers-signers", "eyre", + "forge-fmt", "foundry-common", + "foundry-compilers", "foundry-config", "foundry-debugger", "foundry-evm", - "foundry-utils", "indicatif", "itertools 0.11.0", "once_cell", @@ -4234,10 +4265,13 @@ dependencies = [ name = "foundry-common" version = "0.2.0" dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", "ansi_term", "anyhow", "async-trait", - "auto_impl", "clap 4.4.6", "comfy-table", "const-hex", @@ -4245,15 +4279,18 @@ dependencies = [ "dunce", "era_revm", "ethers-core", - "ethers-etherscan", "ethers-middleware", "ethers-providers", - "ethers-solc", "eyre", + "foundry-block-explorers", + "foundry-compilers", "foundry-config", "foundry-macros", + "glob", "globset", "once_cell", + "pretty_assertions", + "rand 0.8.5", "regex", "reqwest", "semver 1.0.20", @@ -4270,33 +4307,72 @@ dependencies = [ ] [[package]] -name = "foundry-config" -version = "0.2.0" +name = "foundry-compilers" +version = "0.1.1" +source = "git+https://github.com/Deniallugo/compilers.git?branch=main#49eaf03523e4b2853e1329d06f24d40b683d706b" dependencies = [ - "Inflector", - "dirs-next", - "ethers-core", - "ethers-etherscan", - "ethers-solc", - "eyre", - "figment", - "globset", - "number_prefix", + "alloy-json-abi", + "alloy-primitives", + "cfg-if 1.0.0", + "const-hex", + "dirs 5.0.1", + "dunce", + "fs_extra", + "futures-util", + "glob", + "home", + "md-5 0.10.6", + "memmap2 0.9.0", + "num_cpus", "once_cell", - "open-fastrlp", "path-slash", - "pretty_assertions", + "rand 0.8.5", + "rayon", "regex", - "reqwest", - "revm", "semver 1.0.20", "serde", "serde_json", - "serde_regex", + "sha2 0.10.8", + "solang-parser", + "svm-rs", + "svm-rs-builds", "tempfile", "thiserror", - "toml 0.8.2", - "toml_edit 0.20.2", + "tiny-keccak 2.0.2", + "tokio", + "tracing", + "walkdir", + "yansi 0.5.1", +] + +[[package]] +name = "foundry-config" +version = "0.2.0" +dependencies = [ + "Inflector", + "alloy-chains", + "alloy-primitives", + "dirs-next", + "eyre", + "figment", + "foundry-block-explorers", + "foundry-compilers", + "globset", + "number_prefix", + "once_cell", + "path-slash", + "pretty_assertions", + "regex", + "reqwest", + "revm-primitives", + "semver 1.0.20", + "serde", + "serde_json", + "serde_regex", + "tempfile", + "thiserror", + "toml 0.8.2", + "toml_edit 0.21.0", "tracing", "walkdir", ] @@ -4309,8 +4385,9 @@ dependencies = [ "crossterm", "eyre", "foundry-common", - "foundry-evm", - "foundry-utils", + "foundry-compilers", + "foundry-evm-core", + "foundry-evm-traces", "ratatui", "revm", "tracing", @@ -4321,101 +4398,161 @@ name = "foundry-evm" version = "0.2.0" dependencies = [ "alloy-dyn-abi", + "alloy-json-abi", "alloy-primitives", - "auto_impl", - "bytes 1.5.0", + "alloy-sol-types", + "const-hex", + "ethers-core", + "ethers-signers", + "eyre", + "foundry-cheatcodes", + "foundry-common", + "foundry-compilers", + "foundry-config", + "foundry-evm-core", + "foundry-evm-coverage", + "foundry-evm-fuzz", + "foundry-evm-traces", + "hashbrown 0.14.2", + "parking_lot 0.12.1", + "proptest", + "revm", + "thiserror", + "tracing", +] + +[[package]] +name = "foundry-evm-core" +version = "0.2.0" +dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "alloy-sol-types", "const-hex", + "derive_more", "era_revm", - "ethers", + "ethers-core", + "ethers-providers", "eyre", - "foundry-abi", + "foundry-cheatcodes-spec", "foundry-common", + "foundry-compilers", "foundry-config", "foundry-macros", - "foundry-utils", "futures 0.3.28", - "hashbrown 0.14.2", "itertools 0.11.0", - "jsonpath_lib", "once_cell", - "ordered-float 4.1.1", "parking_lot 0.12.1", - "proptest", "revm", - "semver 1.0.20", "serde", "serde_json", - "tempfile", "thiserror", "tokio", "tracing", "url", - "walkdir", - "yansi 0.5.1", ] [[package]] -name = "foundry-macros" +name = "foundry-evm-coverage" version = "0.2.0" dependencies = [ - "ethers-core", - "foundry-macros-impl", - "serde", - "serde_json", + "alloy-primitives", + "eyre", + "foundry-common", + "foundry-compilers", + "foundry-evm-core", + "revm", + "semver 1.0.20", + "tracing", ] [[package]] -name = "foundry-macros-impl" +name = "foundry-evm-fuzz" version = "0.2.0" dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.69", - "quote 1.0.33", - "syn 2.0.38", + "alloy-dyn-abi", + "alloy-json-abi", + "alloy-primitives", + "arbitrary", + "ethers-core", + "eyre", + "foundry-common", + "foundry-compilers", + "foundry-config", + "foundry-evm-core", + "foundry-evm-coverage", + "foundry-evm-traces", + "hashbrown 0.14.2", + "itertools 0.11.0", + "parking_lot 0.12.1", + "proptest", + "rand 0.8.5", + "revm", + "serde", + "thiserror", + "tracing", ] [[package]] -name = "foundry-test-utils" +name = "foundry-evm-traces" version = "0.2.0" dependencies = [ + "alloy-dyn-abi", + "alloy-json-abi", "alloy-primitives", - "ethers", - "ethers-solc", + "alloy-sol-types", + "const-hex", + "ethers-core", "eyre", + "foundry-block-explorers", "foundry-common", + "foundry-compilers", "foundry-config", - "foundry-utils", + "foundry-evm-core", + "futures 0.3.28", + "hashbrown 0.14.2", + "itertools 0.11.0", "once_cell", - "parking_lot 0.12.1", - "pretty_assertions", - "regex", - "serde_json", + "ordered-float 4.1.1", + "revm", + "serde", "tempfile", - "walkdir", + "tokio", + "tracing", + "yansi 0.5.1", ] [[package]] -name = "foundry-utils" +name = "foundry-macros" +version = "0.2.0" +dependencies = [ + "proc-macro-error", + "proc-macro2 1.0.69", + "quote 1.0.33", + "syn 2.0.38", +] + +[[package]] +name = "foundry-test-utils" version = "0.2.0" dependencies = [ - "alloy-dyn-abi", "alloy-primitives", - "dunce", - "ethers-addressbook", - "ethers-contract", "ethers-core", "ethers-providers", - "ethers-solc", "eyre", - "forge-fmt", + "fd-lock 4.0.1", "foundry-common", - "futures 0.3.28", - "glob", + "foundry-compilers", + "foundry-config", "once_cell", + "parking_lot 0.12.1", "pretty_assertions", - "rand 0.8.5", + "regex", "serde_json", "tracing", + "tracing-subscriber", + "walkdir", ] [[package]] @@ -4921,7 +5058,7 @@ dependencies = [ "gix-path", "gix-tempfile", "gix-validate", - "memmap2", + "memmap2 0.5.10", "nom", "thiserror", ] @@ -5852,9 +5989,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.64" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f195fe497f702db0f318b07fdd68edb16955aed830df8363d837542f8f935a" +checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" dependencies = [ "wasm-bindgen", ] @@ -6457,6 +6594,15 @@ dependencies = [ "logos-codegen", ] +[[package]] +name = "lru" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2994eeba8ed550fd9b47a0b38f0242bc3344e496483c6180b69139cc2fa5d1d7" +dependencies = [ + "hashbrown 0.14.2", +] + [[package]] name = "mac" version = "0.1.1" @@ -6516,18 +6662,6 @@ dependencies = [ "regex-automata 0.1.10", ] -[[package]] -name = "matches" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" - -[[package]] -name = "matchit" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73cbba799671b762df5a175adf59ce145165747bb891505c43d09aefbbf38beb" - [[package]] name = "matchit" version = "0.7.3" @@ -6604,6 +6738,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "deaba38d7abf1d4cca21cc89e932e542ba2b9258664d2a9ef0e61512039c9375" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.5.6" @@ -8298,7 +8441,7 @@ checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" dependencies = [ "bytes 1.5.0", "heck 0.4.1", - "itertools 0.10.5", + "itertools 0.11.0", "log", "multimap", "once_cell", @@ -8319,7 +8462,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" dependencies = [ "anyhow", - "itertools 0.10.5", + "itertools 0.11.0", "proc-macro2 1.0.69", "quote 1.0.33", "syn 2.0.38", @@ -8705,15 +8848,16 @@ dependencies = [ [[package]] name = "ratatui" -version = "0.23.0" +version = "0.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e2e4cd95294a85c3b4446e63ef054eea43e0205b1fd60120c16b74ff7ff96ad" +checksum = "0ebc917cfb527a566c37ecb94c7e3fd098353516fb4eb6bea17015ade0182425" dependencies = [ "bitflags 2.4.1", "cassowary", "crossterm", "indoc", "itertools 0.11.0", + "lru", "paste", "strum 0.25.0", "unicode-segmentation", @@ -8952,8 +9096,7 @@ dependencies = [ [[package]] name = "revm" version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f4ca8ae0345104523b4af1a8a7ea97cfa1865cdb7a7c25d23c1a18d9b48598" +source = "git+https://github.com/bluealloy/revm?branch=reth_freeze#b00ebab8b3477f87e3d876a11b8f18d00a8f4103" dependencies = [ "auto_impl", "revm-interpreter", @@ -8965,8 +9108,7 @@ dependencies = [ [[package]] name = "revm-interpreter" version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f959cafdf64a7f89b014fa73dc2325001cf654b3d9400260b212d19a2ebe3da0" +source = "git+https://github.com/bluealloy/revm?branch=reth_freeze#b00ebab8b3477f87e3d876a11b8f18d00a8f4103" dependencies = [ "revm-primitives", "serde", @@ -8975,16 +9117,15 @@ dependencies = [ [[package]] name = "revm-precompile" version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d360a88223d85709d2e95d4609eb1e19c649c47e28954bfabae5e92bb37e83e" +source = "git+https://github.com/bluealloy/revm?branch=reth_freeze#b00ebab8b3477f87e3d876a11b8f18d00a8f4103" dependencies = [ + "aurora-engine-modexp", "c-kzg", "k256 0.13.1", - "num 0.4.1", "once_cell", "revm-primitives", "ripemd", - "secp256k1 0.27.0", + "secp256k1 0.28.0", "sha2 0.10.8", "substrate-bn", ] @@ -8992,8 +9133,7 @@ dependencies = [ [[package]] name = "revm-primitives" version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51187b852d9e458816a2e19c81f1dd6c924077e1a8fccd16e4f044f865f299d7" +source = "git+https://github.com/bluealloy/revm?branch=reth_freeze#b00ebab8b3477f87e3d876a11b8f18d00a8f4103" dependencies = [ "alloy-primitives", "alloy-rlp", @@ -9001,6 +9141,7 @@ dependencies = [ "bitflags 2.4.1", "bitvec 1.0.1", "c-kzg", + "derive_more", "enumn", "hashbrown 0.14.2", "hex", @@ -9153,9 +9294,9 @@ dependencies = [ [[package]] name = "ruint" -version = "1.10.1" +version = "1.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95294d6e3a6192f3aabf91c38f56505a625aa495533442744185a36d75a790c4" +checksum = "608a5726529f2f0ef81b8fde9873c4bb829d6b5b5ca6be4d97345ddf0749c825" dependencies = [ "alloy-rlp", "arbitrary", @@ -9164,6 +9305,7 @@ dependencies = [ "bytes 1.5.0", "fastrlp", "num-bigint 0.4.4", + "num-traits", "parity-scale-codec 3.6.5", "primitive-types 0.12.2", "proptest", @@ -9405,7 +9547,7 @@ dependencies = [ "bitflags 2.4.1", "cfg-if 1.0.0", "clipboard-win", - "fd-lock", + "fd-lock 3.0.13", "home", "libc", "log", @@ -9509,12 +9651,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "scoped-tls" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" - [[package]] name = "scopeguard" version = "1.2.0" @@ -9606,6 +9742,15 @@ dependencies = [ "secp256k1-sys 0.8.1", ] +[[package]] +name = "secp256k1" +version = "0.28.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acea373acb8c21ecb5a23741452acd2593ed44ee3d343e72baaa143bc89d0d5" +dependencies = [ + "secp256k1-sys 0.9.1", +] + [[package]] name = "secp256k1-sys" version = "0.4.2" @@ -9624,6 +9769,15 @@ dependencies = [ "cc", ] +[[package]] +name = "secp256k1-sys" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dd97a086ec737e30053fd5c46f097465d25bb81dd3608825f65298c4c98be83" +dependencies = [ + "cc", +] + [[package]] name = "security-framework" version = "2.9.2" @@ -9873,6 +10027,17 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_repr" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3081f5ffbb02284dda55132aa26daecedd7372a42417bbbab6f14ab7d6bb9145" +dependencies = [ + "proc-macro2 1.0.69", + "quote 1.0.33", + "syn 2.0.38", +] + [[package]] name = "serde_spanned" version = "0.6.3" @@ -10277,9 +10442,9 @@ dependencies = [ [[package]] name = "solang-parser" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cb9fa2fa2fa6837be8a2495486ff92e3ffe68a99b6eeba288e139efdd842457" +checksum = "c425ce1c59f4b154717592f0bdf4715c3a1d55058883622d3157e1f0908a5b26" dependencies = [ "itertools 0.11.0", "lalrpop", @@ -10667,9 +10832,9 @@ dependencies = [ [[package]] name = "syn-solidity" -version = "0.4.2" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b837ef12ab88835251726eb12237655e61ec8dc8a280085d1961cdc3dfd047" +checksum = "e2c7ad08db24862d5b787a94714ff6b047935c3e3f60af944ac969404debd7ff" dependencies = [ "paste", "proc-macro2 1.0.69", @@ -11023,18 +11188,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-tungstenite" -version = "0.17.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f714dd15bead90401d77e04243611caec13726c2408afd5b31901dfcdcb3b181" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.17.3", -] - [[package]] name = "tokio-tungstenite" version = "0.20.1" @@ -11048,7 +11201,7 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tungstenite 0.20.1", + "tungstenite", "webpki-roots 0.25.2", ] @@ -11105,9 +11258,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.3" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" +checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" dependencies = [ "serde", ] @@ -11147,6 +11300,17 @@ dependencies = [ "winnow", ] +[[package]] +name = "toml_edit" +version = "0.21.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d34d383cd00a163b4a5b85053df514d45bc330f6de7737edfe0a93311d1eaa03" +dependencies = [ + "indexmap 2.0.2", + "toml_datetime", + "winnow", +] + [[package]] name = "topological-sort" version = "0.2.2" @@ -11174,25 +11338,6 @@ dependencies = [ "tracing", ] -[[package]] -name = "tower-http" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" -dependencies = [ - "bitflags 1.3.2", - "bytes 1.5.0", - "futures-core", - "futures-util", - "http", - "http-body", - "http-range-header", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", -] - [[package]] name = "tower-http" version = "0.4.4" @@ -11390,25 +11535,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" -[[package]] -name = "tungstenite" -version = "0.17.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" -dependencies = [ - "base64 0.13.1", - "byteorder", - "bytes 1.5.0", - "http", - "httparse", - "log", - "rand 0.8.5", - "sha-1 0.10.1", - "thiserror", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.20.1" @@ -11448,6 +11574,7 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" dependencies = [ + "arbitrary", "byteorder", "crunchy", "hex", @@ -11750,36 +11877,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warp" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e92e22e03ff1230c03a1a8ee37d2f89cd489e2e541b7550d6afad96faed169" -dependencies = [ - "bytes 1.5.0", - "futures-channel", - "futures-util", - "headers", - "http", - "hyper", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project", - "rustls-pemfile", - "scoped-tls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-stream", - "tokio-tungstenite 0.20.1", - "tokio-util 0.7.9", - "tower-service", - "tracing", -] - [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -11800,9 +11897,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7706a72ab36d8cb1f80ffbf0e071533974a60d0a308d01a5d0375bf60499a342" +checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" dependencies = [ "cfg-if 1.0.0", "wasm-bindgen-macro", @@ -11810,9 +11907,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ef2b6d3c510e9625e5fe6f509ab07d66a760f0885d858736483c32ed7809abd" +checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" dependencies = [ "bumpalo", "log", @@ -11825,9 +11922,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.37" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c02dbc21516f9f1f04f187958890d7e6026df8d16540b7ad9492bc34a67cea03" +checksum = "ac36a15a220124ac510204aec1c3e5db8a22ab06fd6706d881dc6149f8ed9a12" dependencies = [ "cfg-if 1.0.0", "js-sys", @@ -11837,9 +11934,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dee495e55982a3bd48105a7b947fd2a9b4a8ae3010041b9e0faab3f9cd028f1d" +checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" dependencies = [ "quote 1.0.33", "wasm-bindgen-macro-support", @@ -11847,9 +11944,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" +checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" dependencies = [ "proc-macro2 1.0.69", "quote 1.0.33", @@ -11860,9 +11957,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.87" +version = "0.2.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" +checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" [[package]] name = "wasm-streams" @@ -11879,9 +11976,9 @@ dependencies = [ [[package]] name = "watchexec" -version = "2.3.0" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b97d05a9305a9aa6a7bedef64cd012ebc9b6f1f5ed0368fb48f0fe58f96988" +checksum = "5931215e14de2355a3039477138ae08a905abd7ad0265519fd79717ff1380f88" dependencies = [ "async-priority-channel", "async-recursion", @@ -12092,6 +12189,15 @@ dependencies = [ "windows-targets 0.48.5", ] +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows-targets" version = "0.42.2" @@ -12122,6 +12228,21 @@ dependencies = [ "windows_x86_64_msvc 0.48.5", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -12134,6 +12255,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.42.2" @@ -12146,6 +12273,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.42.2" @@ -12158,6 +12291,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.42.2" @@ -12170,6 +12309,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.42.2" @@ -12182,6 +12327,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -12194,6 +12345,12 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.42.2" @@ -12206,11 +12363,17 @@ version = "0.48.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" -version = "0.5.17" +version = "0.5.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3b801d0e0a6726477cc207f60162da452f3a95adb368399bef20a946e06f65c" +checksum = "b67b5f0a4e7a27a64c651977932b9dc5667ca7fc31ac44b03ed37a0cf42fdfff" dependencies = [ "memchr", ] @@ -12415,57 +12578,6 @@ dependencies = [ "zkevm_opcode_defs 1.3.2", ] -[[package]] -name = "zkcast" -version = "0.2.0" -dependencies = [ - "ansi_term", - "anyhow", - "async-trait", - "chrono", - "clap 4.4.6", - "clap_complete", - "clap_complete_fig", - "comfy-table", - "const-hex", - "criterion", - "dirs 5.0.1", - "dunce", - "eth-keystore", - "ethabi 18.0.0", - "ethers", - "ethers-core", - "ethers-etherscan", - "ethers-providers", - "evm-disassembler", - "eyre", - "foundry-cli", - "foundry-common", - "foundry-config", - "foundry-evm", - "foundry-test-utils", - "foundry-utils", - "futures 0.3.28", - "indicatif", - "itertools 0.11.0", - "rayon", - "regex", - "rpassword", - "rusoto_core", - "rusoto_kms", - "semver 1.0.20", - "serde", - "serde_json", - "tempfile", - "tokio", - "tracing", - "uint", - "url", - "vergen", - "yansi 0.5.1", - "zksync-web3-rs", -] - [[package]] name = "zkevm-assembly" version = "1.3.2" @@ -12581,64 +12693,6 @@ dependencies = [ "zkevm-assembly", ] -[[package]] -name = "zkforge" -version = "0.2.0" -dependencies = [ - "alloy-primitives", - "anvil", - "async-trait", - "clap 4.4.6", - "clap_complete", - "clap_complete_fig", - "comfy-table", - "const-hex", - "criterion", - "dialoguer", - "dunce", - "ethers", - "eyre", - "forge-doc", - "forge-fmt", - "foundry-cli", - "foundry-common", - "foundry-config", - "foundry-debugger", - "foundry-evm", - "foundry-test-utils", - "foundry-utils", - "futures 0.3.28", - "globset", - "indicatif", - "itertools 0.11.0", - "once_cell", - "parking_lot 0.12.1", - "path-slash", - "pretty_assertions", - "proptest", - "rayon", - "regex", - "reqwest", - "semver 1.0.20", - "serde", - "serde_json", - "serial_test", - "similar", - "solang-parser", - "strum 0.25.0", - "svm-rs", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "url", - "vergen", - "watchexec", - "yansi 0.5.1", - "zkcast", - "zksync-web3-rs", -] - [[package]] name = "zksync-web3-rs" version = "0.1.0" @@ -12897,7 +12951,7 @@ dependencies = [ "actix-web", "anyhow", "async-trait", - "axum 0.6.20", + "axum", "bigdecimal", "bitflags 1.3.2", "chrono", @@ -12925,7 +12979,7 @@ dependencies = [ "thiserror", "tokio", "tower", - "tower-http 0.4.4", + "tower-http", "tracing", "vise", "vlog", diff --git a/Cargo.toml b/Cargo.toml index d15396650..77e0fe777 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,10 +104,8 @@ trezor-client.opt-level = 1 [workspace.dependencies] anvil = { path = "crates/anvil" } cast = { path = "crates/cast" } -zkcast = { path = "crates/zkcast" } chisel = { path = "crates/chisel" } forge = { path = "crates/forge" } -zkforge = { path = "crates/zkforge" } forge-doc = { path = "crates/doc" } forge-fmt = { path = "crates/fmt" } @@ -126,31 +124,24 @@ foundry-macros = { path = "crates/macros" } foundry-test-utils = { path = "crates/test-utils" } foundry-block-explorers = { version = "0.1.2", default-features = false } -foundry-compilers = { version = "0.1.1", default-features = false } ## revm # no default features to avoid c-kzg +revm = { version = "3", default-features = false } revm-primitives = { version = "1", default-features = false } -# Using a fork of revm as zksync-era requires the usage of sha3 0.10.6, and the latest revm uses 0.10.8 -revm = { version = "3.5.0", default-features = false } era_revm = { git="https://github.com/matter-labs/era-revm", rev = "2662bb19427a421662a7e463cf1ed6a15da361e5" } -# We use a fork of `ethers` to gain access to a previously private variable. -# This ensures that all artifact files, freshly compiled and saved in the `output` directory, are publicly accessible. -# For details on this modification, refer to: -# https://github.com/mm-zk/ethers-rs/commit/2b2c7312f328a431fa40a7b87a722eaf28e27061 -ethers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-addressbook = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-core = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-contract = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-contract-abigen = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-providers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-signers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-middleware = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-etherscan = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-solc = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } - +## ethers +ethers = { version = "2.0", default-features = false } +ethers-core = { version = "2.0", default-features = false } +ethers-contract = { version = "2.0", default-features = false } +ethers-contract-abigen = { version = "2.0", default-features = false } +ethers-providers = { version = "2.0", default-features = false } +ethers-signers = { version = "2.0", default-features = false } +ethers-middleware = { version = "2.0", default-features = false } +ethers-solc = { version = "2.0", default-features = false } +foundry-compilers = { version = "0.1.1", default-features = false } ## alloy alloy-primitives = "0.5.0" alloy-dyn-abi = "0.5.0" @@ -185,22 +176,18 @@ tower = "0.4" tower-http = "0.4" [patch.crates-io] -# We use a fork of `ethers` to gain access to a previously private variable. -# This ensures that all artifact files, freshly compiled and saved in the `output` directory, are publicly accessible. -# For details on this modification, refer to: -# https://github.com/mm-zk/ethers-rs/commit/2b2c7312f328a431fa40a7b87a722eaf28e27061 -ethers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-addressbook = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-core = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-contract = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-contract-abigen = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-providers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-signers = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-middleware = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-etherscan = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -ethers-solc = { git = "https://github.com/mm-zk/ethers-rs", tag = "main_public_artifact", default-features = false } -revm = { git = "https://github.com/dutterbutter/revm", tag = "sha3_0.10" } -revm-interpreter = { git = "https://github.com/dutterbutter/revm", tag = "sha3_0.10" } -revm-precompile = { git = "https://github.com/dutterbutter/revm", tag = "sha3_0.10" } -revm-primitives = { git = "https://github.com/dutterbutter/revm", tag = "sha3_0.10" } - +ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-core = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-contract = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-providers = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-signers = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } +ethers-solc = { git = "https://github.com/gakonst/ethers-rs", rev = "f0e5b194f09c533feb10d1a686ddb9e5946ec107" } + +revm = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" } +revm-interpreter = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" } +revm-precompile = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" } +revm-primitives = { git = "https://github.com/bluealloy/revm", branch = "reth_freeze" } + +foundry-compilers = { git = "https://github.com/Deniallugo/compilers.git", branch = "main", default-features = false } diff --git a/crates/chisel/src/executor.rs b/crates/chisel/src/executor.rs index 07d2e3aab..602c0bee8 100644 --- a/crates/chisel/src/executor.rs +++ b/crates/chisel/src/executor.rs @@ -16,7 +16,6 @@ use foundry_evm::{ backend::Backend, decode::decode_console_logs, executors::ExecutorBuilder, inspectors::CheatsConfig, }; -use foundry_utils::types::ToEthers; use revm::primitives::SpecId; use solang_parser::pt::{self, CodeLocation}; use std::str::FromStr; @@ -149,7 +148,7 @@ impl SessionSource { if self.config.foundry_config.verbosity >= 3 { eprintln!("Could not inspect: {e}"); } - return Ok((true, None)); + return Ok((true, None)) } }, }; @@ -169,10 +168,10 @@ impl SessionSource { if let Some(event_definition) = intermediate_contract.event_definitions.get(input) { let formatted = format_event_definition(event_definition)?; - return Ok((false, Some(formatted))); + return Ok((false, Some(formatted))) } - return Ok((false, None)); + return Ok((false, None)) } let Some((stack, memory, _)) = &res.state else { @@ -188,7 +187,7 @@ impl SessionSource { } } - return Err(eyre::eyre!("Failed to inspect expression")); + return Err(eyre::eyre!("Failed to inspect expression")) }; let generated_output = source @@ -736,7 +735,7 @@ impl Type { /// Handle special expressions like [global variables](https://docs.soliditylang.org/en/latest/cheatsheet.html#global-variables) fn map_special(self) -> Self { if !matches!(self, Self::Function(_, _, _) | Self::Access(_, _) | Self::Custom(_)) { - return self; + return self } let mut types = Vec::with_capacity(5); @@ -745,7 +744,7 @@ impl Type { let len = types.len(); if len == 0 { - return self; + return self } // Type members, like array, bytes etc @@ -783,8 +782,8 @@ impl Type { match name { "block" => match access { "coinbase" => Some(DynSolType::Address), - "basefee" | "chainid" | "difficulty" | "gaslimit" | "number" - | "timestamp" => Some(DynSolType::Uint(256)), + "basefee" | "chainid" | "difficulty" | "gaslimit" | "number" | + "timestamp" => Some(DynSolType::Uint(256)), _ => None, }, "msg" => match access { @@ -903,7 +902,7 @@ impl Type { custom_type.pop(); } if custom_type.is_empty() { - return Ok(None); + return Ok(None) } // If a contract exists with the given name, check its definitions for a match. @@ -918,7 +917,7 @@ impl Type { if let Some(func) = intermediate_contract.function_definitions.get(cur_type) { // Check if the custom type is a function pointer member access if let res @ Some(_) = func_members(func, custom_type) { - return Ok(res); + return Ok(res) } // Because tuple types cannot be passed to `abi.encode`, we will only be @@ -939,7 +938,7 @@ impl Type { // struct, array, etc. if let pt::Expression::Variable(ident) = return_ty { custom_type.push(ident.name.clone()); - return Self::infer_custom_type(intermediate, custom_type, Some(contract_name)); + return Self::infer_custom_type(intermediate, custom_type, Some(contract_name)) } // Check if our final function call alters the state. If it does, we bail so that it @@ -978,7 +977,7 @@ impl Type { // anything. If it is, we can stop here. if let Ok(res) = Self::infer_custom_type(intermediate, custom_type, Some("REPL".into())) { - return Ok(res); + return Ok(res) } // Check if the first element of the custom type is a known contract. If it is, begin @@ -987,13 +986,13 @@ impl Type { let contract = intermediate.intermediate_contracts.get(name); if contract.is_some() { let contract_name = custom_type.pop(); - return Self::infer_custom_type(intermediate, custom_type, contract_name); + return Self::infer_custom_type(intermediate, custom_type, contract_name) } // See [`Type::infer_var_expr`] let name = custom_type.last().unwrap(); if let Some(expr) = intermediate.repl_contract_expressions.get(name) { - return Self::infer_var_expr(expr, Some(intermediate), custom_type); + return Self::infer_var_expr(expr, Some(intermediate), custom_type) } // The first element of our custom type was neither a variable or a function within the @@ -1121,7 +1120,7 @@ impl Type { let pt::Expression::Variable(contract_name) = intermediate.repl_contract_expressions.get(&contract_name.name)? else { - return None; + return None }; let contract = intermediate @@ -1189,10 +1188,10 @@ impl Type { fn is_array(&self) -> bool { matches!( self, - Self::Array(_) - | Self::FixedArray(_, _) - | Self::Builtin(DynSolType::Array(_)) - | Self::Builtin(DynSolType::FixedArray(_, _)) + Self::Array(_) | + Self::FixedArray(_, _) | + Self::Builtin(DynSolType::Array(_)) | + Self::Builtin(DynSolType::FixedArray(_, _)) ) } @@ -1209,7 +1208,7 @@ impl Type { #[inline] fn func_members(func: &pt::FunctionDefinition, custom_type: &[String]) -> Option { if !matches!(func.ty, pt::FunctionTy::Function) { - return None; + return None } let vis = func.attributes.iter().find_map(|attr| match attr { @@ -1647,7 +1646,7 @@ mod tests { Ok((solc, v)) => { // successfully installed eprintln!("found installed Solc v{v} @ {}", solc.solc.display()); - break; + break } Err(e) => { // try reinstalling @@ -1655,7 +1654,7 @@ mod tests { let solc = Solc::blocking_install(&version.parse().unwrap()); if solc.map_err(SolcError::from).and_then(|solc| solc.version()).is_ok() { *is_preinstalled = true; - break; + break } } } diff --git a/crates/common/src/zk_compile.rs b/crates/common/src/zk_compile.rs index 5988e8cb6..e5c980be7 100644 --- a/crates/common/src/zk_compile.rs +++ b/crates/common/src/zk_compile.rs @@ -31,18 +31,19 @@ /// - Artifact Path Generation: The `build_artifacts_path` and `build_artifacts_file` methods /// construct the path and file for saving the compiler output artifacts. use crate::zksolc_manager::ZkSolcManager; +use alloy_json_abi::{Function, JsonAbi}; +use alloy_primitives::Bytes; use ansi_term::Colour::{Red, Yellow}; -use ethers_core::types::Bytes; -use ethers_solc::{ +use eyre::{Context, ContextCompat, Result}; +use foundry_compilers::{ artifacts::{ - output_selection::FileOutputSelection, CompactBytecode, CompactDeployedBytecode, - LosslessAbi, Source, StandardJsonCompilerInput, + output_selection::FileOutputSelection, CompactBytecode, CompactDeployedBytecode, Source, + StandardJsonCompilerInput, }, remappings::RelativeRemapping, ArtifactFile, Artifacts, ConfigurableContractArtifact, Graph, Project, ProjectCompileOutput, Solc, }; -use eyre::{Context, ContextCompat, Result}; use regex::Regex; use semver::Version; use serde::Deserialize; @@ -496,7 +497,7 @@ impl ZkSolc { let mut art = ConfigurableContractArtifact { bytecode: Some(CompactBytecode { - object: ethers_solc::artifacts::BytecodeObject::Bytecode( + object: foundry_compilers::artifacts::BytecodeObject::Bytecode( packed_bytecode.clone(), ), source_map: None, @@ -504,7 +505,7 @@ impl ZkSolc { }), deployed_bytecode: Some(CompactDeployedBytecode { bytecode: Some(CompactBytecode { - object: ethers_solc::artifacts::BytecodeObject::Bytecode( + object: foundry_compilers::artifacts::BytecodeObject::Bytecode( packed_bytecode, ), source_map: None, @@ -962,7 +963,7 @@ pub struct ZkContract { #[serde(rename = "factoryDependencies", default)] pub factory_dependencies: HashMap, pub evm: Evm, - pub abi: Option, + pub abi: Option, } #[derive(Debug, Deserialize)] diff --git a/crates/config/src/lib.rs b/crates/config/src/lib.rs index 85b8792bf..a97bed0fb 100644 --- a/crates/config/src/lib.rs +++ b/crates/config/src/lib.rs @@ -422,10 +422,7 @@ impl Config { /// Default address for tx.origin /// /// `0x1804c8AB1F12E6bbf3894d4083f33e07309d1f38` - pub const DEFAULT_SENDER: H160 = H160([ - 0x18, 0x04, 0xc8, 0xAB, 0x1F, 0x12, 0xE6, 0xbb, 0xF3, 0x89, 0x4D, 0x40, 0x83, 0xF3, 0x3E, - 0x07, 0x30, 0x9D, 0x1F, 0x38, - ]); + pub const DEFAULT_SENDER: Address = address!("1804c8AB1F12E6bbf3894d4083f33e07309d1f38"); /// Returns the current `Config` /// @@ -903,7 +900,7 @@ impl Config { // we treat the `etherscan_api_key` as actual API key // if no chain provided, we assume mainnet - let chain = self.chain_id.unwrap_or(Chain::Named(Mainnet)); + let chain = self.chain.unwrap_or(Chain::mainnet()); let api_key = self.etherscan_api_key.as_ref()?; ResolvedEtherscanConfig::create(api_key, chain).map(Ok) } @@ -916,7 +913,7 @@ impl Config { /// over the chain's entry in the table. pub fn get_etherscan_config_with_chain( &self, - chain: Option>, + chain: Option, ) -> Result, EtherscanConfigError> { let chain = chain.map(Into::into); if let Some(maybe_alias) = self.etherscan_api_key.as_ref().or(self.eth_rpc_url.as_ref()) { @@ -946,7 +943,7 @@ impl Config { // etherscan fallback via API key if let Some(key) = self.etherscan_api_key.as_ref() { - let chain = chain.or(self.chain_id).unwrap_or_default(); + let chain = chain.or(self.chain).unwrap_or_default(); return Ok(ResolvedEtherscanConfig::create(key, chain)) } @@ -954,7 +951,7 @@ impl Config { } /// Helper function to just get the API key - pub fn get_etherscan_api_key(&self, chain: Option>) -> Option { + pub fn get_etherscan_api_key(&self, chain: Option) -> Option { self.get_etherscan_config_with_chain(chain).ok().flatten().map(|c| c.key) } @@ -1140,7 +1137,7 @@ impl Config { /// Returns the default config that uses dapptools style paths pub fn dapptools() -> Self { Config { - chain_id: Some(Chain::Id(99)), + chain: Some(Chain::Id(99)), block_timestamp: 0, block_number: 0, ..Config::default() @@ -1796,12 +1793,12 @@ impl Default for Config { initial_balance: U256::from(0xffffffffffffffffffffffffu128), block_number: 1, fork_block_number: None, - chain_id: None, + chain: None, gas_limit: i64::MAX.into(), code_size_limit: None, gas_price: None, block_base_fee_per_gas: 0, - block_coinbase: Address::zero(), + block_coinbase: Address::ZERO, block_timestamp: 1, block_difficulty: 0, block_prevrandao: Default::default(), @@ -2451,54 +2448,26 @@ impl ProviderExt for P {} /// /// ```rust /// use foundry_config::{BasicConfig, Config}; - /// let config = Config { src: "other".into(), ..Default::default() }; - pub const DEFAULT_SENDER: Address = address!("1804c8AB1F12E6bbf3894d4083f33e07309d1f38"); - /// use figment::providers::{Env, Format, Toml}; - /// let figment = Config::figment().merge(Toml::file("other.toml").nested()); - /// use figment::providers::{Env, Format, Toml}; - /// let figment = Config::figment().merge(Toml::file("other.toml").nested()); - self.create_project(self.cache, false) - ))); - ))); - return Ok(solc); - return SpecId::CANCUN; - return false; - !self.no_storage_caching - && self.rpc_storage_caching.enable_for_chain_id(chain_id.into()) - && self.rpc_storage_caching.enable_for_endpoint(endpoint) - /// let config = Config::with_root("./"); - /// let rpc_jwt = config.get_rpc_jwt_secret().unwrap().unwrap(); - /// let config = Config::with_root("./"); - /// let rpc_url = config.get_rpc_url().unwrap().unwrap(); - /// let config = Config::with_root("./"); - /// let rpc_url = config.get_rpc_url_with_alias("mainnet").unwrap().unwrap(); - /// let config = Config::with_root("./"); - /// let rpc_url = config.get_rpc_url_or("http://localhost:8545").unwrap(); - /// let config = Config::with_root("./"); - /// let rpc_url = config.get_rpc_url_or_localhost_http().unwrap(); - /// let config = Config::with_root("./"); - /// let etherscan_config = config.get_etherscan_config().unwrap().unwrap(); - /// let client = etherscan_config.into_client().unwrap(); - return resolved.remove(maybe_alias); - let chain = self.chain.unwrap_or(Chain::mainnet()); - chain: Option, - return self.etherscan.clone().resolved().remove(maybe_alias).transpose(); - return Ok(Some(config)); - let chain = chain.or(self.chain).unwrap_or_default(); - return Ok(ResolvedEtherscanConfig::create(key, chain)); - pub fn get_etherscan_api_key(&self, chain: Option) -> Option { - /// returns the [`foundry_compilers::ConfigurableArtifacts`] for this config, that includes the - chain: Some(Chain::from_id(99)), - return Ok(()); - }; - return Some(file_path); - return Ok(cache); - return Ok(blocks); - return Ok(0); - return Ok(Some(globset::Glob::new(&s).map_err(serde::de::Error::custom)?)); - block_number: 0, // era-test-node starts at block 0 - chain: None, - memory_limit: 1 << 27, // 2**27 = 128MiB = 134_217_728 bytes +/// let config = Config { src: "other".into(), ..Default::default() }; +pub const DEFAULT_SENDER: Address = address!("1804c8AB1F12E6bbf3894d4083f33e07309d1f38"); +/// use figment::providers::{Env, Format, Toml}; +/// let figment = Config::figment().merge(Toml::file("other.toml").nested()); +/// use figment::providers::{Env, Format, Toml}; +/// let figment = Config::figment().merge(Toml::file("other.toml").nested()); +/// let config = Config::with_root("./"); +/// let rpc_jwt = config.get_rpc_jwt_secret().unwrap().unwrap(); +/// let config = Config::with_root("./"); +/// let rpc_url = config.get_rpc_url().unwrap().unwrap(); +/// let config = Config::with_root("./"); +/// let rpc_url = config.get_rpc_url_with_alias("mainnet").unwrap().unwrap(); +/// let config = Config::with_root("./"); +/// let rpc_url = config.get_rpc_url_or("http://localhost:8545").unwrap(); +/// let config = Config::with_root("./"); +/// let rpc_url = config.get_rpc_url_or_localhost_http().unwrap(); +/// let config = Config::with_root("./"); +/// let etherscan_config = config.get_etherscan_config().unwrap().unwrap(); +/// let client = etherscan_config.into_client().unwrap(); +/// returns the [`foundry_compilers::ConfigurableArtifacts`] for this config, that includes the /// use foundry_config::{BasicConfig, Config}; /// use serde::Deserialize; /// diff --git a/crates/debugger/Cargo.toml b/crates/debugger/Cargo.toml index 1203d5be8..0577053a5 100644 --- a/crates/debugger/Cargo.toml +++ b/crates/debugger/Cargo.toml @@ -21,5 +21,4 @@ crossterm = "0.27" eyre.workspace = true ratatui = { version = "0.24.0", default-features = false, features = ["crossterm"] } revm.workspace = true -tracing.workspace = true -revm = { workspace = true, default-features = false, features = ["std", "serde", "arbitrary"] } +tracing.workspace = true \ No newline at end of file diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index 51d9ad6df..1aff62b5b 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -34,6 +34,7 @@ revm = { workspace = true, default-features = false, features = [ ethers-core.workspace = true ethers-providers.workspace = true +era_revm.workspace = true derive_more.workspace = true eyre = "0.6" diff --git a/crates/evm/evm/src/executors/tracing.rs b/crates/evm/evm/src/executors/tracing.rs index f90035e6f..af1023720 100644 --- a/crates/evm/evm/src/executors/tracing.rs +++ b/crates/evm/evm/src/executors/tracing.rs @@ -2,7 +2,7 @@ use crate::executors::{Executor, ExecutorBuilder}; use foundry_compilers::EvmVersion; use foundry_config::{utils::evm_spec_id, Chain, Config}; use foundry_evm_core::{backend::Backend, fork::CreateFork, opts::EvmOpts}; -use revm::primitives::Env; +use revm::primitives::{Env, SpecId}; use std::ops::{Deref, DerefMut}; /// A default executor with tracing enabled diff --git a/crates/zkforge/bin/cmd/coverage.rs b/crates/zkforge/bin/cmd/coverage.rs index c8ddbe961..a80ae25e5 100644 --- a/crates/zkforge/bin/cmd/coverage.rs +++ b/crates/zkforge/bin/cmd/coverage.rs @@ -14,9 +14,8 @@ use foundry_cli::{ p_println, utils::{LoadConfig, STATIC_FUZZ_SEED}, }; -use foundry_common::{compile::ProjectCompiler, evm::EvmArgs, fs}; +use foundry_common::{compile::ProjectCompiler, evm::EvmArgs, fs, types::ToEthers}; use foundry_config::{Config, SolcReq}; -use foundry_utils::types::ToEthers; use semver::Version; use std::{collections::HashMap, path::PathBuf, sync::mpsc::channel}; use tracing::trace; diff --git a/crates/zkforge/bin/cmd/script/executor.rs b/crates/zkforge/bin/cmd/script/executor.rs index 9eaec211a..f8b37ec57 100644 --- a/crates/zkforge/bin/cmd/script/executor.rs +++ b/crates/zkforge/bin/cmd/script/executor.rs @@ -10,8 +10,7 @@ use ethers::{ }; use eyre::Result; use foundry_cli::utils::{ensure_clean_constructor, needs_setup}; -use foundry_common::{shell, RpcUrl}; -use foundry_utils::types::ToEthers; +use foundry_common::{shell, types::ToEthers, RpcUrl}; use futures::future::join_all; use parking_lot::RwLock; use std::{collections::VecDeque, sync::Arc}; diff --git a/crates/zkforge/src/gas_report.rs b/crates/zkforge/src/gas_report.rs index 59e51e78f..15058bade 100644 --- a/crates/zkforge/src/gas_report.rs +++ b/crates/zkforge/src/gas_report.rs @@ -4,8 +4,7 @@ use crate::{ }; use comfy_table::{presets::ASCII_MARKDOWN, *}; use ethers::types::U256; -use foundry_common::{calc, TestFunctionExt}; -use foundry_utils::types::ToEthers; +use foundry_common::{calc, types::ToEthers, TestFunctionExt}; use serde::{Deserialize, Serialize}; use std::{collections::BTreeMap, fmt::Display}; diff --git a/crates/zkforge/src/result.rs b/crates/zkforge/src/result.rs index cb26320bb..8bab24e1d 100644 --- a/crates/zkforge/src/result.rs +++ b/crates/zkforge/src/result.rs @@ -2,7 +2,7 @@ use crate::Address; use ethers::prelude::Log; -use foundry_common::evm::Breakpoints; +use foundry_common::{evm::Breakpoints, types::ToEthers}; use foundry_evm::{ coverage::HitMaps, debug::DebugArena, @@ -10,7 +10,6 @@ use foundry_evm::{ fuzz::{types::FuzzCase, CounterExample}, trace::{TraceKind, Traces}, }; -use foundry_utils::types::ToEthers; use serde::{Deserialize, Serialize}; use std::{collections::BTreeMap, fmt, time::Duration}; diff --git a/crates/zkforge/tests/cli/multi_script.rs b/crates/zkforge/tests/cli/multi_script.rs index 2320b7938..643ea900d 100644 --- a/crates/zkforge/tests/cli/multi_script.rs +++ b/crates/zkforge/tests/cli/multi_script.rs @@ -1,11 +1,11 @@ //! Contains various tests related to forge script use anvil::{spawn, NodeConfig}; +use foundry_common::types::ToEthers; use foundry_test_utils::{ forgetest_async, util::{TestCommand, TestProject}, ScriptOutcome, ScriptTester, }; -use foundry_utils::types::ToEthers; forgetest_async!( can_deploy_multi_chain_script_without_lib, diff --git a/rust-toolchain b/rust-toolchain index 96ca9b10c..e550e5ca2 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-07-23" +channel = "nightly-2023-08-21" components = [ "rustfmt", "clippy" ] \ No newline at end of file diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 96ca9b10c..e550e5ca2 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "nightly-2023-07-23" +channel = "nightly-2023-08-21" components = [ "rustfmt", "clippy" ] \ No newline at end of file