chore: make ethers-solc optional (#1463)
* chore: make ethers-solc optional * chore: update CHANGELOG * add missing requirement * add abigen req
This commit is contained in:
parent
0b88e4246d
commit
fb3fb161c0
|
@ -104,6 +104,8 @@
|
||||||
|
|
||||||
### Unreleased
|
### Unreleased
|
||||||
|
|
||||||
|
- Make `ethers-solc` optional dependency of `ethers`, needs `ethers-solc` feature to activate
|
||||||
|
[#1463](https://github.com/gakonst/ethers-rs/pull/1463)
|
||||||
- Add `rawMetadata:String` field to configurable contract output
|
- Add `rawMetadata:String` field to configurable contract output
|
||||||
[#1365](https://github.com/gakonst/ethers-rs/pull/1365)
|
[#1365](https://github.com/gakonst/ethers-rs/pull/1365)
|
||||||
- Use relative source paths and `solc --base-path`
|
- Use relative source paths and `solc --base-path`
|
||||||
|
|
19
Cargo.toml
19
Cargo.toml
|
@ -76,10 +76,9 @@ abigen = ["ethers-contract/abigen"]
|
||||||
### abigen without reqwest
|
### abigen without reqwest
|
||||||
abigen-offline = ["ethers-contract/abigen-offline"]
|
abigen-offline = ["ethers-contract/abigen-offline"]
|
||||||
## solc
|
## solc
|
||||||
solc-async = ["ethers-solc/async"]
|
solc-full = ["ethers-solc", "ethers-solc/full"]
|
||||||
solc-full = ["ethers-solc/full"]
|
solc-tests = ["ethers-solc", "ethers-solc/tests"]
|
||||||
solc-tests = ["ethers-solc/tests"]
|
solc-sha2-asm = ["ethers-solc", "ethers-solc/asm"]
|
||||||
solc-sha2-asm = ["ethers-solc/asm"]
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
ethers-addressbook = { version = "^0.13.0", default-features = false, path = "./ethers-addressbook" }
|
ethers-addressbook = { version = "^0.13.0", default-features = false, path = "./ethers-addressbook" }
|
||||||
|
@ -88,7 +87,7 @@ ethers-core = { version = "^0.13.0", default-features = false, path = "./ethers-
|
||||||
ethers-providers = { version = "^0.13.0", default-features = false, path = "./ethers-providers" }
|
ethers-providers = { version = "^0.13.0", default-features = false, path = "./ethers-providers" }
|
||||||
ethers-signers = { version = "^0.13.0", default-features = false, path = "./ethers-signers" }
|
ethers-signers = { version = "^0.13.0", default-features = false, path = "./ethers-signers" }
|
||||||
ethers-middleware = { version = "^0.13.0", default-features = false, path = "./ethers-middleware" }
|
ethers-middleware = { version = "^0.13.0", default-features = false, path = "./ethers-middleware" }
|
||||||
ethers-solc = { version = "^0.13.0", default-features = false, path = "./ethers-solc" }
|
ethers-solc = { version = "^0.13.0", default-features = false, path = "./ethers-solc", optional = true }
|
||||||
ethers-etherscan = { version = "^0.13.0", default-features = false, path = "./ethers-etherscan" }
|
ethers-etherscan = { version = "^0.13.0", default-features = false, path = "./ethers-etherscan" }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
|
@ -112,17 +111,25 @@ bytes = "1.1.0"
|
||||||
opt-level = "s"
|
opt-level = "s"
|
||||||
|
|
||||||
|
|
||||||
|
[[example]]
|
||||||
|
name = "abigen"
|
||||||
|
path = "examples/abigen.rs"
|
||||||
|
required-features = ["ethers-solc"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "contract_human_readable"
|
name = "contract_human_readable"
|
||||||
path = "examples/contract_human_readable.rs"
|
path = "examples/contract_human_readable.rs"
|
||||||
|
required-features = ["ethers-solc"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "contract_with_abi"
|
name = "contract_with_abi"
|
||||||
path = "examples/contract_with_abi.rs"
|
path = "examples/contract_with_abi.rs"
|
||||||
|
required-features = ["ethers-solc"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "contract_with_abi_and_bytecode"
|
name = "contract_with_abi_and_bytecode"
|
||||||
path = "examples/contract_with_abi_and_bytecode.rs"
|
path = "examples/contract_with_abi_and_bytecode.rs"
|
||||||
|
required-features = ["ethers-solc"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "ipc"
|
name = "ipc"
|
||||||
|
@ -137,7 +144,7 @@ required-features = ["ledger"]
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "moonbeam_with_abi"
|
name = "moonbeam_with_abi"
|
||||||
path = "examples/moonbeam_with_abi.rs"
|
path = "examples/moonbeam_with_abi.rs"
|
||||||
required-features = ["legacy"]
|
required-features = ["legacy", "ethers-solc"]
|
||||||
|
|
||||||
[[example]]
|
[[example]]
|
||||||
name = "trezor"
|
name = "trezor"
|
||||||
|
|
|
@ -20,5 +20,5 @@ for file in examples/*.rs; do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
echo "running: $file"
|
echo "running: $file"
|
||||||
cargo r -p ethers --example "$(basename "$name")"
|
cargo r -p ethers --example "$(basename "$name")" --features "ethers-solc"
|
||||||
done
|
done
|
||||||
|
|
|
@ -114,6 +114,7 @@ pub mod signers {
|
||||||
pub use ethers_signers::*;
|
pub use ethers_signers::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(feature = "ethers-solc")]
|
||||||
#[doc = include_str!("../assets/SOLC_README.md")]
|
#[doc = include_str!("../assets/SOLC_README.md")]
|
||||||
pub mod solc {
|
pub mod solc {
|
||||||
pub use ethers_solc::*;
|
pub use ethers_solc::*;
|
||||||
|
@ -141,6 +142,7 @@ pub mod prelude {
|
||||||
|
|
||||||
pub use super::signers::*;
|
pub use super::signers::*;
|
||||||
|
|
||||||
|
#[cfg(feature = "ethers-solc")]
|
||||||
pub use super::solc::*;
|
pub use super::solc::*;
|
||||||
|
|
||||||
pub use super::etherscan::*;
|
pub use super::etherscan::*;
|
||||||
|
|
Loading…
Reference in New Issue