From ee7ac4904451f2be799a28abddf579094ab5cac0 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Sun, 14 Jan 2024 04:30:45 +0100 Subject: [PATCH] chore: don't use ethers in evm-core --- Cargo.lock | 3 +-- crates/evm/core/Cargo.toml | 2 +- crates/evm/core/src/backend/mod.rs | 2 +- crates/evm/core/src/fork/multi.rs | 3 +-- crates/evm/core/src/opts.rs | 2 +- crates/evm/core/src/utils.rs | 2 +- 6 files changed, 6 insertions(+), 8 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 0fde23ac095c..8ce6db782467 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2437,7 +2437,6 @@ source = "git+https://github.com/gakonst/ethers-rs?rev=f0e5b194f09c533feb10d1a68 dependencies = [ "chrono", "ethers-core", - "ethers-solc", "reqwest", "semver 1.0.21", "serde", @@ -3180,8 +3179,8 @@ dependencies = [ "alloy-transport", "const-hex", "derive_more", - "ethers", "ethers-core", + "ethers-providers", "eyre", "foundry-cheatcodes-spec", "foundry-common", diff --git a/crates/evm/core/Cargo.toml b/crates/evm/core/Cargo.toml index 3671e08e36b8..62b59a1f6156 100644 --- a/crates/evm/core/Cargo.toml +++ b/crates/evm/core/Cargo.toml @@ -34,9 +34,9 @@ revm = { workspace = true, default-features = false, features = [ alloy-providers = { workspace = true } alloy-transport = { workspace = true } alloy-rpc-types = { workspace = true } -ethers = { workspace = true, features = ["ethers-solc"] } ethers-core.workspace = true +ethers-providers.workspace = true derive_more.workspace = true eyre = "0.6" diff --git a/crates/evm/core/src/backend/mod.rs b/crates/evm/core/src/backend/mod.rs index 771ba7b3d57c..76a78fb6e10f 100644 --- a/crates/evm/core/src/backend/mod.rs +++ b/crates/evm/core/src/backend/mod.rs @@ -8,7 +8,7 @@ use crate::{ }; use alloy_primitives::{b256, keccak256, Address, B256, U256, U64}; use alloy_rpc_types::{Block, BlockNumberOrTag, BlockTransactions, Transaction}; -use ethers::utils::GenesisAccount; +use ethers_core::utils::GenesisAccount; use foundry_common::{is_known_system_sender, types::ToAlloy, SYSTEM_TRANSACTION_TYPE}; use revm::{ db::{CacheDB, DatabaseRef}, diff --git a/crates/evm/core/src/fork/multi.rs b/crates/evm/core/src/fork/multi.rs index 5aa7261bd440..acf509547186 100644 --- a/crates/evm/core/src/fork/multi.rs +++ b/crates/evm/core/src/fork/multi.rs @@ -6,9 +6,8 @@ use crate::fork::{BackendHandler, BlockchainDb, BlockchainDbMeta, CreateFork, SharedBackend}; use alloy_providers::provider::Provider; use alloy_transport::BoxTransport; -use ethers::types::BlockNumber; +use ethers_core::types::BlockNumber; use foundry_common::provider::alloy::ProviderBuilder; - use foundry_config::Config; use futures::{ channel::mpsc::{channel, Receiver, Sender}, diff --git a/crates/evm/core/src/opts.rs b/crates/evm/core/src/opts.rs index 14b3e2cfcf33..7eceb7c5afa2 100644 --- a/crates/evm/core/src/opts.rs +++ b/crates/evm/core/src/opts.rs @@ -2,7 +2,7 @@ use super::fork::environment; use crate::fork::CreateFork; use alloy_primitives::{Address, B256, U256}; use alloy_rpc_types::Block; -use ethers::providers::{Middleware, Provider}; +use ethers_providers::{Middleware, Provider}; use eyre::WrapErr; use foundry_common::{ self, diff --git a/crates/evm/core/src/utils.rs b/crates/evm/core/src/utils.rs index 55ec9a15bdf7..778b9ba13cdd 100644 --- a/crates/evm/core/src/utils.rs +++ b/crates/evm/core/src/utils.rs @@ -1,7 +1,7 @@ use alloy_json_abi::{Function, JsonAbi}; use alloy_primitives::FixedBytes; use alloy_rpc_types::{Block, Transaction}; -use ethers::types::{ActionType, CallType, Chain, H256, U256}; +use ethers_core::types::{ActionType, CallType, Chain, H256, U256}; use eyre::ContextCompat; use foundry_common::types::ToAlloy; use revm::{