chore: make ethers-solc always part of ethers

This commit is contained in:
Georgios Konstantopoulos 2023-03-21 11:34:14 -07:00
parent fff455d2b6
commit 567c2d3c5f
4 changed files with 8 additions and 11 deletions

View File

@ -24,7 +24,7 @@ rustdoc-args = ["--cfg", "docsrs"]
all-features = true
[features]
default = ["abigen", "rustls", "ethers-solc"]
default = ["abigen", "rustls"]
celo = ["ethers-core/celo", "ethers-providers/celo", "ethers-signers/celo", "ethers-contract/celo", "ethers-middleware/celo", "legacy"]
@ -48,9 +48,8 @@ abigen = ["ethers-contract/abigen"]
### abigen without reqwest
abigen-offline = ["ethers-contract/abigen-offline"]
## solc
ethers-solc = ["dep:ethers-solc", "ethers-etherscan/ethers-solc"]
solc-full = ["ethers-solc?/full"]
solc-tests = ["ethers-solc?/tests"]
solc-full = ["ethers-solc/full"]
solc-tests = ["ethers-solc/tests"]
# Deprecated
solc-sha2-asm = []
@ -59,12 +58,11 @@ solc-sha2-asm = []
ethers-addressbook.workspace = true
ethers-contract.workspace = true
ethers-core.workspace = true
ethers-etherscan.workspace = true
ethers-etherscan = { workspace = true, features = ["ethers-solc"] }
ethers-middleware.workspace = true
ethers-providers.workspace = true
ethers-signers.workspace = true
ethers-solc = { workspace = true, optional = true }
ethers-solc = { workspace = true }
[dev-dependencies]
serde.workspace = true

View File

@ -98,7 +98,6 @@ pub use ethers_providers as providers;
#[doc(inline)]
pub use ethers_signers as signers;
#[doc(inline)]
#[cfg(feature = "ethers-solc")]
pub use ethers_solc as solc;
#[doc(inline)]
@ -121,7 +120,6 @@ pub mod prelude {
pub use super::signers::*;
#[cfg(feature = "ethers-solc")]
pub use super::solc::*;
}

View File

@ -6,6 +6,7 @@ use ethers::{
},
providers::Provider,
signers::LocalWallet,
solc::Solc,
};
use std::{path::PathBuf, sync::Arc};
@ -39,7 +40,7 @@ async fn test_derive_eip712() {
// get ABI and bytecode for the DeriveEip712Test contract
let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests");
let result = ethers::solc::Solc::default().compile_source(path).unwrap();
let result = Solc::default().compile_source(path).unwrap();
let (abi, bytecode, _) = result
.find("DeriveEip712Test")
.expect("failed to get DeriveEip712Test contract")

View File

@ -13,7 +13,7 @@ default = ["legacy"]
legacy = ["ethers/legacy"]
[dev-dependencies]
ethers = { workspace = true, features = ["abigen", "ethers-solc", "rustls", "ws"] }
ethers = { workspace = true, features = ["abigen", "rustls", "ws"] }
tokio = { workspace = true, features = ["macros"] }