Repository: gakonst/ethers-rs
Pull request #1794 (2022-10-18 15:12:18)

Fix: minor typo
Fix: minor typo


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fffa6f22..06169b9e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,8 @@
 
 ### Unreleased
 
+-   Remove rust_decimals dependency for ethers-core
+-   Add support for numbers greater than 2^96 for `ethers_core::utils::parse_units` [#1822](https://github.com/gakonst/ethers-rs/issues/1822)
 -   Add comment about safety of u8 -> u64 cast in `ethers_core::types::Signature`
 -   Stop defaulting to the `"latest"` block in `eth_estimateGas` params [#1657](https://github.com/gakonst/ethers-rs/pull/1657)
 -   Fix geth trace types for debug_traceTransaction rpc
@@ -91,6 +93,7 @@
 -   [#1632](https://github.com/gakonst/ethers-rs/pull/1632) Re-export `H32` from `ethabi`.
 -   [#1634](https://github.com/gakonst/ethers-rs/pull/1634) Derive missing `Clone`, `Copy` and `Debug` impls in ethers-etherscan.
 -   Bytes debug format now displays hex literals [#1658](https://github.com/gakonst/ethers-rs/pull/1658)
+-   Fix `get_logs_paginated` trying to fetch beyond the latest block
 
 ## ethers-contract-abigen
 
diff --git a/Cargo.lock b/Cargo.lock
index 15401bba..3db56c4d 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -583,7 +583,7 @@ dependencies = [
  "bs58",
  "coins-core",
  "digest 0.10.5",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "hmac 0.12.1",
  "k256",
  "lazy_static",
@@ -600,7 +600,7 @@ checksum = "2a11892bcac83b4c6e95ab84b5b06c76d9d70ad73548dd07418269c5c7977171"
 dependencies = [
  "bitvec 0.17.4",
  "coins-bip32",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "hex",
  "hmac 0.12.1",
  "pbkdf2 0.11.0",
@@ -952,6 +952,17 @@ dependencies = [
  "zeroize",
 ]
 
+[[package]]
+name = "derive_more"
+version = "0.99.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321"
+dependencies = [
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
 [[package]]
 name = "dialoguer"
 version = "0.8.0"
@@ -1171,8 +1182,10 @@ checksum = "11da94e443c60508eb62cf256243a64da87304c2802ac2528847f79d750007ef"
 dependencies = [
  "crunchy",
  "fixed-hash",
+ "impl-codec",
  "impl-rlp",
  "impl-serde",
+ "scale-info",
  "tiny-keccak",
 ]
 
@@ -1184,15 +1197,17 @@ checksum = "b2827b94c556145446fcce834ca86b7abf0c39a805883fe20e72c5bfdb5a0dc6"
 dependencies = [
  "ethbloom",
  "fixed-hash",
+ "impl-codec",
  "impl-rlp",
  "impl-serde",
  "primitive-types",
+ "scale-info",
  "uint",
 ]
 
 [[package]]
 name = "ethers"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "bytes",
  "ethers-addressbook",
@@ -1213,7 +1228,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-addressbook"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "ethers-core",
  "once_cell",
@@ -1223,7 +1238,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-contract"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "ethers-contract-abigen",
  "ethers-contract-derive",
@@ -1244,7 +1259,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-contract-abigen"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "Inflector",
  "cfg-if 1.0.0",
@@ -1252,7 +1267,7 @@ dependencies = [
  "ethers-core",
  "ethers-solc",
  "eyre",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "hex",
  "proc-macro2",
  "quote",
@@ -1268,7 +1283,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-contract-derive"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "ethers-contract-abigen",
  "ethers-core",
@@ -1281,7 +1296,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-core"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "arrayvec 0.7.2",
  "bincode",
@@ -1291,17 +1306,16 @@ dependencies = [
  "convert_case",
  "elliptic-curve",
  "ethabi",
- "fastrlp",
  "generic-array 0.14.6",
  "hex",
  "hex-literal",
  "k256",
  "once_cell",
+ "open-fastrlp",
  "proc-macro2",
  "rand 0.8.5",
  "rlp",
  "rlp-derive",
- "rust_decimal",
  "serde",
  "serde_json",
  "strum",
@@ -1313,7 +1327,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-derive-eip712"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "ethers-contract-derive",
  "ethers-core",
@@ -1325,11 +1339,11 @@ dependencies = [
 
 [[package]]
 name = "ethers-etherscan"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "ethers-core",
  "ethers-solc",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "reqwest",
  "semver",
  "serde",
@@ -1345,7 +1359,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-middleware"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "async-trait",
  "auto_impl 0.5.0",
@@ -1374,7 +1388,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-providers"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "async-trait",
  "auto_impl 1.0.1",
@@ -1385,7 +1399,7 @@ dependencies = [
  "futures-core",
  "futures-timer",
  "futures-util",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "hashers",
  "hex",
  "http",
@@ -1411,7 +1425,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-signers"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "async-trait",
  "coins-bip32",
@@ -1444,7 +1458,7 @@ dependencies = [
 
 [[package]]
 name = "ethers-solc"
-version = "0.17.0"
+version = "1.0.0"
 dependencies = [
  "cfg-if 1.0.0",
  "criterion",
@@ -1453,7 +1467,7 @@ dependencies = [
  "ethers-core",
  "fs_extra",
  "futures-util",
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "glob",
  "hex",
  "home",
@@ -1524,31 +1538,6 @@ dependencies = [
  "instant",
 ]
 
-[[package]]
-name = "fastrlp"
-version = "0.1.3"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "089263294bb1c38ac73649a6ad563dd9a5142c8dc0482be15b8b9acb22a1611e"
-dependencies = [
- "arrayvec 0.7.2",
- "auto_impl 1.0.1",
- "bytes",
- "ethereum-types",
- "fastrlp-derive",
-]
-
-[[package]]
-name = "fastrlp-derive"
-version = "0.1.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9499f20a2fa1a744422de24d1b4d1ec58f240147de1d0a3ceacadf2e240b4fc2"
-dependencies = [
- "bytes",
- "proc-macro2",
- "quote",
- "syn",
-]
-
 [[package]]
 name = "ff"
 version = "0.12.0"
@@ -1656,9 +1645,9 @@ dependencies = [
 
 [[package]]
 name = "futures-channel"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "30bdd20c28fadd505d0fd6712cdfcb0d4b5648baf45faef7f852afb2399bb050"
+checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed"
 dependencies = [
  "futures-core",
  "futures-sink",
@@ -1666,15 +1655,15 @@ dependencies = [
 
 [[package]]
 name = "futures-core"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4e5aa3de05362c3fb88de6531e6296e85cde7739cccad4b9dfeeb7f6ebce56bf"
+checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac"
 
 [[package]]
 name = "futures-executor"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ff63c23854bee61b6e9cd331d523909f238fc7636290b96826e9cfa5faa00ab"
+checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2"
 dependencies = [
  "futures-core",
  "futures-task",
@@ -1683,9 +1672,9 @@ dependencies = [
 
 [[package]]
 name = "futures-io"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bbf4d2a7a308fd4578637c0b17c7e1c7ba127b8f6ba00b29f717e9655d85eb68"
+checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb"
 
 [[package]]
 name = "futures-locks"
@@ -1700,9 +1689,9 @@ dependencies = [
 
 [[package]]
 name = "futures-macro"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "42cd15d1c7456c04dbdf7e88bcd69760d74f3a798d6444e16974b505b0e62f17"
+checksum = "bdfb8ce053d86b91919aad980c220b1fb8401a9394410e1c289ed7e66b61835d"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -1711,15 +1700,15 @@ dependencies = [
 
 [[package]]
 name = "futures-sink"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21b20ba5a92e727ba30e72834706623d94ac93a725410b6a6b6fbc1b07f7ba56"
+checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9"
 
 [[package]]
 name = "futures-task"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a6508c467c73851293f390476d4491cf4d227dbabcd4170f3bb6044959b294f1"
+checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea"
 
 [[package]]
 name = "futures-timer"
@@ -1729,9 +1718,9 @@ checksum = "e64b03909df88034c26dc1547e8970b91f98bdb65165d6a4e9110d94263dbb2c"
 
 [[package]]
 name = "futures-util"
-version = "0.3.24"
+version = "0.3.25"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "44fb6cb1be61cc1d2e43b262516aafcf63b241cffdb1d3fa115f91d9c7b09c90"
+checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6"
 dependencies = [
  "futures-channel",
  "futures-core",
@@ -1786,9 +1775,9 @@ dependencies = [
 
 [[package]]
 name = "getrandom"
-version = "0.2.7"
+version = "0.2.8"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4eb1a864a501629691edf6c15a593b7a51eebaa1e8468e9ddc623de7c9b58ec6"
+checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31"
 dependencies = [
  "cfg-if 1.0.0",
  "js-sys",
@@ -2398,9 +2387,9 @@ dependencies = [
 
 [[package]]
 name = "num_cpus"
-version = "1.13.1"
+version = "1.14.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1"
+checksum = "f6058e64324c71e02bc2b150e4f3bc8286db6c83092132ffa3f6b1eab0f9def5"
 dependencies = [
  "hermit-abi",
  "libc",
@@ -2445,6 +2434,31 @@ version = "0.3.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
 
+[[package]]
+name = "open-fastrlp"
+version = "0.1.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "131de184f045153e72c537ef4f1d57babddf2a897ca19e67bdff697aebba7f3d"
+dependencies = [
+ "arrayvec 0.7.2",
+ "auto_impl 1.0.1",
+ "bytes",
+ "ethereum-types",
+ "open-fastrlp-derive",
+]
+
+[[package]]
+name = "open-fastrlp-derive"
+version = "0.1.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "003b2be5c6c53c1cfeb0a238b8a1c3915cd410feb684457a36c10038f764bb1c"
+dependencies = [
+ "bytes",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
 [[package]]
 name = "openssl"
 version = "0.10.38"
@@ -2845,6 +2859,7 @@ dependencies = [
  "impl-codec",
  "impl-rlp",
  "impl-serde",
+ "scale-info",
  "uint",
 ]
 
@@ -2983,7 +2998,7 @@ version = "0.6.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7"
 dependencies = [
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
 ]
 
 [[package]]
@@ -3034,7 +3049,7 @@ version = "0.4.0"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64"
 dependencies = [
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "redox_syscall",
 ]
 
@@ -3264,17 +3279,6 @@ dependencies = [
  "tokio",
 ]
 
-[[package]]
-name = "rust_decimal"
-version = "1.26.1"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ee9164faf726e4f3ece4978b25ca877ddc6802fa77f38cdccb32c7f805ecd70c"
-dependencies = [
- "arrayvec 0.7.2",
- "num-traits",
- "serde",
-]
-
 [[package]]
 name = "rustc-hex"
 version = "2.1.0"
@@ -3341,6 +3345,30 @@ dependencies = [
  "winapi-util",
 ]
 
+[[package]]
+name = "scale-info"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "333af15b02563b8182cd863f925bd31ef8fa86a0e095d30c091956057d436153"
+dependencies = [
+ "cfg-if 1.0.0",
+ "derive_more",
+ "parity-scale-codec",
+ "scale-info-derive",
+]
+
+[[package]]
+name = "scale-info-derive"
+version = "2.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "53f56acbd0743d29ffa08f911ab5397def774ad01bab3786804cf6ee057fb5e1"
+dependencies = [
+ "proc-macro-crate",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
 [[package]]
 name = "schannel"
 version = "0.1.19"
@@ -3818,9 +3846,9 @@ dependencies = [
 
 [[package]]
 name = "syn"
-version = "1.0.102"
+version = "1.0.103"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3fcd952facd492f9be3ef0d0b7032a6e442ee9b361d4acc2b1d0c4aaa5f613a1"
+checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d"
 dependencies = [
  "proc-macro2",
  "quote",
@@ -4286,7 +4314,7 @@ version = "0.8.2"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
 dependencies = [
- "getrandom 0.2.7",
+ "getrandom 0.2.8",
  "serde",
 ]
 
diff --git a/Cargo.toml b/Cargo.toml
index d0654130..3702ec50 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2021"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -89,26 +89,26 @@ solc-tests = ["ethers-solc", "ethers-solc/tests"]
 solc-sha2-asm = ["ethers-solc", "ethers-solc/asm"]
 
 [dependencies]
-ethers-addressbook = { version = "^0.17.0", default-features = false, path = "./ethers-addressbook" }
-ethers-contract = { version = "^0.17.0", default-features = false, path = "./ethers-contract" }
-ethers-core = { version = "^0.17.0", default-features = false, path = "./ethers-core" }
-ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers" }
-ethers-signers = { version = "^0.17.0", default-features = false, path = "./ethers-signers" }
-ethers-middleware = { version = "^0.17.0", default-features = false, path = "./ethers-middleware" }
-ethers-solc = { version = "^0.17.0", default-features = false, path = "./ethers-solc", optional = true }
-ethers-etherscan = { version = "^0.17.0", default-features = false, path = "./ethers-etherscan" }
+ethers-addressbook = { version = "^1.0.0", default-features = false, path = "./ethers-addressbook" }
+ethers-contract = { version = "^1.0.0", default-features = false, path = "./ethers-contract" }
+ethers-core = { version = "^1.0.0", default-features = false, path = "./ethers-core" }
+ethers-providers = { version = "^1.0.0", default-features = false, path = "./ethers-providers" }
+ethers-signers = { version = "^1.0.0", default-features = false, path = "./ethers-signers" }
+ethers-middleware = { version = "^1.0.0", default-features = false, path = "./ethers-middleware" }
+ethers-solc = { version = "^1.0.0", default-features = false, path = "./ethers-solc", optional = true }
+ethers-etherscan = { version = "^1.0.0", default-features = false, path = "./ethers-etherscan" }
 
 [dev-dependencies]
-ethers-contract = { version = "^0.17.0", default-features = false, path = "./ethers-contract", features = [
+ethers-contract = { version = "^1.0.0", default-features = false, path = "./ethers-contract", features = [
     "abigen",
     "eip712",
 ] }
-ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [
+ethers-providers = { version = "^1.0.0", default-features = false, path = "./ethers-providers", features = [
     "ws",
 ] }
 
 [target.'cfg(target_family = "unix")'.dev-dependencies]
-ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [
+ethers-providers = { version = "^1.0.0", default-features = false, path = "./ethers-providers", features = [
     "ws",
     "ipc",
 ] }
diff --git a/README.md b/README.md
index 920016ad..a13e15e0 100644
--- a/README.md
+++ b/README.md
@@ -22,7 +22,7 @@ You can also run any of the examples by executing: `cargo run -p ethers --exampl
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs" }
+ethers = "1.0.0"
 ```
 
 </details>
@@ -49,7 +49,7 @@ address that, you must use the `legacy` feature flag:
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["legacy"] }
+ethers = { version = "1.0.0", features = ["legacy"] }
 ```
 
 ### Polygon support
@@ -69,7 +69,7 @@ You can get one [here](https://snowtrace.io/apis).
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["celo"] }
+ethers = { version = "1.0.0", features = ["celo"] }
 ```
 
 Celo's transactions differ from Ethereum transactions by including 3 new fields:
@@ -107,7 +107,7 @@ Websockets support is turned on via the feature-flag `ws`:
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ws"] }
+ethers = { version = "1.0.0", features = ["ws"] }
 ```
 
 ### Interprocess Communication (IPC)
@@ -117,7 +117,7 @@ IPC support is turned on via the feature-flag `ipc`:
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["ipc"] }
+ethers = { version = "1.0.0", features = ["ipc"] }
 ```
 
 ### HTTP Secure (HTTPS)
@@ -130,7 +130,7 @@ To enable `rustls`:
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls"] }
+ethers = { version = "1.0.0", features = ["rustls"] }
 ```
 
 To enable `openssl`:
@@ -138,7 +138,7 @@ To enable `openssl`:
 ```toml
 [dependencies]
 
-ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["openssl"] }
+ethers = { version = "1.0.0", features = ["openssl"] }
 ```
 
 ## Note on WASM and FFI bindings
@@ -175,7 +175,7 @@ issues itself: `cargo +nightly clippy --fix -Z unstable-options`
 
 ## Related Projects
 
-This library would not have been possibly without the great work done in:
+This library would not have been possible without the great work done in:
 
 -   [`ethers.js`](https://github.com/ethers-io/ethers.js/)
 -   [`rust-web3`](https://github.com/tomusdrw/rust-web3/)
diff --git a/ethers-addressbook/Cargo.toml b/ethers-addressbook/Cargo.toml
index a7a58264..95c3beb5 100644
--- a/ethers-addressbook/Cargo.toml
+++ b/ethers-addressbook/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-addressbook"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2021"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -15,4 +15,4 @@ once_cell = "1.15.0"
 serde = { version = "1.0", features = ["derive"] }
 serde_json = "1.0"
 
-ethers-core = { path = "../ethers-core", version = "^0.17.0" }
+ethers-core = { path = "../ethers-core", version = "^1.0.0" }
diff --git a/ethers-contract/Cargo.toml b/ethers-contract/Cargo.toml
index 07a743ee..fe92d961 100644
--- a/ethers-contract/Cargo.toml
+++ b/ethers-contract/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-contract"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -11,11 +11,11 @@ repository = "https://github.com/gakonst/ethers-rs"
 keywords = ["ethereum", "web3", "celo", "ethers"]
 
 [dependencies]
-ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false }
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false }
-ethers-contract-abigen = { version = "^0.17.0", path = "ethers-contract-abigen", default-features = false, optional = true }
-ethers-contract-derive = { version = "^0.17.0", path = "ethers-contract-derive", optional = true }
-ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712", optional = true }
+ethers-providers = { version = "^1.0.0", path = "../ethers-providers", default-features = false }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false }
+ethers-contract-abigen = { version = "^1.0.0", path = "ethers-contract-abigen", default-features = false, optional = true }
+ethers-contract-derive = { version = "^1.0.0", path = "ethers-contract-derive", optional = true }
+ethers-derive-eip712 = { version = "^1.0.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 }
@@ -26,17 +26,17 @@ futures-util = { version = "^0.3" }
 hex = { version = "0.4.3", default-features = false, features = ["std"] }
 
 [dev-dependencies]
-ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [
+ethers-providers = { version = "^1.0.0", path = "../ethers-providers", default-features = false, features = [
     "ws",
 ] }
-ethers-signers = { version = "^0.17.0", path = "../ethers-signers" }
-ethers-contract-abigen = { version = "^0.17.0", path = "ethers-contract-abigen" }
-ethers-contract-derive = { version = "^0.17.0", path = "ethers-contract-derive" }
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false, features = [
+ethers-signers = { version = "^1.0.0", path = "../ethers-signers" }
+ethers-contract-abigen = { version = "^1.0.0", path = "ethers-contract-abigen" }
+ethers-contract-derive = { version = "^1.0.0", path = "ethers-contract-derive" }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false, features = [
     "eip712",
 ] }
-ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712" }
-ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false }
+ethers-derive-eip712 = { version = "^1.0.0", path = "../ethers-core/ethers-derive-eip712" }
+ethers-solc = { version = "^1.0.0", path = "../ethers-solc", default-features = false }
 
 [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
 tokio = { version = "1.18", default-features = false, features = ["macros"] }
diff --git a/ethers-contract/ethers-contract-abigen/Cargo.toml b/ethers-contract/ethers-contract-abigen/Cargo.toml
index d633f40b..f57fd771 100644
--- a/ethers-contract/ethers-contract-abigen/Cargo.toml
+++ b/ethers-contract/ethers-contract-abigen/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-contract-abigen"
-version = "0.17.0"
+version = "1.0.0"
 authors = [
     "Nicholas Rodrigues Lordello <nlordell@gmail.com>",
     "Georgios Konstantopoulos <me@gakonst.com>",
@@ -13,7 +13,7 @@ repository = "https://github.com/gakonst/ethers-rs"
 keywords = ["ethereum", "web3", "celo", "ethers"]
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../../ethers-core", features = ["macros"] }
+ethers-core = { version = "^1.0.0", path = "../../ethers-core", features = ["macros"] }
 
 Inflector = "0.11"
 proc-macro2 = "1.0"
@@ -45,7 +45,7 @@ rustls = ["reqwest/rustls-tls"]
 
 [dev-dependencies]
 tempfile = "3.2.0"
-ethers-solc = { version = "^0.17.0", path = "../../ethers-solc", default-features = false, features = [
+ethers-solc = { version = "^1.0.0", path = "../../ethers-solc", default-features = false, features = [
     "project-util",
     "svm-solc",
 ] }
diff --git a/ethers-contract/ethers-contract-derive/Cargo.toml b/ethers-contract/ethers-contract-derive/Cargo.toml
index 6939c01d..aa2b1ec0 100644
--- a/ethers-contract/ethers-contract-derive/Cargo.toml
+++ b/ethers-contract/ethers-contract-derive/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-contract-derive"
-version = "0.17.0"
+version = "1.0.0"
 authors = [
     "Nicholas Rodrigues Lordello <nlordell@gmail.com>",
     "Georgios Konstantopoulos <me@gakonst.com>",
@@ -16,8 +16,8 @@ keywords = ["ethereum", "web3", "celo", "ethers"]
 proc-macro = true
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../../ethers-core" }
-ethers-contract-abigen = { version = "^0.17.0", path = "../ethers-contract-abigen" }
+ethers-core = { version = "^1.0.0", path = "../../ethers-core" }
+ethers-contract-abigen = { version = "^1.0.0", path = "../ethers-contract-abigen" }
 
 serde_json = "1.0.53"
 hex = { version = "0.4.3", default-features = false, features = ["std"] }
diff --git a/ethers-contract/src/call.rs b/ethers-contract/src/call.rs
index 1f753414..c9a8ab63 100644
--- a/ethers-contract/src/call.rs
+++ b/ethers-contract/src/call.rs
@@ -14,7 +14,14 @@ use ethers_providers::{
     Middleware, PendingTransaction, ProviderError,
 };
 
-use std::{borrow::Cow, fmt::Debug, future::Future, marker::PhantomData, sync::Arc};
+use std::{
+    borrow::Cow,
+    fmt::Debug,
+    future::{Future, IntoFuture},
+    marker::PhantomData,
+    pin::Pin,
+    sync::Arc,
+};
 
 use thiserror::Error as ThisError;
 
@@ -211,3 +218,19 @@ where
             .map_err(ContractError::MiddlewareError)
     }
 }
+
+/// [`ContractCall`] can be turned into [`Future`] automatically with `.await`.
+/// Defaults to calling [`ContractCall::call`].
+impl<M, D> IntoFuture for ContractCall<M, D>
+where
+    Self: 'static,
+    M: Middleware,
+    D: Detokenize,
+{
+    type Output = Result<D, ContractError<M>>;
+    type IntoFuture = Pin<Box<dyn Future<Output = Self::Output>>>;
+
+    fn into_future(self) -> Self::IntoFuture {
+        Box::pin(async move { self.call().await })
+    }
+}
diff --git a/ethers-contract/src/multicall/mod.rs b/ethers-contract/src/multicall/mod.rs
index be81bc2d..99cde5ab 100644
--- a/ethers-contract/src/multicall/mod.rs
+++ b/ethers-contract/src/multicall/mod.rs
@@ -29,7 +29,7 @@ pub const MULTICALL_ADDRESS: Address = H160([
 
 /// The chain IDs that [`MULTICALL_ADDRESS`] has been deployed to.
 /// Taken from: https://github.com/mds1/multicall#multicall3-contract-addresses
-pub static MULTICALL_SUPPORTED_CHAIN_IDS: Lazy<[U256; 47]> = Lazy::new(|| {
+pub static MULTICALL_SUPPORTED_CHAIN_IDS: Lazy<[U256; 48]> = Lazy::new(|| {
     use Chain::*;
     [
         U256::from(Mainnet),                  // Mainnet
@@ -47,6 +47,7 @@ pub static MULTICALL_SUPPORTED_CHAIN_IDS: Lazy<[U256; 47]> = Lazy::new(|| {
         U256::from(Polygon),                  // Polygon
         U256::from(PolygonMumbai),            // PolygonMumbai
         U256::from(XDai),                     // XDai
+        U256::from(Chiado),                   // ChiadoTestnet
         U256::from(Avalanche),                // Avalanche
         U256::from(AvalancheFuji),            // AvalancheFuji
         U256::from(FantomTestnet),            // FantomTestnet
diff --git a/ethers-core/Cargo.toml b/ethers-core/Cargo.toml
index 3934a38d..da1eda32 100644
--- a/ethers-core/Cargo.toml
+++ b/ethers-core/Cargo.toml
@@ -1,7 +1,7 @@
 [package]
 name = "ethers-core"
 license = "MIT OR Apache-2.0"
-version = "0.17.0"
+version = "1.0.0"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
 edition = "2018"
@@ -11,7 +11,8 @@ repository = "https://github.com/gakonst/ethers-rs"
 keywords = ["ethereum", "web3", "celo", "ethers"]
 
 [dependencies]
-fastrlp = { version = "0.1.3", features = ["std", "derive", "ethereum-types"] }
+# Pin FastRLP to 0.1.2 when it was still Apache.
+open-fastrlp = { version = "=0.1.2", features = ["std", "derive", "ethereum-types"] }
 rlp = { version = "0.5.0", default-features = false, features = ["std"] }
 ethabi = { version = "17.2.0", default-features = false, features = ["full-serde", "rlp"] }
 arrayvec = { version = "0.7.2", default-features = false }
@@ -40,9 +41,8 @@ cargo_metadata = { version = "0.15.0", optional = true }
 
 # eip712 feature enabled dependencies
 convert_case = { version = "0.6.0", optional = true }
-syn = { version = "1.0.102", optional = true }
+syn = { version = "1.0.103", optional = true }
 proc-macro2 = { version = "1.0.47", optional = true }
-rust_decimal = { version = "1.26.1", features = ["maths"] }
 
 [dev-dependencies]
 serde_json = { version = "1.0.64", default-features = false }
diff --git a/ethers-core/ethers-derive-eip712/Cargo.toml b/ethers-core/ethers-derive-eip712/Cargo.toml
index b5247d3b..d8fe773a 100644
--- a/ethers-core/ethers-derive-eip712/Cargo.toml
+++ b/ethers-core/ethers-derive-eip712/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-derive-eip712"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 description = "Custom derive macro for EIP-712 typed data"
 license = "MIT OR Apache-2.0"
@@ -11,9 +11,9 @@ proc-macro = true
 [dependencies]
 quote = "1.0.9"
 syn = "1.0.77"
-ethers-core = { version = "^0.17.0", path = "../", default-features = false, features = ["eip712", "macros"] }
+ethers-core = { version = "^1.0.0", path = "../", default-features = false, features = ["eip712", "macros"] }
 hex = "0.4.3"
 serde_json = "1.0.68"
 
 [dev-dependencies]
-ethers-contract-derive = { version = "^0.17.0", path = "../../ethers-contract/ethers-contract-derive" }
+ethers-contract-derive = { version = "^1.0.0", path = "../../ethers-contract/ethers-contract-derive" }
diff --git a/ethers-core/src/types/bytes.rs b/ethers-core/src/types/bytes.rs
index 4b1ffb64..bf1c4450 100644
--- a/ethers-core/src/types/bytes.rs
+++ b/ethers-core/src/types/bytes.rs
@@ -1,4 +1,4 @@
-use fastrlp::{Decodable, Encodable};
+use open_fastrlp::{Decodable, Encodable};
 use serde::{Deserialize, Deserializer, Serialize, Serializer};
 use std::{
     borrow::Borrow,
@@ -147,7 +147,7 @@ impl Encodable for Bytes {
 }
 
 impl Decodable for Bytes {
-    fn decode(buf: &mut &[u8]) -> Result<Self, fastrlp::DecodeError> {
+    fn decode(buf: &mut &[u8]) -> Result<Self, open_fastrlp::DecodeError> {
         Ok(Self(bytes::Bytes::decode(buf)?))
     }
 }
diff --git a/ethers-core/src/types/chain.rs b/ethers-core/src/types/chain.rs
index 4645b890..0b127aa5 100644
--- a/ethers-core/src/types/chain.rs
+++ b/ethers-core/src/types/chain.rs
@@ -32,6 +32,7 @@ pub enum Chain {
     Kovan = 42,
     #[strum(serialize = "xdai")]
     XDai = 100,
+    Chiado = 10200,
     Polygon = 137,
     Fantom = 250,
     Dev = 1337,
@@ -103,6 +104,7 @@ impl Chain {
             Chain::Goerli |
             Chain::Kovan |
             Chain::XDai |
+            Chain::Chiado |
             Chain::Sepolia |
             Chain::Moonbase |
             Chain::MoonbeamDev |
@@ -186,6 +188,9 @@ impl Chain {
             Chain::XDai => {
                 ("https://blockscout.com/xdai/mainnet/api", "https://blockscout.com/xdai/mainnet")
             }
+            Chain::Chiado => {
+                ("https://blockscout.chiadochain.net/api", "https://blockscout.chiadochain.net")
+            }
             Chain::Sokol => {
                 ("https://blockscout.com/poa/sokol/api", "https://blockscout.com/poa/sokol")
             }
@@ -230,6 +235,7 @@ impl fmt::Display for Chain {
             Chain::Goerli => "goerli",
             Chain::Kovan => "kovan",
             Chain::XDai => "xdai",
+            Chain::Chiado => "chiado",
             Chain::Polygon => "polygon",
             Chain::PolygonMumbai => "mumbai",
             Chain::Avalanche => "avalanche",
@@ -299,6 +305,7 @@ impl TryFrom<u64> for Chain {
             5 => Chain::Goerli,
             42 => Chain::Kovan,
             100 => Chain::XDai,
+            10200 => Chain::Chiado,
             137 => Chain::Polygon,
             1337 => Chain::Dev,
             31337 => Chain::AnvilHardhat,
@@ -359,6 +366,7 @@ impl FromStr for Chain {
             "goerli" => Chain::Goerli,
             "kovan" => Chain::Kovan,
             "xdai" => Chain::XDai,
+            "chiado" => Chain::Chiado,
             "polygon" => Chain::Polygon,
             "mumbai" | "polygon-mumbai" => Chain::PolygonMumbai,
             "avalanche" => Chain::Avalanche,
diff --git a/ethers-core/src/types/mod.rs b/ethers-core/src/types/mod.rs
index 68643dc2..3c2aff0e 100644
--- a/ethers-core/src/types/mod.rs
+++ b/ethers-core/src/types/mod.rs
@@ -6,7 +6,7 @@ pub type Selector = [u8; 4];
 pub use ethabi::ethereum_types::H256 as TxHash;
 
 pub use ethabi::ethereum_types::{
-    Address, BigEndianHash, Bloom, H128, H160, H256, H32, H512, H64, U128, U256, U64,
+    Address, BigEndianHash, Bloom, H128, H160, H256, H32, H512, H64, U128, U256, U64, U512,
 };
 
 pub mod transaction;
diff --git a/ethers-core/src/types/signature.rs b/ethers-core/src/types/signature.rs
index f0ef3685..68e60ecb 100644
--- a/ethers-core/src/types/signature.rs
+++ b/ethers-core/src/types/signature.rs
@@ -4,7 +4,6 @@ use crate::{
     utils::hash_message,
 };
 use elliptic_curve::{consts::U32, sec1::ToEncodedPoint};
-use fastrlp::Decodable;
 use generic_array::GenericArray;
 use k256::{
     ecdsa::{
@@ -13,6 +12,7 @@ use k256::{
     },
     PublicKey as K256PublicKey,
 };
+use open_fastrlp::Decodable;
 use serde::{Deserialize, Serialize};
 use std::{convert::TryFrom, fmt, str::FromStr};
 use thiserror::Error;
@@ -141,19 +141,19 @@ impl Signature {
     }
 
     /// Decodes a signature from RLP bytes, assuming no RLP header
-    pub(crate) fn decode_signature(buf: &mut &[u8]) -> Result<Self, fastrlp::DecodeError> {
+    pub(crate) fn decode_signature(buf: &mut &[u8]) -> Result<Self, open_fastrlp::DecodeError> {
         let v = u64::decode(buf)?;
         Ok(Self { r: U256::decode(buf)?, s: U256::decode(buf)?, v })
     }
 }
 
-impl fastrlp::Decodable for Signature {
-    fn decode(buf: &mut &[u8]) -> Result<Self, fastrlp::DecodeError> {
+impl open_fastrlp::Decodable for Signature {
+    fn decode(buf: &mut &[u8]) -> Result<Self, open_fastrlp::DecodeError> {
         Self::decode_signature(buf)
     }
 }
 
-impl fastrlp::Encodable for Signature {
+impl open_fastrlp::Encodable for Signature {
     fn length(&self) -> usize {
         self.r.length() + self.s.length() + self.v.length()
     }
diff --git a/ethers-core/src/types/transaction/eip2930.rs b/ethers-core/src/types/transaction/eip2930.rs
index b853bb03..474e7777 100644
--- a/ethers-core/src/types/transaction/eip2930.rs
+++ b/ethers-core/src/types/transaction/eip2930.rs
@@ -2,7 +2,7 @@ use super::{eip2718::TypedTransaction, normalize_v};
 use crate::types::{
     Address, Bytes, Signature, SignatureError, Transaction, TransactionRequest, H256, U256, U64,
 };
-use fastrlp::{
+use open_fastrlp::{
     RlpDecodable as FastRlpDecodable, RlpDecodableWrapper as FastRlpDecodableWrapper,
     RlpEncodable as FastRlpEncodable, RlpEncodableWrapper as FastRlpEncodableWrapper,
 };
diff --git a/ethers-core/src/utils/mod.rs b/ethers-core/src/utils/mod.rs
index 5e3b1c2d..add0f031 100644
--- a/ethers-core/src/utils/mod.rs
+++ b/ethers-core/src/utils/mod.rs
@@ -56,8 +56,8 @@ pub enum ConversionError {
     InvalidFloat(#[from] std::num::ParseFloatError),
     #[error(transparent)]
     FromDecStrError(#[from] FromDecStrErr),
-    #[error(transparent)]
-    DecimalError(#[from] rust_decimal::Error),
+    #[error("Overflow parsing string")]
+    ParseOverflow,
 }
 
 /// 1 Ether = 1e18 Wei == 0x0de0b6b3a7640000 Wei
@@ -155,19 +155,27 @@ where
     S: ToString,
     K: TryInto<Units, Error = ConversionError> + Copy,
 {
-    use rust_decimal::{Decimal, MathematicalOps};
-
-    let num: Decimal = amount.to_string().parse()?;
-    let exponent = units.try_into()?.as_num();
-
-    let multiplier = Decimal::TEN
-        .checked_powu(exponent.into())
-        .ok_or(rust_decimal::Error::ExceedsMaximumPossibleValue)?;
+    let exponent: u32 = units.try_into()?.as_num();
+    let mut amount_str = amount.to_string().replace("_", "");
+    let dec_len = if let Some(di) = amount_str.find('.') {
+        amount_str.remove(di);
+        amount_str[di..].len() as u32
+    } else {
+        0
+    };
 
-    let val =
-        num.checked_mul(multiplier).ok_or(rust_decimal::Error::ExceedsMaximumPossibleValue)?;
-    let u256_n: U256 = U256::from_dec_str(&val.round().to_string())?;
-    Ok(u256_n)
+    if dec_len > exponent {
+        // Truncate the decimal part if it is longer than the exponent
+        let amount_str = &amount_str[..(amount_str.len() - (dec_len - exponent) as usize)];
+        let a_uint = U256::from_dec_str(amount_str)?;
+        Ok(a_uint)
+    } else {
+        let mut a_uint = U256::from_dec_str(&amount_str)?;
+        a_uint *= U256::from(10)
+            .checked_pow(U256::from(exponent - dec_len))
+            .ok_or(ConversionError::ParseOverflow)?;
+        Ok(a_uint)
+    }
 }
 /// The address for an Ethereum contract is deterministically computed from the
 /// address of its creator (sender) and how many transactions the creator has
@@ -474,6 +482,22 @@ mod tests {
 
         let val = parse_units("2.3", "ether").unwrap();
         assert_eq!(val, U256::from_dec_str("2300000000000000000").unwrap());
+
+        assert_eq!(parse_units(".2", 2).unwrap(), U256::from(20), "leading dot");
+        assert_eq!(parse_units("333.21", 2).unwrap(), U256::from(33321), "trailing dot");
+        assert_eq!(
+            parse_units("98766", 16).unwrap(),
+            U256::from_dec_str("987660000000000000000").unwrap(),
+            "no dot"
+        );
+        assert_eq!(parse_units("3_3_0", 3).unwrap(), U256::from(330000), "underscore");
+        assert_eq!(parse_units("330", 0).unwrap(), U256::from(330), "zero decimals");
+        assert_eq!(parse_units(".1234", 3).unwrap(), U256::from(123), "truncate too many decimals");
+        assert_eq!(parse_units("1", 80).is_err(), true, "overflow");
+        assert_eq!(parse_units("1", -1).is_err(), true, "neg units");
+        let two_e30 = U256::from(2) * U256([0x4674edea40000000, 0xc9f2c9cd0, 0x0, 0x0]);
+        assert_eq!(parse_units("2", 30).unwrap(), two_e30, "2e30");
+        assert_eq!(parse_units(".33_319_2", 0).unwrap(), U256::zero(), "mix");
     }
 
     #[test]
diff --git a/ethers-etherscan/Cargo.toml b/ethers-etherscan/Cargo.toml
index eaa22a1c..4b306ca0 100644
--- a/ethers-etherscan/Cargo.toml
+++ b/ethers-etherscan/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-etherscan"
-version = "0.17.0"
+version = "1.0.0"
 rust-version = "1.62"
 authors = [
     "Matthias Seitz <matthias.seitz@outlook.de>",
@@ -18,8 +18,8 @@ Rust API bindings for the etherscan.io web API
 keywords = ["ethereum", "web3", "etherscan", "ethers"]
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false }
-ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false, optional = true }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false }
+ethers-solc = { version = "^1.0.0", path = "../ethers-solc", default-features = false, optional = true }
 reqwest = { version = "0.11.12", default-features = false, features = ["json"] }
 serde = { version = "1.0.124", default-features = false, features = ["derive"] }
 serde_json = { version = "1.0.64", default-features = false }
@@ -37,7 +37,7 @@ tempfile = "3.3.0"
 tokio = { version = "1.18", features = ["macros", "rt-multi-thread", "time"] }
 serial_test = "0.9.0"
 tracing-subscriber = { version = "0.3", default-features = false, features = ["env-filter", "fmt"] }
-ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false }
+ethers-solc = { version = "^1.0.0", path = "../ethers-solc", default-features = false }
 
 [package.metadata.docs.rs]
 all-features = true
diff --git a/ethers-etherscan/src/lib.rs b/ethers-etherscan/src/lib.rs
index 4df3ebf2..9bd36992 100644
--- a/ethers-etherscan/src/lib.rs
+++ b/ethers-etherscan/src/lib.rs
@@ -103,6 +103,7 @@ impl Client {
                 std::env::var("FTMSCAN_API_KEY").or_else(|_| std::env::var("FANTOMSCAN_API_KEY"))?
             }
             Chain::XDai |
+            Chain::Chiado |
             Chain::Sepolia |
             Chain::Rsk |
             Chain::Sokol |
diff --git a/ethers-middleware/Cargo.toml b/ethers-middleware/Cargo.toml
index 33cdbf51..3eaff182 100644
--- a/ethers-middleware/Cargo.toml
+++ b/ethers-middleware/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-middleware"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -15,11 +15,11 @@ all-features = true
 rustdoc-args = ["--cfg", "docsrs"]
 
 [dependencies]
-ethers-contract = { version = "^0.17.0", path = "../ethers-contract", default-features = false }
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false }
-ethers-etherscan = { version = "^0.17.0", path = "../ethers-etherscan", default-features = false }
-ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false }
-ethers-signers = { version = "^0.17.0", path = "../ethers-signers", default-features = false }
+ethers-contract = { version = "^1.0.0", path = "../ethers-contract", default-features = false }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false }
+ethers-etherscan = { version = "^1.0.0", path = "../ethers-etherscan", default-features = false }
+ethers-providers = { version = "^1.0.0", path = "../ethers-providers", default-features = false }
+ethers-signers = { version = "^1.0.0", path = "../ethers-signers", default-features = false }
 
 async-trait = { version = "0.1.50", default-features = false }
 auto_impl = { version = "0.5.0", default-features = false }
@@ -43,12 +43,12 @@ tokio = { version = "1.18" }
 [dev-dependencies]
 hex = { version = "0.4.3", default-features = false, features = ["std"] }
 rand = { version = "0.8.5", default-features = false }
-ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [
+ethers-providers = { version = "^1.0.0", path = "../ethers-providers", default-features = false, features = [
     "ws",
     "rustls",
 ] }
 once_cell = "1.15.0"
-ethers-solc = { version = "^0.17.0", path = "../ethers-solc" }
+ethers-solc = { version = "^1.0.0", path = "../ethers-solc" }
 serial_test = "0.9.0"
 
 [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
diff --git a/ethers-middleware/src/signer.rs b/ethers-middleware/src/signer.rs
index b911a660..a6c79e15 100644
--- a/ethers-middleware/src/signer.rs
+++ b/ethers-middleware/src/signer.rs
@@ -1,9 +1,10 @@
 use ethers_core::types::{
     transaction::{eip2718::TypedTransaction, eip2930::AccessListWithGasUsed},
-    Address, BlockId, Bytes, Signature, U256,
+    Address, BlockId, Bytes, Chain, Signature, TransactionRequest, U256,
 };
 use ethers_providers::{maybe, FromErr, Middleware, PendingTransaction};
 use ethers_signers::Signer;
+use std::convert::TryFrom;
 
 use async_trait::async_trait;
 use thiserror::Error;
@@ -251,6 +252,18 @@ where
             tx.set_chain_id(chain_id);
         }
 
+        // If a chain_id is matched to a known chain that doesn't support EIP-1559, automatically
+        // change transaction to be Legacy type.
+        if let Some(chain_id) = tx.chain_id() {
+            let chain = Chain::try_from(chain_id.as_u64());
+            if chain.unwrap_or_default().is_legacy() {
+                if let TypedTransaction::Eip1559(inner) = tx {
+                    let tx_req: TransactionRequest = inner.clone().into();
+                    *tx = TypedTransaction::Legacy(tx_req);
+                }
+            }
+        }
+
         let nonce = maybe(tx.nonce().cloned(), self.get_transaction_count(from, block)).await?;
         tx.set_nonce(nonce);
         self.inner()
@@ -338,7 +351,7 @@ where
 mod tests {
     use super::*;
     use ethers_core::{
-        types::TransactionRequest,
+        types::{Eip1559TransactionRequest, TransactionRequest},
         utils::{self, keccak256, Anvil},
     };
     use ethers_providers::Provider;
@@ -503,4 +516,72 @@ mod tests {
         let tx = client.get_transaction(hash).await.unwrap().unwrap();
         assert_eq!(tx.from, acc);
     }
+
+    #[tokio::test]
+    async fn converts_tx_to_legacy_to_match_chain() {
+        let eip1559 = Eip1559TransactionRequest {
+            from: None,
+            to: Some("F0109fC8DF283027b6285cc889F5aA624EaC1F55".parse::<Address>().unwrap().into()),
+            value: Some(1_000_000_000.into()),
+            gas: Some(2_000_000.into()),
+            nonce: Some(U256::zero()),
+            access_list: Default::default(),
+            max_priority_fee_per_gas: None,
+            data: None,
+            chain_id: None,
+            max_fee_per_gas: None,
+        };
+        let mut tx = TypedTransaction::Eip1559(eip1559);
+
+        let chain_id = 10u64; // optimism does not support EIP-1559
+
+        // Signer middlewares now rely on a working provider which it can query the chain id from,
+        // so we make sure Anvil is started with the chain id that the expected tx was signed
+        // with
+        let anvil = Anvil::new().args(vec!["--chain-id".to_string(), chain_id.to_string()]).spawn();
+        let provider = Provider::try_from(anvil.endpoint()).unwrap();
+        let key = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"
+            .parse::<LocalWallet>()
+            .unwrap()
+            .with_chain_id(chain_id);
+        let client = SignerMiddleware::new(provider, key);
+        client.fill_transaction(&mut tx, None).await.unwrap();
+
+        assert!(tx.as_eip1559_ref().is_none());
+        assert_eq!(tx, TypedTransaction::Legacy(tx.as_legacy_ref().unwrap().clone()));
+    }
+
+    #[tokio::test]
+    async fn does_not_convert_to_legacy_for_eip1559_chain() {
+        let eip1559 = Eip1559TransactionRequest {
+            from: None,
+            to: Some("F0109fC8DF283027b6285cc889F5aA624EaC1F55".parse::<Address>().unwrap().into()),
+            value: Some(1_000_000_000.into()),
+            gas: Some(2_000_000.into()),
+            nonce: Some(U256::zero()),
+            access_list: Default::default(),
+            max_priority_fee_per_gas: None,
+            data: None,
+            chain_id: None,
+            max_fee_per_gas: None,
+        };
+        let mut tx = TypedTransaction::Eip1559(eip1559);
+
+        let chain_id = 1u64; // eth main supports EIP-1559
+
+        // Signer middlewares now rely on a working provider which it can query the chain id from,
+        // so we make sure Anvil is started with the chain id that the expected tx was signed
+        // with
+        let anvil = Anvil::new().args(vec!["--chain-id".to_string(), chain_id.to_string()]).spawn();
+        let provider = Provider::try_from(anvil.endpoint()).unwrap();
+        let key = "4c0883a69102937d6231471b5dbb6204fe5129617082792ae468d01a3f362318"
+            .parse::<LocalWallet>()
+            .unwrap()
+            .with_chain_id(chain_id);
+        let client = SignerMiddleware::new(provider, key);
+        client.fill_transaction(&mut tx, None).await.unwrap();
+
+        assert!(tx.as_legacy_ref().is_none());
+        assert_eq!(tx, TypedTransaction::Eip1559(tx.as_eip1559_ref().unwrap().clone()));
+    }
 }
diff --git a/ethers-providers/Cargo.toml b/ethers-providers/Cargo.toml
index d259d365..bb66c0f2 100644
--- a/ethers-providers/Cargo.toml
+++ b/ethers-providers/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-providers"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -15,7 +15,7 @@ all-features = true
 rustdoc-args = ["--cfg", "docsrs"]
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false }
 
 async-trait = { version = "0.1.50", default-features = false }
 hex = { version = "0.4.3", default-features = false, features = ["std"] }
diff --git a/ethers-providers/src/log_query.rs b/ethers-providers/src/log_query.rs
index 43cf7086..ea8c145a 100644
--- a/ethers-providers/src/log_query.rs
+++ b/ethers-providers/src/log_query.rs
@@ -93,7 +93,7 @@ where
                         // this is okay because we will only enter this state when the filter is
                         // paginatable i.e. from block is set
                         let from_block = self.filter.get_from_block().unwrap();
-                        let to_block = from_block + self.page_size;
+                        let to_block = std::cmp::min(from_block + self.page_size, last_block);
                         self.from_block = Some(to_block + 1);
 
                         let filter = self.filter.clone().from_block(from_block).to_block(to_block);
@@ -122,7 +122,7 @@ where
                         // load new logs if there are still more pages to go through
                         // can safely assume this will always be set in this state
                         let from_block = self.from_block.unwrap();
-                        let to_block = from_block + self.page_size;
+                        let to_block = std::cmp::min(from_block + self.page_size, self.last_block.unwrap());
 
                         // no more pages to load, and everything is consumed
                         // can safely assume this will always be set in this state
diff --git a/ethers-signers/Cargo.toml b/ethers-signers/Cargo.toml
index 021d68d7..bc69359d 100644
--- a/ethers-signers/Cargo.toml
+++ b/ethers-signers/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-signers"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 rust-version = "1.62"
 authors = ["Georgios Konstantopoulos <me@gakonst.com>"]
@@ -15,7 +15,7 @@ all-features = true
 rustdoc-args = ["--cfg", "docsrs"]
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../ethers-core", features = ["eip712"] }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", features = ["eip712"] }
 thiserror = { version = "1.0.37", default-features = false }
 coins-bip32 = "0.7.0"
 coins-bip39 = "0.7.0"
@@ -44,8 +44,8 @@ eth-keystore = { version = "0.5.0" }
 home = { version = "0.5.4", optional = true }
 
 [dev-dependencies]
-ethers-contract-derive = { version = "^0.17.0", path = "../ethers-contract/ethers-contract-derive" }
-ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712" }
+ethers-contract-derive = { version = "^1.0.0", path = "../ethers-contract/ethers-contract-derive" }
+ethers-derive-eip712 = { version = "^1.0.0", path = "../ethers-core/ethers-derive-eip712" }
 serde_json = { version = "1.0.64" }
 tracing-subscriber = "0.3.16"
 yubihsm = { version = "0.41.0", features = ["secp256k1", "usb", "mockhsm"] }
diff --git a/ethers-solc/Cargo.toml b/ethers-solc/Cargo.toml
index 0d988d88..1d247d58 100644
--- a/ethers-solc/Cargo.toml
+++ b/ethers-solc/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "ethers-solc"
-version = "0.17.0"
+version = "1.0.0"
 edition = "2018"
 rust-version = "1.62"
 authors = [
@@ -16,7 +16,7 @@ description = "Utilites for working with solc"
 keywords = ["ethereum", "web3", "solc", "solidity", "ethers"]
 
 [dependencies]
-ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false }
+ethers-core = { version = "^1.0.0", path = "../ethers-core", default-features = false }
 serde_json = "1.0.68"
 serde = { version = "1.0.130", features = ["derive"] }
 semver = { version = "1.0.14", features = ["serde"] }
@@ -31,7 +31,7 @@ hex = "0.4.3"
 yansi = "0.5.1"
 glob = "0.3.0"
 tracing = "0.1.37"
-num_cpus = "1.13.1"
+num_cpus = "1.14.0"
 tiny-keccak = { version = "2.0.2", default-features = false }
 tempfile = { version = "3.3.0", optional = true }
 fs_extra = { version = "1.2.0", optional = true }
diff --git a/examples/ethers-wasm/Cargo.toml b/examples/ethers-wasm/Cargo.toml
index ae697516..a74568d8 100644
--- a/examples/ethers-wasm/Cargo.toml
+++ b/examples/ethers-wasm/Cargo.toml
@@ -18,7 +18,7 @@ crate-type = ["cdylib", "rlib"]
 default = ["console_error_panic_hook"]
 
 [dependencies]
-ethers = { path = "../..", version = "0.17.0", features = ["abigen", "legacy", "ws"] }
+ethers = { path = "../..", version = "1.0.0", features = ["abigen", "legacy", "ws"] }
 
 wasm-bindgen-futures = "0.4.33"
 wasm-bindgen = { version = "0.2.83", features = ["serde-serialize"] }
diff --git a/examples/subscribe_contract_events.rs b/examples/subscribe_contract_events.rs
new file mode 100644
index 00000000..a6f769f9
--- /dev/null
+++ b/examples/subscribe_contract_events.rs
@@ -0,0 +1,38 @@
+use ethers::prelude::*;
+use eyre::Result;
+use std::sync::Arc;
+
+// Generate the type-safe contract bindings by providing the ABI
+// definition in human readable format
+abigen!(
+    ERC20,
+    r#"[
+        event  Transfer(address indexed src, address indexed dst, uint wad)
+    ]"#,
+);
+
+// In order to run this example you need to include Ws and TLS features
+// Run this example with
+// `cargo run -p ethers --example subscribe_contract_events --features="ws","rustls"`
+#[tokio::main]
+async fn main() -> Result<()> {
+    let client =
+        Provider::<Ws>::connect("wss://mainnet.infura.io/ws/v3/c60b0bb42f8a4c6481ecd229eddaca27")
+            .await?;
+
+    let client = Arc::new(client);
+
+    // WETH Token
+    let address = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".parse::<Address>()?;
+    let weth = ERC20::new(address, Arc::clone(&client));
+
+    // Subscribe Transfer events
+    let events = weth.events();
+    let mut stream = events.stream().await?;
+
+    while let Some(Ok(event)) = stream.next().await {
+        println!("src: {:?}, dst: {:?}, wad: {:?}", event.src, event.dst, event.wad);
+    }
+
+    Ok(())
+}
diff --git a/examples/subscribe_contract_events_with_meta.rs b/examples/subscribe_contract_events_with_meta.rs
new file mode 100644
index 00000000..c81b4da8
--- /dev/null
+++ b/examples/subscribe_contract_events_with_meta.rs
@@ -0,0 +1,53 @@
+use ethers::prelude::*;
+use eyre::Result;
+use std::sync::Arc;
+
+// Generate the type-safe contract bindings by providing the ABI
+// definition in human readable format
+abigen!(
+    ERC20,
+    r#"[
+        event  Transfer(address indexed src, address indexed dst, uint wad)
+    ]"#,
+);
+
+// In order to run this example you need to include Ws and TLS features
+// Run this example with
+// `cargo run -p ethers --example subscribe_contract_events_with_meta --features="ws","rustls"`
+#[tokio::main]
+async fn main() -> Result<()> {
+    let client =
+        Provider::<Ws>::connect("wss://mainnet.infura.io/ws/v3/c60b0bb42f8a4c6481ecd229eddaca27")
+            .await?;
+
+    let client = Arc::new(client);
+
+    // WETH Token
+    let address = "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2".parse::<Address>()?;
+    let weth = ERC20::new(address, Arc::clone(&client));
+
+    // Subscribe Transfer events
+    let events = weth.events();
+    let mut stream = events.stream().await?.with_meta();
+    while let Some(Ok((event, meta))) = stream.next().await {
+        println!("src: {:?}, dst: {:?}, wad: {:?}", event.src, event.dst, event.wad);
+
+        println!(
+            r#"address: {:?}, 
+               block_number: {:?}, 
+               block_hash: {:?}, 
+               transaction_hash: {:?}, 
+               transaction_index: {:?}, 
+               log_index: {:?}
+            "#,
+            meta.address,
+            meta.block_number,
+            meta.block_hash,
+            meta.transaction_hash,
+            meta.transaction_index,
+            meta.log_index
+        );
+    }
+
+    Ok(())
+}
diff --git a/examples/subscribe_logs.rs b/examples/subscribe_logs.rs
index 18216db9..0c74f78f 100644
--- a/examples/subscribe_logs.rs
+++ b/examples/subscribe_logs.rs
@@ -2,6 +2,8 @@ use ethers::{abi::AbiDecode, prelude::*, utils::keccak256};
 use eyre::Result;
 use std::sync::Arc;
 
+// In order to run this example you need to include Ws and TLS features
+// Run this example with `cargo run -p ethers --example subscribe_logs --features="ws","rustls"`
 #[tokio::main]
 async fn main() -> Result<()> {
     let client =


Test patch:
diff --git a/ethers-providers/tests/log_query.rs b/ethers-providers/tests/log_query.rs
new file mode 100644
index 00000000..641272c6
--- /dev/null
+++ b/ethers-providers/tests/log_query.rs
@@ -0,0 +1,21 @@
+#![cfg(not(target_arch = "wasm32"))]
+use ethers_core::{
+    types::{Filter, BlockNumber},
+    utils::Anvil,
+};
+use ethers_providers::{Http, Middleware, Provider, StreamExt};
+use std::convert::TryFrom;
+
+#[tokio::test]
+async fn get_logs_paginated() {
+    let geth = Anvil::new().block_time(20u64).spawn();
+    let provider = Provider::<Http>::try_from(geth.endpoint()).unwrap();
+
+    let filter = Filter::new().from_block(BlockNumber::Latest);
+    // try to get beyond the number of blocks available
+    let mut stream = provider.get_logs_paginated(&filter, 10);
+    let res = stream.next().await;
+    assert!(res.is_some());
+    let log = res.unwrap();
+    assert!(log.is_ok());
+}