Skip to content

Commit

Permalink
use workspace dependency for ethers-rs (foundry-rs#4613)
Browse files Browse the repository at this point in the history
  • Loading branch information
seunlanlege authored Mar 21, 2023
1 parent 394f217 commit ffa038b
Show file tree
Hide file tree
Showing 18 changed files with 65 additions and 55 deletions.
22 changes: 11 additions & 11 deletions Cargo.lock

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

14 changes: 13 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ strip = true
panic = "abort"
codegen-units = 1

# Lock ethers-rs to a rev to allow this crate be safely used as a dependency
[workspace.dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-addressbook = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-core = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-providers = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-signers = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-middleware = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", rev = "279280c6fdae215a9411cdcf5270f34b7cf3fb70" }

# # Patch ethers-rs with a local checkout then run `cargo update -p ethers`
# [patch."https://github.com/gakonst/ethers-rs"]
# ethers = { path = "../ethers-rs" }
Expand All @@ -70,4 +82,4 @@ codegen-units = 1
# ethers-solc = { path = "../ethers-rs/ethers-solc" }

# [patch.crates-io]
# revm = { path = "../revm/crates/revm" }
# revm = { path = "../revm/crates/revm" }
10 changes: 5 additions & 5 deletions anvil/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ foundry-config = { path = "../config" }

# evm support
bytes = "1.1.0"
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws"] }
ethers = { workspace = true, features = ["ws"] }
trie-db = { version = "0.23" }
hash-db = { version = "0.15" }
memory-db = { version = "0.29" }
Expand Down Expand Up @@ -68,13 +68,13 @@ ethereum-forkid = "0.11"

# ethers
[target.'cfg(not(windows))'.dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls", "ws", "ipc"] }
ethers = { workspace = true, features = ["rustls", "ws", "ipc"] }
[target.'cfg(windows)'.dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls", "ws"] }
ethers = { workspace = true, features = ["rustls", "ws"] }

[dev-dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["abigen"] }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", features = ["project-util", "full"] }
ethers = { workspace = true, features = ["abigen"] }
ethers-solc = { workspace = true, features = ["project-util", "full"] }
pretty_assertions = "1.2.1"
tokio = { version = "1", features = ["full"] }
crc = "3.0.0"
Expand Down
2 changes: 1 addition & 1 deletion anvil/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ revm = { version = "2.3", default-features = false, features = [
"memory_limit",
] }

ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-core = { workspace = true, default-features = false }
serde = { version = "1.0", features = ["derive"], optional = true }
serde_json = { version = "1.0" }
bytes = { version = "1.1" }
Expand Down
4 changes: 2 additions & 2 deletions binder/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ keywords = ["ethereum", "web3", "solidity"]

[dependencies]
foundry-config = { path = "../config" }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-solc = { workspace = true, default-features = false, features = [
"async",
"svm-solc",
"project-util",
] }
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-contract = { workspace = true, default-features = false, features = [
"abigen",
] }
curl = { version = "0.4", default-features = false, features = ["http2"] }
Expand Down
10 changes: 5 additions & 5 deletions cast/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ foundry-config = { path = "./../config" }
foundry-common = { path = "./../common" }

futures = "0.3.17"
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-etherscan = { workspace = true, default-features = false }
ethers-contract = { workspace = true, default-features = false, features = [
"abigen",
] }
ethers-core = { 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-core = { workspace = true, default-features = false }
ethers-providers = { workspace = true, default-features = false }
ethers-signers = { workspace = true, default-features = false }
eyre = "0.6.5"
rustc-hex = "2.1.0"
serde = "1.0.136"
Expand Down
4 changes: 2 additions & 2 deletions chisel/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ foundry-common = { path = "../common" }
forge-fmt = { path = "../fmt" }

# ethers
ethers = { git = "https://github.com/gakonst/ethers-rs" }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", features = ["project-util", "full"] }
ethers = { workspace = true }
ethers-solc = { workspace = true, features = ["project-util", "full"] }

# async
tokio = { version = "1.21.2", features = ["full"] }
Expand Down
2 changes: 1 addition & 1 deletion cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ cast = { path = "../cast" }
ui = { path = "../ui" }

# eth
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = ["rustls"] }
ethers = { workspace = true, default-features = false, features = ["rustls"] }
solang-parser = "=0.2.3"

# cli
Expand Down
4 changes: 2 additions & 2 deletions cli/test-utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ repository = "https://github.com/foundry-rs/foundry"

[dependencies]
tempfile = "3.3.0"
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-solc = { workspace = true, default-features = false, features = [
"project-util",
] }
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers = { workspace = true, default-features = false }

walkdir = "2.3.2"
once_cell = "1.13"
Expand Down
10 changes: 5 additions & 5 deletions common/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ repository = "https://github.com/foundry-rs/foundry"
foundry-config = { path = "../config" }

# eth
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-providers = { 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, features = ["ethers-solc"] }
ethers-core = { workspace = true, default-features = false }
ethers-solc = { workspace = true, default-features = false }
ethers-providers = { workspace = true, default-features = false }
ethers-middleware = { workspace = true, default-features = false }
ethers-etherscan = { workspace = true, default-features = false, features = ["ethers-solc"] }

# io
reqwest = { version = "0.11", default-features = false }
Expand Down
6 changes: 3 additions & 3 deletions config/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ readme = "README.md"

[dependencies]
# eth
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-core = { workspace = true, default-features = false }
ethers-solc = { workspace = true, default-features = false, features = [
"async",
"svm-solc",
] }
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-etherscan = { workspace = true, default-features = false }

# formats
Inflector = "0.11.4"
Expand Down
4 changes: 2 additions & 2 deletions doc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ foundry-config = { path = "../config" }
foundry-utils = { path = "../utils" }

# ethers
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = ["async"] }
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-solc = { workspace = true, default-features = false, features = ["async"] }
ethers-core = { workspace = true, default-features = false }

# cli
clap = { version = "3.0.10", features = [
Expand Down
2 changes: 1 addition & 1 deletion evm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ foundry-macros = { path = "../macros" }
serde_json = "1.0.67"
serde = "1.0.130"
hex = "0.4.3"
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers = { workspace = true, default-features = false, features = [
"solc-full",
"abigen",
] }
Expand Down
2 changes: 1 addition & 1 deletion fmt/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ keywords = ["ethereum", "web3", "solidity", "linter"]
foundry-config = { path = "../config" }

# ethers
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-core = { workspace = true, default-features = false }

# parser
solang-parser = "=0.2.3"
Expand Down
6 changes: 2 additions & 4 deletions forge/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ foundry-common = { path = "./../common" }
foundry-config = { path = "./../config" }
foundry-evm = { path = "./../evm" }

ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
"solc-full",
] }
ethers = { workspace = true, default-features = false, features = ["solc-full"] }
eyre = "0.6.5"
semver = "1.0.5"
serde_json = "1.0.67"
Expand All @@ -33,7 +31,7 @@ comfy-table = "6.0.0"
parking_lot = "0.12"

[dev-dependencies]
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers = { workspace = true, default-features = false, features = [
"solc-full",
"solc-tests",
] }
Expand Down
2 changes: 1 addition & 1 deletion macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ repository = "https://github.com/foundry-rs/foundry"
foundry-macros-impl = { path = "./impl" }
foundry-common = { path = "../common" }

ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-core = { workspace = true, default-features = false }
2 changes: 1 addition & 1 deletion ui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ crossterm = "0.22.1"
tui = { version = "0.16.0", default-features = false, features = ["crossterm"] }
eyre = "0.6.5"
hex = "0.4.3"
ethers = { git = "https://github.com/gakonst/ethers-rs" }
ethers = { workspace = true }
forge = { path = "../forge" }
revm = { version = "2.3", features = ["std", "k256", "with-serde"] }
14 changes: 7 additions & 7 deletions utils/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ readme = "README.md"
repository = "https://github.com/foundry-rs/foundry"

[dependencies]
ethers-core = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-contract = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers-core = { workspace = true, default-features = false }
ethers-contract = { workspace = true, default-features = false, features = [
"abigen",
] }
ethers-etherscan = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-addressbook = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-providers = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-solc = { git = "https://github.com/gakonst/ethers-rs", default-features = false }
ethers-etherscan = { workspace = true, default-features = false }
ethers-addressbook = { workspace = true, default-features = false }
ethers-providers = { workspace = true, default-features = false }
ethers-solc = { workspace = true, default-features = false }
tracing-subscriber = { version = "0.3", default-features = false, features = [
"env-filter",
"fmt",
Expand All @@ -38,7 +38,7 @@ glob = "0.3.0"

[dev-dependencies]
foundry-common = { path = "./../common" }
ethers = { git = "https://github.com/gakonst/ethers-rs", default-features = false, features = [
ethers = { workspace = true, default-features = false, features = [
"solc-full",
] }
pretty_assertions = "1.0.0"
Expand Down

0 comments on commit ffa038b

Please sign in to comment.