Skip to content

Commit

Permalink
rework to not depend on changes in ethers-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
bernard-wagner committed Aug 19, 2023
1 parent ab2892d commit 587cc4a
Show file tree
Hide file tree
Showing 9 changed files with 252 additions and 229 deletions.
12 changes: 11 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

40 changes: 20 additions & 20 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -119,33 +119,33 @@ foundry-test-utils = { path = "crates/test-utils" }
foundry-utils = { path = "crates/utils" }
ui = { path = "crates/ui" }

#ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-addressbook = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-providers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
#ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-addressbook = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-contract-abigen = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-providers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-signers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false }

chrono = { version = "0.4", default-features = false, features = ["clock", "std"] }
hex = { package = "const-hex", version = "1.6", features = ["hex"] }
itertools = "0.11"
solang-parser = "=0.3.1"

#[patch."https://github.com/gakonst/ethers-rs"]
ethers = { path = "../ethers-rs/ethers" }
ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" }
ethers-contract = { path = "../ethers-rs/ethers-contract" }
ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" }
ethers-core = { path = "../ethers-rs/ethers-core" }
ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" }
ethers-middleware = { path = "../ethers-rs/ethers-middleware" }
ethers-providers = { path = "../ethers-rs/ethers-providers", features = ["ws", "ipc"] }
ethers-signers = { path = "../ethers-rs/ethers-signers" }
ethers-solc = { path = "../ethers-rs/ethers-solc" }
#ethers = { path = "../ethers-rs/ethers" }
#ethers-addressbook = { path = "../ethers-rs/ethers-addressbook" }
#ethers-contract = { path = "../ethers-rs/ethers-contract" }
#ethers-contract-abigen = { path = "../ethers-rs/ethers-contract/ethers-contract-abigen" }
#ethers-core = { path = "../ethers-rs/ethers-core" }
#ethers-etherscan = { path = "../ethers-rs/ethers-etherscan" }
#ethers-middleware = { path = "../ethers-rs/ethers-middleware" }
#ethers-providers = { path = "../ethers-rs/ethers-providers", features = ["ws", "ipc"] }
#ethers-signers = { path = "../ethers-rs/ethers-signers" }
#ethers-solc = { path = "../ethers-rs/ethers-solc" }

[patch.crates-io]
revm = { git = "https://github.com/bluealloy/revm/", branch = "release/v25" }
4 changes: 2 additions & 2 deletions crates/cast/bin/cmd/call.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ use foundry_cli::{
opts::{EthereumOpts, TransactionOpts},
utils::{self, handle_traces, parse_ether_value, TraceResult},
};
use foundry_common::runtime_provider::RuntimeProvider;
use foundry_common::runtime_client::RuntimeClient;
use foundry_config::{find_project_root_path, Config};
use foundry_evm::{executor::opts::EvmOpts, trace::TracingExecutor};
use std::str::FromStr;

type Provider = ethers::providers::Provider<RuntimeProvider>;
type Provider = ethers::providers::Provider<RuntimeClient>;

/// CLI arguments for `cast call`.
#[derive(Debug, Parser)]
Expand Down
2 changes: 1 addition & 1 deletion crates/common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ pub mod fmt;
pub mod fs;
pub mod glob;
pub mod provider;
pub mod runtime_provider;
pub mod runtime_client;
pub mod selectors;
pub mod shell;
pub mod term;
Expand Down
6 changes: 3 additions & 3 deletions crates/common/src/provider.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
//! Commonly used helpers to construct `Provider`s
use crate::{runtime_provider::RuntimeProvider, ALCHEMY_FREE_TIER_CUPS, REQUEST_TIMEOUT};
use crate::{runtime_client::RuntimeClient, ALCHEMY_FREE_TIER_CUPS, REQUEST_TIMEOUT};
use ethers_core::types::{Chain, U256};
use ethers_middleware::gas_oracle::{GasCategory, GasOracle, Polygon};
use ethers_providers::{is_local_endpoint, Middleware, Provider, DEFAULT_LOCAL_POLL_INTERVAL};
Expand All @@ -10,7 +10,7 @@ use std::{borrow::Cow, time::Duration};
use url::ParseError;

/// Helper type alias for a retry provider
pub type RetryProvider = Provider<RuntimeProvider>;
pub type RetryProvider = Provider<RuntimeClient>;

/// Helper type alias for a rpc url
pub type RpcUrl = String;
Expand Down Expand Up @@ -171,7 +171,7 @@ impl ProviderBuilder {
} = self;
let url = url?;

let mut provider = Provider::new(RuntimeProvider::new(
let mut provider = Provider::new(RuntimeClient::new(
url.clone(),
max_retry,
timeout_retry,
Expand Down
Loading

0 comments on commit 587cc4a

Please sign in to comment.