chore: pull ethers to top level directory (#398)
* chore: pull up ethers to top level directory * chore: enable ws feature when running examples * chore: fix paths * chore: enable ipc feature when running examples
This commit is contained in:
parent
6a0b74ec17
commit
8891ed38b4
81
Cargo.toml
81
Cargo.toml
|
@ -1,10 +1,77 @@
|
|||
[workspace]
|
||||
[package]
|
||||
name = "ethers"
|
||||
version = "0.4.1"
|
||||
authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
readme = "../README.md"
|
||||
documentation = "https://docs.rs/ethers"
|
||||
repository = "https://github.com/gakonst/ethers-rs"
|
||||
homepage = "https://docs.rs/ethers"
|
||||
description = """
|
||||
Complete Ethereum library and wallet implementation in Rust.
|
||||
"""
|
||||
|
||||
[workspace]
|
||||
members = [
|
||||
"./ethers",
|
||||
"./ethers-contract",
|
||||
"./ethers-providers",
|
||||
"./ethers-signers",
|
||||
"./ethers-core",
|
||||
"./ethers-middleware",
|
||||
"ethers-contract",
|
||||
"ethers-providers",
|
||||
"ethers-signers",
|
||||
"ethers-core",
|
||||
"ethers-middleware",
|
||||
]
|
||||
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.playground]
|
||||
features = ["full"]
|
||||
|
||||
[features]
|
||||
celo = [
|
||||
"ethers-core/celo",
|
||||
"ethers-providers/celo",
|
||||
"ethers-signers/celo",
|
||||
"ethers-contract/celo",
|
||||
"ethers-middleware/celo",
|
||||
"legacy"
|
||||
]
|
||||
|
||||
legacy = [
|
||||
"ethers-core/legacy",
|
||||
"ethers-contract/legacy"
|
||||
]
|
||||
|
||||
# individual features per sub-crate
|
||||
## core
|
||||
setup = ["ethers-core/setup"]
|
||||
## providers
|
||||
ws = ["ethers-providers/ws"]
|
||||
ipc = ["ethers-providers/ipc"]
|
||||
rustls = ["ethers-providers/rustls"]
|
||||
openssl = ["ethers-providers/openssl"]
|
||||
## signers
|
||||
ledger = ["ethers-signers/ledger"]
|
||||
yubi = ["ethers-signers/yubi"]
|
||||
## contracts
|
||||
abigen = ["ethers-contract/abigen"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
ethers-contract = { version = "0.4.7", default-features = false, path = "./ethers-contract" }
|
||||
ethers-core = { version = "0.4.8", default-features = false, path = "./ethers-core", features = ["setup"] }
|
||||
ethers-providers = { version = "0.4.6", default-features = false, path = "./ethers-providers" }
|
||||
ethers-signers = { version = "0.4.6", default-features = false, path = "./ethers-signers" }
|
||||
ethers-middleware = { version = "0.4.8", default-features = false, path = "./ethers-middleware" }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers-contract = { version = "0.4.7", default-features = false, path = "./ethers-contract", features = ["abigen"] }
|
||||
ethers-providers = { version = "0.4.6", default-features = false, path = "./ethers-providers", features = ["ws", "ipc"] }
|
||||
|
||||
anyhow = "1.0.39"
|
||||
rand = "0.8.4"
|
||||
serde = { version = "1.0.124", features = ["derive"] }
|
||||
serde_json = "1.0.64"
|
||||
tokio = { version = "1.5", features = ["macros", "rt-multi-thread"] }
|
||||
|
|
|
@ -24,7 +24,7 @@ futures-util = { version = "0.3.16" }
|
|||
hex = { version = "0.4.3", default-features = false, features = ["std"] }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers = { version = "0.4.0", path = "../ethers" }
|
||||
ethers = { version = "0.4.0", path = ".." }
|
||||
ethers-providers = { version = "0.4.6", path = "../ethers-providers", default-features = false, features = ["ws"] }
|
||||
ethers-signers = { version = "0.4.6", path = "../ethers-signers" }
|
||||
ethers-middleware = { version = "0.4.8", path = "../ethers-middleware" }
|
||||
|
|
|
@ -36,7 +36,7 @@ tokio = { version = "1.5", default-features = false, optional = true}
|
|||
futures-util = { version = "0.3.16", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers = { version = "0.4.0", path = "../ethers" }
|
||||
ethers = { version = "0.4.0", path = ".." }
|
||||
|
||||
serde_json = { version = "1.0.64", default-features = false }
|
||||
bincode = { version = "1.3.3", default-features = false }
|
||||
|
|
|
@ -35,7 +35,7 @@ serde_json = { version = "1.0.64", default-features = false }
|
|||
tokio = { version = "1.5" }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers = { version = "0.4.0", path = "../ethers" }
|
||||
ethers = { version = "0.4.0", path = ".." }
|
||||
hex = { version = "0.4.3", default-features = false, features = ["std"] }
|
||||
rand = { version = "0.8.4", default-features = false }
|
||||
tokio = { version = "1.5", default-features = false, features = ["rt", "macros", "time"] }
|
||||
|
|
|
@ -43,7 +43,7 @@ tokio-util = { version = "0.6.7", default-features = false, features = ["io"], o
|
|||
bytes = { version = "1.0.1", default-features = false, optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers = { version = "0.4.0", path = "../ethers" }
|
||||
ethers = { version = "0.4.0", path = ".." }
|
||||
tokio = { version = "1.5", default-features = false, features = ["rt", "macros"] }
|
||||
tempfile = "3.2.0"
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ tracing-futures = { version = "0.2.5", optional = true }
|
|||
spki = { version = "0.4.0", optional = true }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers = { version = "0.4.0", path = "../ethers" }
|
||||
ethers = { version = "0.4.0", path = ".." }
|
||||
yubihsm = { version = "0.39.0", features = ["secp256k1", "usb", "mockhsm"] }
|
||||
|
||||
tempfile = "3.2.0"
|
||||
|
|
|
@ -1,66 +0,0 @@
|
|||
[package]
|
||||
name = "ethers"
|
||||
version = "0.4.1"
|
||||
authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
|
||||
license = "MIT OR Apache-2.0"
|
||||
edition = "2018"
|
||||
readme = "../README.md"
|
||||
documentation = "https://docs.rs/ethers"
|
||||
repository = "https://github.com/gakonst/ethers-rs"
|
||||
homepage = "https://docs.rs/ethers"
|
||||
description = """
|
||||
Complete Ethereum library and wallet implementation in Rust.
|
||||
"""
|
||||
|
||||
[package.metadata.docs.rs]
|
||||
all-features = true
|
||||
rustdoc-args = ["--cfg", "docsrs"]
|
||||
|
||||
[package.metadata.playground]
|
||||
features = ["full"]
|
||||
|
||||
[features]
|
||||
celo = [
|
||||
"ethers-core/celo",
|
||||
"ethers-providers/celo",
|
||||
"ethers-signers/celo",
|
||||
"ethers-contract/celo",
|
||||
"ethers-middleware/celo",
|
||||
"legacy"
|
||||
]
|
||||
|
||||
legacy = [
|
||||
"ethers-core/legacy",
|
||||
"ethers-contract/legacy"
|
||||
]
|
||||
|
||||
# individual features per sub-crate
|
||||
## core
|
||||
setup = ["ethers-core/setup"]
|
||||
## providers
|
||||
ws = ["ethers-providers/ws"]
|
||||
ipc = ["ethers-providers/ipc"]
|
||||
rustls = ["ethers-providers/rustls"]
|
||||
openssl = ["ethers-providers/openssl"]
|
||||
## signers
|
||||
ledger = ["ethers-signers/ledger"]
|
||||
yubi = ["ethers-signers/yubi"]
|
||||
## contracts
|
||||
abigen = ["ethers-contract/abigen"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
ethers-contract = { version = "0.4.7", default-features = false, path = "../ethers-contract" }
|
||||
ethers-core = { version = "0.4.8", default-features = false, path = "../ethers-core", features = ["setup"] }
|
||||
ethers-providers = { version = "0.4.6", default-features = false, path = "../ethers-providers" }
|
||||
ethers-signers = { version = "0.4.6", default-features = false, path = "../ethers-signers" }
|
||||
ethers-middleware = { version = "0.4.8", default-features = false, path = "../ethers-middleware" }
|
||||
|
||||
[dev-dependencies]
|
||||
ethers-contract = { version = "0.4.7", default-features = false, path = "../ethers-contract", features = ["abigen"] }
|
||||
|
||||
anyhow = "1.0.39"
|
||||
rand = "0.8.4"
|
||||
serde = { version = "1.0.124", features = ["derive"] }
|
||||
serde_json = "1.0.64"
|
||||
tokio = { version = "1.5", features = ["macros", "rt-multi-thread"] }
|
|
@ -19,7 +19,7 @@ abigen!(
|
|||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
// 1. compile the contract (note this requires that you are inside the `ethers/examples` directory) and launch ganache
|
||||
// 1. compile the contract (note this requires that you are inside the `examples` directory) and launch ganache
|
||||
let (compiled, ganache) =
|
||||
compile_and_launch_ganache(Solc::new("**/contract.sol"), Ganache::new()).await?;
|
||||
let contract = compiled
|
|
@ -9,13 +9,13 @@ use std::{convert::TryFrom, sync::Arc, time::Duration};
|
|||
// definition in human readable format
|
||||
abigen!(
|
||||
SimpleContract,
|
||||
"./ethers/examples/contract_abi.json",
|
||||
"./examples/contract_abi.json",
|
||||
event_derives(serde::Deserialize, serde::Serialize)
|
||||
);
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<()> {
|
||||
// 1. compile the contract (note this requires that you are inside the `ethers/examples` directory) and launch ganache
|
||||
// 1. compile the contract (note this requires that you are inside the `examples` directory) and launch ganache
|
||||
let (compiled, ganache) =
|
||||
compile_and_launch_ganache(Solc::new("**/contract.sol"), Ganache::new()).await?;
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
//! ```
|
||||
//!
|
||||
//! Examples on how you can use the types imported by the prelude can be found in
|
||||
//! the [`examples` directory of the repository](https://github.com/gakonst/ethers-rs/tree/master/ethers/examples)
|
||||
//! the [`examples` directory of the repository](https://github.com/gakonst/ethers-rs/tree/master/examples)
|
||||
//! and in the `tests/` directories of each crate.
|
||||
//!
|
||||
//! # Quick explanation of each module in ascending order of abstraction
|
Loading…
Reference in New Issue