Skip to content

Commit

Permalink
release: 0.6.0 (gakonst#611)
Browse files Browse the repository at this point in the history
* release(core): 0.6.0

* release(providers): 0.6.0

* release(contract-abigen): 0.6.0

* release(contract-derive): 0.6.0

* release(derive-eip712): 0.2.0

* release(ethers-solc): 0.1.0

* release(contract): 0.6.0

* release(etherscan): 0.2.0

* release(signers): 0.6.0

* release(middleware): 0.6.0

* chore: update dev deps

* refactor(core): move docs to readme

* refactor(contract): move docs to readme

* refactor(providers): move docs to readme

* chore: bump ethers cargo toml

* refactor(signers): move docs to readme

* refactor(middleware): move docs to readme

* fix(ethers): adjust re-exports to allow searching internal packages

* docs: fix broken links

we cannot use relative crate imports because the readmes
are also imported by the parent crate

* alias readmes to be accessible to ethers crate
  • Loading branch information
gakonst authored Nov 23, 2021
1 parent fb42f04 commit bb3a2fd
Show file tree
Hide file tree
Showing 29 changed files with 348 additions and 294 deletions.
24 changes: 13 additions & 11 deletions Cargo.lock

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

17 changes: 9 additions & 8 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethers"
version = "0.5.4"
version = "0.6.0"
authors = ["Georgios Konstantopoulos <[email protected]>"]
license = "MIT OR Apache-2.0"
edition = "2021"
Expand Down Expand Up @@ -82,16 +82,17 @@ solc-tests = ["ethers-solc/tests"]


[dependencies]
ethers-contract = { version = "^0.5.0", default-features = false, path = "./ethers-contract" }
ethers-core = { version = "^0.5.0", default-features = false, path = "./ethers-core" }
ethers-providers = { version = "^0.5.0", default-features = false, path = "./ethers-providers" }
ethers-signers = { version = "^0.5.0", default-features = false, path = "./ethers-signers" }
ethers-middleware = { version = "^0.5.0", default-features = false, path = "./ethers-middleware" }
ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract" }
ethers-core = { version = "^0.6.0", default-features = false, path = "./ethers-core" }
ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers" }
ethers-signers = { version = "^0.6.0", default-features = false, path = "./ethers-signers" }
ethers-middleware = { version = "^0.6.0", default-features = false, path = "./ethers-middleware" }
ethers-solc = { version = "^0.1.0", default-features = false, path = "./ethers-solc" }
ethers-etherscan = { version = "^0.2.0", default-features = false, path = "./ethers-etherscan" }

[dev-dependencies]
ethers-contract = { version = "^0.5.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] }
ethers-providers = { version = "^0.5.0", default-features = false, path = "./ethers-providers", features = ["ws", "ipc"] }
ethers-contract = { version = "^0.6.0", default-features = false, path = "./ethers-contract", features = ["abigen", "eip712"] }
ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers", features = ["ws", "ipc"] }

anyhow = "1.0.39"
rand = "0.8.4"
Expand Down
1 change: 1 addition & 0 deletions assets/CONTRACT_README.md
1 change: 1 addition & 0 deletions assets/CORE_README.md
1 change: 1 addition & 0 deletions assets/MIDDLEWARE_README.md
1 change: 1 addition & 0 deletions assets/PROVIDERS_README.md
1 change: 1 addition & 0 deletions assets/SIGNERS_README.md
1 change: 1 addition & 0 deletions assets/SOLC_README.md
26 changes: 13 additions & 13 deletions ethers-contract/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ethers-contract"
license = "MIT OR Apache-2.0"
version = "0.5.3"
version = "0.6.0"
authors = ["Georgios Konstantopoulos <[email protected]>"]
edition = "2018"
description = "Smart contract bindings for the ethers-rs crate"
Expand All @@ -10,11 +10,11 @@ repository = "https://github.com/gakonst/ethers-rs"
keywords = ["ethereum", "web3", "celo", "ethers"]

[dependencies]
ethers-providers = { version = "^0.5.0", path = "../ethers-providers", default-features = false }
ethers-core = { version = "^0.5.0", path = "../ethers-core", default-features = false }
ethers-contract-abigen = { version = "^0.5.0", path = "ethers-contract-abigen", default-features = false, optional = true }
ethers-contract-derive = { version = "^0.5.0", path = "ethers-contract-derive", optional = true }
ethers-derive-eip712 = { version = "0.1.0", path = "../ethers-core/ethers-derive-eip712", optional = true }
ethers-providers = { version = "^0.6.0", path = "../ethers-providers", default-features = false }
ethers-core = { version = "^0.6.0", path = "../ethers-core", default-features = false }
ethers-contract-abigen = { version = "^0.6.0", path = "ethers-contract-abigen", default-features = false, optional = true }
ethers-contract-derive = { version = "^0.6.0", path = "ethers-contract-derive", optional = true }
ethers-derive-eip712 = { version = "^0.2.0", path = "../ethers-core/ethers-derive-eip712", optional = true }

serde = { version = "1.0.124", default-features = false }
serde_json = { version = "1.0.64", default-features = false }
Expand All @@ -25,13 +25,13 @@ futures-util = { version = "0.3.18" }
hex = { version = "0.4.3", default-features = false, features = ["std"] }

[dev-dependencies]
ethers-middleware = { version = "^0.5.0", path = "../ethers-middleware" }
ethers-providers = { version = "^0.5.0", path = "../ethers-providers", default-features = false, features = ["ws"] }
ethers-signers = { version = "^0.5.0", path = "../ethers-signers" }
ethers-contract-abigen = { version = "^0.5.0", path = "ethers-contract-abigen" }
ethers-contract-derive = { version = "^0.5.0", path = "ethers-contract-derive" }
ethers-core = { version = "^0.5.0", path = "../ethers-core", default-features = false, features = ["eip712"]}
ethers-derive-eip712 = { version = "0.1.0", path = "../ethers-core/ethers-derive-eip712"}
ethers-middleware = { version = "^0.6.0", path = "../ethers-middleware" }
ethers-providers = { version = "^0.6.0", path = "../ethers-providers", default-features = false, features = ["ws"] }
ethers-signers = { version = "^0.6.0", path = "../ethers-signers" }
ethers-contract-abigen = { version = "^0.6.0", path = "ethers-contract-abigen" }
ethers-contract-derive = { version = "^0.6.0", path = "ethers-contract-derive" }
ethers-core = { version = "^0.6.0", path = "../ethers-core", default-features = false, features = ["eip712"]}
ethers-derive-eip712 = { version = "^0.2.0", path = "../ethers-core/ethers-derive-eip712"}
ethers-solc = { version = "^0.1.0", path = "../ethers-solc", default-features = false }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
Expand Down
16 changes: 16 additions & 0 deletions ethers-contract/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Type-safe abstractions for interacting with Ethereum smart contracts

Interacting with a smart contract requires broadcasting carefully crafted
[transactions](ethers_core::types::TransactionRequest) where the `data` field
contains the
[function's selector](https://ethereum.stackexchange.com/questions/72363/what-is-a-function-selector)
along with the arguments of the called function.

This module provides the [`Contract`] and [`ContractFactory`] abstractions so
that you do not have to worry about that. It also provides typesafe bindings via
the [`abigen`] macro and the [`Abigen` builder].

[`contractfactory`]: ./struct.ContractFactory.html
[`contract`]: ./struct.Contract.html
[`abigen`]: ./macro.abigen.html
[`abigen` builder]: ./struct.Abigen.html
4 changes: 2 additions & 2 deletions ethers-contract/ethers-contract-abigen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethers-contract-abigen"
version = "0.5.3"
version = "0.6.0"
authors = ["Nicholas Rodrigues Lordello <[email protected]>", "Georgios Konstantopoulos <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -10,7 +10,7 @@ repository = "https://github.com/gakonst/ethers-rs"
keywords = ["ethereum", "web3", "celo", "ethers"]

[dependencies]
ethers-core = { version = "^0.5.0", path = "../../ethers-core", features = ["macros"] }
ethers-core = { version = "^0.6.0", path = "../../ethers-core", features = ["macros"] }

anyhow = "1.0.37"
Inflector = "0.11"
Expand Down
6 changes: 3 additions & 3 deletions ethers-contract/ethers-contract-derive/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethers-contract-derive"
version = "0.5.3"
version = "0.6.0"
authors = ["Nicholas Rodrigues Lordello <[email protected]>", "Georgios Konstantopoulos <[email protected]>"]
edition = "2018"
license = "MIT OR Apache-2.0"
Expand All @@ -13,8 +13,8 @@ keywords = ["ethereum", "web3", "celo", "ethers"]
proc-macro = true

[dependencies]
ethers-core = { version = "^0.5.0", path = "../../ethers-core" }
ethers-contract-abigen = { version = "^0.5.0", path = "../ethers-contract-abigen" }
ethers-core = { version = "^0.6.0", path = "../../ethers-core" }
ethers-contract-abigen = { version = "^0.6.0", path = "../ethers-contract-abigen" }

serde_json = "1.0.53"
hex = { version = "0.4.3", default-features = false, features = ["std"] }
Expand Down
15 changes: 1 addition & 14 deletions ethers-contract/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,5 @@
#![cfg_attr(docsrs, feature(doc_cfg))]
//! Type-safe abstractions for interacting with Ethereum smart contracts
//!
//! Interacting with a smart contract requires broadcasting carefully crafted
//! [transactions](ethers_core::types::TransactionRequest) where the `data` field contains
//! the [function's
//! selector](https://ethereum.stackexchange.com/questions/72363/what-is-a-function-selector)
//! along with the arguments of the called function. This module provides the
//! [`Contract`] and [`ContractFactory`] abstractions so that you do not have to worry about that.
//! It also provides typesafe bindings via the [`abigen`] macro and the [`Abigen` builder].
//!
//! [`ContractFactory`]: crate::ContractFactory
//! [`Contract`]: crate::Contract
//! [`abigen`]: ./macro.abigen.html
//! [`Abigen` builder]: crate::Abigen
#![doc = include_str!("../README.md")]
mod contract;
pub use contract::Contract;

Expand Down
2 changes: 1 addition & 1 deletion ethers-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ethers-core"
license = "MIT OR Apache-2.0"
version = "0.5.5"
version = "0.6.0"
authors = ["Georgios Konstantopoulos <[email protected]>"]
edition = "2018"
description = "Core structures for the ethers-rs crate"
Expand Down
48 changes: 48 additions & 0 deletions ethers-core/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Ethereum types, cryptography and utilities.

It is recommended to use the `utils`, `types` and `abi` re-exports instead of
the `core` module to simplify your imports.\_

This library provides type definitions for Ethereum's main datatypes along with
other utilities for interacting with the Ethereum ecosystem

## Signing an ethereum-prefixed message

Signing in Ethereum is done by first prefixing the message with
`"\x19Ethereum Signed Message:\n" + message.length`, and then signing the hash
of the result.

```rust,ignore
# async fn foo() -> Result<(), Box<dyn std::error::Error>> {
use ethers::signers::{Signer, LocalWallet};
let message = "Some data";
let wallet = LocalWallet::new(&mut rand::thread_rng());
// Sign the message
let signature = wallet.sign_message(message).await?;
// Recover the signer from the message
let recovered = signature.recover(message)?;
assert_eq!(recovered, wallet.address());
# Ok(())
# }
```

## Utilities

The crate provides utilities for launching local Ethereum testnets by using
`ganache-cli` via the `GanacheBuilder` struct.

# Features

- - ["eip712"] | Provides Eip712 trait for EIP-712 encoding of typed data for
derived structs

# ABI Encoding and Decoding

This crate re-exports the [`ethabi`](https://docs.rs/ethabi) crate's functions
under the `abi` module, as well as the
[`secp256k1`](https://docs.rs/libsecp256k1) and [`rand`](https://docs.rs/rand)
crates for convenience.
11 changes: 6 additions & 5 deletions ethers-core/ethers-derive-eip712/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
[package]
name = "ethers-derive-eip712"
version = "0.1.0"
version = "0.2.0"
edition = "2018"
description = "Custom derive macro for EIP-712 typed data"
license = "MIT OR Apache-2.0"

[lib]
proc-macro = true

[dependencies]
quote = "1.0.9"
syn = "1.0.77"
ethers-core = { version = "^0.5.0", path = "../", default-features = false, features = ["eip712", "macros"] }
ethers-core = { version = "^0.6.0", path = "../", default-features = false, features = ["eip712", "macros"] }
hex = "0.4.3"
serde = "1.0.130"
serde_json = "1.0.68"
proc-macro2 = "1.0.29"

[dev-dependencies]
ethers-contract = { version = "^0.5.0", path = "../../ethers-contract"}
ethers-contract-derive = { version = "^0.5.0", path = "../../ethers-contract/ethers-contract-derive" }
ethers-signers = { version = "^0.5.0", path = "../../ethers-signers" }
ethers-contract = { version = "^0.6.0", path = "../../ethers-contract"}
ethers-contract-derive = { version = "^0.6.0", path = "../../ethers-contract/ethers-contract-derive" }
ethers-signers = { version = "^0.6.0", path = "../../ethers-signers" }
Loading

0 comments on commit bb3a2fd

Please sign in to comment.