From 279280c6fdae215a9411cdcf5270f34b7cf3fb70 Mon Sep 17 00:00:00 2001 From: Matthias Seitz Date: Sun, 19 Mar 2023 19:45:30 +0100 Subject: [PATCH 01/16] feat(solc): improve error diagnostic (#2280) --- ethers-solc/src/resolver/mod.rs | 69 +++++++++++++++++++++++++++++---- ethers-solc/tests/project.rs | 22 +++++++++++ 2 files changed, 83 insertions(+), 8 deletions(-) diff --git a/ethers-solc/src/resolver/mod.rs b/ethers-solc/src/resolver/mod.rs index 06a971db..7fd6ed75 100644 --- a/ethers-solc/src/resolver/mod.rs +++ b/ethers-solc/src/resolver/mod.rs @@ -46,7 +46,9 @@ //! [version pragma](https://docs.soliditylang.org/en/develop/layout-of-source-files.html#version-pragma), //! which is defined on a per source file basis. -use crate::{error::Result, utils, IncludePaths, ProjectPathsConfig, SolcError, Source, Sources}; +use crate::{ + error::Result, utils, IncludePaths, ProjectPathsConfig, SolcError, SolcVersion, Source, Sources, +}; use parse::{SolData, SolDataUnit, SolImport}; use rayon::prelude::*; use semver::VersionReq; @@ -577,8 +579,7 @@ impl Graph { // on first error, instead gather all the errors and return a bundled error message instead let mut errors = Vec::new(); // we also don't want duplicate error diagnostic - let mut erroneous_nodes = - std::collections::HashSet::with_capacity(self.edges.num_input_files); + let mut erroneous_nodes = HashSet::with_capacity(self.edges.num_input_files); // the sorted list of all versions let all_versions = if offline { Solc::installed_versions() } else { Solc::all_versions() }; @@ -596,11 +597,20 @@ impl Graph { self.retain_compatible_versions(idx, &mut candidates); if candidates.is_empty() && !erroneous_nodes.contains(&idx) { - let mut msg = String::new(); - self.format_imports_list(idx, &mut msg).unwrap(); - errors.push(format!( - "Discovered incompatible solidity versions in following\n: {msg}" - )); + // check if the version is even valid + if let Some(Err(version_err)) = + self.node(idx).check_available_version(&all_versions, offline) + { + let f = utils::source_name(&self.node(idx).path, &self.root).display(); + errors.push(format!("Encountered invalid solc version in {f}: {version_err}")); + } else { + let mut msg = String::new(); + self.format_imports_list(idx, &mut msg).unwrap(); + errors.push(format!( + "Discovered incompatible solidity versions in following\n: {msg}" + )); + } + erroneous_nodes.insert(idx); } else { // found viable candidates, pick the most recent version that's already installed @@ -888,6 +898,37 @@ impl Node { pub fn unpack(&self) -> (&PathBuf, &Source) { (&self.path, &self.source) } + + /// Checks that the file's version is even available. + /// + /// This returns an error if the file's version is invalid semver, or is not available such as + /// 0.8.20, if the highest available version is `0.8.19` + fn check_available_version( + &self, + all_versions: &[SolcVersion], + offline: bool, + ) -> Option> { + fn ensure_version( + v: &str, + all_versions: &[SolcVersion], + offline: bool, + ) -> std::result::Result<(), SourceVersionError> { + let req: VersionReq = + v.parse().map_err(|err| SourceVersionError::InvalidVersion(v.to_string(), err))?; + + if !all_versions.iter().any(|v| req.matches(v.as_ref())) { + return if offline { + Err(SourceVersionError::NoMatchingVersionOffline(req)) + } else { + Err(SourceVersionError::NoMatchingVersion(req)) + } + } + + Ok(()) + } + let v = self.data.version.as_ref()?.data(); + Some(ensure_version(v, all_versions, offline)) + } } /// Helper type for formatting a node @@ -907,6 +948,18 @@ impl<'a> fmt::Display for DisplayNode<'a> { } } +/// Errors thrown when checking the solc version of a file +#[derive(Debug, thiserror::Error)] +#[allow(unused)] +enum SourceVersionError { + #[error("Failed to parse solidity version {0}: {1}")] + InvalidVersion(String, semver::Error), + #[error("No solc version exists that matches the version requirement: {0}")] + NoMatchingVersion(VersionReq), + #[error("No solc version installed that matches the version requirement: {0}")] + NoMatchingVersionOffline(VersionReq), +} + #[cfg(test)] mod tests { use super::*; diff --git a/ethers-solc/tests/project.rs b/ethers-solc/tests/project.rs index 41477fc0..3ce06001 100644 --- a/ethers-solc/tests/project.rs +++ b/ethers-solc/tests/project.rs @@ -8,6 +8,7 @@ use ethers_solc::{ }, buildinfo::BuildInfo, cache::{SolFilesCache, SOLIDITY_FILES_CACHE_FILENAME}, + error::SolcError, info::ContractInfo, project_util::*, remappings::Remapping, @@ -1199,6 +1200,27 @@ library MyLib { let bytecode = &contract.bytecode.as_ref().unwrap().object; assert!(!bytecode.is_unlinked()); } + +#[test] +fn can_detect_invalid_version() { + let tmp = TempProject::dapptools().unwrap(); + let content = r#" + pragma solidity ^0.100.10; + contract A {} + "#; + tmp.add_source("A", content).unwrap(); + + let out = tmp.compile().unwrap_err(); + match out { + SolcError::Message(err) => { + assert_eq!(err, "Encountered invalid solc version in src/A.sol: No solc version exists that matches the version requirement: ^0.100.10"); + } + _ => { + unreachable!() + } + } +} + #[test] fn can_recompile_with_changes() { let mut tmp = TempProject::dapptools().unwrap(); From 89cf65f9639df80c5450938bb7580acb0057625b Mon Sep 17 00:00:00 2001 From: Justin Phu <39173730+jqphu@users.noreply.github.com> Date: Tue, 21 Mar 2023 14:01:48 +1100 Subject: [PATCH 02/16] fix(core): re-export CallLogFrame from geth types (#2283) * fix(core): re-export CallLogFrame from geth types The CallLogFrame was not being exported from geth which made it difficult to store all the logs using the ethers type. * fix(core): correct the visibility of the geth CallLogFrame struct The previous diff made the struct public but did not change the fields itself. The struct being public is not useful unless the fields are public. --- ethers-core/src/types/trace/geth.rs | 2 +- ethers-core/src/types/trace/geth/call.rs | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ethers-core/src/types/trace/geth.rs b/ethers-core/src/types/trace/geth.rs index 630810db..49a5fe7f 100644 --- a/ethers-core/src/types/trace/geth.rs +++ b/ethers-core/src/types/trace/geth.rs @@ -4,7 +4,7 @@ mod noop; mod pre_state; pub use self::{ - call::{CallConfig, CallFrame}, + call::{CallConfig, CallFrame, CallLogFrame}, four_byte::FourByteFrame, noop::NoopFrame, pre_state::{PreStateConfig, PreStateFrame}, diff --git a/ethers-core/src/types/trace/geth/call.rs b/ethers-core/src/types/trace/geth/call.rs index f6c97b89..e0854a71 100644 --- a/ethers-core/src/types/trace/geth/call.rs +++ b/ethers-core/src/types/trace/geth/call.rs @@ -32,11 +32,11 @@ pub struct CallFrame { #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] pub struct CallLogFrame { #[serde(default, skip_serializing_if = "Option::is_none")] - address: Option
, + pub address: Option
, #[serde(default, skip_serializing_if = "Option::is_none")] - topics: Option>, + pub topics: Option>, #[serde(default, skip_serializing_if = "Option::is_none")] - data: Option, + pub data: Option, } #[derive(Debug, Clone, Default, PartialEq, Eq, Serialize, Deserialize)] From 771326e70361728072b5806958e5847c28156421 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Mon, 20 Mar 2023 20:04:00 -0700 Subject: [PATCH 03/16] chore: remove redundant clone --- ethers-solc/src/artifact_output/mod.rs | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/ethers-solc/src/artifact_output/mod.rs b/ethers-solc/src/artifact_output/mod.rs index 17da2b87..d166841b 100644 --- a/ethers-solc/src/artifact_output/mod.rs +++ b/ethers-solc/src/artifact_output/mod.rs @@ -655,11 +655,10 @@ pub trait ArtifactOutput { artifacts_folder: impl AsRef, ) -> PathBuf { let artifacts_folder = artifacts_folder.as_ref(); - let mut rel_candidate = conflict; - if let Ok(stripped) = rel_candidate.strip_prefix(artifacts_folder) { - rel_candidate = stripped.to_path_buf(); + let mut candidate = conflict; + if let Ok(stripped) = candidate.strip_prefix(artifacts_folder) { + candidate = stripped.to_path_buf(); } - let mut candidate = rel_candidate.clone(); let contract_file = contract_file.as_ref(); let mut current_parent = contract_file.parent(); @@ -685,7 +684,7 @@ pub trait ArtifactOutput { loop { // this will attempt to find an alternate path by numerating the first component in the // path: `+_/....sol` - let mut components = rel_candidate.components(); + let mut components = candidate.components(); let first = components.next().expect("path not empty"); let name = first.as_os_str(); let mut numerated = OsString::with_capacity(name.len() + 2); From 5879a84667952b34c9325346436008d692daa601 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Mon, 20 Mar 2023 21:07:30 -0700 Subject: [PATCH 04/16] Revert "chore: remove redundant clone" this was stupid This reverts commit 771326e70361728072b5806958e5847c28156421. --- ethers-solc/src/artifact_output/mod.rs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ethers-solc/src/artifact_output/mod.rs b/ethers-solc/src/artifact_output/mod.rs index d166841b..17da2b87 100644 --- a/ethers-solc/src/artifact_output/mod.rs +++ b/ethers-solc/src/artifact_output/mod.rs @@ -655,10 +655,11 @@ pub trait ArtifactOutput { artifacts_folder: impl AsRef, ) -> PathBuf { let artifacts_folder = artifacts_folder.as_ref(); - let mut candidate = conflict; - if let Ok(stripped) = candidate.strip_prefix(artifacts_folder) { - candidate = stripped.to_path_buf(); + let mut rel_candidate = conflict; + if let Ok(stripped) = rel_candidate.strip_prefix(artifacts_folder) { + rel_candidate = stripped.to_path_buf(); } + let mut candidate = rel_candidate.clone(); let contract_file = contract_file.as_ref(); let mut current_parent = contract_file.parent(); @@ -684,7 +685,7 @@ pub trait ArtifactOutput { loop { // this will attempt to find an alternate path by numerating the first component in the // path: `+_/....sol` - let mut components = candidate.components(); + let mut components = rel_candidate.components(); let first = components.next().expect("path not empty"); let name = first.as_os_str(); let mut numerated = OsString::with_capacity(name.len() + 2); From f7a066e700070bfd204768723d0645ed95564e98 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 21 Mar 2023 05:21:04 +0100 Subject: [PATCH 05/16] chore: update release process (#2278) * chore: strip ethers prefix for the ethers-wasm example * chore: set publish to false and version to 0.0.0 for all example crates * chore: remove unused release helpers * chore: move CHANGELOG.md to CHANGELOG-OLD.md * chore: update lockfile and wasm renames * chore: renames * chore: use git-cliff for generating CHANGELOG.md * chore: renames * chore: update release.toml * chore: move examples script mv \ scripts/examples.sh \ bin/run_all_examples * chore: add release script * fix: update release script and document * fix: mv * docs: remove 'update changelog' in PR template --- .github/PULL_REQUEST_TEMPLATE.md | 1 - .github/workflows/ci.yml | 4 +- .github/workflows/releases.yml | 99 - CHANGELOG-OLD.md | 406 +++ CHANGELOG.md | 2358 ++++++++++++++--- CONTRIBUTING.md | 97 +- Cargo.lock | 52 +- README.md | 2 +- bin/publish | 119 - bin/release | 131 + scripts/examples.sh => bin/run_all_examples | 0 cliff.toml | 83 + examples/anvil/Cargo.toml | 2 +- examples/big-numbers/Cargo.toml | 2 +- examples/contracts/Cargo.toml | 2 +- examples/events/Cargo.toml | 2 +- examples/middleware/Cargo.toml | 2 +- examples/providers/Cargo.toml | 2 +- examples/queries/Cargo.toml | 2 +- examples/subscriptions/Cargo.toml | 2 +- examples/transactions/Cargo.toml | 2 +- examples/wallets/Cargo.toml | 2 +- examples/{ethers-wasm => wasm}/.gitignore | 0 examples/{ethers-wasm => wasm}/Cargo.toml | 5 +- examples/{ethers-wasm => wasm}/README.md | 0 .../{ethers-wasm => wasm}/abi/contract.json | 0 examples/{ethers-wasm => wasm}/index.html | 0 examples/{ethers-wasm => wasm}/index.js | 0 examples/{ethers-wasm => wasm}/package.json | 2 +- examples/{ethers-wasm => wasm}/src/lib.rs | 0 examples/{ethers-wasm => wasm}/src/utils.rs | 0 .../tests/contract_with_abi.rs | 2 +- .../{ethers-wasm => wasm}/webpack.config.js | 0 examples/{ethers-wasm => wasm}/yarn.lock | 0 release.toml | 3 + 35 files changed, 2696 insertions(+), 688 deletions(-) delete mode 100644 .github/workflows/releases.yml create mode 100644 CHANGELOG-OLD.md delete mode 100644 bin/publish create mode 100755 bin/release rename scripts/examples.sh => bin/run_all_examples (100%) create mode 100644 cliff.toml rename examples/{ethers-wasm => wasm}/.gitignore (100%) rename examples/{ethers-wasm => wasm}/Cargo.toml (94%) rename examples/{ethers-wasm => wasm}/README.md (100%) rename examples/{ethers-wasm => wasm}/abi/contract.json (100%) rename examples/{ethers-wasm => wasm}/index.html (100%) rename examples/{ethers-wasm => wasm}/index.js (100%) rename examples/{ethers-wasm => wasm}/package.json (95%) rename examples/{ethers-wasm => wasm}/src/lib.rs (100%) rename examples/{ethers-wasm => wasm}/src/utils.rs (100%) rename examples/{ethers-wasm => wasm}/tests/contract_with_abi.rs (96%) rename examples/{ethers-wasm => wasm}/webpack.config.js (100%) rename examples/{ethers-wasm => wasm}/yarn.lock (100%) create mode 100644 release.toml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 44f0f176..384d6f88 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -29,5 +29,4 @@ the code change. - [ ] Added Tests - [ ] Added Documentation -- [ ] Updated the changelog - [ ] Breaking changes diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 69bc3f5f..708910a9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -172,7 +172,7 @@ jobs: with: node-version: 16 - name: Run wasm example - working-directory: examples/ethers-wasm + working-directory: examples/wasm run: | yarn yarn anvil & @@ -194,4 +194,4 @@ jobs: run: ./.github/scripts/install_test_binaries.sh - uses: Swatinem/rust-cache@v2 - name: Build and run all examples - run: ./scripts/examples.sh + run: ./bin/run_all_examples diff --git a/.github/workflows/releases.yml b/.github/workflows/releases.yml deleted file mode 100644 index 1dbe6779..00000000 --- a/.github/workflows/releases.yml +++ /dev/null @@ -1,99 +0,0 @@ -name: release - -on: - schedule: - - cron: "0 0 * * 0" - - workflow_dispatch: - inputs: - release_type: - type: choice - description: Release type - options: - - major - - minor - - patch - - rc - - beta - - alpha - -permissions: - contents: write - -jobs: - release: - runs-on: ubuntu-latest - env: - CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }} - RELEASE_TYPE: ${{ github.event.inputs.release_type }} - steps: - - name: Checkout sources - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Configure git - run: | - git config user.name github-actions - git config user.email github-actions@github.com - - name: Rust stable - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - - uses: Swatinem/rust-cache@v1 - with: - cache-on-failure: true - - name: Install cargo-release - uses: actions-rs/install@v0.1 - with: - crate: cargo-release - version: latest - - name: Cargo login - run: | - cargo login $CARGO_TOKEN - - name: Dry-run cargo release - run: | - cargo release --workspace ${RELEASE_TYPE:-alpha} --exclude ethers-wasm - - name: Publish release - run: | - cargo release --workspace ${RELEASE_TYPE:-alpha} --exclude ethers-wasm --execute --no-confirm - - name: Setup node - uses: actions/setup-node@v3 - with: - node-version: 14 - - run: | - npm i semver - - name: Install git-cliff - uses: actions-rs/install@v0.1 - with: - crate: git-cliff - version: latest - - name: Publish changelog - id: changelog - run: | - current_version=$(git tag --contains HEAD -l "v*" | head -1) - from_version=$(node .github/scripts/release-tag-from.js $current_version $RELEASE_TYPE) - echo from $from_version to $current_version - - echo "::set-output name=release_version::$(echo $current_version)" - - if git rev-parse "$from_version" >/dev/null 2>&1; then - echo "tag exists, can generate changelog"; - else - echo "tag does not exist, cannot generate changelog, publish github release manually" - exit 0 - fi - - git cliff $from_version..$current_version > GENERATED_CHANGELOG.md - cat GENERATED_CHANGELOG.md - - name: Create GitHub release - id: release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - RELEASE_VERSION: ${{ steps.changelog.outputs.release_version }} - with: - tag_name: ${{ env.RELEASE_VERSION }} - release_name: ${{ env.RELEASE_VERSION }} - body_path: GENERATED_CHANGELOG.md - prerelease: ${{ env.RELEASE_TYPE == 'alpha' }} diff --git a/CHANGELOG-OLD.md b/CHANGELOG-OLD.md new file mode 100644 index 00000000..aa1a0118 --- /dev/null +++ b/CHANGELOG-OLD.md @@ -0,0 +1,406 @@ +# Changelog + +The old `ethers-rs` changelog, that has been discontinued. + +The new one is located [here](./CHANGELOG.md), which is automatically generated by [git-cliff](https://github.com/orhun/git-cliff). + +## ethers-core + +### Unreleased + +- Add support for `ethlive` as a chain name [#2268](https://github.com/gakonst/ethers-rs/pull/2268) +- Make `Chain` more round-trip friendly [#2270](https://github.com/gakonst/ethers-rs/pull/2270) +- Add `other: OtherFields` to `TransactionReceipt` [#2209](https://github.com/gakonst/ethers-rs/pull/2209) +- Add `Signature::recover_typed_data` [#2120](https://github.com/gakonst/ethers-rs/pull/2120) +- Add `abi::encode_packed` [#2104](https://github.com/gakonst/ethers-rs/pull/2104) +- Add support for custom JavaScript tracer to `debug_traceCall` and `debug_traceTransaction` [#2064](https://github.com/gakonst/ethers-rs/pull/2064) +- Add a `Send` bound to the `IntoFuture` implementation of `ContractCall` [#2083](https://github.com/gakonst/ethers-rs/pull/2083) +- Bump [`svm-rs`](https://github.com/roynalnaruto/svm-rs) dependency to fix conflicts with Rust Crytpo packages [#2051](https://github.com/gakonst/ethers-rs/pull/2051) +- Avoid unnecessary allocations in `utils` [#2046](https://github.com/gakonst/ethers-rs/pull/2046) +- Add abigen support for hardhat generated bytecode json format [#2012](https://github.com/gakonst/ethers-rs/pull/2012) +- Fix typo in `RwClient` docs for `write_client` method. +- Add support for Geth `debug_traceCall` [#1949](https://github.com/gakonst/ethers-rs/pull/1949) +- Add support for Geth built-in tracer and config [#2121](https://github.com/gakonst/ethers-rs/pull/2121) +- Graceful handling of WebSocket transport errors [#1889](https://github.com/gakonst/ethers-rs/issues/1889) [#1815](https://github.com/gakonst/ethers-rs/issues/1815) +- `MiddlewareBuilder` trait to instantiate a `Provider` as `Middleware` layers. +- An `Event` builder can be instantiated specifying the event filter type, without the need to instantiate a contract. +- Add 'ethers_core::types::OpCode' and use in 'ethers_core::types::VMOperation' [#1857](https://github.com/gakonst/ethers-rs/issues/1857) +- 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 +- Fix RLP decoding of legacy `Transaction` +- Fix RLP encoding of `TransactionReceipt` [#1661](https://github.com/gakonst/ethers-rs/pull/1661) +- Add `Unit8` helper type [#1639](https://github.com/gakonst/ethers-rs/pull/1639) +- Add `evm.deployedBytecode.immutableReferences` output selector [#1523](https://github.com/gakonst/ethers-rs/pull/1523) +- Added `get_erc1155_token_transfer_events` function for etherscan client [#1503](https://github.com/gakonst/ethers-rs/pull/1503) +- Add support for Geth `debug_traceTransaction` [#1469](https://github.com/gakonst/ethers-rs/pull/1469) +- Use correct, new transaction type for `typool_content` RPC endpoint [#1501](https://github.com/gakonst/ethers-rs/pull/1501) +- Fix the default config for generated `BuildInfo` [#1458](https://github.com/gakonst/ethers-rs/pull/1458) +- Allow configuration of the output directory of the generated `BuildInfo` [#1433](https://github.com/gakonst/ethers-rs/pull/1433) +- capture unknown fields in `Block` and `Transaction` type via new `OtherFields` type [#1423](https://github.com/gakonst/ethers-rs/pull/1423) +- Methods like `set_to()` from `TypedTransaction` can be chained +- Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396) +- Add `as_*_mut` methods on `TypedTransaction` + [#1310](https://github.com/gakonst/ethers-rs/pull/1310) +- AWS EIP712 data signing no longer signs with EIP155 +- Added Cronos testnet to etherscan options [#1276](https://github.com/gakonst/ethers-rs/pull/1276) +- Fix parsing of a pending block + [#1272](https://github.com/gakonst/ethers-rs/pull/1272) +- Removed Cronos mainnet beta from `is_legacy` [1246](https://github.com/gakonst/ethers-rs/pull/1246) +- Fix RLP decoding of `from` field for `Eip1559TransactionRequest` and + `Eip2930TransactionRequest`, remove `Eip1559TransactionRequest` `sighash` + method [#1180](https://github.com/gakonst/ethers-rs/pull/1180) +- Fix RLP encoding of absent access list in `Transaction` [1137](https://github.com/gakonst/ethers-rs/pull/1137) +- Pass compilation time as additional argument to `Reporter::on_solc_success` [#1098](https://github.com/gakonst/ethers-rs/pull/1098) +- Fix aws signer bug which maps un-normalized signature to error if no normalization occurs (in `aws::utils::decode_signature`) +- Implement signed transaction RLP decoding [#1096](https://github.com/gakonst/ethers-rs/pull/1096) +- `Transaction::from` will default to `Address::zero()`. Add `recover_from` and + `recover_from_mut` methods for recovering the sender from signature, and also + setting the same on tx [#1075](https://github.com/gakonst/ethers-rs/pull/1075). +- Add Etherscan account API endpoints [#939](https://github.com/gakonst/ethers-rs/pull/939) +- Add FTM Mainet and testnet to parse method "try_from" from Chain.rs and add cronos mainet and testnet to "from_str" +- Add FTM mainnet and testnet Multicall addresses [#927](https://github.com/gakonst/ethers-rs/pull/927) +- Add Cronos mainnet beta and testnet to the list of known chains + [#926](https://github.com/gakonst/ethers-rs/pull/926) +- `Chain::to_string` will return the same chain name as `Chain::from_str` +- Add `eth_syncing` [#848](https://github.com/gakonst/ethers-rs/pull/848) +- Fix overflow and possible divide-by-zero in `estimate_priority_fee` +- Add BSC mainnet and testnet to the list of known chains + [#831](https://github.com/gakonst/ethers-rs/pull/831) +- Returns error on invalid type conversion instead of panicking + [#691](https://github.com/gakonst/ethers-rs/pull/691/files) +- Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and + solidity `uint8[]` to rust `Vec`. + [#613](https://github.com/gakonst/ethers-rs/pull/613) +- Fix `format_units` to return a `String` of representing a decimal point float + such that the decimal places don't get truncated. + [#597](https://github.com/gakonst/ethers-rs/pull/597) +- Implement hex display format for `ethers::core::Bytes` + [#624](https://github.com/gakonst/ethers-rs/pull/624). +- Fix `fee_history` to first try with `block_count` encoded as a hex `QUANTITY`. + [#668](https://github.com/gakonst/ethers-rs/pull/668) +- Fix `fill_transaction` to set nonces in transactions, if the sender is known + and no nonce is specified +- Move `fill_transaction` implementation to the provider, to allow middleware + to properly override its behavior. +- Add informational messages to solc installation and compilation. +- Significantly refactor `MultiAbigen` module generation. Now allows for lib + generation, and does not make unnecessary disk writes. + [#854](https://github.com/gakonst/ethers-rs/pull/852) +- Refactor `ethers-contract-abigen` to use `eyre` instead of `anyhow` via + [#858](https://github.com/gakonst/ethers-rs/pull/858) +- Add `Deployer.send_with_receipt -> Result<(Contract, Receipt), Error>` + so that the receipt can be returned to the called when deploying + a contract [#865](https://github.com/gakonst/ethers-rs/pull/865) +- Add Arbitrum mainnet and testnet to the list of known chains +- Add ENS avatar and TXT records resolution + [#889](https://github.com/gakonst/ethers-rs/pull/889) +- Do not override gas limits provided by an outer middleware when including an EIP-2930 access list + [#901](https://github.com/gakonst/ethers-rs/pull/901) +- Add a getter to `ProjectCompileOutput` that returns a mapping of compiler + versions to a vector of name + contract struct tuples + [#908](https://github.com/gakonst/ethers-rs/pull/908) +- Add Yul compilation [#994](https://github.com/gakonst/ethers-rs/pull/994) +- Enforce commutativity of ENS reverse resolution + [#996](https://github.com/gakonst/ethers-rs/pull/996) +- Add `TransactionReceipt::to` and `TransactionReceipt::from` + [#1184](https://github.com/gakonst/ethers-rs/pull/1184) +- Add `From` and From> traits to `ValueOrArray` [#1199](https://github.com/gakonst/ethers-rs/pull/1200) +- Fix handling of Websocket connection errors [#1287](https://github.com/gakonst/ethers-rs/pull/1287) +- Add Arithmetic Shift Right operation for I256 [#1323](https://github.com/gakonst/ethers-rs/issues/1323) +- [#1535](https://github.com/gakonst/ethers-rs/pull/1535) Add support to Aurora and Aurora testnet networks. +- [#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) +- [#1451](https://github.com/gakonst/ethers-rs/issues/1451) Add Arithmetic Shift Left operation for I256 +- [#1860](https://github.com/gakonst/ethers-rs/pull/1860) Update I256 type documentation calling out the inconsistency + between its right shift operator and standard library numeric types. +- [#842](https://github.com/gakonst/ethers-rs/issues/842) Add support for I256 types in `parse_units` and `format_units`. + Added `twos_complement` function for I256. +- [#1934](https://github.com/gakonst/ethers-rs/pull/1934) Allow 16 calls in multicall. +- [#1941](https://github.com/gakonst/ethers-rs/pull/1941) Add `add_calls` and `call_array` for `Multicall`. +- Added basic event log filtering example. + +## ethers-contract-abigen + +### Unreleased + +- Abigen now generates events with new `` generic pattern [#2103](https://github.com/gakonst/ethers-rs/pull/2103) +- Fix Cargo.toml generation issue that could cause dependency conflicts [#1852](https://github.com/gakonst/ethers-rs/pull/1852) +- Use corresponding rust structs for event fields if they're solidity structs [#1674](https://github.com/gakonst/ethers-rs/pull/1674) +- Add `ContractFilter` to filter contracts in `MultiAbigen` [#1564](https://github.com/gakonst/ethers-rs/pull/1564) +- generate error bindings for custom errors [#1549](https://github.com/gakonst/ethers-rs/pull/1549) +- Support overloaded events + [#1233](https://github.com/gakonst/ethers-rs/pull/1233) +- Relax Clone requirements when Arc is used + [#1183](https://github.com/gakonst/ethers-rs/pull/1183) +- Generate a deploy function if bytecode is provided in the abigen! input (json artifact) + [#1030](https://github.com/gakonst/ethers-rs/pull/1030). +- Generate correct bindings of struct's field names that are reserved words + [#989](https://github.com/gakonst/ethers-rs/pull/989). +- Generate correct binding module names that are reserved words + [#1498](https://github.com/gakonst/ethers-rs/pull/1498). Note: this changes + generated module names to snake case. For example, `MyContract` is now + `my_contract` rather than `mycontract_mod`. +- The `Cargo.toml` generated by bindings now includes the `abigen` feature on + ethers. [#1508](https://github.com/gakonst/ethers-rs/pull/1508) +- More descriptive contract deserialization errors. + [#1633](https://github.com/gakonst/ethers-rs/pull/1633) + +### 0.6.0 + +- Add `MultiAbigen` to generate a series of contract bindings that can be kept in the repo + [#724](https://github.com/gakonst/ethers-rs/pull/724). +- Add provided `event_derives` to call and event enums as well + [#721](https://github.com/gakonst/ethers-rs/pull/721). +- Implement snowtrace and polygonscan on par with the etherscan integration + [#666](https://github.com/gakonst/ethers-rs/pull/666). + +## ethers-solc + +### Unreleased + +- Add `OutputContext` to `ArtifactOutput` trait + [#1621](https://github.com/gakonst/ethers-rs/pull/1621) +- On windows all paths in the `ProjectCompilerOutput` are now slashed by default + [#1540](https://github.com/gakonst/ethers-rs/pull/1540) +- `ArtifactOutput::write_extras` now takes the `Artifacts` directly + [#1491](https://github.com/gakonst/ethers-rs/pull/1491) +- 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 + [#1365](https://github.com/gakonst/ethers-rs/pull/1365) +- Use relative source paths and `solc --base-path` + [#1317](https://github.com/gakonst/ethers-rs/pull/1317) +- Save cache entry objects with relative paths + [#1307](https://github.com/gakonst/ethers-rs/pull/1307) +- Bundle svm, svm-builds and sha2 dependencies in new `svm-solc` feature + [#1071](https://github.com/gakonst/ethers-rs/pull/1071) +- Emit artifact files for source files without any ContractDefinition + [#1296](https://github.com/gakonst/ethers-rs/pull/1296) +- Wrap `ethabi::Contract` into new type `LosslessAbi` and `abi: Option` with `abi: Option` in `ConfigurableContractArtifact` + [#952](https://github.com/gakonst/ethers-rs/pull/952) +- Let `Project` take ownership of `ArtifactOutput` and change trait interface + [#907](https://github.com/gakonst/ethers-rs/pull/907) +- Total revamp of the `Project::compile` pipeline + [#802](https://github.com/gakonst/ethers-rs/pull/802) + - Support multiple versions of compiled contracts + - Breaking: deprecate hardhat cache file compatibility, cache file now tracks artifact paths and their versions +- Fix flatten replacement target location + [#846](https://github.com/gakonst/ethers-rs/pull/846) +- Fix duplicate files during flattening + [#813](https://github.com/gakonst/ethers-rs/pull/813) +- Add ability to flatten file imports + [#774](https://github.com/gakonst/ethers-rs/pull/774) +- Add dependency graph and resolve all imported libraryfiles + [#750](https://github.com/gakonst/ethers-rs/pull/750) +- `Remapping::find_many` does not return a `Result` anymore + [#707](https://github.com/gakonst/ethers-rs/pull/707) +- Add support for hardhat artifacts + [#677](https://github.com/gakonst/ethers-rs/pull/677) +- Add more utility functions to the `Artifact` trait + [#673](https://github.com/gakonst/ethers-rs/pull/673) +- Return cached artifacts from project `compile` when the cache only contains + some files +- Add support for library linking and make `Bytecode`'s `object` filed an + `enum BytecodeObject` [#656](https://github.com/gakonst/ethers-rs/pull/656). +- Nit: remove accidentally doubled double-quotes in an error message +- Fix when compiler-out metadata is empty and there's no internalType [#1182](https://github.com/gakonst/ethers-rs/pull/1182) +- Add basic `solc` model checker options. + [#1258](https://github.com/gakonst/ethers-rs/pull/1258) + +### 0.6.0 + +- add `EthAbiCodec` proc macro to derive `AbiEncode` `AbiDecode` implementation + [#704](https://github.com/gakonst/ethers-rs/pull/704) +- move `AbiEncode` `AbiDecode` trait to ethers-core and implement for core types + [#531](https://github.com/gakonst/ethers-rs/pull/531) +- Add EIP-712 `sign_typed_data` signer method; add ethers-core type `Eip712` + trait and derive macro in ethers-derive-eip712 + [#481](https://github.com/gakonst/ethers-rs/pull/481) + +### 0.5.3 + +- Allow configuring the optimizer & passing arbitrary arguments to solc + [#427](https://github.com/gakonst/ethers-rs/pull/427) +- Decimal support for `ethers_core::utils::parse_units` + [#463](https://github.com/gakonst/ethers-rs/pull/463) +- Fixed Wei unit calculation in `Units` + [#460](https://github.com/gakonst/ethers-rs/pull/460) +- Add `ethers_core::utils::get_create2_address_from_hash` + [#444](https://github.com/gakonst/ethers-rs/pull/444) +- Bumped ethabi to 0.15.0 and fixing breaking changes + [#469](https://github.com/gakonst/ethers-rs/pull/469), + [#448](https://github.com/gakonst/ethers-rs/pull/448), + [#445](https://github.com/gakonst/ethers-rs/pull/445) + +### 0.5.2 + +- Correctly RLP Encode transactions as received from the mempool + ([#415](https://github.com/gakonst/ethers-rs/pull/415)) + +## ethers-providers + +### Unreleased + +- Breaking: WS now includes reconnection logic and a changed `connect` + interface. Old behavior can be accessed via the `legacy_ws` feature + [#2181](https://github.com/gakonst/ethers-rs/pull/2181) +- Re-organize the crate. #[2150](https://github.com/gakonst/ethers-rs/pull/2159) +- Convert provider errors to arbitrary middleware errors + [#1920](https://github.com/gakonst/ethers-rs/pull/1920) +- Add a subset of the `admin` namespace + [1880](https://github.com/gakonst/ethers-rs/pull/1880) +- Return String for net version + [1376](https://github.com/gakonst/ethers-rs/pull/1376) +- Stream of paginated logs that load logs in small pages + [1285](https://github.com/gakonst/ethers-rs/pull/1285) +- Load previous logs before subscribing to new logs in case fromBlock is set + [1264](https://github.com/gakonst/ethers-rs/pull/1264) +- Add retries to the pending transaction future + [1221](https://github.com/gakonst/ethers-rs/pull/1221) +- Add support for basic and bearer authentication in http and non-wasm websockets. + [829](https://github.com/gakonst/ethers-rs/pull/829) +- Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` + [1012](https://github.com/gakonst/ethers-rs/pull/1012) + +### 0.6.0 + +- re-export error types for `Http` and `Ws` providers in + [#570](https://github.com/gakonst/ethers-rs/pull/570) +- add a method on the `Middleware` to broadcast a tx with a series of escalating + gas prices via [#566](https://github.com/gakonst/ethers-rs/pull/566) +- Remove unnecessary `Serialize` constraint to `R` (the Response type) in the + `request` method of `JsonRpcClient`. +- Fix `http Provider` data race when generating new request `id`s. +- Add support for `net_version` RPC method. + [595](https://github.com/gakonst/ethers-rs/pull/595) +- Add support for `evm_snapshot` and `evm_revert` dev RPC methods. + [640](https://github.com/gakonst/ethers-rs/pull/640) + +### 0.5.3 + +- Expose `ens` module [#435](https://github.com/gakonst/ethers-rs/pull/435) +- Add `eth_getProof` [#459](https://github.com/gakonst/ethers-rs/pull/459) + +### 0.5.2 + +- Set resolved ENS name during gas estimation + ([1e5a9e](https://github.com/gakonst/ethers-rs/commit/1e5a9efb3c678eecd43d5c341b4932da35445831)) + +## ethers-signers + +### Unreleased + +- fix: `LedgerSigner` has improved tracing and a ledger app bug mitigation + [#2192](https://github.com/gakonst/ethers-rs/pull/2192) +- `eth-keystore-rs` crate updated. Allow an optional name for the to-be-generated + keystore file [#910](https://github.com/gakonst/ethers-rs/pull/910) +- [1983](https://github.com/gakonst/ethers-rs/pull/1983) Added a `from_bytes` function for the `Wallet` type. +- Allow parsing of private key that has `0x` prefix + [#2037](https://github.com/gakonst/ethers-rs/pull/2037) + +### 0.6.0 + +- `LocalWallet::new_keystore` now returns a tuple `(LocalWallet, String)` + instead of `LocalWallet`, where the string represents the UUID of the newly + created encrypted JSON keystore. The JSON keystore is stored as a file + `/dir/uuid`. The issue [#557](https://github.com/gakonst/ethers-rs/issues/557) + is addressed [#559](https://github.com/gakonst/ethers-rs/pull/559) + +## ethers-contract + +### Unreleased + +- (Breaking) Add `Revert` to `ContractError`. Add `impl EthError for String`. + Modify existing `ContractError` variants to prevent accidental improper + usage. Change `MulticallError` to use `ContractError::Revert`. Add + convenience methods to decode errors from reverts. + [#2172](https://github.com/gakonst/ethers-rs/pull/2172) +- (Breaking) Improve Multicall result handling + [#2164](https://github.com/gakonst/ethers-rs/pull/2105) +- (Breaking) Make `Event` objects generic over borrow & remove lifetime + [#2105](https://github.com/gakonst/ethers-rs/pull/2105) +- Make `Factory` objects generic over the borrow trait, to allow non-arc mware + [#2103](https://github.com/gakonst/ethers-rs/pull/2103) +- Make `Contract` objects generic over the borrow trait, to allow non-arc mware + [#2082](https://github.com/gakonst/ethers-rs/pull/2082) +- Return pending transaction from `Multicall::send` + [#2044](https://github.com/gakonst/ethers-rs/pull/2044) +- Add abigen to default features + [#1684](https://github.com/gakonst/ethers-rs/pull/1684) +- Add extra Multicall helper methods + [#1666](https://github.com/gakonst/ethers-rs/pull/1666) +- Update Multicall to Multicall3 + [#1584](https://github.com/gakonst/ethers-rs/pull/1584) +- Add `Event::stream_with_meta` and `Event::subscribe_with_meta` + [#1483](https://github.com/gakonst/ethers-rs/pull/1483) +- Added tx builder methods to `ContractFactory` + [#1289](https://github.com/gakonst/ethers-rs/pull/1289) +- Relax Clone requirements when Arc is used + [#1183](https://github.com/gakonst/ethers-rs/pull/1183) +- Add `EventStream::select` to combine streams with different event types + [#725](https://github.com/gakonst/ethers-rs/pull/725) +- Substitute output tuples with rust struct types for function calls + [#664](https://github.com/gakonst/ethers-rs/pull/664) +- Add AbiType implementation during EthAbiType expansion + [#647](https://github.com/gakonst/ethers-rs/pull/647) +- fix Etherscan conditional HTTP support + [#632](https://github.com/gakonst/ethers-rs/pull/632) +- use `CARGO_MANIFEST_DIR` as root for relative paths in abigen + [#631](https://github.com/gakonst/ethers-rs/pull/631) + +### 0.6.0 + +- Provide a way to opt out of networking support in abigen proc macro with + `abigen-offline` feature [#580](https://github.com/gakonst/ethers-rs/pull/580) +- Add `.call()` method to `Deployer` for performing dry runs of contract + deployments. [#554](https://github.com/gakonst/ethers-rs/pull/554) +- Improve error message from failure in `ethers_contract_abigen::Source::parse` + [#552](https://github.com/gakonst/ethers-rs/pull/552) +- use enumerated aliases for overloaded functions + [#545](https://github.com/gakonst/ethers-rs/pull/545) +- add `EthCall` trait and derive macro which generates matching structs for + contract calls [#517](https://github.com/gakonst/ethers-rs/pull/517) +- Use rust types as contract function inputs for human readable abi + [#482](https://github.com/gakonst/ethers-rs/pull/482) +- `abigen!` now generates `Display` for all events using the new `EthDisplay` + macro [#513](https://github.com/gakonst/ethers-rs/pull/513) +- `abigen!` now supports overloaded functions natively + [#501](https://github.com/gakonst/ethers-rs/pull/501) +- `abigen!` now supports multiple contracts + [#498](https://github.com/gakonst/ethers-rs/pull/498) + +### Unreleased + +### 0.5.3 + +- (De)Tokenize structs and events with only a single field as `Token:Tuple` + ([#417](https://github.com/gakonst/ethers-rs/pull/417)) + +## ethers-middleware + +### Unreleased + +- Added `openssl` and `rustls` feature flags + [#1961](https://github.com/gakonst/ethers-rs/pull/1961) +- Relax Clone requirements when Arc is used + [#1183](https://github.com/gakonst/ethers-rs/pull/1183) +- Ensure a consistent chain ID between a Signer and Provider in SignerMiddleware + [#1095](https://gakonst/ethers-rs/pull/1095) +- Add BlockNative gas oracle [#1175](https://github.com/gakonst/ethers-rs/pull/1175) + +### 0.6.0 + +- add the missing constructor for `Timelag` middleware via + [#568](https://github.com/gakonst/ethers-rs/pull/568) +- Removes GasNow as a gas price oracle + [#508](https://github.com/gakonst/ethers-rs/pull/508) +- add initialize_nonce public function to initialize NonceMiddleManager + +### 0.5.3 + +- Added Time Lagged middleware + [#457](https://github.com/gakonst/ethers-rs/pull/457) diff --git a/CHANGELOG.md b/CHANGELOG.md index d78df792..61349c6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,402 +1,2050 @@ # Changelog -## ethers-core +All notable changes to this project will be documented in this file. -### Unreleased +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -- Add support for `ethlive` as a chain name [#2268](https://github.com/gakonst/ethers-rs/pull/2268) -- Make `Chain` more round-trip friendly [#2270](https://github.com/gakonst/ethers-rs/pull/2270) -- Add `other: OtherFields` to `TransactionReceipt` [#2209](https://github.com/gakonst/ethers-rs/pull/2209) -- Add `Signature::recover_typed_data` [#2120](https://github.com/gakonst/ethers-rs/pull/2120) -- Add `abi::encode_packed` [#2104](https://github.com/gakonst/ethers-rs/pull/2104) -- Add support for custom JavaScript tracer to `debug_traceCall` and `debug_traceTransaction` [#2064](https://github.com/gakonst/ethers-rs/pull/2064) -- Add a `Send` bound to the `IntoFuture` implementation of `ContractCall` [#2083](https://github.com/gakonst/ethers-rs/pull/2083) -- Bump [`svm-rs`](https://github.com/roynalnaruto/svm-rs) dependency to fix conflicts with Rust Crytpo packages [#2051](https://github.com/gakonst/ethers-rs/pull/2051) -- Avoid unnecessary allocations in `utils` [#2046](https://github.com/gakonst/ethers-rs/pull/2046) -- Add abigen support for hardhat generated bytecode json format [#2012](https://github.com/gakonst/ethers-rs/pull/2012) -- Fix typo in `RwClient` docs for `write_client` method. -- Add support for Geth `debug_traceCall` [#1949](https://github.com/gakonst/ethers-rs/pull/1949) -- Add support for Geth built-in tracer and config [#2121](https://github.com/gakonst/ethers-rs/pull/2121) -- Graceful handling of WebSocket transport errors [#1889](https://github.com/gakonst/ethers-rs/issues/1889) [#1815](https://github.com/gakonst/ethers-rs/issues/1815) -- `MiddlewareBuilder` trait to instantiate a `Provider` as `Middleware` layers. -- An `Event` builder can be instantiated specifying the event filter type, without the need to instantiate a contract. -- Add 'ethers_core::types::OpCode' and use in 'ethers_core::types::VMOperation' [#1857](https://github.com/gakonst/ethers-rs/issues/1857) -- 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 -- Fix RLP decoding of legacy `Transaction` -- Fix RLP encoding of `TransactionReceipt` [#1661](https://github.com/gakonst/ethers-rs/pull/1661) -- Add `Unit8` helper type [#1639](https://github.com/gakonst/ethers-rs/pull/1639) -- Add `evm.deployedBytecode.immutableReferences` output selector [#1523](https://github.com/gakonst/ethers-rs/pull/1523) -- Added `get_erc1155_token_transfer_events` function for etherscan client [#1503](https://github.com/gakonst/ethers-rs/pull/1503) -- Add support for Geth `debug_traceTransaction` [#1469](https://github.com/gakonst/ethers-rs/pull/1469) -- Use correct, new transaction type for `typool_content` RPC endpoint [#1501](https://github.com/gakonst/ethers-rs/pull/1501) -- Fix the default config for generated `BuildInfo` [#1458](https://github.com/gakonst/ethers-rs/pull/1458) -- Allow configuration of the output directory of the generated `BuildInfo` [#1433](https://github.com/gakonst/ethers-rs/pull/1433) -- capture unknown fields in `Block` and `Transaction` type via new `OtherFields` type [#1423](https://github.com/gakonst/ethers-rs/pull/1423) -- Methods like `set_to()` from `TypedTransaction` can be chained -- Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396) -- Add `as_*_mut` methods on `TypedTransaction` - [#1310](https://github.com/gakonst/ethers-rs/pull/1310) -- AWS EIP712 data signing no longer signs with EIP155 -- Added Cronos testnet to etherscan options [#1276](https://github.com/gakonst/ethers-rs/pull/1276) -- Fix parsing of a pending block - [#1272](https://github.com/gakonst/ethers-rs/pull/1272) -- Removed Cronos mainnet beta from `is_legacy` [1246](https://github.com/gakonst/ethers-rs/pull/1246) -- Fix RLP decoding of `from` field for `Eip1559TransactionRequest` and - `Eip2930TransactionRequest`, remove `Eip1559TransactionRequest` `sighash` - method [#1180](https://github.com/gakonst/ethers-rs/pull/1180) -- Fix RLP encoding of absent access list in `Transaction` [1137](https://github.com/gakonst/ethers-rs/pull/1137) -- Pass compilation time as additional argument to `Reporter::on_solc_success` [#1098](https://github.com/gakonst/ethers-rs/pull/1098) -- Fix aws signer bug which maps un-normalized signature to error if no normalization occurs (in `aws::utils::decode_signature`) -- Implement signed transaction RLP decoding [#1096](https://github.com/gakonst/ethers-rs/pull/1096) -- `Transaction::from` will default to `Address::zero()`. Add `recover_from` and - `recover_from_mut` methods for recovering the sender from signature, and also - setting the same on tx [#1075](https://github.com/gakonst/ethers-rs/pull/1075). -- Add Etherscan account API endpoints [#939](https://github.com/gakonst/ethers-rs/pull/939) -- Add FTM Mainet and testnet to parse method "try_from" from Chain.rs and add cronos mainet and testnet to "from_str" -- Add FTM mainnet and testnet Multicall addresses [#927](https://github.com/gakonst/ethers-rs/pull/927) -- Add Cronos mainnet beta and testnet to the list of known chains - [#926](https://github.com/gakonst/ethers-rs/pull/926) -- `Chain::to_string` will return the same chain name as `Chain::from_str` -- Add `eth_syncing` [#848](https://github.com/gakonst/ethers-rs/pull/848) -- Fix overflow and possible divide-by-zero in `estimate_priority_fee` -- Add BSC mainnet and testnet to the list of known chains - [#831](https://github.com/gakonst/ethers-rs/pull/831) -- Returns error on invalid type conversion instead of panicking - [#691](https://github.com/gakonst/ethers-rs/pull/691/files) -- Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and - solidity `uint8[]` to rust `Vec`. - [#613](https://github.com/gakonst/ethers-rs/pull/613) -- Fix `format_units` to return a `String` of representing a decimal point float - such that the decimal places don't get truncated. - [#597](https://github.com/gakonst/ethers-rs/pull/597) -- Implement hex display format for `ethers::core::Bytes` - [#624](https://github.com/gakonst/ethers-rs/pull/624). -- Fix `fee_history` to first try with `block_count` encoded as a hex `QUANTITY`. - [#668](https://github.com/gakonst/ethers-rs/pull/668) -- Fix `fill_transaction` to set nonces in transactions, if the sender is known - and no nonce is specified -- Move `fill_transaction` implementation to the provider, to allow middleware - to properly override its behavior. -- Add informational messages to solc installation and compilation. -- Significantly refactor `MultiAbigen` module generation. Now allows for lib - generation, and does not make unnecessary disk writes. - [#854](https://github.com/gakonst/ethers-rs/pull/852) -- Refactor `ethers-contract-abigen` to use `eyre` instead of `anyhow` via - [#858](https://github.com/gakonst/ethers-rs/pull/858) -- Add `Deployer.send_with_receipt -> Result<(Contract, Receipt), Error>` - so that the receipt can be returned to the called when deploying - a contract [#865](https://github.com/gakonst/ethers-rs/pull/865) -- Add Arbitrum mainnet and testnet to the list of known chains -- Add ENS avatar and TXT records resolution - [#889](https://github.com/gakonst/ethers-rs/pull/889) -- Do not override gas limits provided by an outer middleware when including an EIP-2930 access list - [#901](https://github.com/gakonst/ethers-rs/pull/901) -- Add a getter to `ProjectCompileOutput` that returns a mapping of compiler - versions to a vector of name + contract struct tuples - [#908](https://github.com/gakonst/ethers-rs/pull/908) -- Add Yul compilation [#994](https://github.com/gakonst/ethers-rs/pull/994) -- Enforce commutativity of ENS reverse resolution - [#996](https://github.com/gakonst/ethers-rs/pull/996) -- Add `TransactionReceipt::to` and `TransactionReceipt::from` - [#1184](https://github.com/gakonst/ethers-rs/pull/1184) -- Add `From` and From> traits to `ValueOrArray` [#1199](https://github.com/gakonst/ethers-rs/pull/1200) -- Fix handling of Websocket connection errors [#1287](https://github.com/gakonst/ethers-rs/pull/1287) -- Add Arithmetic Shift Right operation for I256 [#1323](https://github.com/gakonst/ethers-rs/issues/1323) -- [#1535](https://github.com/gakonst/ethers-rs/pull/1535) Add support to Aurora and Aurora testnet networks. -- [#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) -- [#1451](https://github.com/gakonst/ethers-rs/issues/1451) Add Arithmetic Shift Left operation for I256 -- [#1860](https://github.com/gakonst/ethers-rs/pull/1860) Update I256 type documentation calling out the inconsistency - between its right shift operator and standard library numeric types. -- [#842](https://github.com/gakonst/ethers-rs/issues/842) Add support for I256 types in `parse_units` and `format_units`. - Added `twos_complement` function for I256. -- [#1934](https://github.com/gakonst/ethers-rs/pull/1934) Allow 16 calls in multicall. -- [#1941](https://github.com/gakonst/ethers-rs/pull/1941) Add `add_calls` and `call_array` for `Multicall`. -- Added basic event log filtering example. +This changelog is automatically generated by [git-cliff](https://github.com/orhun/git-cliff). +Please do not manually edit this file. -## ethers-contract-abigen +## [Unreleased] -### Unreleased +### Bug Fixes -- Abigen now generates events with new `` generic pattern [#2103](https://github.com/gakonst/ethers-rs/pull/2103) -- Fix Cargo.toml generation issue that could cause dependency conflicts [#1852](https://github.com/gakonst/ethers-rs/pull/1852) -- Use corresponding rust structs for event fields if they're solidity structs [#1674](https://github.com/gakonst/ethers-rs/pull/1674) -- Add `ContractFilter` to filter contracts in `MultiAbigen` [#1564](https://github.com/gakonst/ethers-rs/pull/1564) -- generate error bindings for custom errors [#1549](https://github.com/gakonst/ethers-rs/pull/1549) -- Support overloaded events - [#1233](https://github.com/gakonst/ethers-rs/pull/1233) -- Relax Clone requirements when Arc is used - [#1183](https://github.com/gakonst/ethers-rs/pull/1183) -- Generate a deploy function if bytecode is provided in the abigen! input (json artifact) - [#1030](https://github.com/gakonst/ethers-rs/pull/1030). -- Generate correct bindings of struct's field names that are reserved words - [#989](https://github.com/gakonst/ethers-rs/pull/989). -- Generate correct binding module names that are reserved words - [#1498](https://github.com/gakonst/ethers-rs/pull/1498). Note: this changes - generated module names to snake case. For example, `MyContract` is now - `my_contract` rather than `mycontract_mod`. -- The `Cargo.toml` generated by bindings now includes the `abigen` feature on - ethers. [#1508](https://github.com/gakonst/ethers-rs/pull/1508) -- More descriptive contract deserialization errors. - [#1633](https://github.com/gakonst/ethers-rs/pull/1633) +- Accept ethlive as a chain name ([#2268](https://github.com/gakonst/ethers-rs/issues/2268)) +- Fix missing ident # ([#2267](https://github.com/gakonst/ethers-rs/issues/2267)) +- Support null result ([#2249](https://github.com/gakonst/ethers-rs/issues/2249)) +- Ensure flatten target is part of graph ([#2256](https://github.com/gakonst/ethers-rs/issues/2256)) +- Dont poll stream again if done ([#2245](https://github.com/gakonst/ethers-rs/issues/2245)) +- Docsrs builds final ([#2235](https://github.com/gakonst/ethers-rs/issues/2235)) +- Docs.rs build ([#2221](https://github.com/gakonst/ethers-rs/issues/2221)) +- Change windows target ABI ([#2230](https://github.com/gakonst/ethers-rs/issues/2230)) +- Init guard in noncemanager ([#2227](https://github.com/gakonst/ethers-rs/issues/2227)) +- Parse_log in public interface ([#2228](https://github.com/gakonst/ethers-rs/issues/2228)) +- Allow MIT-0, allow CC0-1.0 exceptions ([#2212](https://github.com/gakonst/ethers-rs/issues/2212)) +- Udeps ([#2215](https://github.com/gakonst/ethers-rs/issues/2215)) +- Set miner.etherbase in clique mode ([#2210](https://github.com/gakonst/ethers-rs/issues/2210)) +- Examples ([#2207](https://github.com/gakonst/ethers-rs/issues/2207)) +- Properly parse genesis alloc storage ([#2205](https://github.com/gakonst/ethers-rs/issues/2205)) +- I256 docs ([#2187](https://github.com/gakonst/ethers-rs/issues/2187)) +- Builtin trait derives ([#2170](https://github.com/gakonst/ethers-rs/issues/2170)) +- Block FromStr implementation ([#2155](https://github.com/gakonst/ethers-rs/issues/2155)) +- Use event name from abi attribute ([#2144](https://github.com/gakonst/ethers-rs/issues/2144)) +- Report all errors during parsing ([#2149](https://github.com/gakonst/ethers-rs/issues/2149)) +- Examples ([#2153](https://github.com/gakonst/ethers-rs/issues/2153)) +- Test hive genesis parsing ([#2145](https://github.com/gakonst/ethers-rs/issues/2145)) +- Process all imports even input files ([#2136](https://github.com/gakonst/ethers-rs/issues/2136)) +- Fix autodetection edge case ([#2099](https://github.com/gakonst/ethers-rs/issues/2099)) +- Add cfg to IntoFuture preventing Send ([#2086](https://github.com/gakonst/ethers-rs/issues/2086)) +- Use middleware associated err type ([#2093](https://github.com/gakonst/ethers-rs/issues/2093)) +- Add Send bound to return type of JsonRpcClient::request ([#2072](https://github.com/gakonst/ethers-rs/issues/2072)) +- Add getrandom with js feature for wasm ([#2076](https://github.com/gakonst/ethers-rs/issues/2076)) +- Add missing pub for tuple structs ([#2080](https://github.com/gakonst/ethers-rs/issues/2080)) +- Ensure urls have trailing / ([#2069](https://github.com/gakonst/ethers-rs/issues/2069)) +- Fix geth --init temp dir race condition ([#2068](https://github.com/gakonst/ethers-rs/issues/2068)) +- Default to Ascii for windows / Utf8 otherwise ([#2060](https://github.com/gakonst/ethers-rs/issues/2060)) +- Add missing ir option ([#2055](https://github.com/gakonst/ethers-rs/issues/2055)) +- Add back mod util +- Fixed issue#2004 parsing solc verison with trailing newlines ([#2005](https://github.com/gakonst/ethers-rs/issues/2005)) +- Failing can_autodetect_dirs solc test ([#1895](https://github.com/gakonst/ethers-rs/issues/1895)) ([#2052](https://github.com/gakonst/ethers-rs/issues/2052)) +- Ensure correct ABI in `From` impl ([#2036](https://github.com/gakonst/ethers-rs/issues/2036)) +- Revert to old version ([#2048](https://github.com/gakonst/ethers-rs/issues/2048)) +- Signer test ([#2028](https://github.com/gakonst/ethers-rs/issues/2028)) +- Tests ([#2015](https://github.com/gakonst/ethers-rs/issues/2015)) +- Doctests ([#2007](https://github.com/gakonst/ethers-rs/issues/2007)) +- Use full path of i256 ([#2000](https://github.com/gakonst/ethers-rs/issues/2000)) +- Doc typo regarding Multicall::call_array ([#1985](https://github.com/gakonst/ethers-rs/issues/1985)) +- Deprecated gas oracle ([#1986](https://github.com/gakonst/ethers-rs/issues/1986)) +- Gwei wei wrong u256 constant ([#1992](https://github.com/gakonst/ethers-rs/issues/1992)) +- Don't override user-set 1559 attributes ([#1980](https://github.com/gakonst/ethers-rs/issues/1980)) +- Reexport SourceLocation ([#1971](https://github.com/gakonst/ethers-rs/issues/1971)) +- Reexport some ast types again ([#1968](https://github.com/gakonst/ethers-rs/issues/1968)) +- Add setter for MultiBindings' rustfmt ([#1948](https://github.com/gakonst/ethers-rs/issues/1948)) +- Source code serde ([#1962](https://github.com/gakonst/ethers-rs/issues/1962)) +- Ethers-etherscan solc feature ([#1965](https://github.com/gakonst/ethers-rs/issues/1965)) +- Rebase to master for onbjerg's ast ([#1943](https://github.com/gakonst/ethers-rs/issues/1943)) +- Add `openssl` and `rustls` feature flags in ethers-middleware ([#1961](https://github.com/gakonst/ethers-rs/issues/1961)) +- Oracles, tests ([#1944](https://github.com/gakonst/ethers-rs/issues/1944)) +- Bump in .clippy.toml and add a comment in root Cargo.toml ([#1945](https://github.com/gakonst/ethers-rs/issues/1945)) +- Decode to correctly in Transaction ([#1946](https://github.com/gakonst/ethers-rs/issues/1946)) +- Allow 16 calls in multicall ([#1934](https://github.com/gakonst/ethers-rs/issues/1934)) +- Set `GethInstance` p2p_port in spawn ([#1933](https://github.com/gakonst/ethers-rs/issues/1933)) +- Remove `OpCode` enum and update `VMOperation`'s `op` field type ([#1904](https://github.com/gakonst/ethers-rs/issues/1904)) +- Always set p2p port in non-dev mode ([#1919](https://github.com/gakonst/ethers-rs/issues/1919)) +- Make version detection infallible ([#1916](https://github.com/gakonst/ethers-rs/issues/1916)) +- Multicall decode error ([#1907](https://github.com/gakonst/ethers-rs/issues/1907)) +- Rm wrong brackets ([#1914](https://github.com/gakonst/ethers-rs/issues/1914)) +- Txpool_inspect unable to parse contract creations ([#1905](https://github.com/gakonst/ethers-rs/issues/1905)) -### 0.6.0 +### Depedencies -- Add `MultiAbigen` to generate a series of contract bindings that can be kept in the repo - [#724](https://github.com/gakonst/ethers-rs/pull/724). -- Add provided `event_derives` to call and event enums as well - [#721](https://github.com/gakonst/ethers-rs/pull/721). -- Implement snowtrace and polygonscan on par with the etherscan integration - [#666](https://github.com/gakonst/ethers-rs/pull/666). +- Bump and use workspace dependencies ([#2222](https://github.com/gakonst/ethers-rs/issues/2222)) +- Bump crypto deps ([#2260](https://github.com/gakonst/ethers-rs/issues/2260)) +- Bump enr from 0.7.0 to 0.8.0 ([#2255](https://github.com/gakonst/ethers-rs/issues/2255)) +- Bump futures-executor from 0.3.26 to 0.3.27 ([#2250](https://github.com/gakonst/ethers-rs/issues/2250)) +- Bump semver from 1.0.16 to 1.0.17 ([#2251](https://github.com/gakonst/ethers-rs/issues/2251)) +- Bump proc-macro2 from 1.0.51 to 1.0.52 ([#2252](https://github.com/gakonst/ethers-rs/issues/2252)) +- Bump futures-util from 0.3.26 to 0.3.27 ([#2253](https://github.com/gakonst/ethers-rs/issues/2253)) +- Bump chrono from 0.4.23 to 0.4.24 ([#2254](https://github.com/gakonst/ethers-rs/issues/2254)) +- Bump coins-bip39 to 0.8.1 and coins-bip32 to 0.8.0 ([#2246](https://github.com/gakonst/ethers-rs/issues/2246)) +- Bump rayon from 1.6.1 to 1.7.0 ([#2233](https://github.com/gakonst/ethers-rs/issues/2233)) +- Bump serde_path_to_error from 0.1.9 to 0.1.10 ([#2232](https://github.com/gakonst/ethers-rs/issues/2232)) +- Bump thiserror from 1.0.38 to 1.0.39 ([#2234](https://github.com/gakonst/ethers-rs/issues/2234)) +- Improve CI jobs and tests ([#2189](https://github.com/gakonst/ethers-rs/issues/2189)) +- Build without deps ([#2196](https://github.com/gakonst/ethers-rs/issues/2196)) +- Bump tempfile from 3.3.0 to 3.4.0 ([#2200](https://github.com/gakonst/ethers-rs/issues/2200)) +- Bump auto_impl from 0.5.0 to 1.0.1 ([#2201](https://github.com/gakonst/ethers-rs/issues/2201)) +- Bump syn from 1.0.108 to 1.0.109 ([#2202](https://github.com/gakonst/ethers-rs/issues/2202)) +- Bump num_enum from 0.5.10 to 0.5.11 ([#2184](https://github.com/gakonst/ethers-rs/issues/2184)) +- Bump svm ([#2185](https://github.com/gakonst/ethers-rs/issues/2185)) +- Bump syn from 1.0.107 to 1.0.108 ([#2178](https://github.com/gakonst/ethers-rs/issues/2178)) +- Bump svm-rs ([#2179](https://github.com/gakonst/ethers-rs/issues/2179)) +- Make order of types in shared_types deterministic ([#2169](https://github.com/gakonst/ethers-rs/issues/2169)) +- Bump num_enum from 0.5.9 to 0.5.10 ([#2168](https://github.com/gakonst/ethers-rs/issues/2168)) +- Bump http from 0.2.8 to 0.2.9 ([#2167](https://github.com/gakonst/ethers-rs/issues/2167)) +- Bump once_cell from 1.17.0 to 1.17.1 ([#2156](https://github.com/gakonst/ethers-rs/issues/2156)) +- Bump coins-ledger from 0.7.0 to 0.7.1 ([#2139](https://github.com/gakonst/ethers-rs/issues/2139)) +- Bump fs_extra from 1.2.0 to 1.3.0 ([#2118](https://github.com/gakonst/ethers-rs/issues/2118)) +- Bump proc-macro2 from 1.0.50 to 1.0.51 ([#2117](https://github.com/gakonst/ethers-rs/issues/2117)) +- Bump wasm-bindgen-test from 0.3.33 to 0.3.34 ([#2111](https://github.com/gakonst/ethers-rs/issues/2111)) +- Bump solc test 0.8.18 ([#2113](https://github.com/gakonst/ethers-rs/issues/2113)) +- Bump wasm-bindgen-futures from 0.4.33 to 0.4.34 ([#2108](https://github.com/gakonst/ethers-rs/issues/2108)) +- Bump web-sys from 0.3.60 to 0.3.61 ([#2106](https://github.com/gakonst/ethers-rs/issues/2106)) +- Bump svm crates ([#2110](https://github.com/gakonst/ethers-rs/issues/2110)) +- Bump cargo_metadata from 0.15.2 to 0.15.3 ([#2101](https://github.com/gakonst/ethers-rs/issues/2101)) +- Bump bytes from 1.3.0 to 1.4.0 ([#2100](https://github.com/gakonst/ethers-rs/issues/2100)) +- Bump ws_stream_wasm from 0.7.3 to 0.7.4 ([#2092](https://github.com/gakonst/ethers-rs/issues/2092)) +- Bump futures-executor from 0.3.25 to 0.3.26 ([#2096](https://github.com/gakonst/ethers-rs/issues/2096)) +- Bump futures-util from 0.3.25 to 0.3.26 ([#2097](https://github.com/gakonst/ethers-rs/issues/2097)) +- Bump reqwest from 0.11.13 to 0.11.14 ([#2065](https://github.com/gakonst/ethers-rs/issues/2065)) +- Bump num_enum from 0.5.7 to 0.5.9 ([#2073](https://github.com/gakonst/ethers-rs/issues/2073)) +- Bump proc-macro2 from 1.0.49 to 1.0.50 ([#2061](https://github.com/gakonst/ethers-rs/issues/2061)) +- Bump solang-parser 0.2.1 ([#2054](https://github.com/gakonst/ethers-rs/issues/2054)) +- Bump svm-rs ([#2051](https://github.com/gakonst/ethers-rs/issues/2051)) +- Bump criterion from 0.3.6 to 0.4.0 ([#2050](https://github.com/gakonst/ethers-rs/issues/2050)) +- Bump regex from 1.7.0 to 1.7.1 ([#2034](https://github.com/gakonst/ethers-rs/issues/2034)) +- Bump num_enum from 0.5.7 to 0.5.8 ([#2035](https://github.com/gakonst/ethers-rs/issues/2035)) +- Bump bzip2 from 0.4.3 to 0.4.4 ([#2040](https://github.com/gakonst/ethers-rs/issues/2040)) +- Bump base64 from 0.20.0 to 0.21.0 ([#2030](https://github.com/gakonst/ethers-rs/issues/2030)) +- Bump glob from 0.3.0 to 0.3.1 ([#2031](https://github.com/gakonst/ethers-rs/issues/2031)) +- Bump once_cell from 1.16.0 to 1.17.0 ([#1987](https://github.com/gakonst/ethers-rs/issues/1987)) +- Examples ([#1940](https://github.com/gakonst/ethers-rs/issues/1940)) +- Bump serde_path_to_error from 0.1.8 to 0.1.9 ([#1969](https://github.com/gakonst/ethers-rs/issues/1969)) +- Bump proc-macro2 from 1.0.47 to 1.0.49 ([#1951](https://github.com/gakonst/ethers-rs/issues/1951)) +- Bump thiserror from 1.0.37 to 1.0.38 ([#1950](https://github.com/gakonst/ethers-rs/issues/1950)) +- Bump semver from 1.0.14 to 1.0.16 ([#1952](https://github.com/gakonst/ethers-rs/issues/1952)) +- Bump syn from 1.0.105 to 1.0.107 ([#1953](https://github.com/gakonst/ethers-rs/issues/1953)) +- Bump serial_test from 0.9.0 to 0.10.0 ([#1954](https://github.com/gakonst/ethers-rs/issues/1954)) +- Bump num_cpus from 1.14.0 to 1.15.0 ([#1959](https://github.com/gakonst/ethers-rs/issues/1959)) +- Bump base64 from 0.13.1 to 0.20.0 ([#1935](https://github.com/gakonst/ethers-rs/issues/1935)) +- Bump rayon from 1.6.0 to 1.6.1 ([#1936](https://github.com/gakonst/ethers-rs/issues/1936)) +- Bump futures-locks from 0.7.0 to 0.7.1 ([#1930](https://github.com/gakonst/ethers-rs/issues/1930)) +- Bump syn from 1.0.104 to 1.0.105 ([#1918](https://github.com/gakonst/ethers-rs/issues/1918)) +- Bump tokio-tungstenite from 0.17.2 to 0.18.0 ([#1908](https://github.com/gakonst/ethers-rs/issues/1908)) +- Bump chrono from 0.4.20 to 0.4.23 ([#1900](https://github.com/gakonst/ethers-rs/issues/1900)) +- Bump syn from 1.0.103 to 1.0.104 ([#1901](https://github.com/gakonst/ethers-rs/issues/1901)) -## ethers-solc +### Documentation -### Unreleased +- Fix broken links, update documentation ([#2203](https://github.com/gakonst/ethers-rs/issues/2203)) +- Update providers book and examples ([#2098](https://github.com/gakonst/ethers-rs/issues/2098)) +- Rename `event_derives` to `derives` ([#2018](https://github.com/gakonst/ethers-rs/issues/2018)) +- Mock-provider ([#2011](https://github.com/gakonst/ethers-rs/issues/2011)) +- Add rw/quorum provider +- Mdbook ([#1994](https://github.com/gakonst/ethers-rs/issues/1994)) +- Fixed typos in rw client docs ([#1957](https://github.com/gakonst/ethers-rs/issues/1957)) +- Update MRSV to 1.64 ([#1926](https://github.com/gakonst/ethers-rs/issues/1926)) -- Add `OutputContext` to `ArtifactOutput` trait - [#1621](https://github.com/gakonst/ethers-rs/pull/1621) -- On windows all paths in the `ProjectCompilerOutput` are now slashed by default - [#1540](https://github.com/gakonst/ethers-rs/pull/1540) -- `ArtifactOutput::write_extras` now takes the `Artifacts` directly - [#1491](https://github.com/gakonst/ethers-rs/pull/1491) -- 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 - [#1365](https://github.com/gakonst/ethers-rs/pull/1365) -- Use relative source paths and `solc --base-path` - [#1317](https://github.com/gakonst/ethers-rs/pull/1317) -- Save cache entry objects with relative paths - [#1307](https://github.com/gakonst/ethers-rs/pull/1307) -- Bundle svm, svm-builds and sha2 dependencies in new `svm-solc` feature - [#1071](https://github.com/gakonst/ethers-rs/pull/1071) -- Emit artifact files for source files without any ContractDefinition - [#1296](https://github.com/gakonst/ethers-rs/pull/1296) -- Wrap `ethabi::Contract` into new type `LosslessAbi` and `abi: Option` with `abi: Option` in `ConfigurableContractArtifact` - [#952](https://github.com/gakonst/ethers-rs/pull/952) -- Let `Project` take ownership of `ArtifactOutput` and change trait interface - [#907](https://github.com/gakonst/ethers-rs/pull/907) -- Total revamp of the `Project::compile` pipeline - [#802](https://github.com/gakonst/ethers-rs/pull/802) - - Support multiple versions of compiled contracts - - Breaking: deprecate hardhat cache file compatibility, cache file now tracks artifact paths and their versions -- Fix flatten replacement target location - [#846](https://github.com/gakonst/ethers-rs/pull/846) -- Fix duplicate files during flattening - [#813](https://github.com/gakonst/ethers-rs/pull/813) -- Add ability to flatten file imports - [#774](https://github.com/gakonst/ethers-rs/pull/774) -- Add dependency graph and resolve all imported libraryfiles - [#750](https://github.com/gakonst/ethers-rs/pull/750) -- `Remapping::find_many` does not return a `Result` anymore - [#707](https://github.com/gakonst/ethers-rs/pull/707) -- Add support for hardhat artifacts - [#677](https://github.com/gakonst/ethers-rs/pull/677) -- Add more utility functions to the `Artifact` trait - [#673](https://github.com/gakonst/ethers-rs/pull/673) -- Return cached artifacts from project `compile` when the cache only contains - some files -- Add support for library linking and make `Bytecode`'s `object` filed an - `enum BytecodeObject` [#656](https://github.com/gakonst/ethers-rs/pull/656). -- Nit: remove accidentally doubled double-quotes in an error message -- Fix when compiler-out metadata is empty and there's no internalType [#1182](https://github.com/gakonst/ethers-rs/pull/1182) -- Add basic `solc` model checker options. - [#1258](https://github.com/gakonst/ethers-rs/pull/1258) +### Features -### 0.6.0 +- Roundtrip serde + to/from strings ([#2270](https://github.com/gakonst/ethers-rs/issues/2270)) +- Support empty events ([#2263](https://github.com/gakonst/ethers-rs/issues/2263)) +- Add implementations to Opcode ([#2243](https://github.com/gakonst/ethers-rs/issues/2243)) +- Add Boba chain ([#2236](https://github.com/gakonst/ethers-rs/issues/2236)) +- Deseralize other fields on tx receipts ([#2209](https://github.com/gakonst/ethers-rs/issues/2209)) +- Contract revert trait ([#2182](https://github.com/gakonst/ethers-rs/issues/2182)) +- Add filecoin chains ([#2177](https://github.com/gakonst/ethers-rs/issues/2177)) +- Add is_empty fn for structs of Options ([#2195](https://github.com/gakonst/ethers-rs/issues/2195)) +- Use binaries.soliditylang.org ([#2198](https://github.com/gakonst/ethers-rs/issues/2198)) +- Improve I256 implementation ([#2180](https://github.com/gakonst/ethers-rs/issues/2180)) +- Improve Multicall result handling ([#2164](https://github.com/gakonst/ethers-rs/issues/2164)) +- Add debug for geth default api ([#2140](https://github.com/gakonst/ethers-rs/issues/2140)) +- Add basic event filtering example ([#2137](https://github.com/gakonst/ethers-rs/issues/2137)) +- Extend model checker setting field ([#2123](https://github.com/gakonst/ethers-rs/issues/2123)) +- Add support for Geth built-in tracer and config ([#2121](https://github.com/gakonst/ethers-rs/issues/2121)) +- Allow signature to recover typed_data payloads ([#2120](https://github.com/gakonst/ethers-rs/issues/2120)) +- Packed encoding ([#2104](https://github.com/gakonst/ethers-rs/issues/2104)) +- Add DerefMut for OtherFields ([#2109](https://github.com/gakonst/ethers-rs/issues/2109)) +- Add support for js tracer to geth trace, fix different return types ([#2064](https://github.com/gakonst/ethers-rs/issues/2064)) +- More type parsing ([#2095](https://github.com/gakonst/ethers-rs/issues/2095)) +- Add convenience impl From Log ([#2087](https://github.com/gakonst/ethers-rs/issues/2087)) +- Expose genesis and private key in Geth ([#2091](https://github.com/gakonst/ethers-rs/issues/2091)) +- Support emitting bytecode as extra files ([#2074](https://github.com/gakonst/ethers-rs/issues/2074)) +- Add helper functions to access solidity types ([#2081](https://github.com/gakonst/ethers-rs/issues/2081)) +- Allow `ClientBuilder` to create `Client` without API key ([#2067](https://github.com/gakonst/ethers-rs/issues/2067)) +- Enable Clique mode ([#2063](https://github.com/gakonst/ethers-rs/issues/2063)) +- Switch shanghaiBlock to shanghaiTime ([#2049](https://github.com/gakonst/ethers-rs/issues/2049)) +- Use u64 and add more chains to multicall ([#2042](https://github.com/gakonst/ethers-rs/issues/2042)) +- Allow parsing of private key that has `0x` prefix ([#2037](https://github.com/gakonst/ethers-rs/issues/2037)) +- Return multicall pending transaction ([#2044](https://github.com/gakonst/ethers-rs/issues/2044)) +- Add `strum::EnumIter` and `strum::EnumCount` to `Chain` ([#2043](https://github.com/gakonst/ethers-rs/issues/2043)) +- Use prettyplease ([#2027](https://github.com/gakonst/ethers-rs/issues/2027)) +- Support parsing bytecode from evm object ([#2024](https://github.com/gakonst/ethers-rs/issues/2024)) +- Add arbitrum nova api and chain id 42170 ([#2020](https://github.com/gakonst/ethers-rs/issues/2020)) +- Support personal account apis ([#2009](https://github.com/gakonst/ethers-rs/issues/2009)) +- Add ability to take geth stderr ([#2010](https://github.com/gakonst/ethers-rs/issues/2010)) +- Add mining related apis ([#2008](https://github.com/gakonst/ethers-rs/issues/2008)) +- Windows ipc provider (named pipe) ([#1976](https://github.com/gakonst/ethers-rs/issues/1976)) +- Improve error on case mismatch ([#1998](https://github.com/gakonst/ethers-rs/issues/1998)) +- Improve `determine_ethers_crates` ([#1988](https://github.com/gakonst/ethers-rs/issues/1988)) +- Expose all genesis related structs ([#1975](https://github.com/gakonst/ethers-rs/issues/1975)) +- Debug_traceCall ([#1949](https://github.com/gakonst/ethers-rs/issues/1949)) +- Chain macros and impls ([#1958](https://github.com/gakonst/ethers-rs/issues/1958)) +- Adds bscscan as abi source ([#1955](https://github.com/gakonst/ethers-rs/issues/1955)) +- Make geth executable configurable ([#1947](https://github.com/gakonst/ethers-rs/issues/1947)) +- Add_calls and call_array for multicall ([#1941](https://github.com/gakonst/ethers-rs/issues/1941)) +- Add infura error code to retry detection ([#1921](https://github.com/gakonst/ethers-rs/issues/1921)) +- Impl Serialize for Chain ([#1917](https://github.com/gakonst/ethers-rs/issues/1917)) +- Providererror conversion to middleware error ([#1920](https://github.com/gakonst/ethers-rs/issues/1920)) +- Add a subset of admin namespace ([#1880](https://github.com/gakonst/ethers-rs/issues/1880)) +- Chain impls and refactoring ([#1909](https://github.com/gakonst/ethers-rs/issues/1909)) +- Check for serde error with missing req id ([#1910](https://github.com/gakonst/ethers-rs/issues/1910)) -- add `EthAbiCodec` proc macro to derive `AbiEncode` `AbiDecode` implementation - [#704](https://github.com/gakonst/ethers-rs/pull/704) -- move `AbiEncode` `AbiDecode` trait to ethers-core and implement for core types - [#531](https://github.com/gakonst/ethers-rs/pull/531) -- Add EIP-712 `sign_typed_data` signer method; add ethers-core type `Eip712` - trait and derive macro in ethers-derive-eip712 - [#481](https://github.com/gakonst/ethers-rs/pull/481) +### Miscellaneous Tasks -### 0.5.3 +- Make clippy happy ([#2264](https://github.com/gakonst/ethers-rs/issues/2264)) +- Allow clippy false positive ([#2259](https://github.com/gakonst/ethers-rs/issues/2259)) +- Add more cache traces ([#2248](https://github.com/gakonst/ethers-rs/issues/2248)) +- Add some docs and impl debug ([#2219](https://github.com/gakonst/ethers-rs/issues/2219)) +- Replace rpc urls with generic ones ([#2199](https://github.com/gakonst/ethers-rs/issues/2199)) +- Move etherscan api key env var matching to Chain enum ([#2204](https://github.com/gakonst/ethers-rs/issues/2204)) +- Top-up testnet wallets +- Added canto network ([#2171](https://github.com/gakonst/ethers-rs/issues/2171)) +- Add .git-blame-ignore-revs ([#2157](https://github.com/gakonst/ethers-rs/issues/2157)) +- Remove unused generic +- Use arbiscan urls for arbitrum goerli ([#2127](https://github.com/gakonst/ethers-rs/issues/2127)) +- Add etherscan page not found error ([#2126](https://github.com/gakonst/ethers-rs/issues/2126)) +- Fix bare urls in abigen ([#2133](https://github.com/gakonst/ethers-rs/issues/2133)) +- Add convenient from impls ([#2112](https://github.com/gakonst/ethers-rs/issues/2112)) +- Add cloudflare captcha error ([#2116](https://github.com/gakonst/ethers-rs/issues/2116)) +- Fix custom provider example +- Fix ci +- Fix clippy ([#2059](https://github.com/gakonst/ethers-rs/issues/2059)) +- Do not expose util module +- Derive default for enums +- Clippy ([#2032](https://github.com/gakonst/ethers-rs/issues/2032)) +- Alias&export error as ParseChainError ([#2022](https://github.com/gakonst/ethers-rs/issues/2022)) +- Update all rust editions to 2021 ([#1979](https://github.com/gakonst/ethers-rs/issues/1979)) +- Clippy ([#1990](https://github.com/gakonst/ethers-rs/issues/1990)) +- Clippy +- Gitignore .pre-commit-config.yaml ([#1973](https://github.com/gakonst/ethers-rs/issues/1973)) +- Rm broken pre commit yaml ([#1972](https://github.com/gakonst/ethers-rs/issues/1972)) +- Make clippy happy ([#1923](https://github.com/gakonst/ethers-rs/issues/1923)) +- Generate selector as hex in docs ([#1924](https://github.com/gakonst/ethers-rs/issues/1924)) -- Allow configuring the optimizer & passing arbitrary arguments to solc - [#427](https://github.com/gakonst/ethers-rs/pull/427) -- Decimal support for `ethers_core::utils::parse_units` - [#463](https://github.com/gakonst/ethers-rs/pull/463) -- Fixed Wei unit calculation in `Units` - [#460](https://github.com/gakonst/ethers-rs/pull/460) -- Add `ethers_core::utils::get_create2_address_from_hash` - [#444](https://github.com/gakonst/ethers-rs/pull/444) -- Bumped ethabi to 0.15.0 and fixing breaking changes - [#469](https://github.com/gakonst/ethers-rs/pull/469), - [#448](https://github.com/gakonst/ethers-rs/pull/448), - [#445](https://github.com/gakonst/ethers-rs/pull/445) +### Other -### 0.5.2 +- Fix logical errors in doc comments for is_negative and is_zero ([#2218](https://github.com/gakonst/ethers-rs/issues/2218)) +- Solang-parser 0.2.3 ([#2229](https://github.com/gakonst/ethers-rs/issues/2229)) +- Reconnection & Request Reissuance ([#2181](https://github.com/gakonst/ethers-rs/issues/2181)) +- // to https:// on Celo link ([#2193](https://github.com/gakonst/ethers-rs/issues/2193)) +- Workaround for https://github.com/LedgerHQ/app-ethereum/issues/409 ([#2192](https://github.com/gakonst/ethers-rs/issues/2192)) +- Organize ethers-providers ([#2159](https://github.com/gakonst/ethers-rs/issues/2159)) +- Include deployed bytecode in abigen output ([#2163](https://github.com/gakonst/ethers-rs/issues/2163)) +- Use Option for CliqueConfig fields ([#2162](https://github.com/gakonst/ethers-rs/issues/2162)) +- Prestwich/event no lifetime ([#2105](https://github.com/gakonst/ethers-rs/issues/2105)) +- Extend model checker options ([#2147](https://github.com/gakonst/ethers-rs/issues/2147)) +- Add human readable ABI example in documentation ([#2148](https://github.com/gakonst/ethers-rs/issues/2148)) +- Allow upper case acronyms lint ([#2128](https://github.com/gakonst/ethers-rs/issues/2128)) +- Use pascal casing for type names in structs generated by abigen ([#2130](https://github.com/gakonst/ethers-rs/issues/2130)) +- Solang-parser 0.2.2 ([#2135](https://github.com/gakonst/ethers-rs/issues/2135)) +- Refactor factories to use `Borrow` ([#2103](https://github.com/gakonst/ethers-rs/issues/2103)) +- Book - Providers Chapter ([#2023](https://github.com/gakonst/ethers-rs/issues/2023)) +- Remove EthAbiType derive generated unwrap ([#2056](https://github.com/gakonst/ethers-rs/issues/2056)) +- Book - Middleware Chapter ([#2033](https://github.com/gakonst/ethers-rs/issues/2033)) +- Fix deserializing contract creation NormalTransaction objects ([#2029](https://github.com/gakonst/ethers-rs/issues/2029)) +- Mx - CI - mdbook addons - admonition(callouts) and mermaid (code driven diagrams) with example implementation ([#2025](https://github.com/gakonst/ethers-rs/issues/2025)) +- Disable native-tls on rusoto ([#2021](https://github.com/gakonst/ethers-rs/issues/2021)) +- Fix nonce manager test ([#2014](https://github.com/gakonst/ethers-rs/issues/2014)) +- Remove current nonce load when initialized ([#2013](https://github.com/gakonst/ethers-rs/issues/2013)) +- Abigen adopt hardhat generated bytecode ([#2012](https://github.com/gakonst/ethers-rs/issues/2012)) +- Build/deploy book +- Delete book.yml +- Mdbook ([#2003](https://github.com/gakonst/ethers-rs/issues/2003)) +- Sighash on the inner/updated tx object ([#1977](https://github.com/gakonst/ethers-rs/issues/1977)) +- Added `from_bytes` for `Wallet` type ([#1983](https://github.com/gakonst/ethers-rs/issues/1983)) +- (docs): add clippy command ([#1967](https://github.com/gakonst/ethers-rs/issues/1967)) +- Init devenv, gitignore .nlsp-settings ([#1942](https://github.com/gakonst/ethers-rs/issues/1942)) +- Added new checkbox to the PR checklist ([#1937](https://github.com/gakonst/ethers-rs/issues/1937)) +- Added new line were missing ([#1928](https://github.com/gakonst/ethers-rs/issues/1928)) +- Fix Dead Link to abigen test in README ([#1929](https://github.com/gakonst/ethers-rs/issues/1929)) +- Change awsSigner to own kmsclient ([#1922](https://github.com/gakonst/ethers-rs/issues/1922)) +- Middleware library ([#1912](https://github.com/gakonst/ethers-rs/issues/1912)) -- Correctly RLP Encode transactions as received from the mempool - ([#415](https://github.com/gakonst/ethers-rs/pull/415)) +### Performance -## ethers-providers +- Wrap source content in Arc ([#2138](https://github.com/gakonst/ethers-rs/issues/2138)) +- Avoid unnecessary allocations ([#2046](https://github.com/gakonst/ethers-rs/issues/2046)) -### Unreleased +### Refactor -- Breaking: WS now includes reconnection logic and a changed `connect` - interface. Old behavior can be accessed via the `legacy_ws` feature - [#2181](https://github.com/gakonst/ethers-rs/pull/2181) -- Re-organize the crate. #[2150](https://github.com/gakonst/ethers-rs/pull/2159) -- Convert provider errors to arbitrary middleware errors - [#1920](https://github.com/gakonst/ethers-rs/pull/1920) -- Add a subset of the `admin` namespace - [1880](https://github.com/gakonst/ethers-rs/pull/1880) -- Return String for net version - [1376](https://github.com/gakonst/ethers-rs/pull/1376) -- Stream of paginated logs that load logs in small pages - [1285](https://github.com/gakonst/ethers-rs/pull/1285) -- Load previous logs before subscribing to new logs in case fromBlock is set - [1264](https://github.com/gakonst/ethers-rs/pull/1264) -- Add retries to the pending transaction future - [1221](https://github.com/gakonst/ethers-rs/pull/1221) -- Add support for basic and bearer authentication in http and non-wasm websockets. - [829](https://github.com/gakonst/ethers-rs/pull/829) -- Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` - [1012](https://github.com/gakonst/ethers-rs/pull/1012) +- Keep and use parsed spans ([#2247](https://github.com/gakonst/ethers-rs/issues/2247)) +- Derives, struct expansion ([#2160](https://github.com/gakonst/ethers-rs/issues/2160)) +- Derive procedural macros ([#2152](https://github.com/gakonst/ethers-rs/issues/2152)) +- Solidity types expansion ([#2131](https://github.com/gakonst/ethers-rs/issues/2131)) +- Make contract abstract over Borrow ([#2082](https://github.com/gakonst/ethers-rs/issues/2082)) +- Inline docs ([#2090](https://github.com/gakonst/ethers-rs/issues/2090)) +- Add bytes::Bytes static methods, refactor struct declaration ([#2089](https://github.com/gakonst/ethers-rs/issues/2089)) +- Source ([#2016](https://github.com/gakonst/ethers-rs/issues/2016)) +- Abigen, ContractBindings ([#2019](https://github.com/gakonst/ethers-rs/issues/2019)) -### 0.6.0 +### Styling -- re-export error types for `Http` and `Ws` providers in - [#570](https://github.com/gakonst/ethers-rs/pull/570) -- add a method on the `Middleware` to broadcast a tx with a series of escalating - gas prices via [#566](https://github.com/gakonst/ethers-rs/pull/566) -- Remove unnecessary `Serialize` constraint to `R` (the Response type) in the - `request` method of `JsonRpcClient`. -- Fix `http Provider` data race when generating new request `id`s. -- Add support for `net_version` RPC method. - [595](https://github.com/gakonst/ethers-rs/pull/595) -- Add support for `evm_snapshot` and `evm_revert` dev RPC methods. - [640](https://github.com/gakonst/ethers-rs/pull/640) +- Fix fmt from master +- Expose contract revert errors in the ContractError struct ([#2172](https://github.com/gakonst/ethers-rs/issues/2172)) +- Run rustfmt ([#2176](https://github.com/gakonst/ethers-rs/issues/2176)) +- Fmt +- Fmt +- Make ContractCall IntoFuture implement Send ([#2083](https://github.com/gakonst/ethers-rs/issues/2083)) +- Fix to round-trip serialize and deserialize optional address ([#2057](https://github.com/gakonst/ethers-rs/issues/2057)) +- Use sepolia ([#1989](https://github.com/gakonst/ethers-rs/issues/1989)) +- Add celo chain ([#1932](https://github.com/gakonst/ethers-rs/issues/1932)) +- Handle panic on Ws error ([#1915](https://github.com/gakonst/ethers-rs/issues/1915)) +- Feat middleware stack builder ([#1890](https://github.com/gakonst/ethers-rs/issues/1890)) -### 0.5.3 +### Testing -- Expose `ens` module [#435](https://github.com/gakonst/ethers-rs/pull/435) -- Add `eth_getProof` [#459](https://github.com/gakonst/ethers-rs/pull/459) +- Simplify test cleanup ([#2220](https://github.com/gakonst/ethers-rs/issues/2220)) +- Add parse pk test ([#2194](https://github.com/gakonst/ethers-rs/issues/2194)) +- Disable signer integration tests temporarily -### 0.5.2 +## [1.0.2] - 2022-11-27 -- Set resolved ENS name during gas estimation - ([1e5a9e](https://github.com/gakonst/ethers-rs/commit/1e5a9efb3c678eecd43d5c341b4932da35445831)) +### Bug Fixes -## ethers-signers +- Format_units overflow ([#1894](https://github.com/gakonst/ethers-rs/issues/1894)) +- Close example subscriptions after 2 emitted items ([#1892](https://github.com/gakonst/ethers-rs/issues/1892)) +- Handle non existing Cargo.toml edge case ([#1886](https://github.com/gakonst/ethers-rs/issues/1886)) +- Mock ethers mod layout ([#1884](https://github.com/gakonst/ethers-rs/issues/1884)) +- Make compatible with older rust versions ([#1868](https://github.com/gakonst/ethers-rs/issues/1868)) +- Generated crate not using generated version ([#1852](https://github.com/gakonst/ethers-rs/issues/1852)) +- Updated logs event filtering for examples with new syntax ([#1861](https://github.com/gakonst/ethers-rs/issues/1861)) +- Better retry timing ([#1855](https://github.com/gakonst/ethers-rs/issues/1855)) +- Improve overloaded param diff matching ([#1853](https://github.com/gakonst/ethers-rs/issues/1853)) +- Disable futures-locks tokio feature ([#1854](https://github.com/gakonst/ethers-rs/issues/1854)) +- Broken regex ([#1851](https://github.com/gakonst/ethers-rs/issues/1851)) +- Stop decoding gas twice for 2930 txs ([#1850](https://github.com/gakonst/ethers-rs/issues/1850)) +- Failing CI ([#1847](https://github.com/gakonst/ethers-rs/issues/1847)) +- Transaction type in TxpoolContent ([#1844](https://github.com/gakonst/ethers-rs/issues/1844)) +- Rustdoc errors ([#1808](https://github.com/gakonst/ethers-rs/issues/1808)) +- Get_logs_paginated fetches past latest block ([#1818](https://github.com/gakonst/ethers-rs/issues/1818)) +- Fix Build issue ([#1819](https://github.com/gakonst/ethers-rs/issues/1819)) -### Unreleased +### Depedencies -- fix: `LedgerSigner` has improved tracing and a ledger app bug mitigation - [#2192](https://github.com/gakonst/ethers-rs/pull/2192) -- `eth-keystore-rs` crate updated. Allow an optional name for the to-be-generated - keystore file [#910](https://github.com/gakonst/ethers-rs/pull/910) -- [1983](https://github.com/gakonst/ethers-rs/pull/1983) Added a `from_bytes` function for the `Wallet` type. -- Allow parsing of private key that has `0x` prefix - [#2037](https://github.com/gakonst/ethers-rs/pull/2037) +- Bump env_logger from 0.9.3 to 0.10.0 ([#1891](https://github.com/gakonst/ethers-rs/issues/1891)) +- Bump cargo_metadata from 0.15.1 to 0.15.2 ([#1878](https://github.com/gakonst/ethers-rs/issues/1878)) +- Bump serde-aux from 4.1.0 to 4.1.2 ([#1874](https://github.com/gakonst/ethers-rs/issues/1874)) +- Bump rayon from 1.5.3 to 1.6.0 ([#1875](https://github.com/gakonst/ethers-rs/issues/1875)) +- Bump bytes from 1.2.1 to 1.3.0 ([#1879](https://github.com/gakonst/ethers-rs/issues/1879)) +- Bump trezor, fix clippy ([#1871](https://github.com/gakonst/ethers-rs/issues/1871)) +- Bump open-fastrlp +- Bump ethabi from 17.2.0 to 18.0.0 ([#1865](https://github.com/gakonst/ethers-rs/issues/1865)) +- Bump reqwest from 0.11.12 to 0.11.13 ([#1866](https://github.com/gakonst/ethers-rs/issues/1866)) +- Bump serde-aux from 4.0.0 to 4.1.0 ([#1846](https://github.com/gakonst/ethers-rs/issues/1846)) +- Bump cargo_metadata from 0.15.0 to 0.15.1 ([#1806](https://github.com/gakonst/ethers-rs/issues/1806)) +- Bump regex from 1.6.0 to 1.7.0 ([#1841](https://github.com/gakonst/ethers-rs/issues/1841)) +- Bump env_logger from 0.9.1 to 0.9.3 ([#1842](https://github.com/gakonst/ethers-rs/issues/1842)) +- Bump once_cell from 1.15.0 to 1.16.0 ([#1817](https://github.com/gakonst/ethers-rs/issues/1817)) +- Bump rlp from 0.5.1 to 0.5.2 ([#1805](https://github.com/gakonst/ethers-rs/issues/1805)) +- Bump base64 from 0.13.0 to 0.13.1 ([#1804](https://github.com/gakonst/ethers-rs/issues/1804)) +- Bump num_cpus from 1.13.1 to 1.14.0 ([#1831](https://github.com/gakonst/ethers-rs/issues/1831)) -### 0.6.0 +### Features -- `LocalWallet::new_keystore` now returns a tuple `(LocalWallet, String)` - instead of `LocalWallet`, where the string represents the UUID of the newly - created encrypted JSON keystore. The JSON keystore is stored as a file - `/dir/uuid`. The issue [#557](https://github.com/gakonst/ethers-rs/issues/557) - is addressed [#559](https://github.com/gakonst/ethers-rs/pull/559) +- Retry client wasm support ([#1877](https://github.com/gakonst/ethers-rs/issues/1877)) +- Instantiate an event builder without a contract instance ([#1882](https://github.com/gakonst/ethers-rs/issues/1882)) +- Add another rate limit retry check ([#1881](https://github.com/gakonst/ethers-rs/issues/1881)) +- Warnings as errors ([#1838](https://github.com/gakonst/ethers-rs/issues/1838)) +- Add TraceError enum ([#1814](https://github.com/gakonst/ethers-rs/issues/1814)) -## ethers-contract +### Miscellaneous Tasks -### Unreleased +- Pin env-logger +- Make clippy happy ([#1888](https://github.com/gakonst/ethers-rs/issues/1888)) +- Add missing ParseUnit impls ([#1885](https://github.com/gakonst/ethers-rs/issues/1885)) +- Make clippy happy ([#1856](https://github.com/gakonst/ethers-rs/issues/1856)) +- Always use sync sources reading ([#1667](https://github.com/gakonst/ethers-rs/issues/1667)) +- Rename xdai gnosis ([#1809](https://github.com/gakonst/ethers-rs/issues/1809)) +- Update readme -- (Breaking) Add `Revert` to `ContractError`. Add `impl EthError for String`. - Modify existing `ContractError` variants to prevent accidental improper - usage. Change `MulticallError` to use `ContractError::Revert`. Add - convenience methods to decode errors from reverts. - [#2172](https://github.com/gakonst/ethers-rs/pull/2172) -- (Breaking) Improve Multicall result handling - [#2164](https://github.com/gakonst/ethers-rs/pull/2105) -- (Breaking) Make `Event` objects generic over borrow & remove lifetime - [#2105](https://github.com/gakonst/ethers-rs/pull/2105) -- Make `Factory` objects generic over the borrow trait, to allow non-arc mware - [#2103](https://github.com/gakonst/ethers-rs/pull/2103) -- Make `Contract` objects generic over the borrow trait, to allow non-arc mware - [#2082](https://github.com/gakonst/ethers-rs/pull/2082) -- Return pending transaction from `Multicall::send` - [#2044](https://github.com/gakonst/ethers-rs/pull/2044) -- Add abigen to default features - [#1684](https://github.com/gakonst/ethers-rs/pull/1684) -- Add extra Multicall helper methods - [#1666](https://github.com/gakonst/ethers-rs/pull/1666) -- Update Multicall to Multicall3 - [#1584](https://github.com/gakonst/ethers-rs/pull/1584) -- Add `Event::stream_with_meta` and `Event::subscribe_with_meta` - [#1483](https://github.com/gakonst/ethers-rs/pull/1483) -- Added tx builder methods to `ContractFactory` - [#1289](https://github.com/gakonst/ethers-rs/pull/1289) -- Relax Clone requirements when Arc is used - [#1183](https://github.com/gakonst/ethers-rs/pull/1183) -- Add `EventStream::select` to combine streams with different event types - [#725](https://github.com/gakonst/ethers-rs/pull/725) -- Substitute output tuples with rust struct types for function calls - [#664](https://github.com/gakonst/ethers-rs/pull/664) -- Add AbiType implementation during EthAbiType expansion - [#647](https://github.com/gakonst/ethers-rs/pull/647) -- fix Etherscan conditional HTTP support - [#632](https://github.com/gakonst/ethers-rs/pull/632) -- use `CARGO_MANIFEST_DIR` as root for relative paths in abigen - [#631](https://github.com/gakonst/ethers-rs/pull/631) +### Other -### 0.6.0 +- Get gas price in USD using a Chainlink oracle ([#1872](https://github.com/gakonst/ethers-rs/issues/1872)) +- Use cwd manifest ([#1869](https://github.com/gakonst/ethers-rs/issues/1869)) +- Rust already exists on the platform - update it instead ([#1864](https://github.com/gakonst/ethers-rs/issues/1864)) +- I256 parse support ([#1863](https://github.com/gakonst/ethers-rs/issues/1863)) +- Add `op` field to `VMOperation` to determine executed opcode ([#1858](https://github.com/gakonst/ethers-rs/issues/1858)) +- I256 asr doc ([#1860](https://github.com/gakonst/ethers-rs/issues/1860)) +- Add Arithmetic Shift Left operation for I256. Minor update to the ASR tests to include coverage for a shift of 0, and move to 'I256::minus_one' over 'I256::from(-1i8)' syntax ([#1452](https://github.com/gakonst/ethers-rs/issues/1452)) +- Revert "fix: get_logs_paginated fetches past latest block ([#1818](https://github.com/gakonst/ethers-rs/issues/1818))" ([#1845](https://github.com/gakonst/ethers-rs/issues/1845)) +- Move Event into scope for rustdoc Fixes #1676 ([#1787](https://github.com/gakonst/ethers-rs/issues/1787)) +- Add doc CI ([#1813](https://github.com/gakonst/ethers-rs/issues/1813)) +- Minor typo ([#1794](https://github.com/gakonst/ethers-rs/issues/1794)) +- #1822 ([#1823](https://github.com/gakonst/ethers-rs/issues/1823)) +- Enhance signer middleware to automatically switch legacy ([#1832](https://github.com/gakonst/ethers-rs/issues/1832)) +- #1836 ([#1837](https://github.com/gakonst/ethers-rs/issues/1837)) +- Impl `IntoFuture` for `ContractCall` ([#1826](https://github.com/gakonst/ethers-rs/issues/1826)) +- Adding chiado support ([#1811](https://github.com/gakonst/ethers-rs/issues/1811)) -- Provide a way to opt out of networking support in abigen proc macro with - `abigen-offline` feature [#580](https://github.com/gakonst/ethers-rs/pull/580) -- Add `.call()` method to `Deployer` for performing dry runs of contract - deployments. [#554](https://github.com/gakonst/ethers-rs/pull/554) -- Improve error message from failure in `ethers_contract_abigen::Source::parse` - [#552](https://github.com/gakonst/ethers-rs/pull/552) -- use enumerated aliases for overloaded functions - [#545](https://github.com/gakonst/ethers-rs/pull/545) -- add `EthCall` trait and derive macro which generates matching structs for - contract calls [#517](https://github.com/gakonst/ethers-rs/pull/517) -- Use rust types as contract function inputs for human readable abi - [#482](https://github.com/gakonst/ethers-rs/pull/482) -- `abigen!` now generates `Display` for all events using the new `EthDisplay` - macro [#513](https://github.com/gakonst/ethers-rs/pull/513) -- `abigen!` now supports overloaded functions natively - [#501](https://github.com/gakonst/ethers-rs/pull/501) -- `abigen!` now supports multiple contracts - [#498](https://github.com/gakonst/ethers-rs/pull/498) +### Styling -### Unreleased +- Fmt / clippy +- Clippy ([#1812](https://github.com/gakonst/ethers-rs/issues/1812)) +- Examples event streams ([#1839](https://github.com/gakonst/ethers-rs/issues/1839)) -### 0.5.3 +## [1.0] - 2022-10-25 -- (De)Tokenize structs and events with only a single field as `Token:Tuple` - ([#417](https://github.com/gakonst/ethers-rs/pull/417)) +### Bug Fixes -## ethers-middleware +- Emit empty node vec ([#1793](https://github.com/gakonst/ethers-rs/issues/1793)) +- Handle absolute paths properly on conflict ([#1784](https://github.com/gakonst/ethers-rs/issues/1784)) +- Impl default manually for mock project ([#1779](https://github.com/gakonst/ethers-rs/issues/1779)) +- Remove trailing test,script markers ([#1776](https://github.com/gakonst/ethers-rs/issues/1776)) +- Skip json abi formatting ([#1777](https://github.com/gakonst/ethers-rs/issues/1777)) +- RawAbi and Abi ([#1757](https://github.com/gakonst/ethers-rs/issues/1757)) +- Support eip712 domain chain ids as string ([#1756](https://github.com/gakonst/ethers-rs/issues/1756)) +- Use empty bytecode as default instead unlinked ([#1743](https://github.com/gakonst/ethers-rs/issues/1743)) +- Transaction object rlp decoding ([#1740](https://github.com/gakonst/ethers-rs/issues/1740)) +- Use correct tx field const ([#1735](https://github.com/gakonst/ethers-rs/issues/1735)) +- Legacy signed rlp decoding ([#1733](https://github.com/gakonst/ethers-rs/issues/1733)) +- Cyclic deps ([#1730](https://github.com/gakonst/ethers-rs/issues/1730)) +- Relax Middleware trait bound for getters ([#1728](https://github.com/gakonst/ethers-rs/issues/1728)) +- WASM example ([#1719](https://github.com/gakonst/ethers-rs/issues/1719)) +- Don't default to "latest" block ID for `eth_estimateGas` ([#1657](https://github.com/gakonst/ethers-rs/issues/1657)) +- GethTrace shouldn't have 0x prefix for return_value ([#1705](https://github.com/gakonst/ethers-rs/issues/1705)) +- Remove default include paths ([#1691](https://github.com/gakonst/ethers-rs/issues/1691)) +- Geth structlog memory ([#1690](https://github.com/gakonst/ethers-rs/issues/1690)) +- Geth trace types ([#1682](https://github.com/gakonst/ethers-rs/issues/1682)) +- Add derives, impls for Units ([#1683](https://github.com/gakonst/ethers-rs/issues/1683)) +- Legacy transaction rlp decoding ([#1672](https://github.com/gakonst/ethers-rs/issues/1672)) +- Via-ir should be optional ([#1664](https://github.com/gakonst/ethers-rs/issues/1664)) +- Incorrect encoding on TransactionReceipt ([#1661](https://github.com/gakonst/ethers-rs/issues/1661)) +- Emit null transaction fields ([#1654](https://github.com/gakonst/ethers-rs/issues/1654)) +- Only derive default of no arrays len > 32 ([#1653](https://github.com/gakonst/ethers-rs/issues/1653)) +- Use correct model for metadata libraries ([#1648](https://github.com/gakonst/ethers-rs/issues/1648)) +- Set chain id explicitly ([#1647](https://github.com/gakonst/ethers-rs/issues/1647)) +- Dont skip null to field ([#1631](https://github.com/gakonst/ethers-rs/issues/1631)) +- QuorumProvider zero-parameter json Value handling ([#1613](https://github.com/gakonst/ethers-rs/issues/1613)) +- Handle provider error correctly ([#1630](https://github.com/gakonst/ethers-rs/issues/1630)) +- Clarify Geth trace structs ([#1626](https://github.com/gakonst/ethers-rs/issues/1626)) +- Consider case sensitive conflicting artifact paths ([#1625](https://github.com/gakonst/ethers-rs/issues/1625)) +- Extend eth_syncing response type and serde ([#1624](https://github.com/gakonst/ethers-rs/issues/1624)) +- Use cache context when determining artifact files ([#1621](https://github.com/gakonst/ethers-rs/issues/1621)) +- Support formatting large units ([#1608](https://github.com/gakonst/ethers-rs/issues/1608)) +- Sanitize absolute paths from etherscan ([#1603](https://github.com/gakonst/ethers-rs/issues/1603)) +- Deserialize a Filter request with `topics == null` ([#1604](https://github.com/gakonst/ethers-rs/issues/1604)) +- Validate address resolver ([#1605](https://github.com/gakonst/ethers-rs/issues/1605)) +- Ensure base-path is not include-path ([#1596](https://github.com/gakonst/ethers-rs/issues/1596)) +- Strip .sol suffix ([#1583](https://github.com/gakonst/ethers-rs/issues/1583)) +- Typo on README.md ([#1571](https://github.com/gakonst/ethers-rs/issues/1571)) +- Use correct str Regex ([#1566](https://github.com/gakonst/ethers-rs/issues/1566)) +- Use correct moonbeam ([#1552](https://github.com/gakonst/ethers-rs/issues/1552)) +- Convert source paths on windows ([#1540](https://github.com/gakonst/ethers-rs/issues/1540)) +- Resolve output struct types correctly ([#1546](https://github.com/gakonst/ethers-rs/issues/1546)) +- Add missing moonbase fromstr ([#1531](https://github.com/gakonst/ethers-rs/issues/1531)) +- Support stringified numbers in response ([#1524](https://github.com/gakonst/ethers-rs/issues/1524)) +- Use fully qualified path for Result ([#1527](https://github.com/gakonst/ethers-rs/issues/1527)) +- Make compatible with edition2018 ([#1522](https://github.com/gakonst/ethers-rs/issues/1522)) +- Deserialize sealfields with default ([#1520](https://github.com/gakonst/ethers-rs/issues/1520)) +- Abigen feature required for bindings ([#1508](https://github.com/gakonst/ethers-rs/issues/1508)) +- Make StorageLayout json parsing lossless ([#1515](https://github.com/gakonst/ethers-rs/issues/1515)) +- Only run tracing example if env var is set ([#1517](https://github.com/gakonst/ethers-rs/issues/1517)) +- Use correct model for txpool_content endpoint ([#1501](https://github.com/gakonst/ethers-rs/issues/1501)) +- Contract names can be reserve words ([#1498](https://github.com/gakonst/ethers-rs/issues/1498)) +- Improve argument parsing ([#1485](https://github.com/gakonst/ethers-rs/issues/1485)) +- Parse constructor as function ([#1479](https://github.com/gakonst/ethers-rs/issues/1479)) +- Handle zst params in retry provider correctly ([#1481](https://github.com/gakonst/ethers-rs/issues/1481)) +- Fix unused warning ([#1477](https://github.com/gakonst/ethers-rs/issues/1477)) +- Serialize metadata as raw string ([#1474](https://github.com/gakonst/ethers-rs/issues/1474)) +- Use path slash for remapping display on windows ([#1454](https://github.com/gakonst/ethers-rs/issues/1454)) +- Apply base path to model checker contracts ([#1437](https://github.com/gakonst/ethers-rs/issues/1437)) +- Remove 0x bytecode object prefix for CompilerOutput ([#1424](https://github.com/gakonst/ethers-rs/issues/1424)) +- Remove redundant index adjustment for many overloads ([#1419](https://github.com/gakonst/ethers-rs/issues/1419)) +- Add missing chain id match arms ([#1411](https://github.com/gakonst/ethers-rs/issues/1411)) +- Use abi signature attribute if provided ([#1409](https://github.com/gakonst/ethers-rs/issues/1409)) +- Use signer chain when tx is None ([#1377](https://github.com/gakonst/ethers-rs/issues/1377)) +- Net_version returns string ([#1376](https://github.com/gakonst/ethers-rs/issues/1376)) +- ChainId 31337 corresponds to Anvil/Hardhat not Dev +- Fix fields for `UserDoc` and `DevDoc` ([#1355](https://github.com/gakonst/ethers-rs/issues/1355)) +- `Transfered` -> `Transferred* ([#1357](https://github.com/gakonst/ethers-rs/issues/1357)) +- Emit empty vec for empty artifacts ([#1345](https://github.com/gakonst/ethers-rs/issues/1345)) +- Invalidate cache on unresolve error ([#1337](https://github.com/gakonst/ethers-rs/issues/1337)) +- Wrong unit for gas_price (ether -> gwei) ([#1316](https://github.com/gakonst/ethers-rs/issues/1316)) +- Improve remappings autodetection ([#1335](https://github.com/gakonst/ethers-rs/issues/1335)) +- Remove compile_exact restriction ([#1329](https://github.com/gakonst/ethers-rs/issues/1329)) +- Non-snake-case modules out of order ([#1331](https://github.com/gakonst/ethers-rs/issues/1331)) +- Use decimal crate for parsing units ([#1330](https://github.com/gakonst/ethers-rs/issues/1330)) +- Emit empty bytecode objects for standalone sol files ([#1327](https://github.com/gakonst/ethers-rs/issues/1327)) +- Improve contract metadata bindings ([#1326](https://github.com/gakonst/ethers-rs/issues/1326)) +- Clippy warnings on solidity bindings ([#1319](https://github.com/gakonst/ethers-rs/issues/1319)) +- Aws eip712 does not use eip155 ([#1309](https://github.com/gakonst/ethers-rs/issues/1309)) +- Use wallet chainid for tx signing ([#1308](https://github.com/gakonst/ethers-rs/issues/1308)) +- Correctly serialize TxPoolInspectSummary ([#1305](https://github.com/gakonst/ethers-rs/issues/1305)) +- Remove viaIR for older versions ([#1304](https://github.com/gakonst/ethers-rs/issues/1304)) +- Flatten random statement order ([#1292](https://github.com/gakonst/ethers-rs/issues/1292)) +- Support constructor user docs ([#1283](https://github.com/gakonst/ethers-rs/issues/1283)) +- Serialize eth_getStorageAt position param as quantity ([#1281](https://github.com/gakonst/ethers-rs/issues/1281)) +- Follow symlinks in source files ([#1277](https://github.com/gakonst/ethers-rs/issues/1277)) +- Purge obsolete cached artifacts ([#1273](https://github.com/gakonst/ethers-rs/issues/1273)) +- On pending block `miner` field is always `null` ([#1272](https://github.com/gakonst/ethers-rs/issues/1272)) +- Unify name of supported chains with strum ([#1249](https://github.com/gakonst/ethers-rs/issues/1249)) +- Output methodIdentifiers by default ([#1266](https://github.com/gakonst/ethers-rs/issues/1266)) +- All request ids start at 1 ([#1265](https://github.com/gakonst/ethers-rs/issues/1265)) +- Add `RuntimeOrHandle` & fix solc blocking installation ([#1260](https://github.com/gakonst/ethers-rs/issues/1260)) +- Make ast node ids optional ([#1254](https://github.com/gakonst/ethers-rs/issues/1254)) +- Filter out empty bytecode ([#1248](https://github.com/gakonst/ethers-rs/issues/1248)) +- Removed Cronos mainnet beta from `is_legacy` ([#1246](https://github.com/gakonst/ethers-rs/issues/1246)) +- Respect auto detection in additional compile functions ([#1226](https://github.com/gakonst/ethers-rs/issues/1226)) +- Flatten import aliases ([#1192](https://github.com/gakonst/ethers-rs/issues/1192)) +- Make scoped reporter work in parallel ([#1214](https://github.com/gakonst/ethers-rs/issues/1214)) +- Ensure std json sources are unique ([#1210](https://github.com/gakonst/ethers-rs/issues/1210)) +- Pass tx with chain by ref +- Fixed typo when determining to token address ([#1208](https://github.com/gakonst/ethers-rs/issues/1208)) +- Remapping aware libraries ([#1190](https://github.com/gakonst/ethers-rs/issues/1190)) +- Use correct empty output selection ([#1185](https://github.com/gakonst/ethers-rs/issues/1185)) +- Add to and from into the transaction receipt to follow spec ([#1184](https://github.com/gakonst/ethers-rs/issues/1184)) +- Decode `from` field for typed transactions ([#1180](https://github.com/gakonst/ethers-rs/issues/1180)) +- When compiler-out metadata is empty and there's no `internalType` ([#1182](https://github.com/gakonst/ethers-rs/issues/1182)) +- Only write cache file if build was successful ([#1177](https://github.com/gakonst/ethers-rs/issues/1177)) +- Proper fantom api urls ([#1170](https://github.com/gakonst/ethers-rs/issues/1170)) +- Fix extra spacing ([#1149](https://github.com/gakonst/ethers-rs/issues/1149)) +- Support display for bytes ([#1148](https://github.com/gakonst/ethers-rs/issues/1148)) +- Normalize block if block = None ([#1146](https://github.com/gakonst/ethers-rs/issues/1146)) +- Compute content hashes first ([#1142](https://github.com/gakonst/ethers-rs/issues/1142)) +- Encode absent tx access_list correctly ([#1137](https://github.com/gakonst/ethers-rs/issues/1137)) +- Strip root path from remappings and sources for standard json ([#1136](https://github.com/gakonst/ethers-rs/issues/1136)) +- Correct etherscan url address, remove double quotes in solc error ([#1130](https://github.com/gakonst/ethers-rs/issues/1130)) +- Eth_feehistory reward is optional ([#1127](https://github.com/gakonst/ethers-rs/issues/1127)) +- Bump up svm ([#1129](https://github.com/gakonst/ethers-rs/issues/1129)) +- Fix deploy tx RLP decoding ([#1124](https://github.com/gakonst/ethers-rs/issues/1124)) +- Only notify about unresolved import once ([#1125](https://github.com/gakonst/ethers-rs/issues/1125)) +- Correctly check cache expiry ([#1114](https://github.com/gakonst/ethers-rs/issues/1114)) +- Sanitize compilerinput based on version ([#1111](https://github.com/gakonst/ethers-rs/issues/1111)) +- Extend sparse mode to linked references ([#1107](https://github.com/gakonst/ethers-rs/issues/1107)) +- Broken Etherscan URL Construction ([#1100](https://github.com/gakonst/ethers-rs/issues/1100)) +- Aws signer does not throw error on unnormalized sig ([#1099](https://github.com/gakonst/ethers-rs/issues/1099)) +- Bump svm-rs for lockfile + checksum adjustments +- Clippy before nightly ring regression +- Change abiarraytype trait bounds for tuple ([#1079](https://github.com/gakonst/ethers-rs/issues/1079)) +- Bundle new svm-solc feature ([#1071](https://github.com/gakonst/ethers-rs/issues/1071)) +- Remove debug print ([#1067](https://github.com/gakonst/ethers-rs/issues/1067)) +- Eip1559 gas price should be max_fee_per_gas ([#1062](https://github.com/gakonst/ethers-rs/issues/1062)) +- Check against ethers internal crate names ([#1060](https://github.com/gakonst/ethers-rs/issues/1060)) +- More sophisticated crate detection ([#1056](https://github.com/gakonst/ethers-rs/issues/1056)) +- Only modify files that are required to compile the project ([#1050](https://github.com/gakonst/ethers-rs/issues/1050)) +- Use lowercase when comparing paths ([#1041](https://github.com/gakonst/ethers-rs/issues/1041)) +- Adjust breaking changes and detect failures in ci ([#1040](https://github.com/gakonst/ethers-rs/issues/1040)) +- Don't evict cache entries with no artifacts ([#1035](https://github.com/gakonst/ethers-rs/issues/1035)) +- Trim constructor args ([#1024](https://github.com/gakonst/ethers-rs/issues/1024)) +- Use correct artifact api ([#1019](https://github.com/gakonst/ethers-rs/issues/1019)) +- Skip artifacts check for files without artifacts ([#1018](https://github.com/gakonst/ethers-rs/issues/1018)) +- Feature-gate TestProvider.ws fn +- Bump svm-rs for mac m1 solc installs +- Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` ([#1012](https://github.com/gakonst/ethers-rs/issues/1012)) +- Use svm-rs with fixed solc checksums +- Use correct types ([#1004](https://github.com/gakonst/ethers-rs/issues/1004)) +- Respect offline mode ([#1002](https://github.com/gakonst/ethers-rs/issues/1002)) +- Fix cache and allowed paths bug ([#998](https://github.com/gakonst/ethers-rs/issues/998)) +- Remove unnecessary indent ([#999](https://github.com/gakonst/ethers-rs/issues/999)) +- Safe ident field names ([#989](https://github.com/gakonst/ethers-rs/issues/989)) +- Bump solang and adjust breaking change +- Propogate gas limit with access list ([#901](https://github.com/gakonst/ethers-rs/issues/901)) +- Safe ident underscore followed by numeric ([#970](https://github.com/gakonst/ethers-rs/issues/970)) +- Support functions with different casing ([#972](https://github.com/gakonst/ethers-rs/issues/972)) +- Dont generate empty shared_types module ([#965](https://github.com/gakonst/ethers-rs/issues/965)) +- Make abigen work with ethers-solc and abiencoderv2 ([#952](https://github.com/gakonst/ethers-rs/issues/952)) +- Handle lossy ethabi generated abi structs ([#950](https://github.com/gakonst/ethers-rs/issues/950)) +- Consistent serde for linked and unlinked bytecode ([#948](https://github.com/gakonst/ethers-rs/issues/948)) +- Flatten import loc ([#946](https://github.com/gakonst/ethers-rs/issues/946)) +- Mimic hardhat import resolver when in node_modules ([#928](https://github.com/gakonst/ethers-rs/issues/928)) +- Off by one error finding version intersection ([#930](https://github.com/gakonst/ethers-rs/issues/930)) +- Add serde json to created crate +- Do not panic when run on non-cargo projects ([#918](https://github.com/gakonst/ethers-rs/issues/918)) +- Url params naming ([#911](https://github.com/gakonst/ethers-rs/issues/911)) +- Correctly deserialize eip1186 proof responses +- Add address field ([#899](https://github.com/gakonst/ethers-rs/issues/899)) +- Resolver and remapping auto detection bugs ([#893](https://github.com/gakonst/ethers-rs/issues/893)) +- Bump svm-rs to fix race condition on same version installs of solc +- Support remapping autodetection edge case ([#888](https://github.com/gakonst/ethers-rs/issues/888)) +- Bump svm-rs to support arm solc +- PendingTransaction::log() missing deref ([#886](https://github.com/gakonst/ethers-rs/issues/886)) +- Prevent chain_id from serializing for requests ([#879](https://github.com/gakonst/ethers-rs/issues/879)) +- Use nodesiter when printing tree ([#878](https://github.com/gakonst/ethers-rs/issues/878)) +- Bump ethers-solc version ([#864](https://github.com/gakonst/ethers-rs/issues/864)) +- Bump solang ([#861](https://github.com/gakonst/ethers-rs/issues/861)) +- Doc test for dev_rpc ([#857](https://github.com/gakonst/ethers-rs/issues/857)) +- Adjust Ganache for new cli output ([#851](https://github.com/gakonst/ethers-rs/issues/851)) +- Can parse secondary source locations ([#849](https://github.com/gakonst/ethers-rs/issues/849)) +- Flatten replacement target location ([#846](https://github.com/gakonst/ethers-rs/issues/846)) +- Use already instantiated tokio runtime if exists ([#811](https://github.com/gakonst/ethers-rs/issues/811)) +- Make http crate required ([#836](https://github.com/gakonst/ethers-rs/issues/836)) +- Duplicate contracts segments ([#832](https://github.com/gakonst/ethers-rs/issues/832)) +- Propagate deserialization errors upstream + infura quickfix ([#827](https://github.com/gakonst/ethers-rs/issues/827)) +- Derive serde Ser and De for log metadata ([#823](https://github.com/gakonst/ethers-rs/issues/823)) +- Flatten duplicates ([#813](https://github.com/gakonst/ethers-rs/issues/813)) +- Take installer lock before installing ([#801](https://github.com/gakonst/ethers-rs/issues/801)) +- Traverse nodes iteratively ([#800](https://github.com/gakonst/ethers-rs/issues/800)) +- Check for uint8 params in human readable types ([#789](https://github.com/gakonst/ethers-rs/issues/789)) +- Invalid cached artifacts ([#783](https://github.com/gakonst/ethers-rs/issues/783)) +- Allow cyclic imports ([#766](https://github.com/gakonst/ethers-rs/issues/766)) +- Add timeout and error detection for releases lookup ([#759](https://github.com/gakonst/ethers-rs/issues/759)) +- Contract with abi test ([#757](https://github.com/gakonst/ethers-rs/issues/757)) +- Methods is object ([#734](https://github.com/gakonst/ethers-rs/issues/734)) +- Make evm bytecode optional ([#735](https://github.com/gakonst/ethers-rs/issues/735)) +- Handle more remapping edge cases ([#719](https://github.com/gakonst/ethers-rs/issues/719)) +- Prefere dapptools style remappings ([#713](https://github.com/gakonst/ethers-rs/issues/713)) +- Use lib for parsing paths correctly in windows +- Use lib for parsing paths correctly in windows ([#712](https://github.com/gakonst/ethers-rs/issues/712)) +- Auto-enable asm when supported (x86/x64 and not msvc) ([#710](https://github.com/gakonst/ethers-rs/issues/710)) +- Configure rustls & openssl via feature flag ([#703](https://github.com/gakonst/ethers-rs/issues/703)) +- Rollback yanked futures versions +- Parse_units was generating an error on some values because of extra decimal places added round to prevent error ([#701](https://github.com/gakonst/ethers-rs/issues/701)) +- Contract creation on trezor ([#695](https://github.com/gakonst/ethers-rs/issues/695)) +- Avoid futures-util yanked err ([#693](https://github.com/gakonst/ethers-rs/issues/693)) +- Do not panic on invalid units conversion ([#691](https://github.com/gakonst/ethers-rs/issues/691)) +- Remove assert to check cache format ([#689](https://github.com/gakonst/ethers-rs/issues/689)) +- Fix handling empty tx parameters ([#686](https://github.com/gakonst/ethers-rs/issues/686)) +- Bump svm-rs for windows support ([#685](https://github.com/gakonst/ethers-rs/issues/685)) +- Exclude asm for msvc ([#679](https://github.com/gakonst/ethers-rs/issues/679)) +- Format_units return was truncating the decimal places if there were leading zeros ([#675](https://github.com/gakonst/ethers-rs/issues/675)) +- Skip 0x prefix for deserialize bytes decoding ([#671](https://github.com/gakonst/ethers-rs/issues/671)) +- Naming and default impl ([#665](https://github.com/gakonst/ethers-rs/issues/665)) +- Add allow paths ([#667](https://github.com/gakonst/ethers-rs/issues/667)) +- Nonce too low for different providers ([#655](https://github.com/gakonst/ethers-rs/issues/655)) +- Specify home-dep as non-wasm instead of x86-only ([#645](https://github.com/gakonst/ethers-rs/issues/645)) +- Ignore the websocket response when the request has been cancelled. ([#641](https://github.com/gakonst/ethers-rs/issues/641)) +- Make ethers-wasm workspace member ([#642](https://github.com/gakonst/ethers-rs/issues/642)) +- Check all import styles ([#634](https://github.com/gakonst/ethers-rs/issues/634)) +- Source parsing for local paths ([#633](https://github.com/gakonst/ethers-rs/issues/633)) +- Conditional http support ([#632](https://github.com/gakonst/ethers-rs/issues/632)) +- Use CARGO_MANIFEST_DIR as root for relative paths in abigen! ([#631](https://github.com/gakonst/ethers-rs/issues/631)) +- Remove changed artifacts from the cache ([#630](https://github.com/gakonst/ethers-rs/issues/630)) +- Method deduplication ([#619](https://github.com/gakonst/ethers-rs/issues/619)) +- Do not overwrite existing cache ([#629](https://github.com/gakonst/ethers-rs/issues/629)) +- Remove redundant cache read ([#627](https://github.com/gakonst/ethers-rs/issues/627)) +- Pass partial artifact cache to project compiler output ([#623](https://github.com/gakonst/ethers-rs/issues/623)) +- Enable sha2 asm for checksum speed ([#626](https://github.com/gakonst/ethers-rs/issues/626)) +- [**breaking**] Ambiguity unit8[] and bytes ([#613](https://github.com/gakonst/ethers-rs/issues/613)) -### Unreleased +### Depedencies -- Added `openssl` and `rustls` feature flags - [#1961](https://github.com/gakonst/ethers-rs/pull/1961) -- Relax Clone requirements when Arc is used - [#1183](https://github.com/gakonst/ethers-rs/pull/1183) -- Ensure a consistent chain ID between a Signer and Provider in SignerMiddleware - [#1095](https://gakonst/ethers-rs/pull/1095) -- Add BlockNative gas oracle [#1175](https://github.com/gakonst/ethers-rs/pull/1175) +- Revert "chore: disable dev deps for release" +- Disable dev deps for release +- Bump futures-executor from 0.3.24 to 0.3.25 ([#1795](https://github.com/gakonst/ethers-rs/issues/1795)) +- Bump futures-util from 0.3.24 to 0.3.25 ([#1796](https://github.com/gakonst/ethers-rs/issues/1796)) +- Bump syn from 1.0.102 to 1.0.103 ([#1799](https://github.com/gakonst/ethers-rs/issues/1799)) +- Bump getrandom from 0.2.7 to 0.2.8 ([#1800](https://github.com/gakonst/ethers-rs/issues/1800)) +- Bump proc-macro2 from 1.0.46 to 1.0.47 ([#1788](https://github.com/gakonst/ethers-rs/issues/1788)) +- Bump home from 0.5.3 to 0.5.4 ([#1781](https://github.com/gakonst/ethers-rs/issues/1781)) +- Bump tracing-subscriber from 0.3.15 to 0.3.16 ([#1765](https://github.com/gakonst/ethers-rs/issues/1765)) +- Bump dunce from 1.0.2 to 1.0.3 ([#1767](https://github.com/gakonst/ethers-rs/issues/1767)) +- Bump ansi-regex in /examples/ethers-wasm ([#1771](https://github.com/gakonst/ethers-rs/issues/1771)) +- Bump tracing from 0.1.36 to 0.1.37 ([#1766](https://github.com/gakonst/ethers-rs/issues/1766)) +- Bump syn from 1.0.101 to 1.0.102 ([#1764](https://github.com/gakonst/ethers-rs/issues/1764)) +- Bump serde-wasm-bindgen from 0.4.3 to 0.4.5 ([#1761](https://github.com/gakonst/ethers-rs/issues/1761)) +- Bump proc-macro2 from 1.0.44 to 1.0.46 ([#1753](https://github.com/gakonst/ethers-rs/issues/1753)) +- Bump k256 from 0.11.5 to 0.11.6 ([#1749](https://github.com/gakonst/ethers-rs/issues/1749)) +- Bump thiserror from 1.0.36 to 1.0.37 ([#1748](https://github.com/gakonst/ethers-rs/issues/1748)) +- Bump syn from 1.0.100 to 1.0.101 ([#1745](https://github.com/gakonst/ethers-rs/issues/1745)) +- Bump thiserror from 1.0.35 to 1.0.36 ([#1739](https://github.com/gakonst/ethers-rs/issues/1739)) +- Bump proc-macro2 from 1.0.43 to 1.0.44 ([#1738](https://github.com/gakonst/ethers-rs/issues/1738)) +- Bump md-5 from 0.10.4 to 0.10.5 ([#1726](https://github.com/gakonst/ethers-rs/issues/1726)) +- Bump reqwest from 0.11.11 to 0.11.12 ([#1724](https://github.com/gakonst/ethers-rs/issues/1724)) +- Bump once_cell from 1.14.0 to 1.15.0 ([#1725](https://github.com/gakonst/ethers-rs/issues/1725)) +- Bump env_logger from 0.9.0 to 0.9.1 ([#1718](https://github.com/gakonst/ethers-rs/issues/1718)) +- Bump syn from 1.0.99 to 1.0.100 ([#1717](https://github.com/gakonst/ethers-rs/issues/1717)) +- Bump solang-parser from 0.1.17 to 0.1.18 ([#1716](https://github.com/gakonst/ethers-rs/issues/1716)) +- Bump svm-rs 0.2.18 ([#1715](https://github.com/gakonst/ethers-rs/issues/1715)) +- Trim eip712 deps ([#1714](https://github.com/gakonst/ethers-rs/issues/1714)) +- Bump semver from 1.0.13 to 1.0.14 ([#1708](https://github.com/gakonst/ethers-rs/issues/1708)) +- Bump unicode-xid from 0.2.3 to 0.2.4 ([#1707](https://github.com/gakonst/ethers-rs/issues/1707)) +- Bump k256 from 0.11.4 to 0.11.5 ([#1701](https://github.com/gakonst/ethers-rs/issues/1701)) +- Bump sha2 from 0.10.5 to 0.10.6 ([#1709](https://github.com/gakonst/ethers-rs/issues/1709)) +- Bump wasm-bindgen-test from 0.3.32 to 0.3.33 ([#1700](https://github.com/gakonst/ethers-rs/issues/1700)) +- Bump wasm-bindgen-futures from 0.4.32 to 0.4.33 ([#1693](https://github.com/gakonst/ethers-rs/issues/1693)) +- Bump web-sys from 0.3.59 to 0.3.60 ([#1694](https://github.com/gakonst/ethers-rs/issues/1694)) +- Bump thiserror from 1.0.34 to 1.0.35 ([#1697](https://github.com/gakonst/ethers-rs/issues/1697)) +- Bump max solc 0.8.17 ([#1679](https://github.com/gakonst/ethers-rs/issues/1679)) +- Bump url from 2.3.0 to 2.3.1 ([#1680](https://github.com/gakonst/ethers-rs/issues/1680)) +- Bump convert_case from 0.5.0 to 0.6.0 ([#1681](https://github.com/gakonst/ethers-rs/issues/1681)) +- Bump url from 2.2.2 to 2.3.0 ([#1678](https://github.com/gakonst/ethers-rs/issues/1678)) +- Bump serde-aux from 3.1.0 to 4.0.0 ([#1673](https://github.com/gakonst/ethers-rs/issues/1673)) +- Bump thiserror from 1.0.33 to 1.0.34 ([#1668](https://github.com/gakonst/ethers-rs/issues/1668)) +- Bump once_cell from 1.13.1 to 1.14.0 ([#1669](https://github.com/gakonst/ethers-rs/issues/1669)) +- Bump md-5 from 0.10.2 to 0.10.4 ([#1670](https://github.com/gakonst/ethers-rs/issues/1670)) +- Bump sha2 from 0.10.3 to 0.10.5 ([#1671](https://github.com/gakonst/ethers-rs/issues/1671)) +- Bump pretty_assertions from 1.2.1 to 1.3.0 ([#1652](https://github.com/gakonst/ethers-rs/issues/1652)) +- Bump sha2 from 0.10.2 to 0.10.3 ([#1651](https://github.com/gakonst/ethers-rs/issues/1651)) +- Bump thiserror from 1.0.32 to 1.0.33 ([#1650](https://github.com/gakonst/ethers-rs/issues/1650)) +- Bump md-5 from 0.10.1 to 0.10.2 ([#1649](https://github.com/gakonst/ethers-rs/issues/1649)) +- Bump futures-executor from 0.3.23 to 0.3.24 ([#1646](https://github.com/gakonst/ethers-rs/issues/1646)) +- Bump eth-keystore from 0.4.2 to 0.5.0 ([#1645](https://github.com/gakonst/ethers-rs/issues/1645)) +- Bump futures-util from 0.3.23 to 0.3.24 ([#1644](https://github.com/gakonst/ethers-rs/issues/1644)) +- Bump eth-keystore ([#1643](https://github.com/gakonst/ethers-rs/issues/1643)) +- Bump once_cell from 1.13.0 to 1.13.1 ([#1606](https://github.com/gakonst/ethers-rs/issues/1606)) +- Bump ethabi ([#1601](https://github.com/gakonst/ethers-rs/issues/1601)) +- Bump k256 from 0.11.3 to 0.11.4 ([#1599](https://github.com/gakonst/ethers-rs/issues/1599)) +- Bump futures-util from 0.3.21 to 0.3.23 ([#1598](https://github.com/gakonst/ethers-rs/issues/1598)) +- Bump futures-executor from 0.3.21 to 0.3.23 ([#1597](https://github.com/gakonst/ethers-rs/issues/1597)) +- Bump serial_test from 0.8.0 to 0.9.0 ([#1587](https://github.com/gakonst/ethers-rs/issues/1587)) +- Bump rust_decimal from 1.26.0 to 1.26.1 ([#1574](https://github.com/gakonst/ethers-rs/issues/1574)) +- Bump path-slash from 0.2.0 to 0.2.1 ([#1575](https://github.com/gakonst/ethers-rs/issues/1575)) +- Bump chrono from 0.4.19 to 0.4.20 ([#1568](https://github.com/gakonst/ethers-rs/issues/1568)) +- Bump rust_decimal from 1.25.0 to 1.26.0 ([#1569](https://github.com/gakonst/ethers-rs/issues/1569)) +- Bump proc-macro2 from 1.0.42 to 1.0.43 ([#1560](https://github.com/gakonst/ethers-rs/issues/1560)) +- Bump semver from 1.0.12 to 1.0.13 ([#1561](https://github.com/gakonst/ethers-rs/issues/1561)) +- Bump syn from 1.0.98 to 1.0.99 ([#1562](https://github.com/gakonst/ethers-rs/issues/1562)) +- Bump thiserror from 1.0.31 to 1.0.32 ([#1563](https://github.com/gakonst/ethers-rs/issues/1563)) +- Bump elliptic-curve from 0.12.2 to 0.12.3 ([#1555](https://github.com/gakonst/ethers-rs/issues/1555)) +- Bump yubihsm from 0.41.0-pre to 0.41.0 ([#1556](https://github.com/gakonst/ethers-rs/issues/1556)) +- Bump generic-array from 0.14.5 to 0.14.6 ([#1557](https://github.com/gakonst/ethers-rs/issues/1557)) +- Bump bytes from 1.2.0 to 1.2.1 ([#1542](https://github.com/gakonst/ethers-rs/issues/1542)) +- Bump tracing from 0.1.35 to 0.1.36 ([#1543](https://github.com/gakonst/ethers-rs/issues/1543)) +- Bump eth-keystore from 0.4.1 to 0.4.2 ([#1544](https://github.com/gakonst/ethers-rs/issues/1544)) +- Add back dev-deps ([#1532](https://github.com/gakonst/ethers-rs/issues/1532)) +- Disable dev deps +- Bump wasm-bindgen-test from 0.3.31 to 0.3.32 ([#1518](https://github.com/gakonst/ethers-rs/issues/1518)) +- Bump svm-builds ([#1521](https://github.com/gakonst/ethers-rs/issues/1521)) +- Bump fastrlp from 0.1.2 to 0.1.3 ([#1505](https://github.com/gakonst/ethers-rs/issues/1505)) +- Bump proc-macro2 from 1.0.40 to 1.0.42 ([#1513](https://github.com/gakonst/ethers-rs/issues/1513)) +- Bump wasm-bindgen-futures from 0.4.31 to 0.4.32 ([#1512](https://github.com/gakonst/ethers-rs/issues/1512)) +- Bump web-sys from 0.3.58 to 0.3.59 ([#1511](https://github.com/gakonst/ethers-rs/issues/1511)) +- Bump tracing-subscriber from 0.3.14 to 0.3.15 ([#1504](https://github.com/gakonst/ethers-rs/issues/1504)) +- Bump tracing-subscriber from 0.3.11 to 0.3.14 ([#1448](https://github.com/gakonst/ethers-rs/issues/1448)) +- Bump terser from 4.8.0 to 4.8.1 in /examples/ethers-wasm ([#1489](https://github.com/gakonst/ethers-rs/issues/1489)) +- Bump bytes from 1.1.0 to 1.2.0 ([#1488](https://github.com/gakonst/ethers-rs/issues/1488)) +- Bump tokio-tungstenite from 0.17.1 to 0.17.2 ([#1478](https://github.com/gakonst/ethers-rs/issues/1478)) +- Bump svm-rs-builds ([#1476](https://github.com/gakonst/ethers-rs/issues/1476)) +- Bump criterion from 0.3.5 to 0.3.6 ([#1466](https://github.com/gakonst/ethers-rs/issues/1466)) +- Bump crypto deps ([#1465](https://github.com/gakonst/ethers-rs/issues/1465)) +- Bump paths-slash ([#1462](https://github.com/gakonst/ethers-rs/issues/1462)) +- Bump pin-project to silence new clippy lints ([#1464](https://github.com/gakonst/ethers-rs/issues/1464)) +- Bump regex from 1.5.6 to 1.6.0 ([#1461](https://github.com/gakonst/ethers-rs/issues/1461)) +- Bump once_cell from 1.12.0 to 1.13.0 ([#1453](https://github.com/gakonst/ethers-rs/issues/1453)) +- Solang 0.1.16 ([#1446](https://github.com/gakonst/ethers-rs/issues/1446)) +- Implement fastrlp traits for Bytes ([#1443](https://github.com/gakonst/ethers-rs/issues/1443)) +- Bump coins-ledger to 0.6.1 ([#1442](https://github.com/gakonst/ethers-rs/issues/1442)) +- Bump semver from 1.0.11 to 1.0.12 ([#1441](https://github.com/gakonst/ethers-rs/issues/1441)) +- Bump eventsource in /examples/ethers-wasm ([#1334](https://github.com/gakonst/ethers-rs/issues/1334)) +- Bump serde-aux from 3.0.1 to 3.1.0 ([#1432](https://github.com/gakonst/ethers-rs/issues/1432)) +- Bump semver from 1.0.10 to 1.0.11 ([#1431](https://github.com/gakonst/ethers-rs/issues/1431)) +- Bump path-slash from 0.1.4 to 0.1.5 ([#1430](https://github.com/gakonst/ethers-rs/issues/1430)) +- Bump cargo_metadata from 0.14.2 to 0.15.0 ([#1410](https://github.com/gakonst/ethers-rs/issues/1410)) +- Bump serial_test from 0.7.0 to 0.8.0 ([#1418](https://github.com/gakonst/ethers-rs/issues/1418)) +- Bump trezor client 0.0.6 ([#1401](https://github.com/gakonst/ethers-rs/issues/1401)) +- Bump wasm-bindgen-test from 0.3.30 to 0.3.31 ([#1391](https://github.com/gakonst/ethers-rs/issues/1391)) +- Bump syn from 1.0.96 to 1.0.98 ([#1392](https://github.com/gakonst/ethers-rs/issues/1392)) +- Bump proc-macro2 from 1.0.39 to 1.0.40 ([#1393](https://github.com/gakonst/ethers-rs/issues/1393)) +- Bump serial_test from 0.6.0 to 0.7.0 ([#1349](https://github.com/gakonst/ethers-rs/issues/1349)) +- Bump wasm-bindgen-futures from 0.4.30 to 0.4.31 ([#1378](https://github.com/gakonst/ethers-rs/issues/1378)) +- Bump web-sys from 0.3.57 to 0.3.58 ([#1379](https://github.com/gakonst/ethers-rs/issues/1379)) +- Bump wasm-bindgen from 0.2.80 to 0.2.81 ([#1380](https://github.com/gakonst/ethers-rs/issues/1380)) +- Bump ethabi version ([#1381](https://github.com/gakonst/ethers-rs/issues/1381)) +- Revert "release: disable dev deps" +- Disable dev deps +- Bump reqwest from 0.11.10 to 0.11.11 ([#1374](https://github.com/gakonst/ethers-rs/issues/1374)) +- Bump getrandom from 0.2.6 to 0.2.7 ([#1373](https://github.com/gakonst/ethers-rs/issues/1373)) +- Bump strum from 0.24.0 to 0.24.1 ([#1370](https://github.com/gakonst/ethers-rs/issues/1370)) +- Bump rust_decimal from 1.24.0 to 1.25.0 ([#1375](https://github.com/gakonst/ethers-rs/issues/1375)) +- Bump semver from 1.0.9 to 1.0.10 ([#1366](https://github.com/gakonst/ethers-rs/issues/1366)) +- Bump solang_parser 0.1.14 ([#1369](https://github.com/gakonst/ethers-rs/issues/1369)) +- Bump tracing from 0.1.34 to 0.1.35 ([#1364](https://github.com/gakonst/ethers-rs/issues/1364)) +- Bump http from 0.2.7 to 0.2.8 ([#1352](https://github.com/gakonst/ethers-rs/issues/1352)) +- Bump crossbeam-utils from 0.8.6 to 0.8.8 ([#1351](https://github.com/gakonst/ethers-rs/issues/1351)) +- Make ethers-solc dev dep ([#1358](https://github.com/gakonst/ethers-rs/issues/1358)) +- Bump syn from 1.0.95 to 1.0.96 ([#1342](https://github.com/gakonst/ethers-rs/issues/1342)) +- Bump auto_impl from 0.5.0 to 1.0.1 ([#1341](https://github.com/gakonst/ethers-rs/issues/1341)) +- Bump serde_derive from 1.0.136 to 1.0.137 ([#1333](https://github.com/gakonst/ethers-rs/issues/1333)) +- Make tokio required dependency ([#1322](https://github.com/gakonst/ethers-rs/issues/1322)) +- Bump once_cell from 1.11.0 to 1.12.0 ([#1306](https://github.com/gakonst/ethers-rs/issues/1306)) +- Bump regex from 1.5.5 to 1.5.6 ([#1300](https://github.com/gakonst/ethers-rs/issues/1300)) +- Bump once_cell from 1.10.0 to 1.11.0 ([#1288](https://github.com/gakonst/ethers-rs/issues/1288)) +- Bump syn from 1.0.94 to 1.0.95 ([#1280](https://github.com/gakonst/ethers-rs/issues/1280)) +- Bump latest solc release ([#1282](https://github.com/gakonst/ethers-rs/issues/1282)) +- Bump proc-macro2 from 1.0.38 to 1.0.39 ([#1275](https://github.com/gakonst/ethers-rs/issues/1275)) +- Bump rayon from 1.5.2 to 1.5.3 ([#1269](https://github.com/gakonst/ethers-rs/issues/1269)) +- Bump tokio-util from 0.7.1 to 0.7.2 ([#1270](https://github.com/gakonst/ethers-rs/issues/1270)) +- Bump syn from 1.0.93 to 1.0.94 ([#1271](https://github.com/gakonst/ethers-rs/issues/1271)) +- Bump syn from 1.0.92 to 1.0.93 ([#1244](https://github.com/gakonst/ethers-rs/issues/1244)) +- Bump unicode-xid from 0.2.2 to 0.2.3 ([#1243](https://github.com/gakonst/ethers-rs/issues/1243)) +- Bump proc-macro2 from 1.0.37 to 1.0.38 ([#1237](https://github.com/gakonst/ethers-rs/issues/1237)) +- Bump spki from 0.5.4 to 0.6.0 ([#1238](https://github.com/gakonst/ethers-rs/issues/1238)) +- Bump semver from 1.0.7 to 1.0.9 ([#1211](https://github.com/gakonst/ethers-rs/issues/1211)) +- Bump rusoto-kms/core +- Bump async from 2.6.3 to 2.6.4 in /examples/ethers-wasm ([#1196](https://github.com/gakonst/ethers-rs/issues/1196)) +- Bump thiserror from 1.0.30 to 1.0.31 ([#1206](https://github.com/gakonst/ethers-rs/issues/1206)) +- Bump syn from 1.0.91 to 1.0.92 ([#1194](https://github.com/gakonst/ethers-rs/issues/1194)) +- Bump http from 0.2.6 to 0.2.7 ([#1195](https://github.com/gakonst/ethers-rs/issues/1195)) +- Bump rayon from 1.5.1 to 1.5.2 ([#1145](https://github.com/gakonst/ethers-rs/issues/1145)) +- Bump tracing from 0.1.33 to 0.1.34 ([#1147](https://github.com/gakonst/ethers-rs/issues/1147)) +- Bump solang-parser from 0.1.11 to 0.1.12 ([#1152](https://github.com/gakonst/ethers-rs/issues/1152)) +- Bump wasm-bindgen-test from 0.3.29 to 0.3.30 ([#1133](https://github.com/gakonst/ethers-rs/issues/1133)) +- Bump tracing from 0.1.32 to 0.1.33 ([#1132](https://github.com/gakonst/ethers-rs/issues/1132)) +- Bump tracing-subscriber from 0.3.10 to 0.3.11 ([#1131](https://github.com/gakonst/ethers-rs/issues/1131)) +- Bump web-sys from 0.3.56 to 0.3.57 ([#1122](https://github.com/gakonst/ethers-rs/issues/1122)) +- Bump wasm-bindgen from 0.2.79 to 0.2.80 ([#1121](https://github.com/gakonst/ethers-rs/issues/1121)) +- Bump wasm-bindgen-futures from 0.4.29 to 0.4.30 ([#1120](https://github.com/gakonst/ethers-rs/issues/1120)) +- Bump svm-rs for updated timeout +- Bump proc-macro2 from 1.0.36 to 1.0.37 ([#1117](https://github.com/gakonst/ethers-rs/issues/1117)) +- Bump syn from 1.0.90 to 1.0.91 ([#1113](https://github.com/gakonst/ethers-rs/issues/1113)) +- Bump eyre from 0.6.7 to 0.6.8 ([#1110](https://github.com/gakonst/ethers-rs/issues/1110)) +- Bump pretty_assertions from 1.2.0 to 1.2.1 ([#1105](https://github.com/gakonst/ethers-rs/issues/1105)) +- Bump tracing-subscriber from 0.3.9 to 0.3.10 ([#1106](https://github.com/gakonst/ethers-rs/issues/1106)) +- Bump solang-parser 0.1.11 ([#1103](https://github.com/gakonst/ethers-rs/issues/1103)) +- Bump getrandom from 0.2.5 to 0.2.6 ([#1090](https://github.com/gakonst/ethers-rs/issues/1090)) +- Bump syn from 1.0.89 to 1.0.90 ([#1091](https://github.com/gakonst/ethers-rs/issues/1091)) +- Bump tokio-util from 0.7.0 to 0.7.1 ([#1089](https://github.com/gakonst/ethers-rs/issues/1089)) +- Bump semver from 1.0.6 to 1.0.7 ([#1085](https://github.com/gakonst/ethers-rs/issues/1085)) +- Bump minimist from 1.2.5 to 1.2.6 in /examples/ethers-wasm ([#1083](https://github.com/gakonst/ethers-rs/issues/1083)) +- Add some deny lints ([#1064](https://github.com/gakonst/ethers-rs/issues/1064)) +- Bump quote from 1.0.15 to 1.0.16 ([#1061](https://github.com/gakonst/ethers-rs/issues/1061)) +- Bump k256 from 0.10.3 to 0.10.4 ([#1037](https://github.com/gakonst/ethers-rs/issues/1037)) +- Bump syn from 1.0.88 to 1.0.89 ([#1046](https://github.com/gakonst/ethers-rs/issues/1046)) +- Bump reqwest from 0.11.9 to 0.11.10 ([#1031](https://github.com/gakonst/ethers-rs/issues/1031)) +- Bump k256 from 0.10.2 to 0.10.3 ([#1032](https://github.com/gakonst/ethers-rs/issues/1032)) +- Bump syn from 1.0.86 to 1.0.88 ([#1033](https://github.com/gakonst/ethers-rs/issues/1033)) +- Bump svm-rs and use returned install path ([#1034](https://github.com/gakonst/ethers-rs/issues/1034)) +- Bump pretty_assertions from 1.1.0 to 1.2.0 ([#1022](https://github.com/gakonst/ethers-rs/issues/1022)) +- Bump svm-rs +- Bump tracing from 0.1.31 to 0.1.32 ([#1001](https://github.com/gakonst/ethers-rs/issues/1001)) +- Bump svm-rs for macos aarch releases +- Bump regex from 1.5.4 to 1.5.5 ([#997](https://github.com/gakonst/ethers-rs/issues/997)) +- Bump solang ([#992](https://github.com/gakonst/ethers-rs/issues/992)) +- Bump once_cell from 1.9.0 to 1.10.0 ([#987](https://github.com/gakonst/ethers-rs/issues/987)) +- Bump ethabi to 17.0 +- Bump ethabi and trezor signing +- Bump tokio-tungstenite from 0.16.1 to 0.17.1 ([#945](https://github.com/gakonst/ethers-rs/issues/945)) +- Bump eyre from 0.6.6 to 0.6.7 ([#973](https://github.com/gakonst/ethers-rs/issues/973)) +- Bump url-parse in /examples/ethers-wasm ([#974](https://github.com/gakonst/ethers-rs/issues/974)) +- Bump getrandom from 0.2.4 to 0.2.5 ([#955](https://github.com/gakonst/ethers-rs/issues/955)) +- Bump semver from 1.0.5 to 1.0.6 ([#944](https://github.com/gakonst/ethers-rs/issues/944)) +- Bump serial_test from 0.5.1 to 0.6.0 ([#938](https://github.com/gakonst/ethers-rs/issues/938)) +- Bump url-parse from 1.5.3 to 1.5.7 in /examples/ethers-wasm ([#932](https://github.com/gakonst/ethers-rs/issues/932)) +- Bump md-5 from 0.10.0 to 0.10.1 ([#922](https://github.com/gakonst/ethers-rs/issues/922)) +- Bump tracing from 0.1.30 to 0.1.31 ([#923](https://github.com/gakonst/ethers-rs/issues/923)) +- Bump ethabi from `321a651` to `e161e68` ([#925](https://github.com/gakonst/ethers-rs/issues/925)) +- Bump tracing-subscriber from 0.3.8 to 0.3.9 ([#924](https://github.com/gakonst/ethers-rs/issues/924)) +- Bump cargo_metadata from 0.14.1 to 0.14.2 ([#920](https://github.com/gakonst/ethers-rs/issues/920)) +- Bump eth-keystore from 0.4.0 to 0.4.1 ([#913](https://github.com/gakonst/ethers-rs/issues/913)) +- Bump rand from 0.8.4 to 0.8.5 ([#914](https://github.com/gakonst/ethers-rs/issues/914)) +- Bump follow-redirects in /examples/ethers-wasm ([#912](https://github.com/gakonst/ethers-rs/issues/912)) +- Chore/update eth keystore ([#910](https://github.com/gakonst/ethers-rs/issues/910)) +- Bump solang-parser from `f850719` to `b286b63` ([#896](https://github.com/gakonst/ethers-rs/issues/896)) +- Bump tokio-util from 0.6.9 to 0.7.0 ([#895](https://github.com/gakonst/ethers-rs/issues/895)) +- Bump ethabi from `6f18e11` to `321a651` ([#891](https://github.com/gakonst/ethers-rs/issues/891)) +- Bump solang-parser from `f3e8f6f` to `f850719` ([#881](https://github.com/gakonst/ethers-rs/issues/881)) +- Bump futures-util from 0.3.19 to 0.3.21 ([#872](https://github.com/gakonst/ethers-rs/issues/872)) +- Bump futures-executor from 0.3.19 to 0.3.21 ([#873](https://github.com/gakonst/ethers-rs/issues/873)) +- Bump semver from 1.0.4 to 1.0.5 ([#874](https://github.com/gakonst/ethers-rs/issues/874)) +- Bump tracing-subscriber from 0.3.7 to 0.3.8 ([#875](https://github.com/gakonst/ethers-rs/issues/875)) +- Rewrite compiler passes and cache change detection ([#802](https://github.com/gakonst/ethers-rs/issues/802)) +- Bump tracing from 0.1.29 to 0.1.30 ([#862](https://github.com/gakonst/ethers-rs/issues/862)) +- Bump ethabi from `c622438` to `6f18e11` ([#853](https://github.com/gakonst/ethers-rs/issues/853)) +- Bump pretty_assertions from 1.0.0 to 1.1.0 ([#854](https://github.com/gakonst/ethers-rs/issues/854)) +- Bump svm-rs +- Bump elliptic-curve from 0.11.10 to 0.11.12 ([#845](https://github.com/gakonst/ethers-rs/issues/845)) +- Bump deps +- Bump elliptic-curve from 0.11.9 to 0.11.10 ([#837](https://github.com/gakonst/ethers-rs/issues/837)) +- Bump tracing-subscriber from 0.3.6 to 0.3.7 ([#830](https://github.com/gakonst/ethers-rs/issues/830)) +- Bump quote from 1.0.14 to 1.0.15 ([#826](https://github.com/gakonst/ethers-rs/issues/826)) +- Bump wasm-bindgen-test from 0.3.28 to 0.3.29 ([#815](https://github.com/gakonst/ethers-rs/issues/815)) +- Bump syn from 1.0.85 to 1.0.86 ([#816](https://github.com/gakonst/ethers-rs/issues/816)) +- Bump web-sys from 0.3.55 to 0.3.56 ([#817](https://github.com/gakonst/ethers-rs/issues/817)) +- Bump wasm-bindgen from 0.2.78 to 0.2.79 ([#818](https://github.com/gakonst/ethers-rs/issues/818)) +- Bump wasm-bindgen-futures from 0.4.28 to 0.4.29 ([#819](https://github.com/gakonst/ethers-rs/issues/819)) +- Bump ethabi from `5781964` to `c622438` ([#812](https://github.com/gakonst/ethers-rs/issues/812)) +- Bump k256 from 0.10.1 to 0.10.2 ([#804](https://github.com/gakonst/ethers-rs/issues/804)) +- Bump elliptic-curve from 0.11.7 to 0.11.9 ([#803](https://github.com/gakonst/ethers-rs/issues/803)) +- Bump elliptic-curve from 0.11.6 to 0.11.7 ([#793](https://github.com/gakonst/ethers-rs/issues/793)) +- Bump tracing-subscriber from 0.3.5 to 0.3.6 ([#794](https://github.com/gakonst/ethers-rs/issues/794)) +- Bump follow-redirects in /examples/ethers-wasm ([#795](https://github.com/gakonst/ethers-rs/issues/795)) +- Bump solang ([#796](https://github.com/gakonst/ethers-rs/issues/796)) +- Bump getrandom from 0.2.3 to 0.2.4 ([#790](https://github.com/gakonst/ethers-rs/issues/790)) +- Bump ethabi master ([#787](https://github.com/gakonst/ethers-rs/issues/787)) +- Bump tempfile from 3.2.0 to 3.3.0 ([#780](https://github.com/gakonst/ethers-rs/issues/780)) +- Bump reqwest from 0.11.8 to 0.11.9 ([#785](https://github.com/gakonst/ethers-rs/issues/785)) +- Bump ecdsa from 0.13.3 to 0.13.4 ([#767](https://github.com/gakonst/ethers-rs/issues/767)) +- Bump syn from 1.0.84 to 1.0.85 ([#764](https://github.com/gakonst/ethers-rs/issues/764)) +- Bump k256 from 0.10.0 to 0.10.1 ([#762](https://github.com/gakonst/ethers-rs/issues/762)) +- Bump spki from 0.5.3 to 0.5.4 ([#763](https://github.com/gakonst/ethers-rs/issues/763)) +- Bump generic-array from 0.14.4 to 0.14.5 ([#758](https://github.com/gakonst/ethers-rs/issues/758)) +- Bump tracing-subscriber from 0.3.4 to 0.3.5 ([#752](https://github.com/gakonst/ethers-rs/issues/752)) +- Bump quote from 1.0.10 to 1.0.14 ([#746](https://github.com/gakonst/ethers-rs/issues/746)) +- Bump proc-macro2 from 1.0.35 to 1.0.36 ([#744](https://github.com/gakonst/ethers-rs/issues/744)) +- Bump convert_case from 0.4.0 to 0.5.0 ([#741](https://github.com/gakonst/ethers-rs/issues/741)) +- Bump proc-macro2 from 1.0.34 to 1.0.35 ([#743](https://github.com/gakonst/ethers-rs/issues/743)) +- Bump syn from 1.0.83 to 1.0.84 ([#742](https://github.com/gakonst/ethers-rs/issues/742)) +- Bump tracing-subscriber from 0.3.3 to 0.3.4 ([#730](https://github.com/gakonst/ethers-rs/issues/730)) +- Bump syn from 1.0.82 to 1.0.83 ([#726](https://github.com/gakonst/ethers-rs/issues/726)) +- Bump num_cpus from 1.13.0 to 1.13.1 ([#722](https://github.com/gakonst/ethers-rs/issues/722)) +- Bump futures-util from 0.3.17 to 0.3.19 ([#717](https://github.com/gakonst/ethers-rs/issues/717)) +- Bump futures-executor from 0.3.17 to 0.3.19 ([#718](https://github.com/gakonst/ethers-rs/issues/718)) +- Bump latest solc version ([#720](https://github.com/gakonst/ethers-rs/issues/720)) +- Bump solc everywhere ([#672](https://github.com/gakonst/ethers-rs/issues/672)) +- Bump solc 0.8.10 ([#670](https://github.com/gakonst/ethers-rs/issues/670)) +- Bump md-5 from 0.9.1 to 0.10.0 ([#660](https://github.com/gakonst/ethers-rs/issues/660)) +- Bump elliptic-curve from 0.11.1 to 0.11.5 ([#653](https://github.com/gakonst/ethers-rs/issues/653)) +- Bump proc-macro2 from 1.0.32 to 1.0.33 ([#654](https://github.com/gakonst/ethers-rs/issues/654)) +- Bump reqwest from 0.11.6 to 0.11.7 ([#636](https://github.com/gakonst/ethers-rs/issues/636)) +- Bump tracing-subscriber from 0.3.2 to 0.3.3 ([#635](https://github.com/gakonst/ethers-rs/issues/635)) +- Bump syn from 1.0.81 to 1.0.82 ([#620](https://github.com/gakonst/ethers-rs/issues/620)) +- Bump futures-executor from 0.3.17 to 0.3.18 ([#615](https://github.com/gakonst/ethers-rs/issues/615)) -### 0.6.0 +### Documentation -- add the missing constructor for `Timelag` middleware via - [#568](https://github.com/gakonst/ethers-rs/pull/568) -- Removes GasNow as a gas price oracle - [#508](https://github.com/gakonst/ethers-rs/pull/508) -- add initialize_nonce public function to initialize NonceMiddleManager +- Fix typo annonated to annotated ([#1790](https://github.com/gakonst/ethers-rs/issues/1790)) +- Add MSRV ([#1712](https://github.com/gakonst/ethers-rs/issues/1712)) +- Add comment about safety of u8 -> u64 cast in signature ([#1704](https://github.com/gakonst/ethers-rs/issues/1704)) +- Some additional retry docs ([#1537](https://github.com/gakonst/ethers-rs/issues/1537)) +- Fix broken doc links ([#1497](https://github.com/gakonst/ethers-rs/issues/1497)) +- Improve EventStream docs ([#1450](https://github.com/gakonst/ethers-rs/issues/1450)) +- Complete unfinished sentence in block comment +- Improve abigen type docs ([#953](https://github.com/gakonst/ethers-rs/issues/953)) +- More docs and tracing ([#651](https://github.com/gakonst/ethers-rs/issues/651)) -### 0.5.3 +### Features -- Added Time Lagged middleware - [#457](https://github.com/gakonst/ethers-rs/pull/457) +- Re-export H128 ([#1786](https://github.com/gakonst/ethers-rs/issues/1786)) +- Added more ethereum units ([#1760](https://github.com/gakonst/ethers-rs/issues/1760)) +- Parse SourceCode field ([#1747](https://github.com/gakonst/ethers-rs/issues/1747)) +- Add versioned artifacts helper ([#1752](https://github.com/gakonst/ethers-rs/issues/1752)) +- Add arbitrum-goerli ([#1734](https://github.com/gakonst/ethers-rs/issues/1734)) +- Add utility methods to NameOrAddress ([#1720](https://github.com/gakonst/ethers-rs/issues/1720)) +- Double anvil startup time ([#1702](https://github.com/gakonst/ethers-rs/issues/1702)) +- Detect requested backoff ([#1711](https://github.com/gakonst/ethers-rs/issues/1711)) +- Retry infura's header not found ([#1706](https://github.com/gakonst/ethers-rs/issues/1706)) +- Add blocked by cloudflare error ([#1703](https://github.com/gakonst/ethers-rs/issues/1703)) +- Subsitute structs in event bindings ([#1674](https://github.com/gakonst/ethers-rs/issues/1674)) +- Add extra Multicall helper methods ([#1666](https://github.com/gakonst/ethers-rs/issues/1666)) +- Improved debug format for Bytes ([#1658](https://github.com/gakonst/ethers-rs/issues/1658)) +- Add support for Optimism Goerli ([#1641](https://github.com/gakonst/ethers-rs/issues/1641)) +- Update Multicall to Multicall3 ([#1584](https://github.com/gakonst/ethers-rs/issues/1584)) +- Add uint8 type ([#1639](https://github.com/gakonst/ethers-rs/issues/1639)) +- More derives for geth trace structs ([#1637](https://github.com/gakonst/ethers-rs/issues/1637)) +- Descriptive deserialization errors ([#1633](https://github.com/gakonst/ethers-rs/issues/1633)) +- Support retrying connection errors ([#1629](https://github.com/gakonst/ethers-rs/issues/1629)) +- Add events function to set multiple event filter ([#1607](https://github.com/gakonst/ethers-rs/issues/1607)) +- Add invalid api key error type ([#1600](https://github.com/gakonst/ethers-rs/issues/1600)) +- Resolve absolute imports in libraries ([#1590](https://github.com/gakonst/ethers-rs/issues/1590)) +- Add missing helper functions ([#1592](https://github.com/gakonst/ethers-rs/issues/1592)) +- Added PartialEq to TraceType ([#1586](https://github.com/gakonst/ethers-rs/issues/1586)) +- Added Deserialize to TraceType ([#1585](https://github.com/gakonst/ethers-rs/issues/1585)) +- Add etherscan urls function ([#1582](https://github.com/gakonst/ethers-rs/issues/1582)) +- Add helper to checkout temp projects ([#1581](https://github.com/gakonst/ethers-rs/issues/1581)) +- Add contract filter ([#1564](https://github.com/gakonst/ethers-rs/issues/1564)) +- Add ProviderExt trait ([#1559](https://github.com/gakonst/ethers-rs/issues/1559)) +- Add missing str abi trait impls ([#1554](https://github.com/gakonst/ethers-rs/issues/1554)) +- Expose url for http ([#1550](https://github.com/gakonst/ethers-rs/issues/1550)) +- Add set_interval helper function ([#1551](https://github.com/gakonst/ethers-rs/issues/1551)) +- Add lib inclusion function ([#1547](https://github.com/gakonst/ethers-rs/issues/1547)) +- Add EthError trait and derive ([#1549](https://github.com/gakonst/ethers-rs/issues/1549)) +- Add support for EIP-712 typed data ([#1510](https://github.com/gakonst/ethers-rs/issues/1510)) +- Erc1155 token transfer events endpoint ([#1503](https://github.com/gakonst/ethers-rs/issues/1503)) +- Bump abi/token tuple limit ([#1506](https://github.com/gakonst/ethers-rs/issues/1506)) +- Initial commit ([#1469](https://github.com/gakonst/ethers-rs/issues/1469)) +- Handle conflicting artifacts properly ([#1491](https://github.com/gakonst/ethers-rs/issues/1491)) +- Allow event builder to stream with meta ([#1483](https://github.com/gakonst/ethers-rs/issues/1483)) +- Add Sepolia endpoint ([#1467](https://github.com/gakonst/ethers-rs/issues/1467)) +- Add --fork-block-number setter for anvil bindings ([#1468](https://github.com/gakonst/ethers-rs/issues/1468)) +- Configurable build-info output dir ([#1433](https://github.com/gakonst/ethers-rs/issues/1433)) +- Impl Ord for receipt ([#1434](https://github.com/gakonst/ethers-rs/issues/1434)) +- Add remove_contract utility function ([#1436](https://github.com/gakonst/ethers-rs/issues/1436)) +- Add more contract iter helper functions ([#1438](https://github.com/gakonst/ethers-rs/issues/1438)) +- Include opcodes in output ([#1435](https://github.com/gakonst/ethers-rs/issues/1435)) +- Capture unknown fields ([#1423](https://github.com/gakonst/ethers-rs/issues/1423)) +- Add human readable function parser ([#1416](https://github.com/gakonst/ethers-rs/issues/1416)) +- More sensible backoff calc ([#1413](https://github.com/gakonst/ethers-rs/issues/1413)) +- Add Contract Info structs ([#1407](https://github.com/gakonst/ethers-rs/issues/1407)) +- Feat!(solc): add additional remove functions ([#1406](https://github.com/gakonst/ethers-rs/issues/1406)) +- Add evmos support ([#1398](https://github.com/gakonst/ethers-rs/issues/1398)) +- Add eth filter deserialization and matching ([#1389](https://github.com/gakonst/ethers-rs/issues/1389)) +- Emit build info files if configured ([#1338](https://github.com/gakonst/ethers-rs/issues/1338)) +- Emit additional raw metadata field ([#1365](https://github.com/gakonst/ethers-rs/issues/1365)) +- Add option to create ws provider with auth ([#1363](https://github.com/gakonst/ethers-rs/issues/1363)) +- Add script/ to project paths ([#1359](https://github.com/gakonst/ethers-rs/issues/1359)) +- Add anvil hardhat chain id ([#1356](https://github.com/gakonst/ethers-rs/issues/1356)) +- Source map getters for deployed bytecode ([#1348](https://github.com/gakonst/ethers-rs/issues/1348)) +- Add display impl for BlockNumber ([#1346](https://github.com/gakonst/ethers-rs/issues/1346)) +- Additional chain apis ([#1343](https://github.com/gakonst/ethers-rs/issues/1343)) +- Add `RetryClient` ([#1302](https://github.com/gakonst/ethers-rs/issues/1302)) +- Adds cargo audit workflow ([#1318](https://github.com/gakonst/ethers-rs/issues/1318)) +- Use relative paths and --base-path option ([#1317](https://github.com/gakonst/ethers-rs/issues/1317)) +- Impl AbiEncode, AbiDecode for I256 ([#1311](https://github.com/gakonst/ethers-rs/issues/1311)) +- Add `as_*_mut` methods on `TypedTransaction` ([#1310](https://github.com/gakonst/ethers-rs/issues/1310)) +- Make cache entries relative to root dir ([#1307](https://github.com/gakonst/ethers-rs/issues/1307)) +- Add paginated logs ([#1285](https://github.com/gakonst/ethers-rs/issues/1285)) +- Opt out of checking cargo.toml for consistency ([#1301](https://github.com/gakonst/ethers-rs/issues/1301)) +- Install solc io reporter in basic reporter ([#1295](https://github.com/gakonst/ethers-rs/issues/1295)) +- Emit artifacts for standalone source files ([#1296](https://github.com/gakonst/ethers-rs/issues/1296)) +- Add tx builder methods ([#1289](https://github.com/gakonst/ethers-rs/issues/1289)) +- Include id in artifact ([#1284](https://github.com/gakonst/ethers-rs/issues/1284)) +- Add helpers to unwrap `TypedTransaction` ([#1278](https://github.com/gakonst/ethers-rs/issues/1278)) +- Added Cronos testnet ([#1276](https://github.com/gakonst/ethers-rs/issues/1276)) +- Load previous logs before subscribing ([#1264](https://github.com/gakonst/ethers-rs/issues/1264)) +- Add eip-1898 deserialize for BlockId ([#1257](https://github.com/gakonst/ethers-rs/issues/1257)) +- Add strip and join functions to sources and contracts ([#1252](https://github.com/gakonst/ethers-rs/issues/1252)) +- Add source map access functions ([#1253](https://github.com/gakonst/ethers-rs/issues/1253)) +- Remaining AST nodes ([#1201](https://github.com/gakonst/ethers-rs/issues/1201)) +- Add human readable tokenizer and parser ([#1234](https://github.com/gakonst/ethers-rs/issues/1234)) +- Lookup solc build metadata ([#1242](https://github.com/gakonst/ethers-rs/issues/1242)) +- Support overloaded events ([#1233](https://github.com/gakonst/ethers-rs/issues/1233)) +- Store source files with their solc version ([#1231](https://github.com/gakonst/ethers-rs/issues/1231)) +- Add moonbeam urls ([#1232](https://github.com/gakonst/ethers-rs/issues/1232)) +- Add missing options for configurable artifact ([#1223](https://github.com/gakonst/ethers-rs/issues/1223)) +- Pending transaction retries repeatedly before assuming dropped ([#1221](https://github.com/gakonst/ethers-rs/issues/1221)) +- Support logging multiple files via io logger ([#1216](https://github.com/gakonst/ethers-rs/issues/1216)) +- Add ClientBuilder type ([#1193](https://github.com/gakonst/ethers-rs/issues/1193)) +- Add block conversion helpers ([#1186](https://github.com/gakonst/ethers-rs/issues/1186)) +- Relax `Clone` requirements when `Arc` is used ([#1183](https://github.com/gakonst/ethers-rs/issues/1183)) +- Blocknative gas oracle ([#1175](https://github.com/gakonst/ethers-rs/issues/1175)) +- Add minimal ast bindings ([#1167](https://github.com/gakonst/ethers-rs/issues/1167)) +- Function debug data in extra output ([#1165](https://github.com/gakonst/ethers-rs/issues/1165)) +- Abi as an extra file ([#1166](https://github.com/gakonst/ethers-rs/issues/1166)) +- Add standardjson compiler input type ([#1169](https://github.com/gakonst/ethers-rs/issues/1169)) +- Make stream mod public ([#1160](https://github.com/gakonst/ethers-rs/issues/1160)) +- Add debug info bindings ([#1161](https://github.com/gakonst/ethers-rs/issues/1161)) +- Add anvil bindings ([#1164](https://github.com/gakonst/ethers-rs/issues/1164)) +- Accept different middlewares for contract connect ([#1159](https://github.com/gakonst/ethers-rs/issues/1159)) +- Impl rlp encodable for log and receipt ([#1153](https://github.com/gakonst/ethers-rs/issues/1153)) +- Add RwClient ([#1016](https://github.com/gakonst/ethers-rs/issues/1016)) +- Add deserialize support for ValueorArray ([#1138](https://github.com/gakonst/ethers-rs/issues/1138)) +- Implemented signed transaction RLP decoding ([#1096](https://github.com/gakonst/ethers-rs/issues/1096)) +- Add standard-json-input ([#1126](https://github.com/gakonst/ethers-rs/issues/1126)) +- Strip experimental pragma from all imported contracts ([#1116](https://github.com/gakonst/ethers-rs/issues/1116)) +- Add caching ([#1108](https://github.com/gakonst/ethers-rs/issues/1108)) +- Add bytecode hash variants ([#1104](https://github.com/gakonst/ethers-rs/issues/1104)) +- Pass compile time to reporter ([#1098](https://github.com/gakonst/ethers-rs/issues/1098)) +- Include project paths in cache ([#1097](https://github.com/gakonst/ethers-rs/issues/1097)) +- Add dev as a chain ([#1093](https://github.com/gakonst/ethers-rs/issues/1093)) +- Add `ArtifactId::identifier()` ([#1087](https://github.com/gakonst/ethers-rs/issues/1087)) +- Add TryFrom String reference for http provider ([#1084](https://github.com/gakonst/ethers-rs/issues/1084)) +- Include source file ast in artifact ([#1081](https://github.com/gakonst/ethers-rs/issues/1081)) +- Ability to get artifacts + sources ([#1080](https://github.com/gakonst/ethers-rs/issues/1080)) +- Add helper for calculating max cost of tx ([#1070](https://github.com/gakonst/ethers-rs/issues/1070)) +- Use svm-builds instead of fetching http releases list ([#1063](https://github.com/gakonst/ethers-rs/issues/1063)) +- Add abi object deserializer and generate deploy function ([#1030](https://github.com/gakonst/ethers-rs/issues/1030)) +- Add hex encode and decode functions ([#1059](https://github.com/gakonst/ethers-rs/issues/1059)) +- More artifact trait functions ([#1057](https://github.com/gakonst/ethers-rs/issues/1057)) +- Support for solc io json output ([#1043](https://github.com/gakonst/ethers-rs/issues/1043)) +- Add viaIR option ([#1049](https://github.com/gakonst/ethers-rs/issues/1049)) +- Add gas_target and next_block_base_fee fns a… ([#1047](https://github.com/gakonst/ethers-rs/issues/1047)) +- Support customized output selection pruning ([#1039](https://github.com/gakonst/ethers-rs/issues/1039)) +- Optimize output selection in cache mode ([#1029](https://github.com/gakonst/ethers-rs/issues/1029)) +- Add mock project generator ([#1011](https://github.com/gakonst/ethers-rs/issues/1011)) +- Add solc install error report ([#1027](https://github.com/gakonst/ethers-rs/issues/1027)) +- Set from on tx before calling eth_call, eth_createAccessList, eth_estimateGas ([#1021](https://github.com/gakonst/ethers-rs/issues/1021)) +- Rotate infura keys for ws +- Rotating infura keys ([#1017](https://github.com/gakonst/ethers-rs/issues/1017)) +- Yul compilation ([#994](https://github.com/gakonst/ethers-rs/issues/994)) +- Remapping helper functions ([#1003](https://github.com/gakonst/ethers-rs/issues/1003)) +- Add scoped reporter ([#1000](https://github.com/gakonst/ethers-rs/issues/1000)) +- Source tree support ([#990](https://github.com/gakonst/ethers-rs/issues/990)) +- Impl FromStr ([#991](https://github.com/gakonst/ethers-rs/issues/991)) +- Add contract interface helpers ([#982](https://github.com/gakonst/ethers-rs/issues/982)) +- Add helper for getting number of abigen'd contracts +- Implement Default trait ([#976](https://github.com/gakonst/ethers-rs/issues/976)) +- Expose pending tx_hash with a getter ([#968](https://github.com/gakonst/ethers-rs/issues/968)) +- Account endpoints ([#939](https://github.com/gakonst/ethers-rs/issues/939)) +- Support shared type during multiabigen ([#959](https://github.com/gakonst/ethers-rs/issues/959)) +- Add contract code not verified check ([#962](https://github.com/gakonst/ethers-rs/issues/962)) +- Add helper functions to compile standalone files ([#931](https://github.com/gakonst/ethers-rs/issues/931)) +- Add tree printer implementation ([#933](https://github.com/gakonst/ethers-rs/issues/933)) +- Add Cronos and Cronos testnet ([#926](https://github.com/gakonst/ethers-rs/issues/926)) +- Add configurable Artifact type ([#907](https://github.com/gakonst/ethers-rs/issues/907)) +- Add getter to `ProjectCompileOutput` ([#908](https://github.com/gakonst/ethers-rs/issues/908)) +- Report on unresolved imports ([#905](https://github.com/gakonst/ethers-rs/issues/905)) +- Use svm blocking feature ([#904](https://github.com/gakonst/ethers-rs/issues/904)) +- Make to_string and from_str inverse functions ([#903](https://github.com/gakonst/ethers-rs/issues/903)) +- More options for output selection ([#898](https://github.com/gakonst/ethers-rs/issues/898)) +- Better metadata support ([#894](https://github.com/gakonst/ethers-rs/issues/894)) +- Add Reporter type ([#883](https://github.com/gakonst/ethers-rs/issues/883)) +- Log methods for PendingTransaction ([#884](https://github.com/gakonst/ethers-rs/issues/884)) +- Implement Artifact for serde_json ([#885](https://github.com/gakonst/ethers-rs/issues/885)) +- Add `send_with_receipt` to `Deployer` ([#865](https://github.com/gakonst/ethers-rs/issues/865)) +- Add arbitrum support ([#869](https://github.com/gakonst/ethers-rs/issues/869)) +- Add optimizer details ([#868](https://github.com/gakonst/ethers-rs/issues/868)) +- Compiler pipeline improvements ([#866](https://github.com/gakonst/ethers-rs/issues/866)) +- Impl codec for Bytes ([#856](https://github.com/gakonst/ethers-rs/issues/856)) +- Add BSC networks to the is_legacy helper ([#843](https://github.com/gakonst/ethers-rs/issues/843)) +- Is_legacy helper ([#835](https://github.com/gakonst/ethers-rs/issues/835)) +- Add BSC and BSC testnet ([#831](https://github.com/gakonst/ethers-rs/issues/831)) +- Flatten ([#774](https://github.com/gakonst/ethers-rs/issues/774)) +- Relative remappings ([#786](https://github.com/gakonst/ethers-rs/issues/786)) +- Enum values + TryFrom ([#782](https://github.com/gakonst/ethers-rs/issues/782)) +- Expose svm_compile +- Change abi_str to abi from contract in for hardhat abi ([#740](https://github.com/gakonst/ethers-rs/issues/740)) +- Add more contract utility types and functions ([#765](https://github.com/gakonst/ethers-rs/issues/765)) +- Add source map parser ([#658](https://github.com/gakonst/ethers-rs/issues/658)) +- Add dependency graph implementation ([#750](https://github.com/gakonst/ethers-rs/issues/750)) +- Add path auto detection ([#761](https://github.com/gakonst/ethers-rs/issues/761)) +- Add FromStr impl for Chain ([#756](https://github.com/gakonst/ethers-rs/issues/756)) +- Cache session on filesystem ([#747](https://github.com/gakonst/ethers-rs/issues/747)) +- Search json recursively ([#733](https://github.com/gakonst/ethers-rs/issues/733)) +- Add EventStream::select to combine multiple event streams ([#725](https://github.com/gakonst/ethers-rs/issues/725)) +- Add MultiAbigen to generate multiple contract bindings ([#724](https://github.com/gakonst/ethers-rs/issues/724)) +- Add provided derives for call and event enums ([#721](https://github.com/gakonst/ethers-rs/issues/721)) +- Add EthAbiCodec proc macro ([#704](https://github.com/gakonst/ethers-rs/issues/704)) +- Revamped remapping auto detect ([#706](https://github.com/gakonst/ethers-rs/issues/706)) +- New ethabi for error types ([#700](https://github.com/gakonst/ethers-rs/issues/700)) +- Set nonce in fill transaction ([#687](https://github.com/gakonst/ethers-rs/issues/687)) +- Trezor support ([#663](https://github.com/gakonst/ethers-rs/issues/663)) +- Add workspace utils ([#678](https://github.com/gakonst/ethers-rs/issues/678)) +- Add hardhat artifact support ([#677](https://github.com/gakonst/ethers-rs/issues/677)) +- Extend Artifact trait ([#673](https://github.com/gakonst/ethers-rs/issues/673)) +- Use structs for outputs ([#664](https://github.com/gakonst/ethers-rs/issues/664)) +- Add support for library linking ([#656](https://github.com/gakonst/ethers-rs/issues/656)) +- Add support for compiling solc in parallel ([#652](https://github.com/gakonst/ethers-rs/issues/652)) +- Support overloaded functions with different casing ([#650](https://github.com/gakonst/ethers-rs/issues/650)) +- Add clean up function ([#649](https://github.com/gakonst/ethers-rs/issues/649)) +- Improve solc detection and reduce install effort ([#648](https://github.com/gakonst/ethers-rs/issues/648)) +- Use AbiType when parsing Function abi signature fails at compile time ([#647](https://github.com/gakonst/ethers-rs/issues/647)) +- Impl Default for eip2718::TypedTransaction ([#646](https://github.com/gakonst/ethers-rs/issues/646)) +- Add moonbeam support ([#644](https://github.com/gakonst/ethers-rs/issues/644)) +- Implement gas endpoints and use in oracle middleware ([#621](https://github.com/gakonst/ethers-rs/issues/621)) +- Implement hex display for Bytes ([#624](https://github.com/gakonst/ethers-rs/issues/624)) +- Verify checksum before project compilation ([#614](https://github.com/gakonst/ethers-rs/issues/614)) + +### Miscellaneous Tasks + +- Reexport BigEndianHash ([#1789](https://github.com/gakonst/ethers-rs/issues/1789)) +- Disable remove_liq example +- Fix clippy +- Make clippy happy ([#1778](https://github.com/gakonst/ethers-rs/issues/1778)) +- Create artifacts folder on output ([#1772](https://github.com/gakonst/ethers-rs/issues/1772)) +- Replace rinkeby with goerli ([#1768](https://github.com/gakonst/ethers-rs/issues/1768)) +- Rm unwrap ([#1744](https://github.com/gakonst/ethers-rs/issues/1744)) +- Format polygon-mumbai as mumbai ([#1737](https://github.com/gakonst/ethers-rs/issues/1737)) +- Support fuji alias ([#1723](https://github.com/gakonst/ethers-rs/issues/1723)) +- Add another artifacts helper type ([#1722](https://github.com/gakonst/ethers-rs/issues/1722)) +- Add cloudflare test case ([#1721](https://github.com/gakonst/ethers-rs/issues/1721)) +- Log response data on error ([#1698](https://github.com/gakonst/ethers-rs/issues/1698)) +- Inherit stderr ([#1689](https://github.com/gakonst/ethers-rs/issues/1689)) +- Make clippy happy ([#1688](https://github.com/gakonst/ethers-rs/issues/1688)) +- Remove unused import +- Add abigen to default features ([#1684](https://github.com/gakonst/ethers-rs/issues/1684)) +- Export abi related types ([#1677](https://github.com/gakonst/ethers-rs/issues/1677)) +- Replace colorized with yansi ([#1662](https://github.com/gakonst/ethers-rs/issues/1662)) +- Make clippy happy ([#1659](https://github.com/gakonst/ethers-rs/issues/1659)) +- Match standalone mumbai for chain ([#1656](https://github.com/gakonst/ethers-rs/issues/1656)) +- Update svm ([#1627](https://github.com/gakonst/ethers-rs/issues/1627)) +- Add some traces ([#1622](https://github.com/gakonst/ethers-rs/issues/1622)) +- Improve file not found error ([#1611](https://github.com/gakonst/ethers-rs/issues/1611)) +- Make proof response fields pub ([#1612](https://github.com/gakonst/ethers-rs/issues/1612)) +- Improve io error for bad symlinks ([#1594](https://github.com/gakonst/ethers-rs/issues/1594)) +- Make clippy happy ([#1595](https://github.com/gakonst/ethers-rs/issues/1595)) +- Add set cache helper ([#1589](https://github.com/gakonst/ethers-rs/issues/1589)) +- Update svm and svm-builds ([#1588](https://github.com/gakonst/ethers-rs/issues/1588)) +- Update svm crates ([#1579](https://github.com/gakonst/ethers-rs/issues/1579)) +- Skip none trace error ([#1577](https://github.com/gakonst/ethers-rs/issues/1577)) +- Update max solc version 0.8.16 ([#1578](https://github.com/gakonst/ethers-rs/issues/1578)) +- Add aurora etherscan endpoints ([#1572](https://github.com/gakonst/ethers-rs/issues/1572)) +- Improve remapping errors ([#1570](https://github.com/gakonst/ethers-rs/issues/1570)) +- Reexport filter ([#1565](https://github.com/gakonst/ethers-rs/issues/1565)) +- Make clippy happy ([#1525](https://github.com/gakonst/ethers-rs/issues/1525)) +- Add Anvil::at and anvil example ([#1486](https://github.com/gakonst/ethers-rs/issues/1486)) +- Make clippy happy ([#1475](https://github.com/gakonst/ethers-rs/issues/1475)) +- Make ethers-solc optional ([#1463](https://github.com/gakonst/ethers-rs/issues/1463)) +- Export quorum's JsonRpcClientWrapper ([#1439](https://github.com/gakonst/ethers-rs/issues/1439)) +- Add gas_mut function ([#1427](https://github.com/gakonst/ethers-rs/issues/1427)) +- Convenience impls for Bytes ([#1421](https://github.com/gakonst/ethers-rs/issues/1421)) +- Update svm-rs ([#1415](https://github.com/gakonst/ethers-rs/issues/1415)) +- Make ethers-etherscan compile for wasm32 ([#1403](https://github.com/gakonst/ethers-rs/issues/1403)) +- Silence wasm warnings ([#1404](https://github.com/gakonst/ethers-rs/issues/1404)) +- Add moonbase chain id ([#1397](https://github.com/gakonst/ethers-rs/issues/1397)) +- Improve checksum error message ([#1394](https://github.com/gakonst/ethers-rs/issues/1394)) +- Update svm-rs and svm-rs-builds ([#1395](https://github.com/gakonst/ethers-rs/issues/1395)) +- Update svm-rs and svm-rs-builds ([#1387](https://github.com/gakonst/ethers-rs/issues/1387)) +- Add traces to retry provider ([#1382](https://github.com/gakonst/ethers-rs/issues/1382)) +- Add blocknumber convenience impls ([#1368](https://github.com/gakonst/ethers-rs/issues/1368)) +- Reexport ethabi module ([#1362](https://github.com/gakonst/ethers-rs/issues/1362)) +- Remove redundant call ([#1320](https://github.com/gakonst/ethers-rs/issues/1320)) +- Fix wasm warnings ([#1312](https://github.com/gakonst/ethers-rs/issues/1312)) +- Log error on ws unexpected close +- Fix newest nightly lints ([#1298](https://github.com/gakonst/ethers-rs/issues/1298)) +- Make clippy happy ([#1230](https://github.com/gakonst/ethers-rs/issues/1230)) +- Update moonbeam url ([#1228](https://github.com/gakonst/ethers-rs/issues/1228)) +- Update VerifyArgs ([#1212](https://github.com/gakonst/ethers-rs/issues/1212)) +- Fix typo in provider readme +- Remove async feature requirement ([#1181](https://github.com/gakonst/ethers-rs/issues/1181)) +- Include error code in diagnostic ([#1171](https://github.com/gakonst/ethers-rs/issues/1171)) +- Derive default for log ([#1168](https://github.com/gakonst/ethers-rs/issues/1168)) +- Silence unused warnings ([#1162](https://github.com/gakonst/ethers-rs/issues/1162)) +- Update svm ([#1150](https://github.com/gakonst/ethers-rs/issues/1150)) +- Add as number helper function ([#1139](https://github.com/gakonst/ethers-rs/issues/1139)) +- Make ipfs the default bytecodehash again ([#1128](https://github.com/gakonst/ethers-rs/issues/1128)) +- Expose some helpers ([#1118](https://github.com/gakonst/ethers-rs/issues/1118)) +- Add examples with required features ([#1109](https://github.com/gakonst/ethers-rs/issues/1109)) +- Add some solc checksum traces ([#1088](https://github.com/gakonst/ethers-rs/issues/1088)) +- Add .sol extension when missing ([#1077](https://github.com/gakonst/ethers-rs/issues/1077)) +- Update svm ([#1074](https://github.com/gakonst/ethers-rs/issues/1074)) +- Update svm-rs and svm-rs-builds ([#1069](https://github.com/gakonst/ethers-rs/issues/1069)) +- Return error for unverified contracts ([#1065](https://github.com/gakonst/ethers-rs/issues/1065)) +- Decrease tx count in nonce manager test ([#1053](https://github.com/gakonst/ethers-rs/issues/1053)) +- Do not pin eyre patch version +- Improve error message when bindings out of sync ([#1025](https://github.com/gakonst/ethers-rs/issues/1025)) +- Provide remappings on unresolved import message ([#1026](https://github.com/gakonst/ethers-rs/issues/1026)) +- Go back to upstream svm +- Make on_solc_success a no-op to avoid duplicate logs +- Add rate limit message ([#971](https://github.com/gakonst/ethers-rs/issues/971)) +- Cargo --fix ([#921](https://github.com/gakonst/ethers-rs/issues/921)) +- Fix all warnings ([#890](https://github.com/gakonst/ethers-rs/issues/890)) +- Rm no longer valid todo ([#870](https://github.com/gakonst/ethers-rs/issues/870)) +- Lints +- Add info messages to solc install/compile ([#838](https://github.com/gakonst/ethers-rs/issues/838)) +- Remove broken celo test +- Also rm cache dir if empty ([#822](https://github.com/gakonst/ethers-rs/issues/822)) +- Add more convenience functions ([#810](https://github.com/gakonst/ethers-rs/issues/810)) +- Add ord derive ([#807](https://github.com/gakonst/ethers-rs/issues/807)) +- Update ethabi +- Silence unused ws macro ([#788](https://github.com/gakonst/ethers-rs/issues/788)) +- Fix lints / solc test +- Use new acc for rinkeby integration tests +- More verbose traces ([#738](https://github.com/gakonst/ethers-rs/issues/738)) +- Remove old webpki dep from reqwest +- Disable auto-enabling of asm +- Add display impl for PathsConfig ([#708](https://github.com/gakonst/ethers-rs/issues/708)) +- Use new remapping detection ([#707](https://github.com/gakonst/ethers-rs/issues/707)) +- Make clippy happy ([#705](https://github.com/gakonst/ethers-rs/issues/705)) +- Remove unused patch +- Allow unused http_get ([#674](https://github.com/gakonst/ethers-rs/issues/674)) +- Makes etherscan::Result pub(crate) ([#638](https://github.com/gakonst/ethers-rs/issues/638)) +- Update changelog + +### Other + +- Add safe and finalized tag to BlockNumber ([#1792](https://github.com/gakonst/ethers-rs/issues/1792)) +- Add option to disable CBOR metadata in bytecode. ([#1782](https://github.com/gakonst/ethers-rs/issues/1782)) +- Disable remove_liq and revert to always use rinkeby +- Fix Transaction decoding ([#1773](https://github.com/gakonst/ethers-rs/issues/1773)) +- Re-enable remove_liq example and replace key w goerli key +- Drop anvil stdout ([#1759](https://github.com/gakonst/ethers-rs/issues/1759)) +- Return `Arc` instead of `&M` ([#1731](https://github.com/gakonst/ethers-rs/issues/1731)) +- Omit ([#1686](https://github.com/gakonst/ethers-rs/issues/1686)) +- Serialize viaIR setting ([#1655](https://github.com/gakonst/ethers-rs/issues/1655)) +- Explicitly handle all chains on match ([#1635](https://github.com/gakonst/ethers-rs/issues/1635)) +- Derive debug, clone and copy ([#1634](https://github.com/gakonst/ethers-rs/issues/1634)) +- Fix 'get_transactions' response. ([#1632](https://github.com/gakonst/ethers-rs/issues/1632)) +- More gas oracles ([#1251](https://github.com/gakonst/ethers-rs/issues/1251)) +- Don't auto-generate an AccessList when sending/filling a tx ([#1619](https://github.com/gakonst/ethers-rs/issues/1619)) +- Export LogQueryError ([#1615](https://github.com/gakonst/ethers-rs/issues/1615)) +- Fix bug in basic lib and basic contract generation ([#1580](https://github.com/gakonst/ethers-rs/issues/1580)) +- Derive Clone on Wallet ([#1573](https://github.com/gakonst/ethers-rs/issues/1573)) +- Take provider interval on PendingTransaction ([#1558](https://github.com/gakonst/ethers-rs/issues/1558)) +- Solang parser 0.1.17 ([#1548](https://github.com/gakonst/ethers-rs/issues/1548)) +- Rm pinned nightly ([#1541](https://github.com/gakonst/ethers-rs/issues/1541)) +- Add a simple constructor for Wallet ([#1530](https://github.com/gakonst/ethers-rs/issues/1530)) +- MBlockerge branch 'master' of github.com:gakonst/ethers-rs +- Add immutableReferences output selector ([#1523](https://github.com/gakonst/ethers-rs/issues/1523)) +- Update README to document common feature flags for providers (websock… ([#1493](https://github.com/gakonst/ethers-rs/issues/1493)) +- Set URL to binaries.soliditylang.org ([#1490](https://github.com/gakonst/ethers-rs/issues/1490)) +- For fix test code, Added morden to chainid as a Mock-like value. ([#1472](https://github.com/gakonst/ethers-rs/issues/1472)) +- Fix build info default directory ([#1458](https://github.com/gakonst/ethers-rs/issues/1458)) +- Impl fastrlp traits for AccessList ([#1456](https://github.com/gakonst/ethers-rs/issues/1456)) +- Generate structs for the return data of abigen-erated contracts ([#1440](https://github.com/gakonst/ethers-rs/issues/1440)) +- Impl fastrlp traits for Signature ([#1444](https://github.com/gakonst/ethers-rs/issues/1444)) +- TypedTransaction methods into builder style ([#1414](https://github.com/gakonst/ethers-rs/issues/1414)) +- Use H64 for Block Nonce ([#1396](https://github.com/gakonst/ethers-rs/issues/1396)) +- Add call builder and eth_call state overrides ([#1340](https://github.com/gakonst/ethers-rs/issues/1340)) +- Make abigen-ed modules pub ([#1332](https://github.com/gakonst/ethers-rs/issues/1332)) +- `get_paginated_logs` fixes and refactoring ([#1328](https://github.com/gakonst/ethers-rs/issues/1328)) +- Add Arithmetic Shift Right operation for I256 ([#1324](https://github.com/gakonst/ethers-rs/issues/1324)) +- Remove liquidity example ([#1290](https://github.com/gakonst/ethers-rs/issues/1290)) +- Return instead of ignore error ([#1287](https://github.com/gakonst/ethers-rs/issues/1287)) +- Relax thiserror minor version constraint ([#1294](https://github.com/gakonst/ethers-rs/issues/1294)) +- Update & lock solang ([#1256](https://github.com/gakonst/ethers-rs/issues/1256)) +- Add Block::time ([#1250](https://github.com/gakonst/ethers-rs/issues/1250)) +- Impl TryFrom for Chain ([#1247](https://github.com/gakonst/ethers-rs/issues/1247)) +- Robust gas oracles ([#1222](https://github.com/gakonst/ethers-rs/issues/1222)) +- Make Ganache Startup Timeout *Configurable*. ([#1224](https://github.com/gakonst/ethers-rs/issues/1224)) +- Update document to enable ws & rustls / openssl if user wants to use websockets ([#1197](https://github.com/gakonst/ethers-rs/issues/1197)) +- Adds From trait to ValueOrArray ([#1200](https://github.com/gakonst/ethers-rs/issues/1200)) +- Ledger should have correct signature v value for chains with large chain ID ([#1204](https://github.com/gakonst/ethers-rs/issues/1204)) +- Use EIP155 for all signers with empty transaction `chain_id` ([#1198](https://github.com/gakonst/ethers-rs/issues/1198)) +- Update event.rs ([#1173](https://github.com/gakonst/ethers-rs/issues/1173)) +- Adjust flatten format ([#1172](https://github.com/gakonst/ethers-rs/issues/1172)) +- Cleanup of links and requirements in README ([#1163](https://github.com/gakonst/ethers-rs/issues/1163)) +- Pub deployer can modify defaults ([#1156](https://github.com/gakonst/ethers-rs/issues/1156)) +- Tx optional from ([#1075](https://github.com/gakonst/ethers-rs/issues/1075)) +- Show how to retrieve block metadata ([#1058](https://github.com/gakonst/ethers-rs/issues/1058)) +- Temporarily disable examples +- Utterly nitpicking but i was annoyed ([#1038](https://github.com/gakonst/ethers-rs/issues/1038)) +- Fix websocket connection request ([#1005](https://github.com/gakonst/ethers-rs/issues/1005)) +- Enforce commutativity of reverse resolution ([#996](https://github.com/gakonst/ethers-rs/issues/996)) +- Handle case where the data from the resolver is empty ([#963](https://github.com/gakonst/ethers-rs/issues/963)) +- Add missing chains into parse method ([#941](https://github.com/gakonst/ethers-rs/issues/941)) +- Artifact ids ([#882](https://github.com/gakonst/ethers-rs/issues/882)) +- Add Ftm multicall addresses ([#927](https://github.com/gakonst/ethers-rs/issues/927)) +- Change visibility of the function request in Provider to public so one can implement Middleware's with custom call to the node ([#919](https://github.com/gakonst/ethers-rs/issues/919)) +- Remove `limit` on `Filter` ([#917](https://github.com/gakonst/ethers-rs/issues/917)) +- Expose New `call_raw` API that permits MultiCalls without Detokenization ([#915](https://github.com/gakonst/ethers-rs/issues/915)) +- Hide Infura API key from docs ([#863](https://github.com/gakonst/ethers-rs/issues/863)) +- Add dese default_for_null ([#860](https://github.com/gakonst/ethers-rs/issues/860)) +- Flatten before verification ([#828](https://github.com/gakonst/ethers-rs/issues/828)) +- Replace anyhow with eyre in examples ([#859](https://github.com/gakonst/ethers-rs/issues/859)) +- Add eth_syncing RPC ([#848](https://github.com/gakonst/ethers-rs/issues/848)) +- Write outputs to file, if selected ([#847](https://github.com/gakonst/ethers-rs/issues/847)) +- Implement RLP decoding for transactions ([#805](https://github.com/gakonst/ethers-rs/issues/805)) +- Fix overflow and panic in priority fee estimation ([#839](https://github.com/gakonst/ethers-rs/issues/839)) +- Write `CompactContractBytecode` instead of `CompactContract` ([#833](https://github.com/gakonst/ethers-rs/issues/833)) +- Add authorization for http and websocket ([#829](https://github.com/gakonst/ethers-rs/issues/829)) +- Revert "Remove entire cache folder, not just contents ([#820](https://github.com/gakonst/ethers-rs/issues/820))" ([#821](https://github.com/gakonst/ethers-rs/issues/821)) +- Revert "Remove entire cache folder, not just contents ([#820](https://github.com/gakonst/ethers-rs/issues/820))" +- Remove entire cache folder, not just contents ([#820](https://github.com/gakonst/ethers-rs/issues/820)) +- Fantom chain ([#806](https://github.com/gakonst/ethers-rs/issues/806)) +- Add abigen uniswapv2 example ([#798](https://github.com/gakonst/ethers-rs/issues/798)) +- Implement trace_callMany ([#792](https://github.com/gakonst/ethers-rs/issues/792)) +- Uniswap weth addrbook ([#779](https://github.com/gakonst/ethers-rs/issues/779)) +- Implement `is_empty` for `AllowedLibPaths` ([#777](https://github.com/gakonst/ethers-rs/issues/777)) +- Ignore SPDX and contract size for tests ([#775](https://github.com/gakonst/ethers-rs/issues/775)) +- Add `ProjectCompileOutput::has_compiler_warnings` ([#773](https://github.com/gakonst/ethers-rs/issues/773)) +- Check for warnings after compilation ([#772](https://github.com/gakonst/ethers-rs/issues/772)) +- Remove unofficial testnet dai ([#771](https://github.com/gakonst/ethers-rs/issues/771)) +- Add WETH to address book ([#770](https://github.com/gakonst/ethers-rs/issues/770)) +- Ethers-addressbook crate ([#769](https://github.com/gakonst/ethers-rs/issues/769)) +- Update README links ([#754](https://github.com/gakonst/ethers-rs/issues/754)) +- [draft] Add Optimism & OptimismKovan chains ([#737](https://github.com/gakonst/ethers-rs/issues/737)) +- Reexport multiabigen ([#731](https://github.com/gakonst/ethers-rs/issues/731)) +- Add fn settings on CompilerInput ([#729](https://github.com/gakonst/ethers-rs/issues/729)) +- Mark TransactionFut as Send ([#723](https://github.com/gakonst/ethers-rs/issues/723)) +- Add deploy_tokens to ContractFactory ([#699](https://github.com/gakonst/ethers-rs/issues/699)) +- Test on windows targets ([#682](https://github.com/gakonst/ethers-rs/issues/682)) +- Serialize block count as quantity 2 ([#669](https://github.com/gakonst/ethers-rs/issues/669)) +- Add support for polygonscan and snowtrace for abigen ([#666](https://github.com/gakonst/ethers-rs/issues/666)) +- Serialize `eth_feeHistory` block count as `QUANTITY` ([#668](https://github.com/gakonst/ethers-rs/issues/668)) +- Add buffer for file reading ([#662](https://github.com/gakonst/ethers-rs/issues/662)) +- Add dev-rpc middleware ([#640](https://github.com/gakonst/ethers-rs/issues/640)) +- Add tracing ([#628](https://github.com/gakonst/ethers-rs/issues/628)) +- Fix parse units ([#597](https://github.com/gakonst/ethers-rs/issues/597)) + +### Performance + +- Read artifacts in parallel ([#1665](https://github.com/gakonst/ethers-rs/issues/1665)) +- Get response as bytes ([#1536](https://github.com/gakonst/ethers-rs/issues/1536)) +- Add iterator function for finding sol files ([#1480](https://github.com/gakonst/ethers-rs/issues/1480)) +- Replace wake_by_ref with loop ([#1428](https://github.com/gakonst/ethers-rs/issues/1428)) +- Only fallback to old feeHistory request on error ([#1399](https://github.com/gakonst/ethers-rs/issues/1399)) +- Short circuit remapping detection on recursive symlink ([#1225](https://github.com/gakonst/ethers-rs/issues/1225)) + +### Refactor + +- Improve error message for unresolved imports ([#1545](https://github.com/gakonst/ethers-rs/issues/1545)) +- Use expanded EthEvent impl ([#1499](https://github.com/gakonst/ethers-rs/issues/1499)) +- Unify find/remove api ([#1449](https://github.com/gakonst/ethers-rs/issues/1449)) +- Replace ethabi::Reader ([#1417](https://github.com/gakonst/ethers-rs/issues/1417)) +- Refactors ipc transport internals ([#1174](https://github.com/gakonst/ethers-rs/issues/1174)) +- Replace anyhow with eyre ([#858](https://github.com/gakonst/ethers-rs/issues/858)) +- MultiAbigen rework ([#852](https://github.com/gakonst/ethers-rs/issues/852)) +- More temp project features ([#778](https://github.com/gakonst/ethers-rs/issues/778)) +- Remappings detection rewrite ([#732](https://github.com/gakonst/ethers-rs/issues/732)) +- Move fill_transaction impl to provider rather than default ([#697](https://github.com/gakonst/ethers-rs/issues/697)) +- Move FeeHistory to core types ([#688](https://github.com/gakonst/ethers-rs/issues/688)) +- Add new io error with path info ([#680](https://github.com/gakonst/ethers-rs/issues/680)) + +### Styling + +- All ([#1751](https://github.com/gakonst/ethers-rs/issues/1751)) +- Fmt +- Seal extension traits ([#1553](https://github.com/gakonst/ethers-rs/issues/1553)) +- Fmt ([#1539](https://github.com/gakonst/ethers-rs/issues/1539)) +- Add support to Aurora network ([#1535](https://github.com/gakonst/ethers-rs/issues/1535)) +- Update broken test and use it module for ethers-contract ([#1502](https://github.com/gakonst/ethers-rs/issues/1502)) +- Fmt +- Fmt +- Add basic solc model checker options ([#1258](https://github.com/gakonst/ethers-rs/issues/1258)) +- Ensure a consistent chain ID between a signer and provider in SignerMiddleware ([#1095](https://github.com/gakonst/ethers-rs/issues/1095)) +- Fix IPC handling of jsonrpc errors ([#1123](https://github.com/gakonst/ethers-rs/issues/1123)) +- Fmt +- Split artifacts mod and create contract and bytecode mods ([#1052](https://github.com/gakonst/ethers-rs/issues/1052)) +- Create decode_tx_input.rs ([#1054](https://github.com/gakonst/ethers-rs/issues/1054)) +- Add capture test for curly bracket imports ([#956](https://github.com/gakonst/ethers-rs/issues/956)) +- Add ENS avatar and TXT records resolution ([#889](https://github.com/gakonst/ethers-rs/issues/889)) +- Fixes a parsing issue of EIP712 chain_id (chain_id = 80001 parsed as chain_id = 0x80001) ([#892](https://github.com/gakonst/ethers-rs/issues/892)) +- Add pub fn initialize_nonce in NonceMiddleManager ([#840](https://github.com/gakonst/ethers-rs/issues/840)) +- Fmt +- Make it work with latest solang ([#776](https://github.com/gakonst/ethers-rs/issues/776)) +- Make it work with latest solang ([#776](https://github.com/gakonst/ethers-rs/issues/776)) +- Cargo fmt +- Update Cryptography crates ([#617](https://github.com/gakonst/ethers-rs/issues/617)) +- Use svm global_version if it exists and no SOLC_PATH is set ([#709](https://github.com/gakonst/ethers-rs/issues/709)) +- Fix handling of `nonce too low` error ([#643](https://github.com/gakonst/ethers-rs/issues/643)) + +### Testing + +- Add create_parent_dir_all_test ([#1741](https://github.com/gakonst/ethers-rs/issues/1741)) +- Add large tuple test ([#1642](https://github.com/gakonst/ethers-rs/issues/1642)) +- Comment out etherscan abigen! test ([#1616](https://github.com/gakonst/ethers-rs/issues/1616)) +- Ensure trigger rebuild on settings change ([#1591](https://github.com/gakonst/ethers-rs/issues/1591)) +- Add avalanche test ([#1494](https://github.com/gakonst/ethers-rs/issues/1494)) +- Use default initial base fee ([#1386](https://github.com/gakonst/ethers-rs/issues/1386)) +- Add tx roundtrip test ([#1383](https://github.com/gakonst/ethers-rs/issues/1383)) +- Add tx receipt roundtrip test ([#1360](https://github.com/gakonst/ethers-rs/issues/1360)) +- Update test with changed state on forked tests ([#1353](https://github.com/gakonst/ethers-rs/issues/1353)) +- Set nonce for tx stream explicitly ([#1354](https://github.com/gakonst/ethers-rs/issues/1354)) +- Replace ganache with anvil ([#1286](https://github.com/gakonst/ethers-rs/issues/1286)) +- Expose test provider url +- Ensure structs in events work ([#1235](https://github.com/gakonst/ethers-rs/issues/1235)) +- Add another link with remapping test ([#1191](https://github.com/gakonst/ethers-rs/issues/1191)) +- Add ethcall derive test for vec tuples ([#1144](https://github.com/gakonst/ethers-rs/issues/1144)) +- Add type check test for abi array tuples ([#1143](https://github.com/gakonst/ethers-rs/issues/1143)) +- Add multiline flatten test ([#1101](https://github.com/gakonst/ethers-rs/issues/1101)) +- Add unique flatten test ([#995](https://github.com/gakonst/ethers-rs/issues/995)) +- Add etherscan test case ([#964](https://github.com/gakonst/ethers-rs/issues/964)) +- Add curly bracket import test ([#929](https://github.com/gakonst/ethers-rs/issues/929)) +- Use new celo txhash which has not been wiped + +## [0.6.0] - 2021-11-23 + +### Bug Fixes + +- Lowercase node client type ([#600](https://github.com/gakonst/ethers-rs/issues/600)) +- Remove const lag so it can be passed in as runtime variable ([#587](https://github.com/gakonst/ethers-rs/issues/587)) +- Do not unnecessarily query for solc version ([#586](https://github.com/gakonst/ethers-rs/issues/586)) +- Adds TimeLag::new() ([#568](https://github.com/gakonst/ethers-rs/issues/568)) +- Lift macros feature to lib level ([#567](https://github.com/gakonst/ethers-rs/issues/567)) +- Failing test and check --all-targets in ci ([#560](https://github.com/gakonst/ethers-rs/issues/560)) +- Send error back ([#556](https://github.com/gakonst/ethers-rs/issues/556)) +- Preserve underscores in case of collisions ([#548](https://github.com/gakonst/ethers-rs/issues/548)) +- Use debug fmt for nested arrays ([#527](https://github.com/gakonst/ethers-rs/issues/527)) +- Ensure gas estimation includes the access list in 1559/2930 txs ([#523](https://github.com/gakonst/ethers-rs/issues/523)) +- Eip712 signing with ledger hw ([#518](https://github.com/gakonst/ethers-rs/issues/518)) +- Use syn::Index for tuple access ([#515](https://github.com/gakonst/ethers-rs/issues/515)) +- Allow clippy::redundant_clone and clippy::type_complexity in abigen ([#491](https://github.com/gakonst/ethers-rs/issues/491)) +- Allow functions without output args ([#477](https://github.com/gakonst/ethers-rs/issues/477)) +- Normalize EVM version across solc versions ([#473](https://github.com/gakonst/ethers-rs/issues/473)) +- Remove solc path canonicalization +- Canonicalize custom paths +- Breaking changes and force enable serialize for eth-types ([#448](https://github.com/gakonst/ethers-rs/issues/448)) +- Fix cargo fmt command in Contributing.md ([#437](https://github.com/gakonst/ethers-rs/issues/437)) +- Cleanup lock file after exec cargo metadata ([#431](https://github.com/gakonst/ethers-rs/issues/431)) +- Always treat abi type structs as tuples ([#417](https://github.com/gakonst/ethers-rs/issues/417)) +- Enable solc optimization ([#427](https://github.com/gakonst/ethers-rs/issues/427)) + +### Depedencies + +- 0.6.0 ([#611](https://github.com/gakonst/ethers-rs/issues/611)) +- Bump futures-util from 0.3.17 to 0.3.18 ([#609](https://github.com/gakonst/ethers-rs/issues/609)) +- Bump tracing-subscriber from 0.3.1 to 0.3.2 ([#604](https://github.com/gakonst/ethers-rs/issues/604)) +- Bump elliptic-curve from 0.10.6 to 0.11.1 ([#605](https://github.com/gakonst/ethers-rs/issues/605)) +- Bump ethers-core to 0.5.5 ([#582](https://github.com/gakonst/ethers-rs/issues/582)) +- Bump hex-literal from 0.3.3 to 0.3.4 ([#573](https://github.com/gakonst/ethers-rs/issues/573)) +- Bump `ethereum-types`' `impl-serde` to 0.3.2 ([#569](https://github.com/gakonst/ethers-rs/issues/569)) +- Bump cargo_metadata from 0.14.0 to 0.14.1 ([#563](https://github.com/gakonst/ethers-rs/issues/563)) +- Bump auto_impl from 0.4.1 to 0.5.0 ([#564](https://github.com/gakonst/ethers-rs/issues/564)) +- Bump tokio-util from 0.6.8 to 0.6.9 ([#549](https://github.com/gakonst/ethers-rs/issues/549)) +- Bump arrayvec from 0.7.1 to 0.7.2 ([#540](https://github.com/gakonst/ethers-rs/issues/540)) +- Bump tracing-subscriber from 0.3.0 to 0.3.1 ([#532](https://github.com/gakonst/ethers-rs/issues/532)) +- Bump serde-aux from 2.3.0 to 3.0.1 ([#533](https://github.com/gakonst/ethers-rs/issues/533)) +- Bump syn from 1.0.80 to 1.0.81 ([#535](https://github.com/gakonst/ethers-rs/issues/535)) +- Bump proc-macro2 from 1.0.30 to 1.0.32 ([#534](https://github.com/gakonst/ethers-rs/issues/534)) +- Bump tracing-subscriber from 0.2.25 to 0.3.0 ([#529](https://github.com/gakonst/ethers-rs/issues/529)) +- Bump reqwest from 0.11.5 to 0.11.6 ([#521](https://github.com/gakonst/ethers-rs/issues/521)) +- Bump instant from 0.1.11 to 0.1.12 ([#520](https://github.com/gakonst/ethers-rs/issues/520)) +- Bump proc-macro2 from 1.0.29 to 1.0.30 ([#504](https://github.com/gakonst/ethers-rs/issues/504)) +- Bump thiserror from 1.0.29 to 1.0.30 ([#500](https://github.com/gakonst/ethers-rs/issues/500)) +- Bump syn from 1.0.78 to 1.0.80 ([#499](https://github.com/gakonst/ethers-rs/issues/499)) +- Initial implementation of eip712 derive macro ([#481](https://github.com/gakonst/ethers-rs/issues/481)) +- Bump reqwest from 0.11.4 to 0.11.5 ([#490](https://github.com/gakonst/ethers-rs/issues/490)) +- Bump tracing from 0.1.28 to 0.1.29 ([#488](https://github.com/gakonst/ethers-rs/issues/488)) +- Bump tracing-subscriber from 0.2.24 to 0.2.25 ([#487](https://github.com/gakonst/ethers-rs/issues/487)) +- Bump instant from 0.1.10 to 0.1.11 ([#467](https://github.com/gakonst/ethers-rs/issues/467)) +- Bump coins-ledger from 0.4.0 to 0.4.2 ([#470](https://github.com/gakonst/ethers-rs/issues/470)) +- Bump ethabi ([#469](https://github.com/gakonst/ethers-rs/issues/469)) +- Bump ethabi from `ef19ba9` to `1da9de9` ([#464](https://github.com/gakonst/ethers-rs/issues/464)) +- Bump nth-check from 2.0.0 to 2.0.1 in /examples/ethers-wasm ([#466](https://github.com/gakonst/ethers-rs/issues/466)) +- Bump wasm-bindgen-futures from 0.4.27 to 0.4.28 ([#456](https://github.com/gakonst/ethers-rs/issues/456)) +- Bump tracing from 0.1.27 to 0.1.28 ([#461](https://github.com/gakonst/ethers-rs/issues/461)) +- Bump tracing-subscriber from 0.2.23 to 0.2.24 ([#462](https://github.com/gakonst/ethers-rs/issues/462)) +- Bump web-sys from 0.3.54 to 0.3.55 ([#455](https://github.com/gakonst/ethers-rs/issues/455)) +- Bump wasm-bindgen from 0.2.77 to 0.2.78 ([#454](https://github.com/gakonst/ethers-rs/issues/454)) +- Bump tracing-subscriber from 0.2.22 to 0.2.23 ([#458](https://github.com/gakonst/ethers-rs/issues/458)) +- Bump ethabi from `8bd90d1` to `ef19ba9` ([#452](https://github.com/gakonst/ethers-rs/issues/452)) +- Bump spki from 0.4.0 to 0.4.1 ([#453](https://github.com/gakonst/ethers-rs/issues/453)) +- Bump web-sys from 0.3.53 to 0.3.54 ([#438](https://github.com/gakonst/ethers-rs/issues/438)) +- Bump serde-aux from 2.2.0 to 2.3.0 ([#439](https://github.com/gakonst/ethers-rs/issues/439)) +- Bump tracing from 0.1.26 to 0.1.27 ([#449](https://github.com/gakonst/ethers-rs/issues/449)) +- Bump tracing-subscriber from 0.2.21 to 0.2.22 ([#450](https://github.com/gakonst/ethers-rs/issues/450)) +- Bump sha2 from 0.9.6 to 0.9.8 ([#443](https://github.com/gakonst/ethers-rs/issues/443)) +- Bump tracing-subscriber from 0.2.20 to 0.2.21 ([#447](https://github.com/gakonst/ethers-rs/issues/447)) +- Bump wasm-bindgen-futures from 0.4.26 to 0.4.27 ([#441](https://github.com/gakonst/ethers-rs/issues/441)) +- Bump thiserror from 1.0.28 to 1.0.29 ([#433](https://github.com/gakonst/ethers-rs/issues/433)) +- Bump tokio-util from 0.6.7 to 0.6.8 ([#434](https://github.com/gakonst/ethers-rs/issues/434)) +- Bump futures-executor from 0.3.16 to 0.3.17 ([#426](https://github.com/gakonst/ethers-rs/issues/426)) +- Bump parking_lot from 0.11.1 to 0.11.2 ([#418](https://github.com/gakonst/ethers-rs/issues/418)) +- Bump thiserror from 1.0.26 to 1.0.28 ([#419](https://github.com/gakonst/ethers-rs/issues/419)) +- Bump sha2 from 0.9.5 to 0.9.6 ([#420](https://github.com/gakonst/ethers-rs/issues/420)) +- Bump futures-util from 0.3.16 to 0.3.17 ([#423](https://github.com/gakonst/ethers-rs/issues/423)) + +### Documentation + +- Add note about wasm and ffi to readme ([#607](https://github.com/gakonst/ethers-rs/issues/607)) +- Add telegram metadata ([#509](https://github.com/gakonst/ethers-rs/issues/509)) +- Fix broken ethers-js link ([#475](https://github.com/gakonst/ethers-rs/issues/475)) + +### Features + +- Add cargo change detection support ([#599](https://github.com/gakonst/ethers-rs/issues/599)) +- Allow specifying solc version even if auto-detect enabled ([#594](https://github.com/gakonst/ethers-rs/issues/594)) +- Add solc-tests feature for synchronous download of solc versions +- Add from_str for Remapping ([#583](https://github.com/gakonst/ethers-rs/issues/583)) +- Make reqwest optional but enabled by default ([#580](https://github.com/gakonst/ethers-rs/issues/580)) +- Auto-detect solc remappings ([#574](https://github.com/gakonst/ethers-rs/issues/574)) +- Allow providing --allow-args ([#553](https://github.com/gakonst/ethers-rs/issues/553)) +- Multiple Solc Version detection ([#551](https://github.com/gakonst/ethers-rs/issues/551)) +- Add solc svm find support ([#547](https://github.com/gakonst/ethers-rs/issues/547)) +- Use ethers_solc::Solc instead of ethers_core::utils::Solc ([#546](https://github.com/gakonst/ethers-rs/issues/546)) +- Enumerate overloaded functions if they are nameless ([#545](https://github.com/gakonst/ethers-rs/issues/545)) +- Only compile changed files ([#544](https://github.com/gakonst/ethers-rs/issues/544)) +- Improved solc management ([#539](https://github.com/gakonst/ethers-rs/issues/539)) +- Unify get_block_receipts for eth/parity RPCs ([#541](https://github.com/gakonst/ethers-rs/issues/541)) +- Add abi code trait impls ([#531](https://github.com/gakonst/ethers-rs/issues/531)) +- Add ethers-solc crate ([#522](https://github.com/gakonst/ethers-rs/issues/522)) +- Expose Wallet::sign_hash +- Add ethabitype support for solidity style enums ([#526](https://github.com/gakonst/ethers-rs/issues/526)) +- Add abi type trait ([#519](https://github.com/gakonst/ethers-rs/issues/519)) +- Function call enums EthCall macro and more ([#517](https://github.com/gakonst/ethers-rs/issues/517)) +- Transaction endpoints ([#512](https://github.com/gakonst/ethers-rs/issues/512)) +- Add display support for events ([#513](https://github.com/gakonst/ethers-rs/issues/513)) +- Substitute overloaded functions ([#501](https://github.com/gakonst/ethers-rs/issues/501)) +- Add support for multiple contract definitions in abigen macro ([#498](https://github.com/gakonst/ethers-rs/issues/498)) +- Impl Deserialize for block number ([#497](https://github.com/gakonst/ethers-rs/issues/497)) +- Add etherscan client crate ([#486](https://github.com/gakonst/ethers-rs/issues/486)) +- Add general solc contract types ([#484](https://github.com/gakonst/ethers-rs/issues/484)) +- Support artifact format in proc macro ([#480](https://github.com/gakonst/ethers-rs/issues/480)) +- Support human readable struct inputs ([#482](https://github.com/gakonst/ethers-rs/issues/482)) +- Allow to configure combined-json ([#483](https://github.com/gakonst/ethers-rs/issues/483)) +- Support Hardhat ABI format ([#478](https://github.com/gakonst/ethers-rs/issues/478)) +- Support shorthand function declarations ([#472](https://github.com/gakonst/ethers-rs/issues/472)) +- First draft timelag middleware ([#457](https://github.com/gakonst/ethers-rs/issues/457)) +- Expand solc capabilities / chore: update ethabi ([#445](https://github.com/gakonst/ethers-rs/issues/445)) +- Add quorum provider ([#409](https://github.com/gakonst/ethers-rs/issues/409)) + +### Miscellaneous Tasks + +- Enable zeroize feature for k256 ([#596](https://github.com/gakonst/ethers-rs/issues/596)) +- Don't look for remappings on hardhat ([#585](https://github.com/gakonst/ethers-rs/issues/585)) +- Re-export http client error in providers transports ([#570](https://github.com/gakonst/ethers-rs/issues/570)) +- Fix flaky integration test +- Expose modules +- Update to Rust edition 2021 ([#528](https://github.com/gakonst/ethers-rs/issues/528)) +- Move proc macro implementation to separate modules ([#510](https://github.com/gakonst/ethers-rs/issues/510)) +- Remove GasNow api since it's deprecated ([#508](https://github.com/gakonst/ethers-rs/issues/508)) +- Remove unused && cargo fix ([#496](https://github.com/gakonst/ethers-rs/issues/496)) +- Expose I256 functions +- Expose solc module +- Update changelog +- Add changelog for #427 changes ([#428](https://github.com/gakonst/ethers-rs/issues/428)) +- Update changelog ([#429](https://github.com/gakonst/ethers-rs/issues/429)) +- Add changelog ([#424](https://github.com/gakonst/ethers-rs/issues/424)) + +### Other + +- Update readme for polygon and avalanche ([#610](https://github.com/gakonst/ethers-rs/issues/610)) +- Add support for polygon and avalanche ([#606](https://github.com/gakonst/ethers-rs/issues/606)) +- Add net_version call ([#595](https://github.com/gakonst/ethers-rs/issues/595)) +- Fix/providers ([#590](https://github.com/gakonst/ethers-rs/issues/590)) +- Prestwich/escalator fixes ([#581](https://github.com/gakonst/ethers-rs/issues/581)) +- Remove failing workflow +- Load rinkeby privkey from envvar instead of secrets +- Load rinkeby privkey from secrets +- Add Decimal support to ethers::utils::parse_units ([#463](https://github.com/gakonst/ethers-rs/issues/463)) +- Change wei from 1 to 0 ([#460](https://github.com/gakonst/ethers-rs/issues/460)) +- Add getProof to provider ([#459](https://github.com/gakonst/ethers-rs/issues/459)) +- Add cache +- Add utils::get_create2_address_from_hash() ([#444](https://github.com/gakonst/ethers-rs/issues/444)) +- Add usage examples for hashing utilities ([#436](https://github.com/gakonst/ethers-rs/issues/436)) +- Make 'ens' module public ([#435](https://github.com/gakonst/ethers-rs/issues/435)) +- Event aliasing for contract bindings ([#425](https://github.com/gakonst/ethers-rs/issues/425)) +- Correctly encode non-legacy mempool transactions ([#415](https://github.com/gakonst/ethers-rs/issues/415)) +- Run examples in CI ([#421](https://github.com/gakonst/ethers-rs/issues/421)) + +### Performance + +- Remove clone ([#602](https://github.com/gakonst/ethers-rs/issues/602)) + +### Refactor + +- [**breaking**] Make artifactoutput a trait ([#579](https://github.com/gakonst/ethers-rs/issues/579)) +- Move Chain enum, use HashMap::from ([#524](https://github.com/gakonst/ethers-rs/issues/524)) + +### Styling + +- Prestwich/super pending ([#566](https://github.com/gakonst/ethers-rs/issues/566)) +- Refactor crate determination in new ethers-macro crate ([#555](https://github.com/gakonst/ethers-rs/issues/555)) +- (fix): new_keystore returns uuid as well ([#559](https://github.com/gakonst/ethers-rs/issues/559)) +- Fix missing fmt argument in error message ([#552](https://github.com/gakonst/ethers-rs/issues/552)) +- Add rustfmt.toml ([#537](https://github.com/gakonst/ethers-rs/issues/537)) +- Simplify eip712 example ([#492](https://github.com/gakonst/ethers-rs/issues/492)) +- Cargo fmt + +### Testing + +- Get rinkeby private key from env var ([#542](https://github.com/gakonst/ethers-rs/issues/542)) +- Add underscore test ([#505](https://github.com/gakonst/ethers-rs/issues/505)) +- Fix flapping gas oracle ([#514](https://github.com/gakonst/ethers-rs/issues/514)) +- Fix duplicate tx flakes by rotating through a list of wallets ([#451](https://github.com/gakonst/ethers-rs/issues/451)) + +## [0.5.1] - 2021-08-28 + +### Bug Fixes + +- Generate correct imports depending on ethers crate usage ([#413](https://github.com/gakonst/ethers-rs/issues/413)) +- Make packages default members so they get executed on unit tests ([#411](https://github.com/gakonst/ethers-rs/issues/411)) +- Add send + unpin to stream type ([#402](https://github.com/gakonst/ethers-rs/issues/402)) +- Use once_cell with feature=std in abigen ([#401](https://github.com/gakonst/ethers-rs/issues/401)) +- Drop WS server if work complete ([#399](https://github.com/gakonst/ethers-rs/issues/399)) +- Backwards compatibility for eth_feeHistory ([#395](https://github.com/gakonst/ethers-rs/issues/395)) +- Skip 2930 tests in legacy mode / skip aws test if no id ([#386](https://github.com/gakonst/ethers-rs/issues/386)) +- Signature fields should be U256 instead of H256 ([#379](https://github.com/gakonst/ethers-rs/issues/379)) +- Make gasPrice optional (since Type 2 transactions) ([#374](https://github.com/gakonst/ethers-rs/issues/374)) +- Use async-await-macro to fix docs.rs publishing +- Only wrap single struct param in a tuple ([#368](https://github.com/gakonst/ethers-rs/issues/368)) +- Convert tuple arguments to tuples ([#363](https://github.com/gakonst/ethers-rs/issues/363)) +- Make chain_id mandatory ([#286](https://github.com/gakonst/ethers-rs/issues/286)) +- Preserve from field in SignerMiddleware ([#350](https://github.com/gakonst/ethers-rs/issues/350)) +- Make event types thread safe ([#341](https://github.com/gakonst/ethers-rs/issues/341)) +- Use ethabi from master w/ fixed abiv2 bug +- Remove ethers celo feature and ignore celo test ([#313](https://github.com/gakonst/ethers-rs/issues/313)) +- Event decoding for events with zero or one parameters ([#300](https://github.com/gakonst/ethers-rs/issues/300)) +- Off by one error during event decoding ([#296](https://github.com/gakonst/ethers-rs/issues/296)) +- Remove dependency on curl ([#285](https://github.com/gakonst/ethers-rs/issues/285)) +- Add indexed attribute when deriving EthEvent ([#255](https://github.com/gakonst/ethers-rs/issues/255)) +- Make EthEvent abi attribute work for tuple inputs ([#229](https://github.com/gakonst/ethers-rs/issues/229)) +- Correctly parse params in human readable abi ([#194](https://github.com/gakonst/ethers-rs/issues/194)) +- Improvements in DsProxy execute ([#177](https://github.com/gakonst/ethers-rs/issues/177)) +- Switch between units correctly ([#170](https://github.com/gakonst/ethers-rs/issues/170)) + +### Depedencies + +- Remove cyclical dependencies ([#410](https://github.com/gakonst/ethers-rs/issues/410)) +- Bump bytes from 1.0.1 to 1.1.0 ([#407](https://github.com/gakonst/ethers-rs/issues/407)) +- Bump elliptic-curve from 0.10.5 to 0.10.6 ([#406](https://github.com/gakonst/ethers-rs/issues/406)) +- Bump coins-ledger from 0.3.0 to 0.4.0 ([#405](https://github.com/gakonst/ethers-rs/issues/405)) +- Bump tracing-subscriber from 0.2.19 to 0.2.20 ([#389](https://github.com/gakonst/ethers-rs/issues/389)) +- 0.4 ([#382](https://github.com/gakonst/ethers-rs/issues/382)) +- Bump coins-ledger from 0.1.0 to 0.3.0 ([#334](https://github.com/gakonst/ethers-rs/issues/334)) +- Bump futures-executor from 0.3.15 to 0.3.16 ([#351](https://github.com/gakonst/ethers-rs/issues/351)) +- Update deps ([#352](https://github.com/gakonst/ethers-rs/issues/352)) +- Bump tokio-tungstenite from 0.14.0 to 0.15.0 ([#338](https://github.com/gakonst/ethers-rs/issues/338)) +- Bump hex-literal from 0.3.2 to 0.3.3 ([#344](https://github.com/gakonst/ethers-rs/issues/344)) +- Bump futures-util from 0.3.15 to 0.3.16 ([#348](https://github.com/gakonst/ethers-rs/issues/348)) +- Bump elliptic-curve from 0.10.3 to 0.10.4 ([#340](https://github.com/gakonst/ethers-rs/issues/340)) +- Bump ethabi to 14.1.0 +- Update crypto deps for ethers ([#333](https://github.com/gakonst/ethers-rs/issues/333)) +- Bump futures-util from 0.3.14 to 0.3.15 ([#290](https://github.com/gakonst/ethers-rs/issues/290)) +- Bump url from 2.2.1 to 2.2.2 ([#289](https://github.com/gakonst/ethers-rs/issues/289)) +- Bump sha2 from 0.9.3 to 0.9.5 ([#291](https://github.com/gakonst/ethers-rs/issues/291)) +- Bump tracing from 0.1.25 to 0.1.26 ([#284](https://github.com/gakonst/ethers-rs/issues/284)) +- Bump tokio-util from 0.6.6 to 0.6.7 ([#295](https://github.com/gakonst/ethers-rs/issues/295)) +- Bump elliptic-curve from 0.10.0 to 0.10.3 ([#323](https://github.com/gakonst/ethers-rs/issues/323)) +- Bump reqwest from 0.11.3 to 0.11.4 ([#322](https://github.com/gakonst/ethers-rs/issues/322)) +- Bump thiserror from 1.0.24 to 1.0.26 ([#328](https://github.com/gakonst/ethers-rs/issues/328)) +- Bump once_cell from 1.7.2 to 1.8.0 ([#317](https://github.com/gakonst/ethers-rs/issues/317)) +- Bump elliptic-curve from 0.9.11 to 0.10.0 ([#311](https://github.com/gakonst/ethers-rs/issues/311)) +- Bump eth-keystore from 0.2.0 to 0.2.1 ([#280](https://github.com/gakonst/ethers-rs/issues/280)) +- Bump futures-executor from 0.3.13 to 0.3.14 ([#273](https://github.com/gakonst/ethers-rs/issues/273)) +- Bump k256 from 0.7.2 to 0.7.3 ([#277](https://github.com/gakonst/ethers-rs/issues/277)) +- Bump async-trait from 0.1.48 to 0.1.50 ([#278](https://github.com/gakonst/ethers-rs/issues/278)) +- Bump pin-project from 1.0.6 to 1.0.7 ([#279](https://github.com/gakonst/ethers-rs/issues/279)) +- Bump elliptic-curve from 0.9.6 to 0.9.11 ([#281](https://github.com/gakonst/ethers-rs/issues/281)) +- Bump tokio from 1.4.0 to 1.5.0 ([#275](https://github.com/gakonst/ethers-rs/issues/275)) +- Bump serde-aux from 2.1.1 to 2.2.0 ([#267](https://github.com/gakonst/ethers-rs/issues/267)) +- Bump tokio-util from 0.6.5 to 0.6.6 ([#272](https://github.com/gakonst/ethers-rs/issues/272)) +- Bump bincode from 1.3.2 to 1.3.3 ([#266](https://github.com/gakonst/ethers-rs/issues/266)) +- Bump futures-util from 0.3.13 to 0.3.14 ([#268](https://github.com/gakonst/ethers-rs/issues/268)) +- Bump reqwest from 0.11.2 to 0.11.3 ([#271](https://github.com/gakonst/ethers-rs/issues/271)) +- Bump anyhow from 1.0.38 to 1.0.39 ([#243](https://github.com/gakonst/ethers-rs/issues/243)) +- Bump tokio from 1.2.0 to 1.4.0 ([#242](https://github.com/gakonst/ethers-rs/issues/242)) +- Bump elliptic-curve from 0.9.4 to 0.9.5 ([#237](https://github.com/gakonst/ethers-rs/issues/237)) +- Bump reqwest from 0.11.1 to 0.11.2 ([#223](https://github.com/gakonst/ethers-rs/issues/223)) +- Bump serde from 1.0.123 to 1.0.124 ([#222](https://github.com/gakonst/ethers-rs/issues/222)) +- Bump hex from 0.4.2 to 0.4.3 ([#220](https://github.com/gakonst/ethers-rs/issues/220)) +- Bump once_cell from 1.7.0 to 1.7.2 ([#218](https://github.com/gakonst/ethers-rs/issues/218)) +- Bump bincode from 1.3.1 to 1.3.2 ([#211](https://github.com/gakonst/ethers-rs/issues/211)) +- Bump futures-executor from 0.3.12 to 0.3.13 ([#213](https://github.com/gakonst/ethers-rs/issues/213)) +- Bump serde_json from 1.0.62 to 1.0.64 ([#215](https://github.com/gakonst/ethers-rs/issues/215)) +- Bump futures-channel from 0.3.12 to 0.3.13 ([#208](https://github.com/gakonst/ethers-rs/issues/208)) +- Bump futures-util from 0.3.12 to 0.3.13 ([#207](https://github.com/gakonst/ethers-rs/issues/207)) +- Bump once_cell from 1.6.0 to 1.7.0 ([#212](https://github.com/gakonst/ethers-rs/issues/212)) +- Bump tracing from 0.1.24 to 0.1.25 ([#210](https://github.com/gakonst/ethers-rs/issues/210)) +- Bump once_cell from 1.5.2 to 1.6.0 ([#206](https://github.com/gakonst/ethers-rs/issues/206)) +- Bump url from 2.2.0 to 2.2.1 ([#201](https://github.com/gakonst/ethers-rs/issues/201)) +- Bump tracing from 0.1.23 to 0.1.24 ([#199](https://github.com/gakonst/ethers-rs/issues/199)) +- Bump elliptic-curve from 0.9.3 to 0.9.4 ([#203](https://github.com/gakonst/ethers-rs/issues/203)) +- Bump thiserror from 1.0.23 to 1.0.24 ([#204](https://github.com/gakonst/ethers-rs/issues/204)) +- Bump reqwest from 0.11.0 to 0.11.1 ([#202](https://github.com/gakonst/ethers-rs/issues/202)) +- Bump elliptic-curve from 0.9.2 to 0.9.3 ([#198](https://github.com/gakonst/ethers-rs/issues/198)) +- Bump tracing-futures from 0.2.4 to 0.2.5 ([#197](https://github.com/gakonst/ethers-rs/issues/197)) +- Update deps ([#196](https://github.com/gakonst/ethers-rs/issues/196)) +- Bump sha2 from 0.9.2 to 0.9.3 ([#185](https://github.com/gakonst/ethers-rs/issues/185)) +- Bump serde_json from 1.0.61 to 1.0.62 ([#190](https://github.com/gakonst/ethers-rs/issues/190)) +- Bump pin-project from 1.0.4 to 1.0.5 ([#187](https://github.com/gakonst/ethers-rs/issues/187)) +- Bump yubihsm from 0.37.0 to 0.38.0 ([#186](https://github.com/gakonst/ethers-rs/issues/186)) +- Bump tokio from 1.1.1 to 1.2.0 ([#189](https://github.com/gakonst/ethers-rs/issues/189)) +- Bump tracing from 0.1.22 to 0.1.23 ([#188](https://github.com/gakonst/ethers-rs/issues/188)) +- Bump tokio from 1.1.0 to 1.1.1 ([#184](https://github.com/gakonst/ethers-rs/issues/184)) +- Bump serde from 1.0.120 to 1.0.123 ([#181](https://github.com/gakonst/ethers-rs/issues/181)) +- Bump tokio from 1.0.2 to 1.1.0 ([#179](https://github.com/gakonst/ethers-rs/issues/179)) +- Bump serde from 1.0.119 to 1.0.120 ([#176](https://github.com/gakonst/ethers-rs/issues/176)) +- Bump futures-executor from 0.3.11 to 0.3.12 ([#173](https://github.com/gakonst/ethers-rs/issues/173)) +- Bump futures-util from 0.3.11 to 0.3.12 ([#171](https://github.com/gakonst/ethers-rs/issues/171)) +- Bump k256 from 0.7.1 to 0.7.2 ([#156](https://github.com/gakonst/ethers-rs/issues/156)) +- Bump tokio from 1.0.1 to 1.0.2 ([#160](https://github.com/gakonst/ethers-rs/issues/160)) +- Bump futures-channel from 0.3.11 to 0.3.12 ([#167](https://github.com/gakonst/ethers-rs/issues/167)) +- Bump futures-executor from 0.3.9 to 0.3.11 ([#158](https://github.com/gakonst/ethers-rs/issues/158)) +- Bump futures-core from 0.3.11 to 0.3.12 ([#166](https://github.com/gakonst/ethers-rs/issues/166)) +- Bump futures-util from 0.3.9 to 0.3.11 ([#159](https://github.com/gakonst/ethers-rs/issues/159)) + +### Documentation + +- Typo fix ([#292](https://github.com/gakonst/ethers-rs/issues/292)) +- Add example for mnemonic ([#258](https://github.com/gakonst/ethers-rs/issues/258)) +- Note EIP-658 in TransactionReceipt ([#178](https://github.com/gakonst/ethers-rs/issues/178)) + +### Features + +- Add wasm http provider support ([#403](https://github.com/gakonst/ethers-rs/issues/403)) +- Wasm support ([#390](https://github.com/gakonst/ethers-rs/issues/390)) +- Add basic policy middleware ([#400](https://github.com/gakonst/ethers-rs/issues/400)) +- Drop WS server on when WS connection closes ([#396](https://github.com/gakonst/ethers-rs/issues/396)) +- Fee estimation with custom/default fn ([#369](https://github.com/gakonst/ethers-rs/issues/369)) +- Improve gas oracles ([#392](https://github.com/gakonst/ethers-rs/issues/392)) +- Add legacy feature to ethers crate ([#384](https://github.com/gakonst/ethers-rs/issues/384)) +- Generate rust structs from solidity JSON ABI ([#378](https://github.com/gakonst/ethers-rs/issues/378)) +- Multiple addresses on Filter ([#375](https://github.com/gakonst/ethers-rs/issues/375)) +- Typed txs (part 4) ([#362](https://github.com/gakonst/ethers-rs/issues/362)) +- Typed txs provider / middleware changes (part 3) ([#357](https://github.com/gakonst/ethers-rs/issues/357)) +- 1559/2930 txs (part 2) ([#355](https://github.com/gakonst/ethers-rs/issues/355)) +- Eip2930/1559 response type adjustments (part 1) ([#353](https://github.com/gakonst/ethers-rs/issues/353)) +- Add support for `eth_getBlockReceipts` ([#365](https://github.com/gakonst/ethers-rs/issues/365)) +- Detect ethers crate paths in derive macros ([#366](https://github.com/gakonst/ethers-rs/issues/366)) +- Signer using aws kms ([#358](https://github.com/gakonst/ethers-rs/issues/358)) +- Stream_with_meta ([#354](https://github.com/gakonst/ethers-rs/issues/354)) +- Support additional ganache arguments ([#347](https://github.com/gakonst/ethers-rs/issues/347)) +- Initial delay in PendingTransaction ([#339](https://github.com/gakonst/ethers-rs/issues/339)) +- PendingTransaction returns Option ([#327](https://github.com/gakonst/ethers-rs/issues/327)) +- Allow using native-tls or rustls ([#330](https://github.com/gakonst/ethers-rs/issues/330)) +- Extend Middleware trait customized for celo ([#314](https://github.com/gakonst/ethers-rs/issues/314)) +- Add filter utility function ([#316](https://github.com/gakonst/ethers-rs/issues/316)) +- Introduce tx stream ([#303](https://github.com/gakonst/ethers-rs/issues/303)) +- Make I256::from_raw() as const ([#305](https://github.com/gakonst/ethers-rs/issues/305)) +- Support parsing solc contract abi output in string and array form ([#301](https://github.com/gakonst/ethers-rs/issues/301)) +- Signature derives Copy trait ([#288](https://github.com/gakonst/ethers-rs/issues/288)) +- Implement IPC transport support ([#260](https://github.com/gakonst/ethers-rs/issues/260)) +- Mnemonic phrase support for wallet ([#256](https://github.com/gakonst/ethers-rs/issues/256)) +- Add async setup utility functions ([#241](https://github.com/gakonst/ethers-rs/issues/241)) +- Extend ethevent trait methods and decoding ([#239](https://github.com/gakonst/ethers-rs/issues/239)) +- Update ethabi ([#233](https://github.com/gakonst/ethers-rs/issues/233)) +- Add support for EIP-234 and EIP-1898 ([#231](https://github.com/gakonst/ethers-rs/issues/231)) +- Include ethevent proc macro in abigen code gen workflow ([#232](https://github.com/gakonst/ethers-rs/issues/232)) +- Add EthEvent proc macro derive support ([#227](https://github.com/gakonst/ethers-rs/issues/227)) +- Add struct parsing support for human readable ABI ([#226](https://github.com/gakonst/ethers-rs/issues/226)) +- Report path on failed abigen load ([#205](https://github.com/gakonst/ethers-rs/issues/205)) +- Transformer middleware with DsProxy impl ([#165](https://github.com/gakonst/ethers-rs/issues/165)) + +### Miscellaneous Tasks + +- Pull ethers to top level directory ([#398](https://github.com/gakonst/ethers-rs/issues/398)) +- Disable all ethers features by default and expose them individually ([#394](https://github.com/gakonst/ethers-rs/issues/394)) +- Add explanation on `legacy` flag +- Remove default feature on futures-util from all crates +- Skip tx rlp test in celo +- Allow clippy enum variant names ([#364](https://github.com/gakonst/ethers-rs/issues/364)) +- Re-export aws signer error ([#359](https://github.com/gakonst/ethers-rs/issues/359)) +- Fix lints ([#329](https://github.com/gakonst/ethers-rs/issues/329)) +- Use latest ethabi ([#253](https://github.com/gakonst/ethers-rs/issues/253)) +- Fix two small typos ([#249](https://github.com/gakonst/ethers-rs/issues/249)) +- Use upstream ethabi ([#248](https://github.com/gakonst/ethers-rs/issues/248)) +- Use upgraded version for eth-keystore-rs ([#193](https://github.com/gakonst/ethers-rs/issues/193)) + +### Other + +- Fix RLP encoding of gas price ([#408](https://github.com/gakonst/ethers-rs/issues/408)) +- Refactor WS handling code ([#397](https://github.com/gakonst/ethers-rs/issues/397)) +- Add uncle related missing api ([#385](https://github.com/gakonst/ethers-rs/issues/385)) +- Log streams properly end when internal stream closes ([#387](https://github.com/gakonst/ethers-rs/issues/387)) +- Sign_transaction_sync ([#388](https://github.com/gakonst/ethers-rs/issues/388)) +- Disable type serialization when legacy feature is set ([#383](https://github.com/gakonst/ethers-rs/issues/383)) +- Add Flashbots middleware to projects section ([#381](https://github.com/gakonst/ethers-rs/issues/381)) +- Add impl_fixed_types!(18) (fixes opensea abigen) ([#373](https://github.com/gakonst/ethers-rs/issues/373)) +- Cargo clippy --fix ([#346](https://github.com/gakonst/ethers-rs/issues/346)) +- Add util functions for bytes32 string encoding/decoding ([#337](https://github.com/gakonst/ethers-rs/issues/337)) +- Add xDai multicall contract address ([#324](https://github.com/gakonst/ethers-rs/issues/324)) +- Change types of block number and returned keys ([#320](https://github.com/gakonst/ethers-rs/issues/320)) +- Make request error to be confined per request, not a global websocket error ([#315](https://github.com/gakonst/ethers-rs/issues/315)) +- Fix tests failing on solc 0.8.0 or above ([#310](https://github.com/gakonst/ethers-rs/issues/310)) +- Update sign.rs ([#304](https://github.com/gakonst/ethers-rs/issues/304)) +- Upgrade to GitHub-native Dependabot ([#283](https://github.com/gakonst/ethers-rs/issues/283)) +- Prevent interleaving websocket ID load/store operations ([#217](https://github.com/gakonst/ethers-rs/issues/217)) +- Make abigen reproducible ([#200](https://github.com/gakonst/ethers-rs/issues/200)) +- Feat/is middleware signer ([#182](https://github.com/gakonst/ethers-rs/issues/182)) +- I256 implementation ([#175](https://github.com/gakonst/ethers-rs/issues/175)) +- Handle ping/pong messages for Ws provider ([#163](https://github.com/gakonst/ethers-rs/issues/163)) + +### Refactor + +- Make IPC generic over AsyncRead/Write ([#264](https://github.com/gakonst/ethers-rs/issues/264)) +- Make human readable abi parsing more robust ([#225](https://github.com/gakonst/ethers-rs/issues/225)) + +### Styling + +- Expose `LogMeta` type and add more fields, and expose FilterBlockOption ([#294](https://github.com/gakonst/ethers-rs/issues/294)) +- Replace println usage in ws provider ([#263](https://github.com/gakonst/ethers-rs/issues/263)) +- Remove token instead cloning them ([#236](https://github.com/gakonst/ethers-rs/issues/236)) + +### Testing + +- Enable ignored tests with geth ([#306](https://github.com/gakonst/ethers-rs/issues/306)) +- Account for offset for first subscription ([#302](https://github.com/gakonst/ethers-rs/issues/302)) + +## [0.2.0] - 2021-01-13 + +### Bug Fixes + +- Bump to tokio-tungstenite 13.0 +- Reschedule waker for >1 confs ([#112](https://github.com/gakonst/ethers-rs/issues/112)) +- Reschedule waker even if receipt is not available ([#104](https://github.com/gakonst/ethers-rs/issues/104)) +- Reschedule waker if receipt is immediately available ([#103](https://github.com/gakonst/ethers-rs/issues/103)) +- Default param name if not found following memory/calldata ([#91](https://github.com/gakonst/ethers-rs/issues/91)) +- Update signature error +- Replace FilterStream with concrete type ([#69](https://github.com/gakonst/ethers-rs/issues/69)) +- Return Option for txs/receipts/blocks ([#64](https://github.com/gakonst/ethers-rs/issues/64)) +- Serialize filters properly and always rewake ([#61](https://github.com/gakonst/ethers-rs/issues/61)) +- Make multicall work by reference ([#58](https://github.com/gakonst/ethers-rs/issues/58)) +- Make token decoding abiencoderv2 friendly +- Add Randomness when using celo ([#44](https://github.com/gakonst/ethers-rs/issues/44)) +- Add Send trait bound to PendingTx state future ([#39](https://github.com/gakonst/ethers-rs/issues/39)) + +### Depedencies + +- Bump to 0.2.0 ([#151](https://github.com/gakonst/ethers-rs/issues/151)) +- Bump tempfile from 3.1.0 to 3.2.0 ([#149](https://github.com/gakonst/ethers-rs/issues/149)) +- Bump serde from 1.0.118 to 1.0.119 ([#146](https://github.com/gakonst/ethers-rs/issues/146)) +- Bump bytes from 1.0.0 to 1.0.1 ([#145](https://github.com/gakonst/ethers-rs/issues/145)) +- Bump anyhow from 1.0.37 to 1.0.38 ([#139](https://github.com/gakonst/ethers-rs/issues/139)) +- Bump pin-project from 1.0.2 to 1.0.3 ([#135](https://github.com/gakonst/ethers-rs/issues/135)) +- Upgrade to Tokio 1.0 and remove async-std ([#120](https://github.com/gakonst/ethers-rs/issues/120)) +- Trim some dependencies ([#116](https://github.com/gakonst/ethers-rs/issues/116)) + +### Documentation + +- Add more docs ([#130](https://github.com/gakonst/ethers-rs/issues/130)) +- Add solc-select to the readme +- Fix broken links +- Add telegram to README + +### Features + +- Add tracing ([#113](https://github.com/gakonst/ethers-rs/issues/113)) +- Expose to_eip_155 ([#111](https://github.com/gakonst/ethers-rs/issues/111)) +- Derives &, Arc and Box for Middleware ([#109](https://github.com/gakonst/ethers-rs/issues/109)) +- Add a mock transport ([#99](https://github.com/gakonst/ethers-rs/issues/99)) +- Add method for parity_getBlockReceipts +- Port over tracing from rust-web3 ([#93](https://github.com/gakonst/ethers-rs/issues/93)) +- Allow encoding/decoding function data ([#90](https://github.com/gakonst/ethers-rs/issues/90)) +- Transaction Gas Price Escalator middleware ([#81](https://github.com/gakonst/ethers-rs/issues/81)) +- Generalize wallet/private key + yubihsm2 ([#75](https://github.com/gakonst/ethers-rs/issues/75)) +- Convert signing to k256 ([#72](https://github.com/gakonst/ethers-rs/issues/72)) +- Middleware Architecture ([#65](https://github.com/gakonst/ethers-rs/issues/65)) +- Ledger support ([#66](https://github.com/gakonst/ethers-rs/issues/66)) +- Add epochSnarkData to the celo block ([#46](https://github.com/gakonst/ethers-rs/issues/46)) +- Tokenize tuples +- Ethers-core wasm32 arch compatibility ([#38](https://github.com/gakonst/ethers-rs/issues/38)) +- Add helper to query events w/ metadata (block num + tx hash) ([#33](https://github.com/gakonst/ethers-rs/issues/33)) +- Make Signer on Client optional ([#34](https://github.com/gakonst/ethers-rs/issues/34)) +- Introduce a pending tx polling delay so that we do not spam the chain ([#31](https://github.com/gakonst/ethers-rs/issues/31)) + +### Miscellaneous Tasks + +- Use published crate ([#148](https://github.com/gakonst/ethers-rs/issues/148)) +- Upgrade to latest ethtypes ([#137](https://github.com/gakonst/ethers-rs/issues/137)) +- Use published coins-ledger ([#132](https://github.com/gakonst/ethers-rs/issues/132)) +- Remove dead code +- Add example for ledger +- Make websockets optional ([#45](https://github.com/gakonst/ethers-rs/issues/45)) + +### Other + +- Support for encrypted JSON keystore ([#138](https://github.com/gakonst/ethers-rs/issues/138)) +- Upgrade reqwest to 0.11.0 to ensure only 1 version of tokio used ([#136](https://github.com/gakonst/ethers-rs/issues/136)) +- Fix broken link to TG group in readme. ([#110](https://github.com/gakonst/ethers-rs/issues/110)) +- Returning a `PendingTransaction` after sending a tx ([#107](https://github.com/gakonst/ethers-rs/issues/107)) +- Update README.md +- Contract & Provider eth_subscribe support ([#100](https://github.com/gakonst/ethers-rs/issues/100)) +- Update README.md +- Misc Fixes ([#97](https://github.com/gakonst/ethers-rs/issues/97)) +- Add Sync trait to middleware error ([#94](https://github.com/gakonst/ethers-rs/issues/94)) +- Geth TxPool API Support ([#86](https://github.com/gakonst/ethers-rs/issues/86)) +- Address checksum ([#85](https://github.com/gakonst/ethers-rs/issues/85)) +- Nonce manager ([#59](https://github.com/gakonst/ethers-rs/issues/59)) +- (feat) gas oracle support ([#56](https://github.com/gakonst/ethers-rs/issues/56)) +- Add support for gas estimate and calldata from ContractCall ([#53](https://github.com/gakonst/ethers-rs/issues/53)) +- Add get_storage_at +- Reschedule rewaking when unpausing pending tx future ([#50](https://github.com/gakonst/ethers-rs/issues/50)) +- Implement Multicall functionality for batched calls ([#43](https://github.com/gakonst/ethers-rs/issues/43)) +- Fix buggy non-nested tuples ([#48](https://github.com/gakonst/ethers-rs/issues/48)) +- Update README.md ([#47](https://github.com/gakonst/ethers-rs/issues/47)) +- Improve Ganache Flexibility ([#37](https://github.com/gakonst/ethers-rs/issues/37)) +- Replace contract client references with Arc ([#35](https://github.com/gakonst/ethers-rs/issues/35)) +- Websockets + TLS for Async-Std / Tokio ([#30](https://github.com/gakonst/ethers-rs/issues/30)) + +### Refactor + +- Extract minimal features of Contract into BaseContract ([#88](https://github.com/gakonst/ethers-rs/issues/88)) +- Pending txns don't wait to poll futures until interval elapses ([#49](https://github.com/gakonst/ethers-rs/issues/49)) + +### Styling + +- Bug #55: prevent request from serializing ZSTs as null ([#57](https://github.com/gakonst/ethers-rs/issues/57)) + +## [0.1.3] - 2020-06-20 + +### Bug Fixes + +- Fix intradoc links and add missing cargo metadata ([#29](https://github.com/gakonst/ethers-rs/issues/29)) +- Make Signature.v a u64 instead of a u8 and expose `verify` ([#21](https://github.com/gakonst/ethers-rs/issues/21)) +- Pass array arguments ([#10](https://github.com/gakonst/ethers-rs/issues/10)) +- Simplify ENS interfaces +- Make wallet non-optional +- Serialize null filters +- Adjust to rest of contract fixes +- Fix examples + +### Depedencies + +- Skip tests with external deps + +### Documentation + +- Add missing attribution to Althea for the lean JSON RPC client +- Add missing attribution to Gnosis for codegen & macros +- Add ethers.js as a reference +- Add contributing.md +- Add some templates ([#14](https://github.com/gakonst/ethers-rs/issues/14)) +- Further expand the docs +- Update struct +- Expand contract docs +- Expand Wallet examples +- Add more docs +- Improve struct level docs +- Add doctests and examples +- Add some more docs +- Add docs to ethers-providers +- Docs + +### Features + +- Implement Serde and make Wallet API smaller ([#20](https://github.com/gakonst/ethers-rs/issues/20)) +- Add various new utility methods ([#13](https://github.com/gakonst/ethers-rs/issues/13)) +- Join the transaction futures +- Allow querying logs with their respective tx hashes +- Add solc bindings +- Adds support for launching ganache-cli +- Add ens support +- Add tokenization and improve contract API for events +- Add basic contract support +- Add fetching logs +- Add receipts +- Add get_block + +### Miscellaneous Tasks + +- Remove leftover file +- Do not run the doctests since the abi paths cannot be found +- Fix doctest +- Fix examples +- Remove unnecessary stuff +- Comment out some bothersome tests + +### Other + +- Dual license under MIT/Apache 2 ([#28](https://github.com/gakonst/ethers-rs/issues/28)) +- Provider Fixes on filters and gas estimation ([#23](https://github.com/gakonst/ethers-rs/issues/23)) +- Add Celo support ([#8](https://github.com/gakonst/ethers-rs/issues/8)) +- Fix Pending Transactions and EIP-155 ([#22](https://github.com/gakonst/ethers-rs/issues/22)) +- ABI Encoder v2 + ABI Spec v6.6 ([#17](https://github.com/gakonst/ethers-rs/issues/17)) +- Switch to github actions ([#18](https://github.com/gakonst/ethers-rs/issues/18)) +- Add json rpc bindings for eth_getCode ([#15](https://github.com/gakonst/ethers-rs/issues/15)) +- Add pending tx type to wait for tx confirmations ([#11](https://github.com/gakonst/ethers-rs/issues/11)) +- Update docs path ([#12](https://github.com/gakonst/ethers-rs/issues/12)) +- Add streamed logs to the provider ([#9](https://github.com/gakonst/ethers-rs/issues/9)) +- Re-enable paths/etherscan and enable more complex tokens +- Simplify structs and re-enable file/remote codegen +- Simplify lifetimes +- Allow connecting to many clients/addresses +- Simplify errors and generics +- Remove provider/signers trait bound +- Simplify signers +- Remove type-safe networks +- Simplify provider type declaration +- Ensure functions do not clash with event names +- Use pure rust libsecp +- Reorganize docs +- Add a prelude to make importing stuff easier +- Add deployer +- Add ContractFactory +- Add docs to ethers-signer +- Ethers-types docs +- Add some block tests +- Add test for utils +- Make ENS a first class citizen +- Integrate ENS at the provider level +- Install cargo-audit and clippy +- Add versions for publishing +- Fix ci +- Progress +- Specify the datatype when creating the call +- Complete refactor +- WIP +- Wip +- WIP +- Wip +- El refactor +- WIP add contract abi +- Filters +- Add circleci +- Update readme +- Do not expose fields +- Use builder pattern for txs +- Add eth_balance and eth_accounts +- Rename type +- Deduplicate tx types +- Cleanup +- Lock +- Abuse Deref for using provider methods in the Client +- Lints and more examples +- Wallet refactor +- WIP +- Init + +### Refactor + +- Pull crates to root dir +- Refactor ethers-types -> ethers-core +- Refactor ethers-utils to be part of ethers-types +- Refactor ethers-abi to be part of ethers-types +- Split to modules +- Refactor + +### Styling + +- Improve Stream performance ([#25](https://github.com/gakonst/ethers-rs/issues/25)) +- Cargo fmt +- Fmt + +### Testing + +- Re-enable tests + + diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b522f980..63428b5c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -134,14 +134,13 @@ include one or more tests to ensure that ethers-rs does not regress in the futur #### Unit Tests Functions which have very specific tasks should be unit tested. We encourage using -table tests to cover a large number of cases in a succinct readable manner. A good example -is the [create2](https://github.com/gakonst/ethers-rs/blob/1d7bdef0bd792867454da28c4e9c193681295fb2/ethers-core/src/utils/mod.rs#L110-L163) unit tests. +table tests to cover a large number of cases in a succinct readable manner. A good +example is the [utils](./ethers-core/src/utils/mod.rs#L647) unit tests. #### Integration tests -Integration tests go in the same crate as the code they are testing. Each sub -crate should have a `dev-dependency` on `ethers` itself. This makes all -utilities available to use in tests, no matter the crate being tested. +Integration tests go in the same crate as the code they are testing, in the +`tests/it/` directory. The best strategy for writing a new integration test is to look at existing integration tests in the crate and follow the style. @@ -155,27 +154,23 @@ that the example is correct and provides additional test coverage. The trick to documentation tests is striking a balance between being succinct for a reader to understand and actually testing the API. -Same as with integration tests, when writing a documentation test, the full -`ethers` crate is available. This is especially useful for getting access to the -runtime to run the example. - The documentation tests will be visible from both the crate specific documentation **and** the `ethers` facade documentation via the re-export. The example should be written from the point of view of a user that is using the -`ethers` crate. As such, the example should use the API via the facade and not by -directly referencing the crate. +`ethers` crate. The type level example for `ethers_providers::Provider` provides a good example of a documentation test: ````rust /// ```no_run -/// use ethers::providers::{JsonRpcClient, Provider, Http}; -/// use std::convert::TryFrom; +/// # async fn foo() -> Result<(), Box> { +/// use ethers_providers::{Middleware, Provider, Http}; /// -/// let provider = Provider::::try_from("https://eth.llamarpc.com").expect("could not instantiate HTTP Provider"); +/// let provider = Provider::::try_from( +/// "https://eth.llamarpc.com" +/// ).expect("could not instantiate HTTP Provider"); /// -/// # async fn foo(provider: &Provider

) -> Result<(), Box> { /// let block = provider.get_block(100u64).await?; /// println!("Got block: {}", serde_json::to_string(&block)?); /// # Ok(()) @@ -205,52 +200,15 @@ notes about [commit squashing](#commit-squashing)). #### Commit message guidelines -A good commit message should describe what changed and why. +Commit messages should follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) +specification. -1. The first line should: +Here's a few examples from the master branch's commit log: -- contain a short description of the change (preferably 50 characters or less, - and no more than 72 characters) -- be entirely in lowercase with the exception of proper nouns, acronyms, and - the words that refer to code, like function/variable names -- be prefixed with the name of the sub crate being changed (without the `ethers-` - prefix) and start with an imperative verb. If modifying `ethers` proper, - omit the crate prefix. - -Examples: - -- providers: introduce ENS querying for names and addresses -- re-export the abi, types and utils modules from `ethers_core` - -2. Keep the second line blank. -3. Wrap all other lines at 72 columns (except for long URLs). -4. If your patch fixes an open issue, you can add a reference to it at the end - of the log. Use the `Fixes: #` prefix and the issue number. For other - references use `Refs: #`. `Refs` may include multiple issues, separated by a - comma. - - Examples: - - - `Fixes: #1337` - - `Refs: #1234` - -Sample complete commit message: - -```txt -subcrate: explain the commit in one line - -Body of commit message is a few lines of text, explaining things -in more detail, possibly giving some background about the issue -being fixed, etc. - -The body of the commit message can be several paragraphs, and -please do proper word-wrap and keep columns shorter than about -72 characters or so. That way, `git log` will show things -nicely even when it is indented. - -Fixes: #1337 -Refs: #453, #154 -``` +- feat(abigen): support empty events +- chore: bump crypto deps +- test: simplify test cleanup +- fmt: run rustfmt ### Opening the Pull Request @@ -380,17 +338,14 @@ When releasing the workspace: existing APIs. If so, resolve those issues and make a `minor` change release. Otherwise, if it is necessary to make a breaking release, make a `major` change release. -2. **Dry run the release** by running `cargo release --workspace ` -3. **Update the changelog for the crate.** Changelog for all crates go in - [`CHANGELOG.md`](./CHANGELOG.md). Any unreleased changes changelogs should - be moved to respective crates released changelogs. Change descriptions - may be taken from the Git history, but should be edited to ensure a consistent - format, based on [Keep A Changelog][keep-a-changelog]. Other entries in that - crate's changelog may also be used for reference. -4. **Release the crate.** Run the following command: - - ```bash - cargo release --workspace --execute - ``` +2. **Dry run the release.** Running the `cargo release` command without the + `--execute` flag will perform a dry run. +3. **Release the crate.** + Run the `bin/release` script with the `--execute` flag. + This will update the package versions in the relevant manifests, create + git tags, automatically generate the [`CHANGELOG.md`](./CHANGELOG.md) file + with [git-cliff], and finally publish the crates to `crates.io`. + For more information, see the top comment in the script file. [keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md +[git-cliff]: https://github.com/orhun/git-cliff diff --git a/Cargo.lock b/Cargo.lock index aa4eeafb..a436fa3d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1497,25 +1497,9 @@ dependencies = [ "yansi", ] -[[package]] -name = "ethers-wasm" -version = "2.0.0" -dependencies = [ - "console_error_panic_hook", - "ethers", - "hex", - "serde", - "serde-wasm-bindgen", - "serde_json", - "wasm-bindgen", - "wasm-bindgen-futures", - "wasm-bindgen-test", - "web-sys", -] - [[package]] name = "examples-anvil" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1524,14 +1508,14 @@ dependencies = [ [[package]] name = "examples-big-numbers" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", ] [[package]] name = "examples-contracts" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1542,7 +1526,7 @@ dependencies = [ [[package]] name = "examples-events" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1565,7 +1549,7 @@ dependencies = [ [[package]] name = "examples-middleware" -version = "2.0.0" +version = "0.0.0" dependencies = [ "async-trait", "ethers", @@ -1578,7 +1562,7 @@ dependencies = [ [[package]] name = "examples-providers" -version = "2.0.0" +version = "0.0.0" dependencies = [ "async-trait", "ethers", @@ -1593,7 +1577,7 @@ dependencies = [ [[package]] name = "examples-queries" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1604,7 +1588,7 @@ dependencies = [ [[package]] name = "examples-subscriptions" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1615,7 +1599,7 @@ dependencies = [ [[package]] name = "examples-transactions" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1626,7 +1610,7 @@ dependencies = [ [[package]] name = "examples-wallets" -version = "2.0.0" +version = "0.0.0" dependencies = [ "ethers", "eyre", @@ -1635,6 +1619,22 @@ dependencies = [ "tokio", ] +[[package]] +name = "examples-wasm" +version = "0.0.0" +dependencies = [ + "console_error_panic_hook", + "ethers", + "hex", + "serde", + "serde-wasm-bindgen", + "serde_json", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-bindgen-test", + "web-sys", +] + [[package]] name = "eyre" version = "0.6.8" diff --git a/README.md b/README.md index 97cea2aa..c5037f62 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ ethers = { version = "1.0.2", features = ["openssl"] } ## Note on WASM and FFI bindings -You should be able to build a wasm app that uses ethers-rs (see the [example](./examples/ethers-wasm) for reference). If ethers fails to +You should be able to build a wasm app that uses ethers-rs (see the [example](./examples/wasm) for reference). If ethers fails to compile in WASM, please [open an issue](https://github.com/gakonst/ethers-rs/issues/new/choose). There is currently no plan to provide an official JS/TS-accessible library diff --git a/bin/publish b/bin/publish deleted file mode 100644 index d2d4d742..00000000 --- a/bin/publish +++ /dev/null @@ -1,119 +0,0 @@ -#!/usr/bin/env bash - -set -e -USAGE="Publish a new release of a ethers-rs crate -USAGE: - $(basename "$0") [OPTIONS] [CRATE] [VERSION] -OPTIONS: - -v, --verbose Use verbose Cargo output - -d, --dry-run Perform a dry run (do not publish or tag the release) - -h, --help Show this help text and exit" - -DRY_RUN="" -VERBOSE="" - -err() { - echo -e "\e[31m\e[1merror:\e[0m $@" 1>&2; -} - -status() { - WIDTH=12 - printf "\e[32m\e[1m%${WIDTH}s\e[0m %s\n" "$1" "$2" -} - -verify() { - status "Verifying" "if $CRATE v$VERSION can be released" - ACTUAL=$(cargo pkgid | sed -n 's/.*#\(.*\)/\1/p') - - if [ "$ACTUAL" != "$VERSION" ]; then - err "expected to release version $VERSION, but Cargo.toml contained $ACTUAL" - exit 1 - fi - - if git tag -l | grep -Fxq "$TAG" ; then - err "git tag \`$TAG\` already exists" - exit 1 - fi - - PATH_DEPS=$(grep -F "path = \"" Cargo.toml | sed -e 's/^/ /') - if [ -n "$PATH_DEPS" ]; then - err "crate \`$CRATE\` contained path dependencies:\n$PATH_DEPS" - echo "path dependencies must be removed prior to release" - exit 1 - fi -} - -release() { - status "Releasing" "$CRATE v$VERSION" - cargo package $VERBOSE - cargo publish $VERBOSE $DRY_RUN - - status "Tagging" "$TAG" - if [ -n "$DRY_RUN" ]; then - echo "# git tag $TAG && git push --tags" - else - git tag "$TAG" && git push --tags - fi -} - -while [[ $# -gt 0 ]] -do - -case "$1" in - -h|--help) - echo "$USAGE" - exit 0 - ;; - -v|--verbose) - VERBOSE="--verbose" - set +x - shift - ;; - -d|--dry-run) - DRY_RUN="--dry-run" - shift - ;; - -*) - err "unknown flag \"$1\"" - echo "$USAGE" - exit 1 - ;; - *) # crate or version - if [ -z "$CRATE" ]; then - CRATE="$1" - elif [ -z "$VERSION" ]; then - VERSION="$1" - else - err "unknown positional argument \"$1\"" - echo "$USAGE" - exit 1 - fi - shift - ;; -esac -done -# set -- "${POSITIONAL[@]}" - -if [ -z "$VERSION" ]; then - err "no version specified!" - HELP=1 -fi - -if [ -n "$CRATE" ]; then - TAG="$CRATE-$VERSION" -else - err "no crate specified!" - HELP=1 -fi - -if [ -n "$HELP" ]; then - echo "$USAGE" - exit 1 -fi - -if [ -d "$CRATE" ]; then - (cd "$CRATE" && verify && release ) -else - err "no such crate \"$CRATE\"" - exit 1 -fi diff --git a/bin/release b/bin/release new file mode 100755 index 00000000..c8a70b5d --- /dev/null +++ b/bin/release @@ -0,0 +1,131 @@ +#!/usr/bin/env bash +# Creates a new release of all the ethers crates in the workspace +# +# Note that this intended be run with the --execute flag, as the dry run will +# perform all the checks that a normal `cargo release` command would. +# This is because this script will execute only a few of the steps because it +# has to run `git-cliff` to create the changelog in between steps, and exclude +# all the example crates from the version bump. + +set -e + +info() { + printf "\e[34;1minfo\e[0m: %s\n" "$1" +} + +throw() { + printf "\e[31;1merror\e[0m: %s\n\n%s\n" "$1" "$USAGE" 1>&2 + exit 1 +} + +exec_or_print() { + if [ "$EXECUTE" ]; then + "$@" + else + echo "Skipping due to dry run. Command:" "$@" + fi +} + +USAGE="Create a new release of the ethers workspace crates + +Usage: + $(basename "$0") [OPTIONS] + +Options: + -s, --sign Sign commits and tag + -v, --verbose Use verbose Cargo output + -e, --execute Actually perform a release. Dry-run mode is the default + -h, --help Show this help text and exit + +Arguments: + See 'cargo release --help'. Levels are not supported" + +SIGN_COMMIT="" +SIGN_TAG="" +VERBOSE="" +EXECUTE="" +VERSION="" +while [[ $# -gt 0 ]]; do + case $1 in + -s|--sign) + SIGN_COMMIT="--sign-commit" + SIGN_TAG="--sign-tag" + shift + ;; + -v|--verbose) + VERBOSE="--verbose" + shift + ;; + -x|--execute) + EXECUTE="--execute" + shift + ;; + -h|--help) + echo "$USAGE" + exit 0 + ;; + + --) + VERSION="$2" + break + ;; + + -*) + throw "unrecognized option: '$1'" + ;; + + *) + if [ "$VERSION" ]; then + throw "only one version can be specified" + else + VERSION="$1" + fi + shift + ;; + esac +done + +if [ ! "$VERSION" ]; then + throw "a version must be set" 1>&2 +fi + +# check for necessary binaries +NECESSARY=(cargo-release git-cliff) +MISSING="" +for bin in "${NECESSARY[@]}"; do + if ! command -v "$bin" &>/dev/null; then + MISSING=true + echo "'$bin' is required to run this command, but it is not installed" 1>&2 + fi +done +[ "$MISSING" ] && throw "missing necessary binaries" + +# exclude examples +WORKSPACE_FLAGS=(--workspace) +for ex in examples/*; do + if [ -d "$ex" ]; then + crate=$(echo "$ex" | tr / -) + WORKSPACE_FLAGS+=(--exclude "$crate") + fi +done + +# shellcheck disable=SC2206 +COMMON_FLAGS=($VERBOSE $EXECUTE) + +info "bumping crate versions" +cargo release version "${WORKSPACE_FLAGS[@]}" "${COMMON_FLAGS[@]}" "$VERSION" + +info "creating changelog" +exec_or_print git cliff -t "$VERSION" -o CHANGELOG.md + +info "creating git commit" +exec_or_print cargo release commit "${COMMON_FLAGS[@]}" $SIGN_COMMIT + +info "publishing crates" +exec_or_print cargo release publish "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}" + +info "tagging commits" +cargo release tag "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}" $SIGN_TAG + +info "pushing commits and tags to remote" +cargo release push "${COMMON_FLAGS[@]}" "${WORKSPACE_FLAGS[@]}" diff --git a/scripts/examples.sh b/bin/run_all_examples similarity index 100% rename from scripts/examples.sh rename to bin/run_all_examples diff --git a/cliff.toml b/cliff.toml new file mode 100644 index 00000000..01e6475d --- /dev/null +++ b/cliff.toml @@ -0,0 +1,83 @@ +# configuration file for git-cliff +# see https://github.com/orhun/git-cliff#configuration-file + +[changelog] +# changelog header +header = """ +# Changelog + +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), +and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +This changelog is automatically generated by [git-cliff](https://github.com/orhun/git-cliff), +which is configured [here](./cliff.toml). + +Please do not manually edit this file.\n +""" +# template for the changelog body +# https://tera.netlify.app/docs/#introduction +body = """ +{% if version %}\ + ## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }} +{% else %}\ + ## [Unreleased] +{% endif %}\ +{% for group, commits in commits | group_by(attribute="group") %} + ### {{ group | title }} + {% for commit in commits %} + - {% if commit.breaking %}[**breaking**] {% endif %}{{ commit.message | upper_first | split(pat="\\n") | first }}\ + {% endfor %} +{% endfor %}\n +""" +# remove the leading and trailing whitespace from the template +trim = true +# changelog footer +footer = """ + +""" + +[git] +# parse the commits based on https://www.conventionalcommits.org +conventional_commits = true +# filter out the commits that are not conventional +filter_unconventional = false +# process each line of a commit as an individual commit +split_commits = false +# regex for preprocessing the commit messages +commit_preprocessors = [ + # replace issue numbers + { pattern = '\((\w+\s)?#([0-9]+)\)', replace = "([#${2}](https://github.com/gakonst/ethers-rs/issues/${2}))" }, +] +# regex for parsing and grouping commits +commit_parsers = [ + { message = "^feat", group = "Features" }, + { message = "^fix", group = "Bug Fixes" }, + { message = "^doc", group = "Documentation" }, + { message = "(.*deps)|(.*dependencies)|(.*[Bb]ump)", group = "Depedencies" }, + { message = "^perf", group = "Performance" }, + { message = "^refactor", group = "Refactor" }, + { message = "(^style)|(.*fmt)", group = "Styling" }, + { message = "^test", group = "Testing" }, + { message = ".*release", skip = true }, + { message = "^revert", skip = true }, + { message = "^chore", group = "Miscellaneous Tasks" }, + { message = ".*", group = "Other" }, +] +# protect breaking changes from being skipped due to matching a skipping commit_parser +protect_breaking_commits = true +# filter out the commits that are not matched by commit parsers +filter_commits = false +# glob pattern for matching git tags +tag_pattern = "*" +# regex for skipping tags +# skip_tags = "v0.1.0-beta.1" +# regex for ignoring tags +ignore_tags = "^ethers.*" +# sort the tags topologically +topo_order = false +# sort the commits inside sections by oldest/newest order +sort_commits = "newest" +# limit the number of commits included in the changelog. +# limit_commits = 42 diff --git a/examples/anvil/Cargo.toml b/examples/anvil/Cargo.toml index 13b0ed18..3d8b0971 100644 --- a/examples/anvil/Cargo.toml +++ b/examples/anvil/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-anvil" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/big-numbers/Cargo.toml b/examples/big-numbers/Cargo.toml index 832ff472..d3f5849a 100644 --- a/examples/big-numbers/Cargo.toml +++ b/examples/big-numbers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-big-numbers" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/contracts/Cargo.toml b/examples/contracts/Cargo.toml index 6e9ca761..3fd9bb5f 100644 --- a/examples/contracts/Cargo.toml +++ b/examples/contracts/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-contracts" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/events/Cargo.toml b/examples/events/Cargo.toml index b1730d52..8dbaea5a 100644 --- a/examples/events/Cargo.toml +++ b/examples/events/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-events" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/middleware/Cargo.toml b/examples/middleware/Cargo.toml index b11c82d3..924a0162 100644 --- a/examples/middleware/Cargo.toml +++ b/examples/middleware/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-middleware" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/providers/Cargo.toml b/examples/providers/Cargo.toml index 964e2c4c..3a5b37cb 100644 --- a/examples/providers/Cargo.toml +++ b/examples/providers/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-providers" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/queries/Cargo.toml b/examples/queries/Cargo.toml index 71b01a4d..315de0e9 100644 --- a/examples/queries/Cargo.toml +++ b/examples/queries/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-queries" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/subscriptions/Cargo.toml b/examples/subscriptions/Cargo.toml index 76ca8499..0d6d276a 100644 --- a/examples/subscriptions/Cargo.toml +++ b/examples/subscriptions/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-subscriptions" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/transactions/Cargo.toml b/examples/transactions/Cargo.toml index 70bc415d..ad065baf 100644 --- a/examples/transactions/Cargo.toml +++ b/examples/transactions/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-transactions" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/wallets/Cargo.toml b/examples/wallets/Cargo.toml index 0d37ab5b..483c46d8 100644 --- a/examples/wallets/Cargo.toml +++ b/examples/wallets/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "examples-wallets" -version = "2.0.0" +version = "0.0.0" publish = false authors = ["Andrea Simeoni "] diff --git a/examples/ethers-wasm/.gitignore b/examples/wasm/.gitignore similarity index 100% rename from examples/ethers-wasm/.gitignore rename to examples/wasm/.gitignore diff --git a/examples/ethers-wasm/Cargo.toml b/examples/wasm/Cargo.toml similarity index 94% rename from examples/ethers-wasm/Cargo.toml rename to examples/wasm/Cargo.toml index 83925955..321fff65 100644 --- a/examples/ethers-wasm/Cargo.toml +++ b/examples/wasm/Cargo.toml @@ -1,8 +1,9 @@ [package] -name = "ethers-wasm" -version = "2.0.0" +name = "examples-wasm" +version = "0.0.0" authors = ["Matthias Seitz "] license = "MIT OR Apache-2.0" +publish = false rust-version.workspace = true edition.workspace = true diff --git a/examples/ethers-wasm/README.md b/examples/wasm/README.md similarity index 100% rename from examples/ethers-wasm/README.md rename to examples/wasm/README.md diff --git a/examples/ethers-wasm/abi/contract.json b/examples/wasm/abi/contract.json similarity index 100% rename from examples/ethers-wasm/abi/contract.json rename to examples/wasm/abi/contract.json diff --git a/examples/ethers-wasm/index.html b/examples/wasm/index.html similarity index 100% rename from examples/ethers-wasm/index.html rename to examples/wasm/index.html diff --git a/examples/ethers-wasm/index.js b/examples/wasm/index.js similarity index 100% rename from examples/ethers-wasm/index.js rename to examples/wasm/index.js diff --git a/examples/ethers-wasm/package.json b/examples/wasm/package.json similarity index 95% rename from examples/ethers-wasm/package.json rename to examples/wasm/package.json index 7dceecec..44c9c8e6 100644 --- a/examples/ethers-wasm/package.json +++ b/examples/wasm/package.json @@ -1,5 +1,5 @@ { - "name": "ethers-wasm", + "name": "examples-wasm", "license": "MIT OR Apache-2.0", "private": "true", "scripts": { diff --git a/examples/ethers-wasm/src/lib.rs b/examples/wasm/src/lib.rs similarity index 100% rename from examples/ethers-wasm/src/lib.rs rename to examples/wasm/src/lib.rs diff --git a/examples/ethers-wasm/src/utils.rs b/examples/wasm/src/utils.rs similarity index 100% rename from examples/ethers-wasm/src/utils.rs rename to examples/wasm/src/utils.rs diff --git a/examples/ethers-wasm/tests/contract_with_abi.rs b/examples/wasm/tests/contract_with_abi.rs similarity index 96% rename from examples/ethers-wasm/tests/contract_with_abi.rs rename to examples/wasm/tests/contract_with_abi.rs index 0050be94..f1446a13 100644 --- a/examples/ethers-wasm/tests/contract_with_abi.rs +++ b/examples/wasm/tests/contract_with_abi.rs @@ -5,7 +5,7 @@ use ethers::{ signers::Signer, types::Chain, }; -use ethers_wasm::{utils, SimpleContract}; +use examples_wasm::{utils, SimpleContract}; use std::sync::Arc; use wasm_bindgen_test::*; diff --git a/examples/ethers-wasm/webpack.config.js b/examples/wasm/webpack.config.js similarity index 100% rename from examples/ethers-wasm/webpack.config.js rename to examples/wasm/webpack.config.js diff --git a/examples/ethers-wasm/yarn.lock b/examples/wasm/yarn.lock similarity index 100% rename from examples/ethers-wasm/yarn.lock rename to examples/wasm/yarn.lock diff --git a/release.toml b/release.toml new file mode 100644 index 00000000..2dfcd4f7 --- /dev/null +++ b/release.toml @@ -0,0 +1,3 @@ +allow-branch = ["master"] +pre-release-commit-message = "chore: release" +tag-message = "chore: release {{crate_name}} v{{version}}" From 944ed05556f7560eae6acc4a6d3f9d832655f717 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 21 Mar 2023 18:38:23 +0100 Subject: [PATCH 06/16] fix(abigen): handle all struct field types (#2289) * fix(abigen): handle all struct field types * typo --- .../ethers-contract-abigen/src/util.rs | 13 +++-- ethers-contract/tests/it/abigen.rs | 56 +++++++++++++------ .../tests/solidity-contracts/BeefyV1.json | 1 + ethers-solc/src/resolver/mod.rs | 1 + 4 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 ethers-contract/tests/solidity-contracts/BeefyV1.json diff --git a/ethers-contract/ethers-contract-abigen/src/util.rs b/ethers-contract/ethers-contract-abigen/src/util.rs index e9453b5e..b4f0acfd 100644 --- a/ethers-contract/ethers-contract-abigen/src/util.rs +++ b/ethers-contract/ethers-contract-abigen/src/util.rs @@ -263,14 +263,15 @@ fn _derive_builtin_traits_struct( } } +/// Recurses on the type until it reaches the struct tuple `ParamType`. fn get_struct_params<'a>(s_ty: &StructFieldType, ty: &'a ParamType) -> &'a [ParamType] { match (s_ty, ty) { - (StructFieldType::Type(_), ParamType::Tuple(params)) => params, - (StructFieldType::Array(s_ty), ParamType::Array(ty)) => get_struct_params(s_ty, ty), - (StructFieldType::FixedArray(s_ty, _), ParamType::FixedArray(ty, _)) => { - get_struct_params(s_ty, ty) - } - _ => unreachable!(), + (_, ParamType::Tuple(params)) => params, + ( + StructFieldType::Array(s_ty) | StructFieldType::FixedArray(s_ty, _), + ParamType::Array(param) | ParamType::FixedArray(param, _), + ) => get_struct_params(s_ty, param), + _ => unreachable!("Unhandled struct field: {s_ty:?} | {ty:?}"), } } diff --git a/ethers-contract/tests/it/abigen.rs b/ethers-contract/tests/it/abigen.rs index 45ca640a..348e3790 100644 --- a/ethers-contract/tests/it/abigen.rs +++ b/ethers-contract/tests/it/abigen.rs @@ -8,7 +8,7 @@ use ethers_core::{ }; use ethers_providers::{MockProvider, Provider}; use ethers_solc::Solc; -use std::sync::Arc; +use std::{fmt::Debug, hash::Hash, sync::Arc}; const fn assert_codec() {} const fn assert_tokenizeable() {} @@ -16,7 +16,12 @@ const fn assert_call() {} const fn assert_event() {} const fn assert_clone() {} const fn assert_default() {} -const fn assert_builtin() {} +const fn assert_builtin() {} +const fn assert_struct() +where + T: AbiEncode + AbiDecode + Tokenizable + Clone + Default + Debug + PartialEq + Eq + Hash, +{ +} #[test] fn can_generate_human_readable() { @@ -25,7 +30,7 @@ fn can_generate_human_readable() { r#"[ event ValueChanged(address indexed author, string oldValue, string newValue) ]"#, - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); assert_eq!("ValueChanged", ValueChangedFilter::name()); assert_eq!("ValueChanged(address,string,string)", ValueChangedFilter::abi_signature()); @@ -43,13 +48,13 @@ fn can_generate_human_readable_multiple() { r#"[ event ValueChanged1(address indexed author, string oldValue, string newValue) ]"#, - event_derives(serde::Deserialize, serde::Serialize); + derives(serde::Deserialize, serde::Serialize); SimpleContract2, r#"[ event ValueChanged2(address indexed author, string oldValue, string newValue) ]"#, - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); assert_eq!("ValueChanged1", ValueChanged1Filter::name()); assert_eq!("ValueChanged1(address,string,string)", ValueChanged1Filter::abi_signature()); @@ -66,7 +71,7 @@ fn can_generate_structs_readable() { struct Addresses {address[] addr; string s;} event ValueChanged(Value indexed old, Value newValue, Addresses _a) ]"#, - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); let addr = Addresses { addr: vec!["eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee".parse().unwrap()], @@ -97,7 +102,7 @@ fn can_generate_structs_with_arrays_readable() { struct Addresses {address[] addr; string s;} event ValueChanged(Value indexed old, Value newValue, Addresses[] _a) ]"#, - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); assert_eq!( "ValueChanged((address,string),(address,string),(address[],string)[])", @@ -113,15 +118,32 @@ fn can_generate_internal_structs() { abigen!( VerifierContract, "ethers-contract/tests/solidity-contracts/verifier_abi.json", - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); - assert_tokenizeable::(); - assert_tokenizeable::(); - assert_tokenizeable::(); + assert_struct::(); + assert_struct::(); + assert_struct::(); +} - assert_codec::(); - assert_codec::(); - assert_codec::(); +#[test] +fn can_generate_internal_structs_2() { + abigen!(Beefy, "./tests/solidity-contracts/BeefyV1.json"); + assert_struct::(); + assert_struct::(); + assert_struct::(); + assert_struct::(); + + let s = + AuthoritySetCommitment { id: U256::from(1), len: U256::from(2), root: Default::default() }; + let _encoded = AbiEncode::encode(s.clone()); + + let s = BeefyConsensusState { current_authority_set: s, ..Default::default() }; + let _encoded = AbiEncode::encode(s); + + // tuple[][] + let node = ProofNode::default(); + let s = BeefyConsensusProof { authorities_proof: vec![vec![node; 2]; 2], ..Default::default() }; + let _encoded = AbiEncode::encode(s); } #[test] @@ -133,11 +155,11 @@ fn can_generate_internal_structs_multiple() { abigen!( VerifierContract, "ethers-contract/tests/solidity-contracts/verifier_abi.json", - event_derives(serde::Deserialize, serde::Serialize); + derives(serde::Deserialize, serde::Serialize); MyOtherVerifierContract, "ethers-contract/tests/solidity-contracts/verifier_abi.json", - event_derives(serde::Deserialize, serde::Serialize); + derives(serde::Deserialize, serde::Serialize); ); } assert_tokenizeable::(); @@ -207,7 +229,7 @@ fn can_generate_human_readable_with_structs() { function bar(uint256 x, uint256 y, address addr) yeet(uint256,uint256,address) ]"#, - event_derives(serde::Deserialize, serde::Serialize) + derives(serde::Deserialize, serde::Serialize) ); assert_tokenizeable::(); assert_codec::(); diff --git a/ethers-contract/tests/solidity-contracts/BeefyV1.json b/ethers-contract/tests/solidity-contracts/BeefyV1.json new file mode 100644 index 00000000..51507f81 --- /dev/null +++ b/ethers-contract/tests/solidity-contracts/BeefyV1.json @@ -0,0 +1 @@ +[{"inputs":[{"internalType":"contract ISMPHost","name":"host","type":"address"},{"components":[{"internalType":"uint256","name":"latestHeight","type":"uint256"},{"internalType":"uint256","name":"latestTimestamp","type":"uint256"},{"internalType":"uint256","name":"frozenHeight","type":"uint256"},{"internalType":"bytes32","name":"latestHeadsRoot","type":"bytes32"},{"internalType":"uint256","name":"beefyActivationBlock","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"len","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct AuthoritySetCommitment","name":"currentAuthoritySet","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"len","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct AuthoritySetCommitment","name":"nextAuthoritySet","type":"tuple"}],"internalType":"struct BeefyConsensusState","name":"trustedState","type":"tuple"},{"components":[{"components":[{"components":[{"components":[{"internalType":"bytes2","name":"id","type":"bytes2"},{"internalType":"bytes","name":"data","type":"bytes"}],"internalType":"struct Payload[]","name":"payload","type":"tuple[]"},{"internalType":"uint256","name":"blockNumber","type":"uint256"},{"internalType":"uint256","name":"validatorSetId","type":"uint256"}],"internalType":"struct Commitment","name":"commitment","type":"tuple"},{"components":[{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"uint256","name":"authorityIndex","type":"uint256"}],"internalType":"struct Signature[]","name":"signatures","type":"tuple[]"}],"internalType":"struct SignedCommitment","name":"signedCommitment","type":"tuple"},{"components":[{"internalType":"uint256","name":"version","type":"uint256"},{"internalType":"uint256","name":"parentNumber","type":"uint256"},{"internalType":"bytes32","name":"parentHash","type":"bytes32"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"len","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct AuthoritySetCommitment","name":"nextAuthoritySet","type":"tuple"},{"internalType":"bytes32","name":"extra","type":"bytes32"},{"internalType":"uint256","name":"kIndex","type":"uint256"}],"internalType":"struct BeefyMmrLeaf","name":"latestMmrLeaf","type":"tuple"},{"internalType":"bytes32[]","name":"mmrProof","type":"bytes32[]"},{"components":[{"internalType":"uint256","name":"k_index","type":"uint256"},{"internalType":"bytes32","name":"node","type":"bytes32"}],"internalType":"struct ProofNode[][]","name":"authoritiesProof","type":"tuple[][]"},{"internalType":"bytes","name":"header","type":"bytes"},{"internalType":"uint256","name":"headsIndex","type":"uint256"},{"internalType":"bytes[]","name":"extrinsicProof","type":"bytes[]"},{"internalType":"bytes","name":"timestampExtrinsic","type":"bytes"}],"internalType":"struct BeefyConsensusProof","name":"proof","type":"tuple"}],"name":"VerifyConsensus","outputs":[{"components":[{"internalType":"uint256","name":"latestHeight","type":"uint256"},{"internalType":"uint256","name":"latestTimestamp","type":"uint256"},{"internalType":"uint256","name":"frozenHeight","type":"uint256"},{"internalType":"bytes32","name":"latestHeadsRoot","type":"bytes32"},{"internalType":"uint256","name":"beefyActivationBlock","type":"uint256"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"len","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct AuthoritySetCommitment","name":"currentAuthoritySet","type":"tuple"},{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"len","type":"uint256"},{"internalType":"bytes32","name":"root","type":"bytes32"}],"internalType":"struct AuthoritySetCommitment","name":"nextAuthoritySet","type":"tuple"}],"internalType":"struct BeefyConsensusState","name":"","type":"tuple"},{"components":[{"components":[{"internalType":"uint256","name":"stateMachineId","type":"uint256"},{"internalType":"uint256","name":"height","type":"uint256"}],"internalType":"struct StateMachineHeight","name":"height","type":"tuple"},{"components":[{"internalType":"uint256","name":"timestamp","type":"uint256"},{"internalType":"bytes32","name":"commitment","type":"bytes32"}],"internalType":"struct StateCommitment","name":"commitment","type":"tuple"}],"internalType":"struct IntermediateState","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"}] diff --git a/ethers-solc/src/resolver/mod.rs b/ethers-solc/src/resolver/mod.rs index 7fd6ed75..16f7d1d6 100644 --- a/ethers-solc/src/resolver/mod.rs +++ b/ethers-solc/src/resolver/mod.rs @@ -903,6 +903,7 @@ impl Node { /// /// This returns an error if the file's version is invalid semver, or is not available such as /// 0.8.20, if the highest available version is `0.8.19` + #[allow(dead_code)] fn check_available_version( &self, all_versions: &[SolcVersion], From 757314b082943aa413227823903c935589f7458f Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 21 Mar 2023 19:13:50 +0100 Subject: [PATCH 07/16] fix(solc): features (#2290) * fix: solc svm feature * fix: conditional features --- ethers-solc/Cargo.toml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ethers-solc/Cargo.toml b/ethers-solc/Cargo.toml index dd8a2a5c..0943167f 100644 --- a/ethers-solc/Cargo.toml +++ b/ethers-solc/Cargo.toml @@ -111,14 +111,14 @@ async = [ "futures-util", "criterion/async_tokio", ] -svm-solc = ["svm-builds", "sha2"] +svm-solc = ["svm", "svm-builds", "sha2"] # Utilities for creating and testing project workspaces project-util = ["tempfile", "fs_extra", "rand"] tests = [] -openssl = ["svm/openssl"] -rustls = ["svm/rustls"] +openssl = ["svm?/openssl"] +rustls = ["svm?/rustls"] # Deprecated asm = [] From 0356db1faea15517af5f99166c7203015ea89625 Mon Sep 17 00:00:00 2001 From: Waylon Jepsen <57912727+0xJepsen@users.noreply.github.com> Date: Tue, 21 Mar 2023 12:15:41 -0600 Subject: [PATCH 08/16] Contracts chapter (#2281) --- book/SUMMARY.md | 40 ++++++++++--------- book/contracts/abigen.md | 5 +++ book/contracts/compile.md | 5 +++ book/contracts/contracts.md | 29 ++++++++++++++ book/contracts/creating-instances.md | 5 +++ book/contracts/deploy-anvil.md | 5 +++ .../contracts/deploy-from-abi-and-bytecode.md | 5 +++ book/contracts/doploy-moonbeam.md | 5 +++ book/contracts/events-with-meta.md | 5 +++ book/contracts/events.md | 5 +++ book/contracts/methods.md | 5 +++ 11 files changed, 95 insertions(+), 19 deletions(-) create mode 100644 book/contracts/abigen.md create mode 100644 book/contracts/compile.md create mode 100644 book/contracts/contracts.md create mode 100644 book/contracts/creating-instances.md create mode 100644 book/contracts/deploy-anvil.md create mode 100644 book/contracts/deploy-from-abi-and-bytecode.md create mode 100644 book/contracts/doploy-moonbeam.md create mode 100644 book/contracts/events-with-meta.md create mode 100644 book/contracts/events.md create mode 100644 book/contracts/methods.md diff --git a/book/SUMMARY.md b/book/SUMMARY.md index 1998ee06..0bf0bae0 100644 --- a/book/SUMMARY.md +++ b/book/SUMMARY.md @@ -1,11 +1,13 @@ # Summary # Getting started - - [Intro](./getting-started/intro.md) - - [Start a new project](./getting-started/start_a_new_project.md) - - [Connect to an Ethereum node](./getting-started/connect_to_an_ethereum_node.md) + +- [Intro](./getting-started/intro.md) +- [Start a new project](./getting-started/start_a_new_project.md) +- [Connect to an Ethereum node](./getting-started/connect_to_an_ethereum_node.md) # Reference guide + - [Providers](./providers/providers.md) - [Http](./providers/http.md) - [WebSocket](./providers/ws.md) @@ -26,16 +28,16 @@ - [Signer](./middleware/signer.md) - [Time lag]() - [Transformer]() -- [Contracts]() - - [Abigen]() - - [Compile]() - - [Creating Instances]() - - [Deploy Anvil]() - - [Deploy from ABI and bytecode]() - - [Deploy Moonbeam]() - - [Events]() - - [Events with meta]() - - [Methods]() +- [Contracts](./contracts/contracts.md) + - [Abigen](./contracts/abigen.md) + - [Compile](./contracts/compile.md) + - [Creating Instances](./contracts/creating-instances.md) + - [Deploy Anvil](./contracts/deploy-anvil.md) + - [Deploy from ABI and bytecode](./contracts/deploy-from-abi-and-bytecode.md) + - [Deploy Moonbeam](./contracts/doploy-moonbeam.md) + - [Events](./contracts/events.md) + - [Events with meta](./contracts/events-with-meta.md) + - [Methods](contracts/methods.md) - [Events]() - [Logs and filtering]() - [Solidity topics]() @@ -56,7 +58,7 @@ - [Create typed transaction]() - [Decode input]() - [EIP-1559]() - - [ENS]() + - [ENS]() - [Estimate gas]() - [Get gas price]() - [Get gas price USD]() @@ -78,13 +80,13 @@ - [Trezor]() - [Yubi]() - [Big numbers](./big-numbers/intro.md) - - [Comparison and equivalence](./big-numbers/comparison-and-equivalence.md) + - [Comparison and equivalence](./big-numbers/comparison-and-equivalence.md) - [Conversion](./big-numbers/conversion.md) - [Creating Instances](./big-numbers/creating_instances.md) - [Math operations](./big-numbers/math-operations.md) - [Utilities](./big-numbers/utilities.md) - [Anvil]() - - [Boot anvil]() - - [Deploy contracts]() - - [Fork]() - - [Testing]() + - [Boot anvil]() + - [Deploy contracts]() + - [Fork]() + - [Testing]() diff --git a/book/contracts/abigen.md b/book/contracts/abigen.md new file mode 100644 index 00000000..b93306d6 --- /dev/null +++ b/book/contracts/abigen.md @@ -0,0 +1,5 @@ +# Abigen + +```rust +{{#include ../../examples/contracts/examples/abigen.rs}} +``` diff --git a/book/contracts/compile.md b/book/contracts/compile.md new file mode 100644 index 00000000..80708c27 --- /dev/null +++ b/book/contracts/compile.md @@ -0,0 +1,5 @@ +# Compile + +```rust +{{#include ../../examples/contracts/examples/compile.rs}} +``` diff --git a/book/contracts/contracts.md b/book/contracts/contracts.md new file mode 100644 index 00000000..dc490f19 --- /dev/null +++ b/book/contracts/contracts.md @@ -0,0 +1,29 @@ +# Contracts + +In ethers-rs, contracts are a way to interact with smart contracts on the Ethereum blockchain through rust bindings, which serve as a robust rust API to these objects. + +The ethers-contracts module includes the following features: + +- [Abigen](): A module for generating Rust code from Solidity contracts. +- [Compile](): A module for compiling Solidity contracts into bytecode and ABI files. +- [Creating Instances](): A module for creating instances of smart contracts. +- [Deploy Anvil](): A module for deploying smart contracts on the Anvil network. +- [Deploy from ABI and bytecode](): A module for deploying smart contracts from their ABI and bytecode files. +- [Deploy Moonbeam](): A module for deploying smart contracts on the Moonbeam network. +- [Events](): A module for listening to smart contract events. +- [Events with Meta](): A module for listening to smart contract events with metadata. +- [Methods](): A module for calling smart contract methods. + +The ethers-contracts module provides a convenient way to work with Ethereum smart contracts in Rust. With this module, you can easily create instances of smart contracts, deploy them to the network, and interact with their methods and events. + +The Abigen module allows you to generate Rust code from Solidity contracts, which can save you a lot of time and effort when writing Rust code for Ethereum smart contracts. + +The Compile module makes it easy to compile Solidity contracts into bytecode and ABI files, which are required for deploying smart contracts. + +The Deploy Anvil and Deploy Moonbeam modules allow you to deploy smart contracts to specific networks, making it easy to test and deploy your smart contracts on the desired network. + +The Events and Events with Meta modules allow you to listen to smart contract events and retrieve event data, which is essential for building applications that interact with Ethereum smart contracts. + +Finally, the Methods module provides a simple way to call smart contract methods from Rust code, allowing you to interact with smart contracts in a programmatic way. + +Overall, the ethers-contracts module provides a comprehensive set of tools for working with Ethereum smart contracts in Rust, making it an essential tool for Rust developers building decentralized applications on the Ethereum network. diff --git a/book/contracts/creating-instances.md b/book/contracts/creating-instances.md new file mode 100644 index 00000000..635d858b --- /dev/null +++ b/book/contracts/creating-instances.md @@ -0,0 +1,5 @@ +# Creating Instances + +```rust +{{#include ../../examples/contracts/examples/instances.rs}} +``` diff --git a/book/contracts/deploy-anvil.md b/book/contracts/deploy-anvil.md new file mode 100644 index 00000000..721cfdbf --- /dev/null +++ b/book/contracts/deploy-anvil.md @@ -0,0 +1,5 @@ +# Deploy Anvil + +```rust +{{#include ../../examples/contracts/examples/deploy_anvil.rs}} +``` diff --git a/book/contracts/deploy-from-abi-and-bytecode.md b/book/contracts/deploy-from-abi-and-bytecode.md new file mode 100644 index 00000000..650a3d6f --- /dev/null +++ b/book/contracts/deploy-from-abi-and-bytecode.md @@ -0,0 +1,5 @@ +# Deploying a Contract from ABI and Bytecode + +```rust +{{#include ../../examples/contracts/examples/deploy_from_abi_and_bytecode.rs}} +``` diff --git a/book/contracts/doploy-moonbeam.md b/book/contracts/doploy-moonbeam.md new file mode 100644 index 00000000..4bea6cf2 --- /dev/null +++ b/book/contracts/doploy-moonbeam.md @@ -0,0 +1,5 @@ +# Deploy Moonbeam + +```rust +{{#include ../../examples/contracts/examples/deploy_moonbeam.rs}} +``` diff --git a/book/contracts/events-with-meta.md b/book/contracts/events-with-meta.md new file mode 100644 index 00000000..1d4d4f4b --- /dev/null +++ b/book/contracts/events-with-meta.md @@ -0,0 +1,5 @@ +# Events with meta + +```rust +{{#include ../../examples/contracts/examples/events_with_meta.rs}} +``` diff --git a/book/contracts/events.md b/book/contracts/events.md new file mode 100644 index 00000000..0c30117c --- /dev/null +++ b/book/contracts/events.md @@ -0,0 +1,5 @@ +# Events + +```rust +{{#include ../../examples/contracts/examples/events.rs}} +``` diff --git a/book/contracts/methods.md b/book/contracts/methods.md new file mode 100644 index 00000000..5fe1d579 --- /dev/null +++ b/book/contracts/methods.md @@ -0,0 +1,5 @@ +# Methods + +```rust +{{#include ../../examples/contracts/examples/methods.rs}} +``` From 080bb2e068a1a8af492e8279d07c0832911cf2a1 Mon Sep 17 00:00:00 2001 From: James Prestwich <10149425+prestwich@users.noreply.github.com> Date: Tue, 21 Mar 2023 11:18:41 -0700 Subject: [PATCH 09/16] Prestwich/gas escalator dangle (#2284) * fix: prevent gas escalator dangling tasks * chore: lockfile * refactor: avoid holding lock for a long time * refactor: cleanup * chore: changelog and docs * tests: fix test in name * docs: add a lot of info to the gasescalator docs * reset changelog as it'll be automatically managed in the future --------- Co-authored-by: Georgios Konstantopoulos --- Cargo.lock | 1 + ethers-middleware/Cargo.toml | 1 + ethers-middleware/src/gas_escalator/mod.rs | 363 +++++++++++++-------- 3 files changed, 230 insertions(+), 135 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a436fa3d..96a617dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1368,6 +1368,7 @@ dependencies = [ "ethers-providers", "ethers-signers", "ethers-solc", + "futures-channel", "futures-locks", "futures-util", "hex", diff --git a/ethers-middleware/Cargo.toml b/ethers-middleware/Cargo.toml index fce13218..a8710206 100644 --- a/ethers-middleware/Cargo.toml +++ b/ethers-middleware/Cargo.toml @@ -36,6 +36,7 @@ serde.workspace = true thiserror.workspace = true futures-util.workspace = true futures-locks.workspace = true +futures-channel.workspace = true tracing.workspace = true tracing-futures.workspace = true instant.workspace = true diff --git a/ethers-middleware/src/gas_escalator/mod.rs b/ethers-middleware/src/gas_escalator/mod.rs index 384f0291..fb55c7c1 100644 --- a/ethers-middleware/src/gas_escalator/mod.rs +++ b/ethers-middleware/src/gas_escalator/mod.rs @@ -1,21 +1,28 @@ mod geometric; -use ethers_core::types::transaction::eip2718::TypedTransaction; pub use geometric::GeometricGasPrice; mod linear; pub use linear::LinearGasPrice; use async_trait::async_trait; -use ethers_core::types::{BlockId, TransactionRequest, TxHash, U256}; -use ethers_providers::{interval, Middleware, MiddlewareError, PendingTransaction, StreamExt}; -use futures_util::lock::Mutex; + +use futures_channel::oneshot; +use futures_util::{lock::Mutex, select_biased}; use instant::Instant; use std::{pin::Pin, sync::Arc}; use thiserror::Error; +use tracing_futures::Instrument; + +use ethers_core::types::{ + transaction::eip2718::TypedTransaction, BlockId, TransactionRequest, TxHash, U256, +}; +use ethers_providers::{interval, Middleware, MiddlewareError, PendingTransaction, StreamExt}; #[cfg(not(target_arch = "wasm32"))] use tokio::spawn; +type ToEscalate = Arc)>>>; + #[cfg(target_arch = "wasm32")] type WatcherFuture<'a> = Pin + 'a>>; #[cfg(not(target_arch = "wasm32"))] @@ -29,7 +36,34 @@ pub trait GasEscalator: Send + Sync + std::fmt::Debug { fn get_gas_price(&self, initial_price: U256, time_elapsed: u64) -> U256; } -#[derive(Debug, Clone)] +#[derive(Error, Debug)] +/// Error thrown when the GasEscalator interacts with the blockchain +pub enum GasEscalatorError { + #[error("{0}")] + /// Thrown when an internal middleware errors + MiddlewareError(M::Error), + + #[error("Gas escalation is only supported for EIP2930 or Legacy transactions")] + UnsupportedTxType, +} + +// Boilerplate +impl MiddlewareError for GasEscalatorError { + type Inner = M::Error; + + fn from_err(src: M::Error) -> GasEscalatorError { + GasEscalatorError::MiddlewareError(src) + } + + fn as_inner(&self) -> Option<&Self::Inner> { + match self { + GasEscalatorError::MiddlewareError(e) => Some(e), + _ => None, + } + } +} + +#[derive(Debug, Clone, Copy)] /// The frequency at which transactions will be bumped pub enum Frequency { /// On a per block basis using the eth_newBlock filter @@ -39,9 +73,49 @@ pub enum Frequency { } #[derive(Debug)] +pub(crate) struct GasEscalatorMiddlewareInternal { + pub(crate) inner: Arc, + /// The transactions which are currently being monitored for escalation + #[allow(clippy::type_complexity)] + pub txs: ToEscalate, + _background: oneshot::Sender<()>, +} + +#[derive(Debug, Clone)] /// A Gas escalator allows bumping transactions' gas price to avoid getting them /// stuck in the memory pool. /// +/// GasEscalator runs a background task which monitors the blockchain for tx +/// confirmation, and bumps fees over time if txns do not occur. This task +/// periodically loops over a stored history of sent transactions, and checks +/// if any require fee bumps. If so, it will resend the same transaction with a +/// higher fee. +/// +/// Using [`GasEscalatorMiddleware::new`] will create a new instance of the +/// background task. Using [`GasEscalatorMiddleware::clone`] will crate a new +/// instance of the middleware, but will not create a new background task. The +/// background task is shared among all clones. +/// +/// ## Footgun +/// +/// If you drop the middleware, the background task will be dropped as well, +/// and any transactions you have sent will stop escalating. We recommend +/// holding an instance of the middleware throughout your application's +/// lifecycle, or leaking an `Arc` of it so that it is never dropped. +/// +/// ## Outstanding issue +/// +/// This task is fallible, and will stop if the provider's connection is lost. +/// If this happens, the middleware will become unable to properly escalate gas +/// prices. Transactions will still be dispatched, but no fee-bumping will +/// happen. This will also cause a memory leak, as the middleware will keep +/// appending to the list of transactions to escalate (and nothing will ever +/// clear that list). +/// +/// We intend to fix this issue in a future release. +/// +/// ## Example +/// /// ```no_run /// use ethers_providers::{Provider, Http}; /// use ethers_middleware::{ @@ -63,39 +137,22 @@ pub enum Frequency { /// let gas_oracle = GasNow::new().category(GasCategory::SafeLow); /// let provider = GasOracleMiddleware::new(provider, gas_oracle); /// ``` -pub struct GasEscalatorMiddleware { - pub(crate) inner: Arc, - pub(crate) escalator: E, - /// The transactions which are currently being monitored for escalation - #[allow(clippy::type_complexity)] - pub txs: Arc)>>>, - frequency: Frequency, -} - -impl Clone for GasEscalatorMiddleware { - fn clone(&self) -> Self { - GasEscalatorMiddleware { - inner: self.inner.clone(), - escalator: self.escalator.clone(), - txs: self.txs.clone(), - frequency: self.frequency.clone(), - } - } +pub struct GasEscalatorMiddleware { + pub(crate) inner: Arc>, } #[cfg_attr(target_arch = "wasm32", async_trait(?Send))] #[cfg_attr(not(target_arch = "wasm32"), async_trait)] -impl Middleware for GasEscalatorMiddleware +impl Middleware for GasEscalatorMiddleware where M: Middleware, - E: GasEscalator, { type Error = GasEscalatorError; type Provider = M::Provider; type Inner = M; - fn inner(&self) -> &M { - &self.inner + fn inner(&self) -> &Self::Inner { + &self.inner.inner } async fn send_transaction + Send + Sync>( @@ -103,13 +160,26 @@ where tx: T, block: Option, ) -> Result, Self::Error> { + self.inner.send_transaction(tx, block).await + } +} + +impl GasEscalatorMiddlewareInternal +where + M: Middleware, +{ + async fn send_transaction + Send + Sync>( + &self, + tx: T, + block: Option, + ) -> Result, GasEscalatorError> { let tx = tx.into(); let pending_tx = self - .inner() + .inner .send_transaction(tx.clone(), block) .await - .map_err(GasEscalatorError::MiddlewareError)?; + .map_err(MiddlewareError::from_err)?; let tx = match tx { TypedTransaction::Legacy(inner) => inner, @@ -125,141 +195,164 @@ where } } -impl GasEscalatorMiddleware +impl GasEscalatorMiddleware where M: Middleware, - E: GasEscalator, { /// Initializes the middleware with the provided gas escalator and the chosen /// escalation frequency (per block or per second) #[allow(clippy::let_and_return)] #[cfg(not(target_arch = "wasm32"))] - pub fn new(inner: M, escalator: E, frequency: Frequency) -> Self + pub fn new(inner: M, escalator: E, frequency: Frequency) -> Self where - E: Clone + 'static, - M: Clone + 'static, + E: GasEscalator + 'static, + M: 'static, { - use tracing_futures::Instrument; + let (tx, rx) = oneshot::channel(); + let inner = Arc::new(inner); - let this = Self { - inner: Arc::new(inner), - escalator, - frequency, - txs: Arc::new(Mutex::new(Vec::new())), - }; + let txs: ToEscalate = Default::default(); + + let this = Arc::new(GasEscalatorMiddlewareInternal { + inner: inner.clone(), + txs: txs.clone(), + _background: tx, + }); + + let esc = EscalationTask { inner, escalator, frequency, txs, shutdown: rx }; { - let this2 = this.clone(); - spawn(async move { - this2.escalate().instrument(tracing::trace_span!("gas-escalation")).await.unwrap(); - }); + spawn(esc.escalate().instrument(tracing::trace_span!("gas-escalation"))); } - this + Self { inner: this } + } +} + +#[derive(Debug)] +pub struct EscalationTask { + inner: M, + escalator: E, + frequency: Frequency, + txs: ToEscalate, + shutdown: oneshot::Receiver<()>, +} + +impl EscalationTask { + pub fn new( + inner: M, + escalator: E, + frequency: Frequency, + txs: ToEscalate, + shutdown: oneshot::Receiver<()>, + ) -> Self { + Self { inner, escalator, frequency, txs, shutdown } } - /// Re-broadcasts pending transactions with a gas price escalator - pub async fn escalate(&self) -> Result<(), GasEscalatorError> { + async fn escalate(mut self) -> Result<(), GasEscalatorError> + where + M: Middleware, + E: GasEscalator, + { // the escalation frequency is either on a per-block basis, or on a duration basis - let mut watcher: WatcherFuture = match self.frequency { + let watcher: WatcherFuture = match self.frequency { Frequency::PerBlock => Box::pin( - self.inner - .watch_blocks() - .await - .map_err(GasEscalatorError::MiddlewareError)? - .map(|_| ()), + self.inner.watch_blocks().await.map_err(MiddlewareError::from_err)?.map(|_| ()), ), Frequency::Duration(ms) => Box::pin(interval(std::time::Duration::from_millis(ms))), }; - while watcher.next().await.is_some() { - let now = Instant::now(); - let mut txs = self.txs.lock().await; - let len = txs.len(); + let mut watcher = watcher.fuse(); - // Pop all transactions and re-insert those that have not been included yet - for _ in 0..len { - // this must never panic as we're explicitly within bounds - let (tx_hash, mut replacement_tx, time, priority) = - txs.pop().expect("should have element in vector"); + loop { + select_biased! { + _ = &mut self.shutdown => { + tracing::debug!("Shutting down escalation task, middleware has gone away"); + return Ok(()) + } + opt = watcher.next() => { + if opt.is_none() { + tracing::error!("timing future has gone away"); + return Ok(()); + } + let now = Instant::now(); - let receipt = self.get_transaction_receipt(tx_hash).await?; - tracing::trace!(tx_hash = ?tx_hash, "checking if exists"); - if receipt.is_none() { - let old_gas_price = replacement_tx.gas_price.expect("gas price must be set"); - // Get the new gas price based on how much time passed since the - // tx was last broadcast - let new_gas_price = self - .escalator - .get_gas_price(old_gas_price, now.duration_since(time).as_secs()); + // We take the contents of the mutex, and then add them back in + // later. + let mut txs: Vec<_> = { + let mut txs = self.txs.lock().await; + std::mem::take(&mut (*txs)) + // Lock scope ends + }; - let new_txhash = if new_gas_price != old_gas_price { - // bump the gas price - replacement_tx.gas_price = Some(new_gas_price); + let len = txs.len(); + // Pop all transactions and re-insert those that have not been included yet + for _ in 0..len { + // this must never panic as we're explicitly within bounds + let (tx_hash, mut replacement_tx, time, priority) = + txs.pop().expect("should have element in vector"); - // the tx hash will be different so we need to update it - match self.inner().send_transaction(replacement_tx.clone(), priority).await - { - Ok(new_tx_hash) => { - let new_tx_hash = *new_tx_hash; - tracing::trace!( - old_tx_hash = ?tx_hash, - new_tx_hash = ?new_tx_hash, - old_gas_price = ?old_gas_price, - new_gas_price = ?new_gas_price, - "escalated" - ); - new_tx_hash - } - Err(err) => { - if err.to_string().contains("nonce too low") { - // ignore "nonce too low" errors because they - // may happen if we try to broadcast a higher - // gas price tx when one of the previous ones - // was already mined (meaning we also do not - // push it back to the pending txs vector) - continue - } else { - return Err(GasEscalatorError::MiddlewareError(err)) + let receipt = self + .inner + .get_transaction_receipt(tx_hash) + .await + .map_err(MiddlewareError::from_err)?; + + tracing::trace!(tx_hash = ?tx_hash, "checking if exists"); + + if receipt.is_none() { + let old_gas_price = replacement_tx.gas_price.expect("gas price must be set"); + // Get the new gas price based on how much time passed since the + // tx was last broadcast + let new_gas_price = self + .escalator + .get_gas_price(old_gas_price, now.duration_since(time).as_secs()); + + let new_txhash = if new_gas_price == old_gas_price { + tx_hash + } else { + // bump the gas price + replacement_tx.gas_price = Some(new_gas_price); + + // the tx hash will be different so we need to update it + match self.inner.send_transaction(replacement_tx.clone(), priority).await { + Ok(new_tx_hash) => { + let new_tx_hash = *new_tx_hash; + tracing::trace!( + old_tx_hash = ?tx_hash, + new_tx_hash = ?new_tx_hash, + old_gas_price = ?old_gas_price, + new_gas_price = ?new_gas_price, + "escalated" + ); + new_tx_hash + } + Err(err) => { + if err.to_string().contains("nonce too low") { + // ignore "nonce too low" errors because they + // may happen if we try to broadcast a higher + // gas price tx when one of the previous ones + // was already mined (meaning we also do not + // push it back to the pending txs vector) + continue + } else { + tracing::error!( + err = %err, + "Killing escalator backend" + ); + return Err(GasEscalatorError::MiddlewareError(err)) + } } } - } - } else { - tx_hash - }; - - txs.push((new_txhash, replacement_tx, time, priority)); + }; + txs.push((new_txhash, replacement_tx, time, priority)); + } } - } - } - - Ok(()) - } -} - -// Boilerplate -impl MiddlewareError for GasEscalatorError { - type Inner = M::Error; - - fn from_err(src: M::Error) -> GasEscalatorError { - GasEscalatorError::MiddlewareError(src) - } - - fn as_inner(&self) -> Option<&Self::Inner> { - match self { - GasEscalatorError::MiddlewareError(e) => Some(e), - _ => None, + // after this big ugly loop, we dump everything back in + // we don't replace here, as the vec in the mutex may contain + // items! + self.txs.lock().await.extend(txs); + }} } } } - -#[derive(Error, Debug)] -/// Error thrown when the GasEscalator interacts with the blockchain -pub enum GasEscalatorError { - #[error("{0}")] - /// Thrown when an internal middleware errors - MiddlewareError(M::Error), - - #[error("Gas escalation is only supported for EIP2930 or Legacy transactions")] - UnsupportedTxType, -} From 73c7f6cacc546adda18ace4c4a3bd22e53de3e9b Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 21 Mar 2023 11:44:12 -0700 Subject: [PATCH 10/16] fix: ethers-contract circular dep on ethers-signers (#2291) * fix: remove dep of contract on signers * refactor: move ethers/live up a dir * test: move over eip712 test from ethers-contract * chore: rm unused vars * ethers: enable ethers-solc by default * ci: remove --live from ci tests * chore: make ethers-solc always part of ethers * test: ensure rustls is enabled for https * chore: ignore clippy fp --- .github/workflows/ci.yml | 2 +- Cargo.lock | 2 +- ethers-contract/Cargo.toml | 2 +- ethers-contract/src/contract.rs | 2 - ethers-contract/src/factory.rs | 1 - ethers-contract/tests/it/contract.rs | 154 +---------------- ethers-solc/src/artifact_output/mod.rs | 1 + ethers/Cargo.toml | 38 ++--- ethers/src/lib.rs | 2 - .../tests}/DeriveEip712Test.sol | 0 ethers/tests/{live => }/celo.rs | 3 +- ethers/tests/eip712.rs | 157 ++++++++++++++++++ ethers/tests/live/main.rs | 13 -- ethers/tests/main.rs | 7 + examples/contracts/Cargo.toml | 2 +- 15 files changed, 184 insertions(+), 202 deletions(-) rename {ethers-contract/tests/solidity-contracts => ethers/tests}/DeriveEip712Test.sol (100%) rename ethers/tests/{live => }/celo.rs (96%) create mode 100644 ethers/tests/eip712.rs delete mode 100644 ethers/tests/live/main.rs create mode 100644 ethers/tests/main.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 708910a9..9e45e770 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -94,7 +94,7 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: Swatinem/rust-cache@v2 - name: live tests - run: cargo test -p ethers --test live --all-features + run: cargo test -p ethers --all-features # TODO: [#2191](https://github.com/gakonst/ethers-rs/issues/2191) # feature-checks: diff --git a/Cargo.lock b/Cargo.lock index 96a617dc..d4bde293 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1219,6 +1219,7 @@ dependencies = [ "ethers-providers", "ethers-signers", "ethers-solc", + "serde", "tokio", ] @@ -1241,7 +1242,6 @@ dependencies = [ "ethers-core", "ethers-derive-eip712", "ethers-providers", - "ethers-signers", "ethers-solc", "futures-util", "hex", diff --git a/ethers-contract/Cargo.toml b/ethers-contract/Cargo.toml index a0c65795..dc0d5483 100644 --- a/ethers-contract/Cargo.toml +++ b/ethers-contract/Cargo.toml @@ -43,8 +43,8 @@ ethers-contract-derive = { workspace = true, optional = true } ethers-derive-eip712 = { workspace = true, optional = true } [dev-dependencies] -ethers-signers.workspace = true ethers-solc.workspace = true +ethers-providers = { workspace = true, features = ["ws"] } [target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies] tokio = { workspace = true, features = ["macros"] } diff --git a/ethers-contract/src/contract.rs b/ethers-contract/src/contract.rs index 2fa4f888..eae39a46 100644 --- a/ethers-contract/src/contract.rs +++ b/ethers-contract/src/contract.rs @@ -75,7 +75,6 @@ pub type Contract = ContractInstance, M>; /// }; /// use ethers_contract::Contract; /// use ethers_providers::{Provider, Http}; -/// use ethers_signers::Wallet; /// use std::{convert::TryFrom, sync::Arc}; /// /// # async fn foo() -> Result<(), Box> { @@ -122,7 +121,6 @@ pub type Contract = ContractInstance, M>; /// use ethers_core::{abi::Abi, types::Address}; /// use ethers_contract::{Contract, EthEvent}; /// use ethers_providers::{Provider, Http, Middleware}; -/// use ethers_signers::Wallet; /// use std::{convert::TryFrom, sync::Arc}; /// use ethers_core::abi::{Detokenize, Token, InvalidOutputType}; /// # // this is a fake address used just for this example diff --git a/ethers-contract/src/factory.rs b/ethers-contract/src/factory.rs index b396ef0b..711e44a2 100644 --- a/ethers-contract/src/factory.rs +++ b/ethers-contract/src/factory.rs @@ -323,7 +323,6 @@ where /// use ethers_solc::Solc; /// use ethers_contract::ContractFactory; /// use ethers_providers::{Provider, Http}; -/// use ethers_signers::Wallet; /// use std::convert::TryFrom; /// /// # async fn foo() -> Result<(), Box> { diff --git a/ethers-contract/tests/it/contract.rs b/ethers-contract/tests/it/contract.rs index 8d4dd44e..88f04ed5 100644 --- a/ethers-contract/tests/it/contract.rs +++ b/ethers-contract/tests/it/contract.rs @@ -1,18 +1,14 @@ use crate::common::*; use ethers_contract::{ - abigen, ContractFactory, ContractInstance, EthAbiType, EthEvent, LogMeta, Multicall, - MulticallError, MulticallVersion, + abigen, ContractFactory, ContractInstance, EthEvent, LogMeta, Multicall, MulticallError, + MulticallVersion, }; use ethers_core::{ abi::{encode, AbiEncode, Token, Tokenizable}, - types::{ - transaction::eip712::Eip712, Address, BlockId, Bytes, Filter, ValueOrArray, H160, H256, - I256, U256, - }, + types::{Address, BlockId, Bytes, Filter, ValueOrArray, H160, H256, U256}, utils::{keccak256, Anvil}, }; use ethers_providers::{Http, Middleware, MiddlewareError, Provider, StreamExt}; -use ethers_signers::{LocalWallet, Signer}; use std::{sync::Arc, time::Duration}; #[derive(Debug)] @@ -330,7 +326,6 @@ async fn call_past_hash_test() { } #[tokio::test] -#[cfg(feature = "abigen")] async fn watch_events() { let (abi, bytecode) = compile_contract("SimpleStorage", "SimpleStorage.sol"); let anvil = Anvil::new().spawn(); @@ -784,146 +779,3 @@ async fn multicall_aggregate() { assert_eq!(bytes[..4], keccak256("CustomErrorWithData(string)")[..4]); assert_eq!(bytes[4..], encode(&[Token::String("Data".to_string())])); } - -#[tokio::test] -#[cfg(feature = "eip712")] -async fn test_derive_eip712() { - use ethers_derive_eip712::*; - - // Generate Contract ABI Bindings - abigen!( - DeriveEip712Test, - "./ethers-contract/tests/solidity-contracts/derive_eip712_abi.json", - event_derives(serde::Deserialize, serde::Serialize) - ); - - // Create derived structs - - #[derive(Debug, Clone, Eip712, EthAbiType)] - #[eip712( - name = "Eip712Test", - version = "1", - chain_id = 1, - verifying_contract = "0x0000000000000000000000000000000000000001", - salt = "eip712-test-75F0CCte" - )] - struct FooBar { - foo: I256, - bar: U256, - fizz: Bytes, - buzz: [u8; 32], - far: String, - out: Address, - } - - // get ABI and bytecode for the DeriveEip712Test contract - let (abi, bytecode) = compile_contract("DeriveEip712Test", "DeriveEip712Test.sol"); - - // launch the network & connect to it - let anvil = Anvil::new().spawn(); - let from = anvil.addresses()[0]; - let provider = Provider::try_from(anvil.endpoint()) - .unwrap() - .with_sender(from) - .interval(std::time::Duration::from_millis(10)); - let client = Arc::new(provider); - - let wallet: LocalWallet = anvil.keys()[0].clone().into(); - - let factory = ContractFactory::new(abi.clone(), bytecode.clone(), client.clone()); - - let contract = factory - .deploy(()) - .expect("failed to deploy DeriveEip712Test contract") - .legacy() - .send() - .await - .expect("failed to instantiate factory for DeriveEip712 contract"); - - let addr = contract.address(); - - let contract = DeriveEip712Test::new(addr, client.clone()); - - let foo_bar = FooBar { - foo: I256::from(10u64), - bar: U256::from(20u64), - fizz: b"fizz".into(), - buzz: keccak256("buzz"), - far: String::from("space"), - out: Address::from([0; 20]), - }; - - let derived_foo_bar = derive_eip_712_test::FooBar { - foo: foo_bar.foo, - bar: foo_bar.bar, - fizz: foo_bar.fizz.clone(), - buzz: foo_bar.buzz, - far: foo_bar.far.clone(), - out: foo_bar.out, - }; - - let sig = wallet.sign_typed_data(&foo_bar).await.expect("failed to sign typed data"); - - let r = <[u8; 32]>::try_from(sig.r) - .expect("failed to parse 'r' value from signature into [u8; 32]"); - let s = <[u8; 32]>::try_from(sig.s) - .expect("failed to parse 's' value from signature into [u8; 32]"); - let v = u8::try_from(sig.v).expect("failed to parse 'v' value from signature into u8"); - - let domain_separator = contract - .domain_separator() - .call() - .await - .expect("failed to retrieve domain_separator from contract"); - let type_hash = - contract.type_hash().call().await.expect("failed to retrieve type_hash from contract"); - let struct_hash = contract - .struct_hash(derived_foo_bar.clone()) - .call() - .await - .expect("failed to retrieve struct_hash from contract"); - let encoded = contract - .encode_eip_712(derived_foo_bar.clone()) - .call() - .await - .expect("failed to retrieve eip712 encoded hash from contract"); - let verify = contract - .verify_foo_bar(wallet.address(), derived_foo_bar, r, s, v) - .call() - .await - .expect("failed to verify signed typed data eip712 payload"); - - assert_eq!( - domain_separator, - foo_bar - .domain() - .expect("failed to return domain_separator from Eip712 implemented struct") - .separator(), - "domain separator does not match contract domain separator!" - ); - - assert_eq!( - type_hash, - FooBar::type_hash().expect("failed to return type_hash from Eip712 implemented struct"), - "type hash does not match contract struct type hash!" - ); - - assert_eq!( - struct_hash, - foo_bar - .clone() - .struct_hash() - .expect("failed to return struct_hash from Eip712 implemented struct"), - "struct hash does not match contract struct hash!" - ); - - assert_eq!( - encoded, - foo_bar - .encode_eip712() - .expect("failed to return domain_separator from Eip712 implemented struct"), - "Encoded value does not match!" - ); - - assert!(verify, "typed data signature failed!"); -} diff --git a/ethers-solc/src/artifact_output/mod.rs b/ethers-solc/src/artifact_output/mod.rs index 17da2b87..5f7b2bc3 100644 --- a/ethers-solc/src/artifact_output/mod.rs +++ b/ethers-solc/src/artifact_output/mod.rs @@ -659,6 +659,7 @@ pub trait ArtifactOutput { if let Ok(stripped) = rel_candidate.strip_prefix(artifacts_folder) { rel_candidate = stripped.to_path_buf(); } + #[allow(clippy::redundant_clone)] // false positive let mut candidate = rel_candidate.clone(); let contract_file = contract_file.as_ref(); let mut current_parent = contract_file.parent(); diff --git a/ethers/Cargo.toml b/ethers/Cargo.toml index 7dff1300..8a5b36ed 100644 --- a/ethers/Cargo.toml +++ b/ethers/Cargo.toml @@ -26,14 +26,7 @@ all-features = true [features] default = ["abigen", "rustls"] -celo = [ - "ethers-core/celo", - "ethers-providers/celo", - "ethers-signers/celo", - "ethers-contract/celo", - "ethers-middleware/celo", - "legacy", -] +celo = ["ethers-core/celo", "ethers-providers/celo", "ethers-signers/celo", "ethers-contract/celo", "ethers-middleware/celo", "legacy"] legacy = ["ethers-core/legacy", "ethers-contract/legacy"] @@ -43,20 +36,8 @@ eip712 = ["ethers-contract/eip712", "ethers-core/eip712"] ## providers ws = ["ethers-providers/ws"] ipc = ["ethers-providers/ipc"] -rustls = [ - "ethers-middleware/rustls", - "ethers-providers/rustls", - "ethers-etherscan/rustls", - "ethers-contract/rustls", - "ethers-solc/rustls", -] -openssl = [ - "ethers-middleware/openssl", - "ethers-providers/openssl", - "ethers-etherscan/openssl", - "ethers-contract/openssl", - "ethers-solc/openssl", -] +rustls = ["ethers-middleware/rustls", "ethers-providers/rustls", "ethers-etherscan/rustls", "ethers-contract/rustls", "ethers-solc/rustls"] +openssl = ["ethers-middleware/openssl", "ethers-providers/openssl", "ethers-etherscan/openssl", "ethers-contract/openssl", "ethers-solc/openssl"] dev-rpc = ["ethers-providers/dev-rpc"] ## signers ledger = ["ethers-signers/ledger"] @@ -67,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 = [] @@ -78,12 +58,14 @@ 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 tokio = { workspace = true, features = ["macros", "rt"] } +ethers-contract = { workspace = true, features = ["eip712"] } +ethers-providers = { workspace = true, features = ["rustls"] } # allow https connections diff --git a/ethers/src/lib.rs b/ethers/src/lib.rs index 8cdc5983..3d94e43d 100644 --- a/ethers/src/lib.rs +++ b/ethers/src/lib.rs @@ -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::*; } diff --git a/ethers-contract/tests/solidity-contracts/DeriveEip712Test.sol b/ethers/tests/DeriveEip712Test.sol similarity index 100% rename from ethers-contract/tests/solidity-contracts/DeriveEip712Test.sol rename to ethers/tests/DeriveEip712Test.sol diff --git a/ethers/tests/live/celo.rs b/ethers/tests/celo.rs similarity index 96% rename from ethers/tests/live/celo.rs rename to ethers/tests/celo.rs index 7457e0dd..0931decf 100644 --- a/ethers/tests/live/celo.rs +++ b/ethers/tests/celo.rs @@ -1,7 +1,8 @@ -use crate::simple_storage::SimpleStorage; use ethers::prelude::*; use std::{sync::Arc, time::Duration}; +ethers::contract::abigen!(SimpleStorage, "../testdata/SimpleStorage.json"); + static CELO_TESTNET_URL: &str = "https://alfajores-forno.celo-testnet.org"; #[tokio::test] diff --git a/ethers/tests/eip712.rs b/ethers/tests/eip712.rs new file mode 100644 index 00000000..f23d8295 --- /dev/null +++ b/ethers/tests/eip712.rs @@ -0,0 +1,157 @@ +use ethers::{ + contract::{abigen, ContractFactory, Eip712, EthAbiType}, + core::{ + types::{transaction::eip712::Eip712, Address, Bytes, I256, U256}, + utils::{keccak256, Anvil}, + }, + providers::Provider, + signers::LocalWallet, + solc::Solc, +}; +use std::{path::PathBuf, sync::Arc}; + +#[tokio::test] +async fn test_derive_eip712() { + // Generate Contract ABI Bindings + abigen!( + DeriveEip712Test, + "./ethers-contract/tests/solidity-contracts/derive_eip712_abi.json", + event_derives(serde::Deserialize, serde::Serialize) + ); + + // Create derived structs + + #[derive(Debug, Clone, Eip712, EthAbiType)] + #[eip712( + name = "Eip712Test", + version = "1", + chain_id = 1, + verifying_contract = "0x0000000000000000000000000000000000000001", + salt = "eip712-test-75F0CCte" + )] + struct FooBar { + foo: I256, + bar: U256, + fizz: Bytes, + buzz: [u8; 32], + far: String, + out: Address, + } + + // get ABI and bytecode for the DeriveEip712Test contract + let path = PathBuf::from(env!("CARGO_MANIFEST_DIR")).join("tests"); + let result = Solc::default().compile_source(path).unwrap(); + let (abi, bytecode, _) = result + .find("DeriveEip712Test") + .expect("failed to get DeriveEip712Test contract") + .into_parts_or_default(); + + // launch the network & connect to it + let anvil = Anvil::new().spawn(); + let from = anvil.addresses()[0]; + let provider = Provider::try_from(anvil.endpoint()) + .unwrap() + .with_sender(from) + .interval(std::time::Duration::from_millis(10)); + let client = Arc::new(provider); + + let factory = ContractFactory::new(abi.clone(), bytecode.clone(), client.clone()); + + let contract = factory + .deploy(()) + .expect("failed to deploy DeriveEip712Test contract") + .legacy() + .send() + .await + .expect("failed to instantiate factory for DeriveEip712 contract"); + + let addr = contract.address(); + + let contract = DeriveEip712Test::new(addr, client.clone()); + + let foo_bar = FooBar { + foo: I256::from(10u64), + bar: U256::from(20u64), + fizz: b"fizz".into(), + buzz: keccak256("buzz"), + far: String::from("space"), + out: Address::from([0; 20]), + }; + + let derived_foo_bar = derive_eip_712_test::FooBar { + foo: foo_bar.foo, + bar: foo_bar.bar, + fizz: foo_bar.fizz.clone(), + buzz: foo_bar.buzz, + far: foo_bar.far.clone(), + out: foo_bar.out, + }; + + use ethers::signers::Signer; + + let wallet: LocalWallet = anvil.keys()[0].clone().into(); + let sig = wallet.sign_typed_data(&foo_bar).await.expect("failed to sign typed data"); + + let r = <[u8; 32]>::try_from(sig.r) + .expect("failed to parse 'r' value from signature into [u8; 32]"); + let s = <[u8; 32]>::try_from(sig.s) + .expect("failed to parse 's' value from signature into [u8; 32]"); + let v = u8::try_from(sig.v).expect("failed to parse 'v' value from signature into u8"); + + let domain_separator = contract + .domain_separator() + .call() + .await + .expect("failed to retrieve domain_separator from contract"); + let type_hash = + contract.type_hash().call().await.expect("failed to retrieve type_hash from contract"); + let struct_hash = contract + .struct_hash(derived_foo_bar.clone()) + .call() + .await + .expect("failed to retrieve struct_hash from contract"); + let encoded = contract + .encode_eip_712(derived_foo_bar.clone()) + .call() + .await + .expect("failed to retrieve eip712 encoded hash from contract"); + let verify = contract + .verify_foo_bar(wallet.address(), derived_foo_bar, r, s, v) + .call() + .await + .expect("failed to verify signed typed data eip712 payload"); + + assert_eq!( + domain_separator, + foo_bar + .domain() + .expect("failed to return domain_separator from Eip712 implemented struct") + .separator(), + "domain separator does not match contract domain separator!" + ); + + assert_eq!( + type_hash, + FooBar::type_hash().expect("failed to return type_hash from Eip712 implemented struct"), + "type hash does not match contract struct type hash!" + ); + + assert_eq!( + struct_hash, + foo_bar + .clone() + .struct_hash() + .expect("failed to return struct_hash from Eip712 implemented struct"), + "struct hash does not match contract struct hash!" + ); + + assert_eq!( + encoded, + foo_bar + .encode_eip712() + .expect("failed to return domain_separator from Eip712 implemented struct"), + "Encoded value does not match!" + ); + + assert!(verify, "typed data signature failed!"); +} diff --git a/ethers/tests/live/main.rs b/ethers/tests/live/main.rs deleted file mode 100644 index a8828646..00000000 --- a/ethers/tests/live/main.rs +++ /dev/null @@ -1,13 +0,0 @@ -//! Ethers live tests. -//! -//! If a feature or external binary is added, like Solc, please also update -//! `.github/workflows/ci.yml` at `job.live-test`. - -#![cfg(not(target_arch = "wasm32"))] - -#[cfg(feature = "celo")] -mod celo; - -pub(crate) mod simple_storage { - ethers::contract::abigen!(SimpleStorage, "../testdata/SimpleStorage.json"); -} diff --git a/ethers/tests/main.rs b/ethers/tests/main.rs new file mode 100644 index 00000000..7d10133c --- /dev/null +++ b/ethers/tests/main.rs @@ -0,0 +1,7 @@ +//! Ethers integration tests. +#![cfg(not(target_arch = "wasm32"))] + +#[cfg(feature = "celo")] +mod celo; + +mod eip712; diff --git a/examples/contracts/Cargo.toml b/examples/contracts/Cargo.toml index 3fd9bb5f..8cc0618f 100644 --- a/examples/contracts/Cargo.toml +++ b/examples/contracts/Cargo.toml @@ -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"] } From 1936f0ed0d05e33a09b2820fc9f8dee95f67fe39 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 21 Mar 2023 11:45:12 -0700 Subject: [PATCH 11/16] chore: release --- CHANGELOG.md | 18 ++++++++++++++++-- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 26 +++++++++++++------------- 3 files changed, 41 insertions(+), 27 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 61349c6b..f054ce95 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,13 +5,21 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -This changelog is automatically generated by [git-cliff](https://github.com/orhun/git-cliff). +This changelog is automatically generated by [git-cliff](https://github.com/orhun/git-cliff), +which is configured [here](./cliff.toml). + Please do not manually edit this file. -## [Unreleased] +## [2.0.1] - 2023-03-21 ### Bug Fixes +- Ethers-contract circular dep on ethers-signers ([#2291](https://github.com/gakonst/ethers-rs/issues/2291)) +- Features ([#2290](https://github.com/gakonst/ethers-rs/issues/2290)) +- Handle all struct field types ([#2289](https://github.com/gakonst/ethers-rs/issues/2289)) +- Re-export CallLogFrame from geth types ([#2283](https://github.com/gakonst/ethers-rs/issues/2283)) +- Feature resolution ([#2274](https://github.com/gakonst/ethers-rs/issues/2274)) +- Use to_string in mainnet chain variant ([#2275](https://github.com/gakonst/ethers-rs/issues/2275)) - Accept ethlive as a chain name ([#2268](https://github.com/gakonst/ethers-rs/issues/2268)) - Fix missing ident # ([#2267](https://github.com/gakonst/ethers-rs/issues/2267)) - Support null result ([#2249](https://github.com/gakonst/ethers-rs/issues/2249)) @@ -79,6 +87,7 @@ Please do not manually edit this file. ### Depedencies +- Bump MSRV from 1.64 to 1.65 ([#2277](https://github.com/gakonst/ethers-rs/issues/2277)) - Bump and use workspace dependencies ([#2222](https://github.com/gakonst/ethers-rs/issues/2222)) - Bump crypto deps ([#2260](https://github.com/gakonst/ethers-rs/issues/2260)) - Bump enr from 0.7.0 to 0.8.0 ([#2255](https://github.com/gakonst/ethers-rs/issues/2255)) @@ -158,6 +167,7 @@ Please do not manually edit this file. ### Features +- Improve error diagnostic ([#2280](https://github.com/gakonst/ethers-rs/issues/2280)) - Roundtrip serde + to/from strings ([#2270](https://github.com/gakonst/ethers-rs/issues/2270)) - Support empty events ([#2263](https://github.com/gakonst/ethers-rs/issues/2263)) - Add implementations to Opcode ([#2243](https://github.com/gakonst/ethers-rs/issues/2243)) @@ -213,6 +223,7 @@ Please do not manually edit this file. ### Miscellaneous Tasks +- Remove redundant clone - Make clippy happy ([#2264](https://github.com/gakonst/ethers-rs/issues/2264)) - Allow clippy false positive ([#2259](https://github.com/gakonst/ethers-rs/issues/2259)) - Add more cache traces ([#2248](https://github.com/gakonst/ethers-rs/issues/2248)) @@ -245,6 +256,9 @@ Please do not manually edit this file. ### Other +- Prestwich/gas escalator dangle ([#2284](https://github.com/gakonst/ethers-rs/issues/2284)) +- Contracts chapter ([#2281](https://github.com/gakonst/ethers-rs/issues/2281)) +- Revert "chore: remove redundant clone" - Fix logical errors in doc comments for is_negative and is_zero ([#2218](https://github.com/gakonst/ethers-rs/issues/2218)) - Solang-parser 0.2.3 ([#2229](https://github.com/gakonst/ethers-rs/issues/2229)) - Reconnection & Request Reissuance ([#2181](https://github.com/gakonst/ethers-rs/issues/2181)) diff --git a/Cargo.lock b/Cargo.lock index d4bde293..776ef985 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1209,7 +1209,7 @@ dependencies = [ [[package]] name = "ethers" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-addressbook", "ethers-contract", @@ -1225,7 +1225,7 @@ dependencies = [ [[package]] name = "ethers-addressbook" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-core", "once_cell", @@ -1235,7 +1235,7 @@ dependencies = [ [[package]] name = "ethers-contract" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-contract-abigen", "ethers-contract-derive", @@ -1255,7 +1255,7 @@ dependencies = [ [[package]] name = "ethers-contract-abigen" -version = "2.0.0" +version = "2.0.1" dependencies = [ "Inflector", "dunce", @@ -1282,7 +1282,7 @@ dependencies = [ [[package]] name = "ethers-contract-derive" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-contract-abigen", "ethers-core", @@ -1294,7 +1294,7 @@ dependencies = [ [[package]] name = "ethers-core" -version = "2.0.0" +version = "2.0.1" dependencies = [ "arrayvec", "bincode", @@ -1327,7 +1327,7 @@ dependencies = [ [[package]] name = "ethers-derive-eip712" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-contract-derive", "ethers-core", @@ -1339,7 +1339,7 @@ dependencies = [ [[package]] name = "ethers-etherscan" -version = "2.0.0" +version = "2.0.1" dependencies = [ "ethers-core", "ethers-solc", @@ -1358,7 +1358,7 @@ dependencies = [ [[package]] name = "ethers-middleware" -version = "2.0.0" +version = "2.0.1" dependencies = [ "async-trait", "auto_impl", @@ -1387,7 +1387,7 @@ dependencies = [ [[package]] name = "ethers-providers" -version = "2.0.0" +version = "2.0.1" dependencies = [ "async-trait", "auto_impl", @@ -1426,7 +1426,7 @@ dependencies = [ [[package]] name = "ethers-signers" -version = "2.0.0" +version = "2.0.1" dependencies = [ "async-trait", "coins-bip32", @@ -1459,7 +1459,7 @@ dependencies = [ [[package]] name = "ethers-solc" -version = "2.0.0" +version = "2.0.1" dependencies = [ "cfg-if", "criterion", diff --git a/Cargo.toml b/Cargo.toml index 3cd4a57e..a9d483b7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,5 @@ [workspace.package] -version = "2.0.0" +version = "2.0.1" edition = "2021" rust-version = "1.65" license = "MIT OR Apache-2.0" @@ -64,19 +64,19 @@ resolver = "2" [workspace.dependencies] # workspace crates -ethers = { version = "2.0.0", path = "ethers", default-features = false } -ethers-addressbook = { version = "2.0.0", path = "ethers-addressbook", default-features = false } -ethers-contract = { version = "2.0.0", path = "ethers-contract", default-features = false } -ethers-core = { version = "2.0.0", path = "ethers-core", default-features = false } -ethers-etherscan = { version = "2.0.0", path = "ethers-etherscan", default-features = false } -ethers-middleware = { version = "2.0.0", path = "ethers-middleware", default-features = false } -ethers-providers = { version = "2.0.0", path = "ethers-providers", default-features = false } -ethers-signers = { version = "2.0.0", path = "ethers-signers", default-features = false } -ethers-solc = { version = "2.0.0", path = "ethers-solc", default-features = false } +ethers = { version = "2.0.1", path = "ethers", default-features = false } +ethers-addressbook = { version = "2.0.1", path = "ethers-addressbook", default-features = false } +ethers-contract = { version = "2.0.1", path = "ethers-contract", default-features = false } +ethers-core = { version = "2.0.1", path = "ethers-core", default-features = false } +ethers-etherscan = { version = "2.0.1", path = "ethers-etherscan", default-features = false } +ethers-middleware = { version = "2.0.1", path = "ethers-middleware", default-features = false } +ethers-providers = { version = "2.0.1", path = "ethers-providers", default-features = false } +ethers-signers = { version = "2.0.1", path = "ethers-signers", default-features = false } +ethers-solc = { version = "2.0.1", path = "ethers-solc", default-features = false } -ethers-contract-abigen = { version = "2.0.0", path = "ethers-contract/ethers-contract-abigen", default-features = false } -ethers-contract-derive = { version = "2.0.0", path = "ethers-contract/ethers-contract-derive", default-features = false } -ethers-derive-eip712 = { version = "2.0.0", path = "ethers-core/ethers-derive-eip712", default-features = false } +ethers-contract-abigen = { version = "2.0.1", path = "ethers-contract/ethers-contract-abigen", default-features = false } +ethers-contract-derive = { version = "2.0.1", path = "ethers-contract/ethers-contract-derive", default-features = false } +ethers-derive-eip712 = { version = "2.0.1", path = "ethers-core/ethers-derive-eip712", default-features = false } # async / async utils tokio = "1.26" From 89b1b2de78641ef98b8ba8f5d58cd218c329e9fa Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 21 Mar 2023 12:52:17 -0700 Subject: [PATCH 12/16] ci: rm celo integration test, install missing solc version (#2292) --- .github/workflows/ci.yml | 4 +-- ethers/tests/celo.rs | 60 ---------------------------------------- ethers/tests/eip712.rs | 1 + ethers/tests/main.rs | 3 -- 4 files changed, 3 insertions(+), 65 deletions(-) delete mode 100644 ethers/tests/celo.rs diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9e45e770..e63f25d2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,11 +63,11 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: test ${{ matrix.flags.flags }} shell: bash - # skip `ethers_etherscan::it` and `ethers::live` + # skip `ethers_etherscan::it` run: | cargo nextest run \ ${{ matrix.flags.flags }} \ - -E "!binary(~live) & !(deps(ethers-etherscan) & kind(test))" + -E "!(deps(ethers-etherscan) & kind(test))" etherscan-tests: name: etherscan tests diff --git a/ethers/tests/celo.rs b/ethers/tests/celo.rs deleted file mode 100644 index 0931decf..00000000 --- a/ethers/tests/celo.rs +++ /dev/null @@ -1,60 +0,0 @@ -use ethers::prelude::*; -use std::{sync::Arc, time::Duration}; - -ethers::contract::abigen!(SimpleStorage, "../testdata/SimpleStorage.json"); - -static CELO_TESTNET_URL: &str = "https://alfajores-forno.celo-testnet.org"; - -#[tokio::test] -async fn test_send_transaction() { - // Celo testnet - let provider = - Provider::::try_from(CELO_TESTNET_URL).unwrap().interval(Duration::from_secs(3)); - let chain_id = provider.get_chainid().await.unwrap().as_u64(); - - // Funded with https://celo.org/developers/faucet - // Please do not drain this account :) - let wallet = "d652abb81e8c686edba621a895531b1f291289b63b5ef09a94f686a5ecdd5db1" - .parse::() - .unwrap() - .with_chain_id(chain_id); - let client = SignerMiddleware::new(provider, wallet); - - let balance_before = client.get_balance(client.address(), None).await.unwrap(); - let tx = TransactionRequest::pay(client.address(), 100); - let _receipt = client.send_transaction(tx, None).await.unwrap().confirmations(3).await.unwrap(); - let balance_after = client.get_balance(client.address(), None).await.unwrap(); - assert!(balance_before > balance_after); -} - -#[tokio::test] -async fn deploy_and_call_contract() { - // Celo testnet - let provider = - Provider::::try_from(CELO_TESTNET_URL).unwrap().interval(Duration::from_secs(3)); - let chain_id = provider.get_chainid().await.unwrap().as_u64(); - - // Funded with https://celo.org/developers/faucet - let wallet = "58ea5643a78c36926ad5128a6b0d8dfcc7fc705788a993b1c724be3469bc9697" - .parse::() - .unwrap() - .with_chain_id(chain_id); - let client = provider.with_signer(wallet); - let client = Arc::new(client); - - let deploy_tx = SimpleStorage::deploy(client, ()).unwrap(); - let contract = deploy_tx.send().await.unwrap(); - - let value: U256 = contract.value().call().await.unwrap(); - assert_eq!(value, 0.into()); - - // make a state mutating transaction - // gas estimation costs are sometimes under-reported on celo, - // so we manually set it to avoid failures - let call = contract.set_value(1.into()).gas(100000); - let pending_tx = call.send().await.unwrap(); - let _receipt = pending_tx.await.unwrap(); - - let value: U256 = contract.method("value", ()).unwrap().call().await.unwrap(); - assert_eq!(value, 1.into()); -} diff --git a/ethers/tests/eip712.rs b/ethers/tests/eip712.rs index f23d8295..7843a317 100644 --- a/ethers/tests/eip712.rs +++ b/ethers/tests/eip712.rs @@ -40,6 +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"); + Solc::find_or_install_svm_version("0.6.0").unwrap(); // install solc let result = Solc::default().compile_source(path).unwrap(); let (abi, bytecode, _) = result .find("DeriveEip712Test") diff --git a/ethers/tests/main.rs b/ethers/tests/main.rs index 7d10133c..d4845162 100644 --- a/ethers/tests/main.rs +++ b/ethers/tests/main.rs @@ -1,7 +1,4 @@ //! Ethers integration tests. #![cfg(not(target_arch = "wasm32"))] -#[cfg(feature = "celo")] -mod celo; - mod eip712; From 797488eedf2248c154818a39b7152194f9625b91 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 21 Mar 2023 14:38:41 -0700 Subject: [PATCH 13/16] fix: add missing feature on ethers tests --- ethers/Cargo.toml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ethers/Cargo.toml b/ethers/Cargo.toml index 8a5b36ed..9db13a3e 100644 --- a/ethers/Cargo.toml +++ b/ethers/Cargo.toml @@ -62,10 +62,11 @@ ethers-etherscan = { workspace = true, features = ["ethers-solc"] } ethers-middleware.workspace = true ethers-providers.workspace = true ethers-signers.workspace = true -ethers-solc = { workspace = true } +ethers-solc.workspace = true [dev-dependencies] serde.workspace = true -tokio = { workspace = true, features = ["macros", "rt"] } +tokio = { workspace = true, features = ["macros", "rt-multi-thread"] } ethers-contract = { workspace = true, features = ["eip712"] } ethers-providers = { workspace = true, features = ["rustls"] } # allow https connections +ethers-solc = { workspace = true, features = ["svm-solc"] } From 80ac3947d066bb3e3148edaecf8cd54792452bb2 Mon Sep 17 00:00:00 2001 From: Georgios Konstantopoulos Date: Tue, 21 Mar 2023 15:16:10 -0700 Subject: [PATCH 14/16] test: ensure multithreaded tokio rt --- ethers/tests/eip712.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers/tests/eip712.rs b/ethers/tests/eip712.rs index 7843a317..869bb635 100644 --- a/ethers/tests/eip712.rs +++ b/ethers/tests/eip712.rs @@ -10,7 +10,7 @@ use ethers::{ }; use std::{path::PathBuf, sync::Arc}; -#[tokio::test] +#[tokio::test(flavor = "multi_thread")] async fn test_derive_eip712() { // Generate Contract ABI Bindings abigen!( From 16f9fab75cb43e2d9e4c2b74b68afde7577f0e2f Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Thu, 23 Mar 2023 00:29:10 +0100 Subject: [PATCH 15/16] fix: enable doc_cfg feature for docsrs (#2294) --- ethers-addressbook/src/lib.rs | 1 + ethers-contract/ethers-contract-abigen/src/lib.rs | 1 + ethers-contract/ethers-contract-derive/src/lib.rs | 1 + ethers-contract/src/lib.rs | 1 + ethers-core/src/lib.rs | 1 + ethers-etherscan/src/lib.rs | 1 + ethers-middleware/src/lib.rs | 1 + ethers-providers/src/lib.rs | 2 +- ethers-signers/src/lib.rs | 1 + ethers-solc/src/lib.rs | 1 + ethers/src/lib.rs | 1 + 11 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ethers-addressbook/src/lib.rs b/ethers-addressbook/src/lib.rs index c2acc2f6..3eddf863 100644 --- a/ethers-addressbook/src/lib.rs +++ b/ethers-addressbook/src/lib.rs @@ -1,5 +1,6 @@ #![doc = include_str!("../README.md")] #![deny(unsafe_code, rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] pub use ethers_core::types::{Address, Chain}; diff --git a/ethers-contract/ethers-contract-abigen/src/lib.rs b/ethers-contract/ethers-contract-abigen/src/lib.rs index 8ea9a972..3867ed46 100644 --- a/ethers-contract/ethers-contract-abigen/src/lib.rs +++ b/ethers-contract/ethers-contract-abigen/src/lib.rs @@ -9,6 +9,7 @@ #![deny(rustdoc::broken_intra_doc_links, missing_docs, unsafe_code)] #![warn(unreachable_pub)] +#![cfg_attr(docsrs, feature(doc_cfg))] #[cfg(test)] #[allow(missing_docs)] diff --git a/ethers-contract/ethers-contract-derive/src/lib.rs b/ethers-contract/ethers-contract-derive/src/lib.rs index c41de57e..3013f9d3 100644 --- a/ethers-contract/ethers-contract-derive/src/lib.rs +++ b/ethers-contract/ethers-contract-derive/src/lib.rs @@ -2,6 +2,7 @@ #![deny(missing_docs, unsafe_code, unused_crate_dependencies)] #![deny(rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] use abigen::Contracts; use proc_macro::TokenStream; diff --git a/ethers-contract/src/lib.rs b/ethers-contract/src/lib.rs index 8c8474bc..88f8df43 100644 --- a/ethers-contract/src/lib.rs +++ b/ethers-contract/src/lib.rs @@ -2,6 +2,7 @@ #![doc = include_str!("../README.md")] #![deny(unsafe_code)] #![warn(missing_docs)] +#![cfg_attr(docsrs, feature(doc_cfg))] #[path = "contract.rs"] mod _contract; diff --git a/ethers-core/src/lib.rs b/ethers-core/src/lib.rs index 446a58f8..4a087fa7 100644 --- a/ethers-core/src/lib.rs +++ b/ethers-core/src/lib.rs @@ -2,6 +2,7 @@ #![doc = include_str!("../README.md")] #![deny(rustdoc::broken_intra_doc_links)] #![cfg_attr(not(target_arch = "wasm32"), deny(unused_crate_dependencies))] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod types; diff --git a/ethers-etherscan/src/lib.rs b/ethers-etherscan/src/lib.rs index b9594e3e..5577deb8 100644 --- a/ethers-etherscan/src/lib.rs +++ b/ethers-etherscan/src/lib.rs @@ -1,5 +1,6 @@ #![doc = include_str!("../README.md")] #![deny(unsafe_code, rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] use crate::errors::{is_blocked_by_cloudflare_response, is_cloudflare_security_challenge}; use contract::ContractMetadata; diff --git a/ethers-middleware/src/lib.rs b/ethers-middleware/src/lib.rs index 127b8337..451f1ede 100644 --- a/ethers-middleware/src/lib.rs +++ b/ethers-middleware/src/lib.rs @@ -1,5 +1,6 @@ #![doc = include_str!("../README.md")] #![deny(unsafe_code, rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] /// The [Gas Escalator middleware](crate::gas_escalator::GasEscalatorMiddleware) /// is used to re-broadcast transactions with an increasing gas price to guarantee diff --git a/ethers-providers/src/lib.rs b/ethers-providers/src/lib.rs index a49a78d6..b86b4fe3 100644 --- a/ethers-providers/src/lib.rs +++ b/ethers-providers/src/lib.rs @@ -1,8 +1,8 @@ #![doc = include_str!("../README.md")] -#![cfg_attr(docsrs, feature(doc_cfg))] #![allow(clippy::type_complexity)] #![warn(missing_docs)] #![deny(unsafe_code, rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] mod ext; pub use ext::*; diff --git a/ethers-signers/src/lib.rs b/ethers-signers/src/lib.rs index 67cc78e2..7ff631b6 100644 --- a/ethers-signers/src/lib.rs +++ b/ethers-signers/src/lib.rs @@ -1,5 +1,6 @@ #![doc = include_str!("../README.md")] #![deny(unsafe_code, rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] mod wallet; pub use wallet::{MnemonicBuilder, Wallet, WalletError}; diff --git a/ethers-solc/src/lib.rs b/ethers-solc/src/lib.rs index d0976954..10185c91 100644 --- a/ethers-solc/src/lib.rs +++ b/ethers-solc/src/lib.rs @@ -1,5 +1,6 @@ #![doc = include_str!("../README.md")] #![deny(rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] pub mod artifacts; pub mod sourcemap; diff --git a/ethers/src/lib.rs b/ethers/src/lib.rs index 3d94e43d..0911b6f0 100644 --- a/ethers/src/lib.rs +++ b/ethers/src/lib.rs @@ -81,6 +81,7 @@ #![warn(missing_debug_implementations, missing_docs, rust_2018_idioms, unreachable_pub)] #![deny(rustdoc::broken_intra_doc_links)] +#![cfg_attr(docsrs, feature(doc_cfg))] #![doc(test(no_crate_inject, attr(deny(rust_2018_idioms), allow(dead_code, unused_variables))))] #[doc(inline)] From 36dac5864c657719f1b134ccd100bb3bc99e5883 Mon Sep 17 00:00:00 2001 From: Jonathan LEI Date: Sat, 25 Mar 2023 02:00:01 +0800 Subject: [PATCH 16/16] fix: broken eip155 logic in aws signer (#2300) --- ethers-signers/src/aws/utils.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ethers-signers/src/aws/utils.rs b/ethers-signers/src/aws/utils.rs index e6687c98..e15f8f7c 100644 --- a/ethers-signers/src/aws/utils.rs +++ b/ethers-signers/src/aws/utils.rs @@ -51,7 +51,7 @@ pub(super) fn sig_from_digest_bytes_trial_recovery( /// Modify the v value of a signature to conform to eip155 pub(super) fn apply_eip155(sig: &mut EthSig, chain_id: u64) { - let v = (chain_id * 2 + 35) + ((sig.v - 1) % 2); + let v = (chain_id * 2 + 35) + sig.v; sig.v = v; }