* fmt: all

* fmt: eol
This commit is contained in:
DaniPopes 2022-09-28 20:58:26 +02:00 committed by GitHub
parent 3ee1b6796e
commit 5c762c44d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
31 changed files with 981 additions and 1005 deletions

View File

@ -1,10 +1,9 @@
--- ---
name: Bug report name: Bug report
about: Create a report to help us improve about: Create a report to help us improve
title: '' title: ""
labels: bug labels: bug
assignees: '' assignees: ""
--- ---
**Version** **Version**

View File

@ -1,10 +1,9 @@
--- ---
name: Feature request name: Feature request
about: Suggest an idea for this project about: Suggest an idea for this project
title: '' title: ""
labels: feature-request labels: feature-request
assignees: '' assignees: ""
--- ---
**Is your feature request related to a problem? Please describe.** **Is your feature request related to a problem? Please describe.**

View File

@ -1,10 +1,9 @@
--- ---
name: Question name: Question
about: Please use the Telegram group for questions about: Please use the Telegram group for questions
title: '' title: ""
labels: '' labels: ""
assignees: '' assignees: ""
--- ---
Please post your question as a discussion in Telegram: https://t.me/ethers_rs Please post your question as a discussion in Telegram: https://t.me/ethers_rs

View File

@ -27,6 +27,6 @@ the code change.
## PR Checklist ## PR Checklist
- [ ] Added Tests - [ ] Added Tests
- [ ] Added Documentation - [ ] Added Documentation
- [ ] Updated the changelog - [ ] Updated the changelog

View File

@ -1,49 +1,49 @@
version: 2 version: 2
updates: updates:
- package-ecosystem: cargo - package-ecosystem: cargo
directory: "/" directory: "/"
schedule: schedule:
interval: daily interval: daily
time: "03:00" time: "03:00"
open-pull-requests-limit: 10 open-pull-requests-limit: 10
ignore: ignore:
- dependency-name: async-trait - dependency-name: async-trait
versions: versions:
- 0.1.48 - 0.1.48
- 0.1.49 - 0.1.49
- dependency-name: futures-core - dependency-name: futures-core
versions: versions:
- 0.3.13 - 0.3.13
- 0.3.14 - 0.3.14
- dependency-name: futures-channel - dependency-name: futures-channel
versions: versions:
- 0.3.14 - 0.3.14
- dependency-name: anyhow - dependency-name: anyhow
versions: versions:
- 1.0.40 - 1.0.40
- dependency-name: elliptic-curve - dependency-name: elliptic-curve
versions: versions:
- 0.9.0 - 0.9.0
- 0.9.2 - 0.9.2
- 0.9.6 - 0.9.6
- dependency-name: pin-project - dependency-name: pin-project
versions: versions:
- 1.0.6 - 1.0.6
- dependency-name: arrayvec - dependency-name: arrayvec
versions: versions:
- 0.6.0 - 0.6.0
- dependency-name: serde - dependency-name: serde
versions: versions:
- 1.0.125 - 1.0.125
- dependency-name: tokio - dependency-name: tokio
versions: versions:
- 1.3.0 - 1.3.0
- dependency-name: serde_json - dependency-name: serde_json
versions: versions:
- 1.0.63 - 1.0.63
- dependency-name: ethereum-types - dependency-name: ethereum-types
versions: versions:
- 0.11.0 - 0.11.0
- dependency-name: yubihsm - dependency-name: yubihsm
versions: versions:
- 0.38.0 - 0.38.0

View File

@ -1,14 +1,14 @@
name: Security audit name: Security audit
on: on:
push: push:
paths: paths:
- '**/Cargo.toml' - "**/Cargo.toml"
- '**/Cargo.lock' - "**/Cargo.lock"
jobs: jobs:
security_audit: security_audit:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v1
- uses: actions-rs/audit-check@v1 - uses: actions-rs/audit-check@v1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,8 +1,8 @@
on: on:
push: push:
branches: branches:
- master - master
pull_request: pull_request:
name: Tests name: Tests
@ -10,282 +10,285 @@ name: Tests
# so that we do not get rate limited by Etherscan (and it's free to generate as # so that we do not get rate limited by Etherscan (and it's free to generate as
# many as you want) # many as you want)
env: env:
ETHERSCAN_API_KEY_ETHEREUM: I5BXNZYP5GEDWFINGVEZKYIVU2695NPQZB ETHERSCAN_API_KEY_ETHEREUM: I5BXNZYP5GEDWFINGVEZKYIVU2695NPQZB
ETHERSCAN_API_KEY_CELO: B13XSMUT6Q3Q4WZ5DNQR8RXDBA2KNTMT4M ETHERSCAN_API_KEY_CELO: B13XSMUT6Q3Q4WZ5DNQR8RXDBA2KNTMT4M
RINKEBY_PRIVATE_KEY: "fa4a1a79e869a96fcb42727f75e3232d6865a82ea675bb95de967a7fe6a773b2" RINKEBY_PRIVATE_KEY: "fa4a1a79e869a96fcb42727f75e3232d6865a82ea675bb95de967a7fe6a773b2"
jobs: jobs:
tests: tests:
name: ethereum tests name: ethereum tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install Anvil - name: Install Anvil
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
with: with:
version: nightly version: nightly
- name: Install Solc - name: Install Solc
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc
chmod u+x "$HOME/bin/solc" chmod u+x "$HOME/bin/solc"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
solc --version solc --version
- name: Install geth - name: Install geth
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz
tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz
mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth
chmod u+x "$HOME/bin/geth" chmod u+x "$HOME/bin/geth"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
geth version geth version
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
cache-on-failure: true cache-on-failure: true
- name: cargo test - name: cargo test
run: | run: |
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
export ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY_ETHEREUM export ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY_ETHEREUM
cargo test cargo test
feature-tests: feature-tests:
name: celo tests name: celo tests
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
# TODO: can we combine these shared steps in github actions? # TODO: can we combine these shared steps in github actions?
- name: Install Anvil - name: Install Anvil
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
with: with:
version: nightly version: nightly
- name: Install Solc - name: Install Solc
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc
chmod u+x "$HOME/bin/solc" chmod u+x "$HOME/bin/solc"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
solc --version solc --version
- name: Install geth - name: Install geth
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz
tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz
mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth
chmod u+x "$HOME/bin/geth" chmod u+x "$HOME/bin/geth"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
geth version geth version
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
cache-on-failure: true cache-on-failure: true
- name: cargo test (Celo) - name: cargo test (Celo)
run: | run: |
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
export ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY_CELO export ETHERSCAN_API_KEY=$ETHERSCAN_API_KEY_CELO
cargo test --all-features cargo test --all-features
lint: lint:
name: lints name: lints
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install toolchain - name: Install toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: nightly toolchain: nightly
profile: minimal profile: minimal
components: rustfmt, clippy components: rustfmt, clippy
override: true override: true
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
cache-on-failure: true cache-on-failure: true
- name: cargo fmt - name: cargo fmt
run: cargo +nightly fmt --all -- --check run: cargo +nightly fmt --all -- --check
- name: cargo clippy - name: cargo clippy
run: cargo +nightly clippy --all-features -- -D warnings run: cargo +nightly clippy --all-features -- -D warnings
wasm: wasm:
name: WASM name: WASM
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install rust - name: Install rust
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
toolchain: stable toolchain: stable
target: wasm32-unknown-unknown target: wasm32-unknown-unknown
profile: minimal profile: minimal
override: true override: true
- name: Install Anvil - name: Install Anvil
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
with: with:
version: nightly version: nightly
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
cache-on-failure: true cache-on-failure: true
- name: Check - name: Check
uses: actions-rs/cargo@v1 uses: actions-rs/cargo@v1
with: with:
command: check command: check
args: --target wasm32-unknown-unknown args: --target wasm32-unknown-unknown
- name: Launch Anvil - name: Launch Anvil
run: anvil --block-time 2 -m "stuff inherit faith park genre spread huge knee ecology private marble supreme" & run:
anvil --block-time 2 -m "stuff inherit faith park genre spread huge knee ecology
private marble supreme" &
- name: Install wasm-pack - name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Wasm-pack test firefox - name: Wasm-pack test firefox
run: | run: |
cd examples/ethers-wasm cd examples/ethers-wasm
wasm-pack test --headless --firefox wasm-pack test --headless --firefox
- name: Wasm-pack test chrome - name: Wasm-pack test chrome
run: | run: |
cd examples/ethers-wasm cd examples/ethers-wasm
wasm-pack test --headless --chrome wasm-pack test --headless --chrome
examples: examples:
name: Examples name: Examples
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout sources - name: Checkout sources
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Install geth (for state overrides example) - name: Install geth (for state overrides example)
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz wget -q https://gethstore.blob.core.windows.net/builds/geth-linux-amd64-1.9.23-8c2f2715.tar.gz
tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz tar -xvf geth-linux-amd64-1.9.23-8c2f2715.tar.gz
mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth mv geth-linux-amd64-1.9.23-8c2f2715/geth $HOME/bin/geth
chmod u+x "$HOME/bin/geth" chmod u+x "$HOME/bin/geth"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
geth version geth version
- name: Install Anvil - name: Install Anvil
uses: foundry-rs/foundry-toolchain@v1 uses: foundry-rs/foundry-toolchain@v1
with: with:
version: nightly version: nightly
- name: Install Solc - name: Install Solc
run: | run: |
mkdir -p "$HOME/bin" mkdir -p "$HOME/bin"
wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc wget -q https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O $HOME/bin/solc
chmod u+x "$HOME/bin/solc" chmod u+x "$HOME/bin/solc"
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
solc --version solc --version
- name: Install stable toolchain - name: Install stable toolchain
uses: actions-rs/toolchain@v1 uses: actions-rs/toolchain@v1
with: with:
profile: minimal profile: minimal
toolchain: stable toolchain: stable
override: true override: true
components: rustfmt, clippy components: rustfmt, clippy
- uses: Swatinem/rust-cache@v1 - uses: Swatinem/rust-cache@v1
with: with:
cache-on-failure: true cache-on-failure: true
- name: Build all examples - name: Build all examples
run: | run: |
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
examples=$(cargo metadata --format-version 1 | \ examples=$(cargo metadata --format-version 1 | \
jq -c '.packages[] jq -c '.packages[]
| select(.name == "ethers") | select(.name == "ethers")
| .targets[] | .targets[]
| select(.kind[] | contains("example")) | select(.kind[] | contains("example"))
| with_entries(select([.key] | with_entries(select([.key]
| inside(["name", "required-features"])))' | inside(["name", "required-features"])))'
) )
for example in $examples; do for example in $examples; do
name="$(echo "$example" | jq -r '.name')" name="$(echo "$example" | jq -r '.name')"
args=( args=(
-p ethers -p ethers
--example "$name" --example "$name"
) )
features="$(echo "$example" | jq -r 'try(."required-features" | join(","))')" features="$(echo "$example" | jq -r 'try(."required-features" | join(","))')"
if [[ ! -z "$features" ]]; then if [[ ! -z "$features" ]]; then
args+=(--features "$features") args+=(--features "$features")
fi fi
echo "building $name" echo "building $name"
cargo build "${args[@]}" cargo build "${args[@]}"
done done
- name: Run all examples - name: Run all examples
run: | run: |
export PATH=$HOME/bin:$PATH export PATH=$HOME/bin:$PATH
chmod +x ./scripts/examples.sh chmod +x ./scripts/examples.sh
./scripts/examples.sh ./scripts/examples.sh
windows-build: windows-build:
runs-on: windows-latest runs-on: windows-latest
name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }}) name: (${{ matrix.target }}, ${{ matrix.cfg_release_channel }})
env: env:
CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }} CFG_RELEASE_CHANNEL: ${{ matrix.cfg_release_channel }}
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
target: [ target:
i686-pc-windows-gnu, [
i686-pc-windows-msvc, i686-pc-windows-gnu,
x86_64-pc-windows-gnu, i686-pc-windows-msvc,
x86_64-pc-windows-msvc, x86_64-pc-windows-gnu,
] x86_64-pc-windows-msvc,
cfg_release_channel: [nightly] ]
cfg_release_channel: [nightly]
steps: steps:
- name: checkout - name: checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
# Run build # Run build
- name: Install Rustup using win.rustup.rs - name: Install Rustup using win.rustup.rs
run: | run: |
# disable download progress bar # disable download progress bar
$ProgressPreference = "SilentlyContinue" $ProgressPreference = "SilentlyContinue"
Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe Invoke-WebRequest https://win.rustup.rs/ -OutFile rustup-init.exe
.\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none .\rustup-init.exe -y --default-host=x86_64-pc-windows-msvc --default-toolchain=none
del rustup-init.exe del rustup-init.exe
rustup target add ${{ matrix.target }} rustup target add ${{ matrix.target }}
shell: powershell shell: powershell
- name: Add mingw32 to path for i686-gnu - name: Add mingw32 to path for i686-gnu
run: | run: |
echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH echo "C:\msys64\mingw32\bin" >> $GITHUB_PATH
if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly' if: matrix.target == 'i686-pc-windows-gnu' && matrix.channel == 'nightly'
shell: bash shell: bash
- name: Add mingw64 to path for x86_64-gnu - name: Add mingw64 to path for x86_64-gnu
run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH run: echo "C:\msys64\mingw64\bin" >> $GITHUB_PATH
if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly' if: matrix.target == 'x86_64-pc-windows-gnu' && matrix.channel == 'nightly'
shell: bash shell: bash
- name: build - name: build
run: | run: |
rustc -Vv rustc -Vv
cargo -V cargo -V
# we test without --all-features on Windows so that sha2-asm is not activated. # we test without --all-features on Windows so that sha2-asm is not activated.
cargo check cargo check
shell: cmd shell: cmd

View File

@ -1,36 +1,34 @@
const semver = require("semver"); const semver = require("semver");
const previousVersion = (currentVersion, releaseType) => { const previousVersion = (currentVersion, releaseType) => {
const parsedVersion = semver.parse(currentVersion); const parsedVersion = semver.parse(currentVersion);
switch (releaseType) { switch (releaseType) {
case "major": { case "major": {
return `v${parsedVersion.major - 1}.0.0`; return `v${parsedVersion.major - 1}.0.0`;
}
case "minor": {
return `v${parsedVersion.major}.${parsedVersion.minor - 1}.0`;
}
case "patch": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch - 1}`;
}
case "alpha": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}-alpha.${
parsedVersion.prerelease[1] - 1
}`;
}
case "beta": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}-beta.${
parsedVersion.prerelease[1] - 1
}`;
}
case "rc": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${parsedVersion.patch}-rc.${
parsedVersion.prerelease[1] - 1
}`;
}
} }
case "minor": {
return `v${parsedVersion.major}.${parsedVersion.minor - 1}.0`;
}
case "patch": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${
parsedVersion.patch - 1
}`;
}
case "alpha": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${
parsedVersion.patch
}-alpha.${parsedVersion.prerelease[1] - 1}`;
}
case "beta": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${
parsedVersion.patch
}-beta.${parsedVersion.prerelease[1] - 1}`;
}
case "rc": {
return `v${parsedVersion.major}.${parsedVersion.minor}.${
parsedVersion.patch
}-rc.${parsedVersion.prerelease[1] - 1}`;
}
}
}; };
const [currentVersion, releaseType] = process.argv.slice(-2); const [currentVersion, releaseType] = process.argv.slice(-2);

View File

@ -1,99 +1,99 @@
name: Release name: Release
on: on:
schedule: schedule:
- cron: "0 0 * * 0" - cron: "0 0 * * 0"
workflow_dispatch: workflow_dispatch:
inputs: inputs:
release_type: release_type:
type: choice type: choice
description: Release type description: Release type
options: options:
- major - major
- minor - minor
- patch - patch
- rc - rc
- beta - beta
- alpha - alpha
permissions: permissions:
contents: write contents: write
jobs: jobs:
release: release:
runs-on: ubuntu-latest 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/workflows/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: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_TOKEN: ${{ secrets.CARGO_TOKEN }}
RELEASE_VERSION: ${{ steps.changelog.outputs.release_version }} RELEASE_TYPE: ${{ github.event.inputs.release_type }}
with: steps:
tag_name: ${{ env.RELEASE_VERSION }} - name: Checkout sources
release_name: ${{ env.RELEASE_VERSION }} uses: actions/checkout@v3
body_path: GENERATED_CHANGELOG.md with:
prerelease: ${{ env.RELEASE_TYPE == 'alpha' }} 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/workflows/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' }}

2
.gitignore vendored
View File

@ -1,4 +1,4 @@
/target /target
.vscode .vscode
/.envrc /.envrc
.idea .idea

View File

@ -4,340 +4,340 @@
### Unreleased ### Unreleased
- Add comment about safety of u8 -> u64 cast in `ethers_core::types::Signature` - 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) - 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 geth trace types for debug_traceTransaction rpc
- Fix RLP decoding of legacy `Transaction` - Fix RLP decoding of legacy `Transaction`
- Fix RLP encoding of `TransactionReceipt` [#1661](https://github.com/gakonst/ethers-rs/pull/1661) - 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 `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) - 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) - 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) - 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) - 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) - 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) - 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) - 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 - Methods like `set_to()` from `TypedTransaction` can be chained
- Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396) - Use H64 for Block Nonce [#1396](https://github.com/gakonst/ethers-rs/pull/1396)
- Add `as_*_mut` methods on `TypedTransaction` - Add `as_*_mut` methods on `TypedTransaction`
[#1310](https://github.com/gakonst/ethers-rs/pull/1310) [#1310](https://github.com/gakonst/ethers-rs/pull/1310)
- AWS EIP712 data signing no longer signs with EIP155 - AWS EIP712 data signing no longer signs with EIP155
- Added Cronos testnet to etherscan options [1276](https://github.com/gakonst/ethers-rs/pull/1276) - Added Cronos testnet to etherscan options [1276](https://github.com/gakonst/ethers-rs/pull/1276)
- Fix parsing of a pending block - Fix parsing of a pending block
[1272](https://github.com/gakonst/ethers-rs/pull/1272) [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) - 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 - Fix RLP decoding of `from` field for `Eip1559TransactionRequest` and
`Eip2930TransactionRequest`, remove `Eip1559TransactionRequest` `sighash` `Eip2930TransactionRequest`, remove `Eip1559TransactionRequest` `sighash`
method [1180](https://github.com/gakonst/ethers-rs/pull/1180) 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) - 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) - 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`) - 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) - 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 - `Transaction::from` will default to `Address::zero()`. Add `recover_from` and
`recover_from_mut` methods for recovering the sender from signature, and also `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). 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 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 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 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 - Add Cronos mainnet beta and testnet to the list of known chains
[926](https://github.com/gakonst/ethers-rs/pull/926) [926](https://github.com/gakonst/ethers-rs/pull/926)
- `Chain::to_string` will return the same chain name as `Chain::from_str` - `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) - Add `eth_syncing` [848](https://github.com/gakonst/ethers-rs/pull/848)
- Fix overflow and possible divide-by-zero in `estimate_priority_fee` - Fix overflow and possible divide-by-zero in `estimate_priority_fee`
- Add BSC mainnet and testnet to the list of known chains - Add BSC mainnet and testnet to the list of known chains
[831](https://github.com/gakonst/ethers-rs/pull/831) [831](https://github.com/gakonst/ethers-rs/pull/831)
- Returns error on invalid type conversion instead of panicking - Returns error on invalid type conversion instead of panicking
[691](https://github.com/gakonst/ethers-rs/pull/691/files) [691](https://github.com/gakonst/ethers-rs/pull/691/files)
- Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and - Change types mapping for solidity `bytes` to rust `ethers::core::Bytes` and
solidity `uint8[]` to rust `Vec<u8>`. solidity `uint8[]` to rust `Vec<u8>`.
[613](https://github.com/gakonst/ethers-rs/pull/613) [613](https://github.com/gakonst/ethers-rs/pull/613)
- Fix `format_units` to return a `String` of representing a decimal point float - Fix `format_units` to return a `String` of representing a decimal point float
such that the decimal places don't get truncated. such that the decimal places don't get truncated.
[597](https://github.com/gakonst/ethers-rs/pull/597) [597](https://github.com/gakonst/ethers-rs/pull/597)
- Implement hex display format for `ethers::core::Bytes` - Implement hex display format for `ethers::core::Bytes`
[#624](https://github.com/gakonst/ethers-rs/pull/624). [#624](https://github.com/gakonst/ethers-rs/pull/624).
- Fix `fee_history` to first try with `block_count` encoded as a hex `QUANTITY`. - Fix `fee_history` to first try with `block_count` encoded as a hex `QUANTITY`.
[#668](https://github.com/gakonst/ethers-rs/pull/668) [#668](https://github.com/gakonst/ethers-rs/pull/668)
- Fix `fill_transaction` to set nonces in transactions, if the sender is known - Fix `fill_transaction` to set nonces in transactions, if the sender is known
and no nonce is specified and no nonce is specified
- Move `fill_transaction` implementation to the provider, to allow middleware - Move `fill_transaction` implementation to the provider, to allow middleware
to properly override its behavior. to properly override its behavior.
- Add informational messages to solc installation and compilation. - Add informational messages to solc installation and compilation.
- Significantly refactor `MultiAbigen` module generation. Now allows for lib - Significantly refactor `MultiAbigen` module generation. Now allows for lib
generation, and does not make unnecessary disk writes. generation, and does not make unnecessary disk writes.
[#854](https://github.com/gakonst/ethers-rs/pull/852) [#854](https://github.com/gakonst/ethers-rs/pull/852)
- Refactor `ethers-contract-abigen` to use `eyre` instead of `anyhow` via - Refactor `ethers-contract-abigen` to use `eyre` instead of `anyhow` via
[#858](https://github.com/gakonst/ethers-rs/pull/858) [#858](https://github.com/gakonst/ethers-rs/pull/858)
- Add `Deployer.send_with_receipt -> Result<(Contract, Receipt), Error>` - Add `Deployer.send_with_receipt -> Result<(Contract, Receipt), Error>`
so that the receipt can be returned to the called when deploying so that the receipt can be returned to the called when deploying
a contract [#865](https://github.com/gakonst/ethers-rs/pull/865) a contract [#865](https://github.com/gakonst/ethers-rs/pull/865)
- Add Arbitrum mainnet and testnet to the list of known chains - Add Arbitrum mainnet and testnet to the list of known chains
- Add ENS avatar and TXT records resolution - Add ENS avatar and TXT records resolution
[#889](https://github.com/gakonst/ethers-rs/pull/889) [#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 - 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) [#901](https://github.com/gakonst/ethers-rs/pull/901)
- Add a getter to `ProjectCompileOutput` that returns a mapping of compiler - Add a getter to `ProjectCompileOutput` that returns a mapping of compiler
versions to a vector of name + contract struct tuples versions to a vector of name + contract struct tuples
[#908](https://github.com/gakonst/ethers-rs/pull/908) [#908](https://github.com/gakonst/ethers-rs/pull/908)
- Add Yul compilation [994](https://github.com/gakonst/ethers-rs/pull/994) - Add Yul compilation [994](https://github.com/gakonst/ethers-rs/pull/994)
- Enforce commutativity of ENS reverse resolution - Enforce commutativity of ENS reverse resolution
[#996](https://github.com/gakonst/ethers-rs/pull/996) [#996](https://github.com/gakonst/ethers-rs/pull/996)
- Add `TransactionReceipt::to` and `TransactionReceipt::from` - Add `TransactionReceipt::to` and `TransactionReceipt::from`
[#1184](https://github.com/gakonst/ethers-rs/pull/1184) [#1184](https://github.com/gakonst/ethers-rs/pull/1184)
- Add `From<H160>` and From<Vec<H160>> traits to `ValueOrArray<H160>` [#1199](https://github.com/gakonst/ethers-rs/pull/1200) - Add `From<H160>` and From<Vec<H160>> traits to `ValueOrArray<H160>` [#1199](https://github.com/gakonst/ethers-rs/pull/1200)
- Fix handling of Websocket connection errors [#1287](https://github.com/gakonst/ethers-rs/pull/1287) - 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) - 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. - [#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`. - [#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. - [#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) - Bytes debug format now displays hex literals [#1658](https://github.com/gakonst/ethers-rs/pull/1658)
## ethers-contract-abigen ## ethers-contract-abigen
### Unreleased ### Unreleased
- Use corresponding rust structs for event fields if they're solidity structs [#1674](https://github.com/gakonst/ethers-rs/pull/1674) - 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) - 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) - generate error bindings for custom errors [#1549](https://github.com/gakonst/ethers-rs/pull/1549)
- Support overloaded events - Support overloaded events
[#1233](https://github.com/gakonst/ethers-rs/pull/1233) [#1233](https://github.com/gakonst/ethers-rs/pull/1233)
- Relax Clone requirements when Arc<Middleware> is used - Relax Clone requirements when Arc<Middleware> is used
[#1183](https://github.com/gakonst/ethers-rs/pull/1183) [#1183](https://github.com/gakonst/ethers-rs/pull/1183)
- Generate a deploy function if bytecode is provided in the abigen! input (json artifact) - Generate a deploy function if bytecode is provided in the abigen! input (json artifact)
[#1030](https://github.com/gakonst/ethers-rs/pull/1030). [#1030](https://github.com/gakonst/ethers-rs/pull/1030).
- Generate correct bindings of struct's field names that are reserved words - Generate correct bindings of struct's field names that are reserved words
[#989](https://github.com/gakonst/ethers-rs/pull/989). [#989](https://github.com/gakonst/ethers-rs/pull/989).
- Generate correct binding module names that are reserved words - Generate correct binding module names that are reserved words
[#1498](https://github.com/gakonst/ethers-rs/pull/1498). Note: this changes [#1498](https://github.com/gakonst/ethers-rs/pull/1498). Note: this changes
generated module names to snake case. For example, `MyContract` is now generated module names to snake case. For example, `MyContract` is now
`my_contract` rather than `mycontract_mod`. `my_contract` rather than `mycontract_mod`.
- The `Cargo.toml` generated by bindings now includes the `abigen` feature on - The `Cargo.toml` generated by bindings now includes the `abigen` feature on
ethers. [#1508](https://github.com/gakonst/ethers-rs/pull/1508) ethers. [#1508](https://github.com/gakonst/ethers-rs/pull/1508)
- More descriptive contract deserialization errors. - More descriptive contract deserialization errors.
[#1633](https://github.com/gakonst/ethers-rs/pull/1633) [#1633](https://github.com/gakonst/ethers-rs/pull/1633)
### 0.6.0 ### 0.6.0
- Add `MultiAbigen` to generate a series of contract bindings that can be kept in the repo - 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). [#724](https://github.com/gakonst/ethers-rs/pull/724).
- Add provided `event_derives` to call and event enums as well - Add provided `event_derives` to call and event enums as well
[#721](https://github.com/gakonst/ethers-rs/pull/721). [#721](https://github.com/gakonst/ethers-rs/pull/721).
- Implement snowtrace and polygonscan on par with the etherscan integration - Implement snowtrace and polygonscan on par with the etherscan integration
[#666](https://github.com/gakonst/ethers-rs/pull/666). [#666](https://github.com/gakonst/ethers-rs/pull/666).
## ethers-solc ## ethers-solc
### Unreleased ### Unreleased
- Add `OutputContext` to `ArtifactOutput` trait - Add `OutputContext` to `ArtifactOutput` trait
[#1621](https://github.com/gakonst/ethers-rs/pull/1621) [#1621](https://github.com/gakonst/ethers-rs/pull/1621)
- On windows all paths in the `ProjectCompilerOutput` are now slashed by default - On windows all paths in the `ProjectCompilerOutput` are now slashed by default
[#1540](https://github.com/gakonst/ethers-rs/pull/1540) [#1540](https://github.com/gakonst/ethers-rs/pull/1540)
- `ArtifactOutput::write_extras` now takes the `Artifacts` directly - `ArtifactOutput::write_extras` now takes the `Artifacts` directly
[#1491](https://github.com/gakonst/ethers-rs/pull/1491) [#1491](https://github.com/gakonst/ethers-rs/pull/1491)
- Make `ethers-solc` optional dependency of `ethers`, needs `ethers-solc` feature to activate - Make `ethers-solc` optional dependency of `ethers`, needs `ethers-solc` feature to activate
[#1463](https://github.com/gakonst/ethers-rs/pull/1463) [#1463](https://github.com/gakonst/ethers-rs/pull/1463)
- Add `rawMetadata:String` field to configurable contract output - Add `rawMetadata:String` field to configurable contract output
[#1365](https://github.com/gakonst/ethers-rs/pull/1365) [#1365](https://github.com/gakonst/ethers-rs/pull/1365)
- Use relative source paths and `solc --base-path` - Use relative source paths and `solc --base-path`
[#1317](https://github.com/gakonst/ethers-rs/pull/1317) [#1317](https://github.com/gakonst/ethers-rs/pull/1317)
- Save cache entry objects with relative paths - Save cache entry objects with relative paths
[#1307](https://github.com/gakonst/ethers-rs/pull/1307) [#1307](https://github.com/gakonst/ethers-rs/pull/1307)
- Bundle svm, svm-builds and sha2 dependencies in new `svm-solc` feature - Bundle svm, svm-builds and sha2 dependencies in new `svm-solc` feature
[#1071](https://github.com/gakonst/ethers-rs/pull/1071) [#1071](https://github.com/gakonst/ethers-rs/pull/1071)
- Emit artifact files for source files without any ContractDefinition - Emit artifact files for source files without any ContractDefinition
[#1296](https://github.com/gakonst/ethers-rs/pull/1296) [#1296](https://github.com/gakonst/ethers-rs/pull/1296)
- Wrap `ethabi::Contract` into new type `LosslessAbi` and `abi: Option<Abi>` with `abi: Option<LosslessAbi>` in `ConfigurableContractArtifact` - Wrap `ethabi::Contract` into new type `LosslessAbi` and `abi: Option<Abi>` with `abi: Option<LosslessAbi>` in `ConfigurableContractArtifact`
[#952](https://github.com/gakonst/ethers-rs/pull/952) [#952](https://github.com/gakonst/ethers-rs/pull/952)
- Let `Project` take ownership of `ArtifactOutput` and change trait interface - Let `Project` take ownership of `ArtifactOutput` and change trait interface
[#907](https://github.com/gakonst/ethers-rs/pull/907) [#907](https://github.com/gakonst/ethers-rs/pull/907)
- Total revamp of the `Project::compile` pipeline - Total revamp of the `Project::compile` pipeline
[#802](https://github.com/gakonst/ethers-rs/pull/802) [#802](https://github.com/gakonst/ethers-rs/pull/802)
- Support multiple versions of compiled contracts - Support multiple versions of compiled contracts
- Breaking: deprecate hardhat cache file compatibility, cache file now tracks artifact paths and their versions - Breaking: deprecate hardhat cache file compatibility, cache file now tracks artifact paths and their versions
- Fix flatten replacement target location - Fix flatten replacement target location
[#846](https://github.com/gakonst/ethers-rs/pull/846) [#846](https://github.com/gakonst/ethers-rs/pull/846)
- Fix duplicate files during flattening - Fix duplicate files during flattening
[#813](https://github.com/gakonst/ethers-rs/pull/813) [#813](https://github.com/gakonst/ethers-rs/pull/813)
- Add ability to flatten file imports - Add ability to flatten file imports
[#774](https://github.com/gakonst/ethers-rs/pull/774) [#774](https://github.com/gakonst/ethers-rs/pull/774)
- Add dependency graph and resolve all imported libraryfiles - Add dependency graph and resolve all imported libraryfiles
[#750](https://github.com/gakonst/ethers-rs/pull/750) [#750](https://github.com/gakonst/ethers-rs/pull/750)
- `Remapping::find_many` does not return a `Result` anymore - `Remapping::find_many` does not return a `Result` anymore
[#707](https://github.com/gakonst/ethers-rs/pull/707) [#707](https://github.com/gakonst/ethers-rs/pull/707)
- Add support for hardhat artifacts - Add support for hardhat artifacts
[#677](https://github.com/gakonst/ethers-rs/pull/677) [#677](https://github.com/gakonst/ethers-rs/pull/677)
- Add more utility functions to the `Artifact` trait - Add more utility functions to the `Artifact` trait
[#673](https://github.com/gakonst/ethers-rs/pull/673) [#673](https://github.com/gakonst/ethers-rs/pull/673)
- Return cached artifacts from project `compile` when the cache only contains - Return cached artifacts from project `compile` when the cache only contains
some files some files
- Add support for library linking and make `Bytecode`'s `object` filed an - Add support for library linking and make `Bytecode`'s `object` filed an
`enum BytecodeObject` [#656](https://github.com/gakonst/ethers-rs/pull/656). `enum BytecodeObject` [#656](https://github.com/gakonst/ethers-rs/pull/656).
- Nit: remove accidentally doubled double-quotes in an error message - 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) - 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. - Add basic `solc` model checker options.
[#1258](https://github.com/gakonst/ethers-rs/pull/1258) [#1258](https://github.com/gakonst/ethers-rs/pull/1258)
### 0.6.0 ### 0.6.0
- add `EthAbiCodec` proc macro to derive `AbiEncode` `AbiDecode` implementation - add `EthAbiCodec` proc macro to derive `AbiEncode` `AbiDecode` implementation
[#704](https://github.com/gakonst/ethers-rs/pull/704) [#704](https://github.com/gakonst/ethers-rs/pull/704)
- move `AbiEncode` `AbiDecode` trait to ethers-core and implement for core types - move `AbiEncode` `AbiDecode` trait to ethers-core and implement for core types
[#531](https://github.com/gakonst/ethers-rs/pull/531) [#531](https://github.com/gakonst/ethers-rs/pull/531)
- Add EIP-712 `sign_typed_data` signer method; add ethers-core type `Eip712` - Add EIP-712 `sign_typed_data` signer method; add ethers-core type `Eip712`
trait and derive macro in ethers-derive-eip712 trait and derive macro in ethers-derive-eip712
[#481](https://github.com/gakonst/ethers-rs/pull/481) [#481](https://github.com/gakonst/ethers-rs/pull/481)
### 0.5.3 ### 0.5.3
- Allow configuring the optimizer & passing arbitrary arguments to solc - Allow configuring the optimizer & passing arbitrary arguments to solc
[#427](https://github.com/gakonst/ethers-rs/pull/427) [#427](https://github.com/gakonst/ethers-rs/pull/427)
- Decimal support for `ethers_core::utils::parse_units` - Decimal support for `ethers_core::utils::parse_units`
[#463](https://github.com/gakonst/ethers-rs/pull/463) [#463](https://github.com/gakonst/ethers-rs/pull/463)
- Fixed Wei unit calculation in `Units` - Fixed Wei unit calculation in `Units`
[#460](https://github.com/gakonst/ethers-rs/pull/460) [#460](https://github.com/gakonst/ethers-rs/pull/460)
- Add `ethers_core::utils::get_create2_address_from_hash` - Add `ethers_core::utils::get_create2_address_from_hash`
[#444](https://github.com/gakonst/ethers-rs/pull/444) [#444](https://github.com/gakonst/ethers-rs/pull/444)
- Bumped ethabi to 0.15.0 and fixing breaking changes - Bumped ethabi to 0.15.0 and fixing breaking changes
[#469](https://github.com/gakonst/ethers-rs/pull/469), [#469](https://github.com/gakonst/ethers-rs/pull/469),
[#448](https://github.com/gakonst/ethers-rs/pull/448), [#448](https://github.com/gakonst/ethers-rs/pull/448),
[#445](https://github.com/gakonst/ethers-rs/pull/445) [#445](https://github.com/gakonst/ethers-rs/pull/445)
### 0.5.2 ### 0.5.2
- Correctly RLP Encode transactions as received from the mempool - Correctly RLP Encode transactions as received from the mempool
([#415](https://github.com/gakonst/ethers-rs/pull/415)) ([#415](https://github.com/gakonst/ethers-rs/pull/415))
## ethers-providers ## ethers-providers
### Unreleased ### Unreleased
- Return String for net version - Return String for net version
[1376](https://github.com/gakonst/ethers-rs/pull/1376) [1376](https://github.com/gakonst/ethers-rs/pull/1376)
- Stream of paginated logs that load logs in small pages - Stream of paginated logs that load logs in small pages
[1285](https://github.com/gakonst/ethers-rs/pull/1285) [1285](https://github.com/gakonst/ethers-rs/pull/1285)
- Load previous logs before subscribing to new logs in case fromBlock is set - Load previous logs before subscribing to new logs in case fromBlock is set
[1264](https://github.com/gakonst/ethers-rs/pull/1264) [1264](https://github.com/gakonst/ethers-rs/pull/1264)
- Add retries to the pending transaction future - Add retries to the pending transaction future
[1221](https://github.com/gakonst/ethers-rs/pull/1221) [1221](https://github.com/gakonst/ethers-rs/pull/1221)
- Add support for basic and bearer authentication in http and non-wasm websockets. - Add support for basic and bearer authentication in http and non-wasm websockets.
[829](https://github.com/gakonst/ethers-rs/pull/829) [829](https://github.com/gakonst/ethers-rs/pull/829)
- Export `ethers_providers::IpcError` and `ethers_providers::QuorumError` - Export `ethers_providers::IpcError` and `ethers_providers::QuorumError`
[1012](https://github.com/gakonst/ethers-rs/pull/1012) [1012](https://github.com/gakonst/ethers-rs/pull/1012)
### 0.6.0 ### 0.6.0
- re-export error types for `Http` and `Ws` providers in - re-export error types for `Http` and `Ws` providers in
[#570](https://github.com/gakonst/ethers-rs/pull/570) [#570](https://github.com/gakonst/ethers-rs/pull/570)
- add a method on the `Middleware` to broadcast a tx with a series of escalating - 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) gas prices via [#566](https://github.com/gakonst/ethers-rs/pull/566)
- Remove unnecessary `Serialize` constraint to `R` (the Response type) in the - Remove unnecessary `Serialize` constraint to `R` (the Response type) in the
`request` method of `JsonRpcClient`. `request` method of `JsonRpcClient`.
- Fix `http Provider` data race when generating new request `id`s. - Fix `http Provider` data race when generating new request `id`s.
- Add support for `net_version` RPC method. - Add support for `net_version` RPC method.
[595](https://github.com/gakonst/ethers-rs/pull/595) [595](https://github.com/gakonst/ethers-rs/pull/595)
- Add support for `evm_snapshot` and `evm_revert` dev RPC methods. - Add support for `evm_snapshot` and `evm_revert` dev RPC methods.
[640](https://github.com/gakonst/ethers-rs/pull/640) [640](https://github.com/gakonst/ethers-rs/pull/640)
### 0.5.3 ### 0.5.3
- Expose `ens` module [#435](https://github.com/gakonst/ethers-rs/pull/435) - Expose `ens` module [#435](https://github.com/gakonst/ethers-rs/pull/435)
- Add `eth_getProof` [#459](https://github.com/gakonst/ethers-rs/pull/459) - Add `eth_getProof` [#459](https://github.com/gakonst/ethers-rs/pull/459)
### 0.5.2 ### 0.5.2
- Set resolved ENS name during gas estimation - Set resolved ENS name during gas estimation
([1e5a9e](https://github.com/gakonst/ethers-rs/commit/1e5a9efb3c678eecd43d5c341b4932da35445831)) ([1e5a9e](https://github.com/gakonst/ethers-rs/commit/1e5a9efb3c678eecd43d5c341b4932da35445831))
## ethers-signers ## ethers-signers
### Unreleased ### Unreleased
- `eth-keystore-rs` crate updated. Allow an optional name for the to-be-generated - `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) keystore file [#910](https://github.com/gakonst/ethers-rs/pull/910)
### 0.6.0 ### 0.6.0
- `LocalWallet::new_keystore` now returns a tuple `(LocalWallet, String)` - `LocalWallet::new_keystore` now returns a tuple `(LocalWallet, String)`
instead of `LocalWallet`, where the string represents the UUID of the newly instead of `LocalWallet`, where the string represents the UUID of the newly
created encrypted JSON keystore. The JSON keystore is stored as a file 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) `/dir/uuid`. The issue [#557](https://github.com/gakonst/ethers-rs/issues/557)
is addressed [#559](https://github.com/gakonst/ethers-rs/pull/559) is addressed [#559](https://github.com/gakonst/ethers-rs/pull/559)
## ethers-contract ## ethers-contract
### Unreleased ### Unreleased
- Add abigen to default features - Add abigen to default features
[#1684](https://github.com/gakonst/ethers-rs/pull/1684) [#1684](https://github.com/gakonst/ethers-rs/pull/1684)
- Add extra Multicall helper methods - Add extra Multicall helper methods
[#1666](https://github.com/gakonst/ethers-rs/pull/1666) [#1666](https://github.com/gakonst/ethers-rs/pull/1666)
- Update Multicall to Multicall3 - Update Multicall to Multicall3
[#1584](https://github.com/gakonst/ethers-rs/pull/1584) [#1584](https://github.com/gakonst/ethers-rs/pull/1584)
- Add `Event::stream_with_meta` and `Event::subscribe_with_meta` - Add `Event::stream_with_meta` and `Event::subscribe_with_meta`
[#1483](https://github.com/gakonst/ethers-rs/pull/1483) [#1483](https://github.com/gakonst/ethers-rs/pull/1483)
- Added tx builder methods to `ContractFactory` - Added tx builder methods to `ContractFactory`
[#1289](https://github.com/gakonst/ethers-rs/pull/1289) [#1289](https://github.com/gakonst/ethers-rs/pull/1289)
- Relax Clone requirements when Arc<Middleware> is used - Relax Clone requirements when Arc<Middleware> is used
[#1183](https://github.com/gakonst/ethers-rs/pull/1183) [#1183](https://github.com/gakonst/ethers-rs/pull/1183)
- Add `EventStream::select` to combine streams with different event types - Add `EventStream::select` to combine streams with different event types
[#725](https://github.com/gakonst/ethers-rs/pull/725) [#725](https://github.com/gakonst/ethers-rs/pull/725)
- Substitute output tuples with rust struct types for function calls - Substitute output tuples with rust struct types for function calls
[#664](https://github.com/gakonst/ethers-rs/pull/664) [#664](https://github.com/gakonst/ethers-rs/pull/664)
- Add AbiType implementation during EthAbiType expansion - Add AbiType implementation during EthAbiType expansion
[#647](https://github.com/gakonst/ethers-rs/pull/647) [#647](https://github.com/gakonst/ethers-rs/pull/647)
- fix Etherscan conditional HTTP support - fix Etherscan conditional HTTP support
[#632](https://github.com/gakonst/ethers-rs/pull/632) [#632](https://github.com/gakonst/ethers-rs/pull/632)
- use `CARGO_MANIFEST_DIR` as root for relative paths in abigen - use `CARGO_MANIFEST_DIR` as root for relative paths in abigen
[#631](https://github.com/gakonst/ethers-rs/pull/631) [#631](https://github.com/gakonst/ethers-rs/pull/631)
### 0.6.0 ### 0.6.0
- Provide a way to opt out of networking support in abigen proc macro with - 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) `abigen-offline` feature [#580](https://github.com/gakonst/ethers-rs/pull/580)
- Add `.call()` method to `Deployer` for performing dry runs of contract - Add `.call()` method to `Deployer` for performing dry runs of contract
deployments. [#554](https://github.com/gakonst/ethers-rs/pull/554) deployments. [#554](https://github.com/gakonst/ethers-rs/pull/554)
- Improve error message from failure in `ethers_contract_abigen::Source::parse` - Improve error message from failure in `ethers_contract_abigen::Source::parse`
[#552](https://github.com/gakonst/ethers-rs/pull/552) [#552](https://github.com/gakonst/ethers-rs/pull/552)
- use enumerated aliases for overloaded functions - use enumerated aliases for overloaded functions
[#545](https://github.com/gakonst/ethers-rs/pull/545) [#545](https://github.com/gakonst/ethers-rs/pull/545)
- add `EthCall` trait and derive macro which generates matching structs for - add `EthCall` trait and derive macro which generates matching structs for
contract calls [#517](https://github.com/gakonst/ethers-rs/pull/517) contract calls [#517](https://github.com/gakonst/ethers-rs/pull/517)
- Use rust types as contract function inputs for human readable abi - Use rust types as contract function inputs for human readable abi
[#482](https://github.com/gakonst/ethers-rs/pull/482) [#482](https://github.com/gakonst/ethers-rs/pull/482)
- `abigen!` now generates `Display` for all events using the new `EthDisplay` - `abigen!` now generates `Display` for all events using the new `EthDisplay`
macro [#513](https://github.com/gakonst/ethers-rs/pull/513) macro [#513](https://github.com/gakonst/ethers-rs/pull/513)
- `abigen!` now supports overloaded functions natively - `abigen!` now supports overloaded functions natively
[#501](https://github.com/gakonst/ethers-rs/pull/501) [#501](https://github.com/gakonst/ethers-rs/pull/501)
- `abigen!` now supports multiple contracts - `abigen!` now supports multiple contracts
[#498](https://github.com/gakonst/ethers-rs/pull/498) [#498](https://github.com/gakonst/ethers-rs/pull/498)
### Unreleased ### Unreleased
### 0.5.3 ### 0.5.3
- (De)Tokenize structs and events with only a single field as `Token:Tuple` - (De)Tokenize structs and events with only a single field as `Token:Tuple`
([#417](https://github.com/gakonst/ethers-rs/pull/417)) ([#417](https://github.com/gakonst/ethers-rs/pull/417))
## ethers-middleware ## ethers-middleware
### Unreleased ### Unreleased
- Relax Clone requirements when Arc<Middleware> is used - Relax Clone requirements when Arc<Middleware> is used
[#1183](https://github.com/gakonst/ethers-rs/pull/1183) [#1183](https://github.com/gakonst/ethers-rs/pull/1183)
- Ensure a consistent chain ID between a Signer and Provider in SignerMiddleware - Ensure a consistent chain ID between a Signer and Provider in SignerMiddleware
[#1095](https://gakonst/ethers-rs/pull/1095) [#1095](https://gakonst/ethers-rs/pull/1095)
- Add BlockNative gas oracle [#1175](https://github.com/gakonst/ethers-rs/pull/1175) - Add BlockNative gas oracle [#1175](https://github.com/gakonst/ethers-rs/pull/1175)
### 0.6.0 ### 0.6.0
- add the missing constructor for `Timelag` middleware via - add the missing constructor for `Timelag` middleware via
[#568](https://github.com/gakonst/ethers-rs/pull/568) [#568](https://github.com/gakonst/ethers-rs/pull/568)
- Removes GasNow as a gas price oracle - Removes GasNow as a gas price oracle
[#508](https://github.com/gakonst/ethers-rs/pull/508) [#508](https://github.com/gakonst/ethers-rs/pull/508)
- add initialize_nonce public function to initialize NonceMiddleManager - add initialize_nonce public function to initialize NonceMiddleManager
### 0.5.3 ### 0.5.3
- Added Time Lagged middleware - Added Time Lagged middleware
[#457](https://github.com/gakonst/ethers-rs/pull/457) [#457](https://github.com/gakonst/ethers-rs/pull/457)

View File

@ -167,7 +167,7 @@ directly referencing the crate.
The type level example for `ethers_providers::Provider` provides a good example of a The type level example for `ethers_providers::Provider` provides a good example of a
documentation test: documentation test:
```rust ````rust
/// ```no_run /// ```no_run
/// use ethers::providers::{JsonRpcClient, Provider, Http}; /// use ethers::providers::{JsonRpcClient, Provider, Http};
/// use std::convert::TryFrom; /// use std::convert::TryFrom;
@ -182,9 +182,9 @@ documentation test:
/// # Ok(()) /// # Ok(())
/// # } /// # }
/// ``` /// ```
``` ````
Given that this is a *type* level documentation test and the primary way users Given that this is a _type_ level documentation test and the primary way users
of `ethers-rs` will create an instance of `Provider` is by using of `ethers-rs` will create an instance of `Provider` is by using
`Provider::<T>::try_from`, this is how the documentation test is structured. `Provider::<T>::try_from`, this is how the documentation test is structured.
@ -210,18 +210,18 @@ A good commit message should describe what changed and why.
1. The first line should: 1. The first line should:
* contain a short description of the change (preferably 50 characters or less, - contain a short description of the change (preferably 50 characters or less,
and no more than 72 characters) and no more than 72 characters)
* be entirely in lowercase with the exception of proper nouns, acronyms, and - be entirely in lowercase with the exception of proper nouns, acronyms, and
the words that refer to code, like function/variable names the words that refer to code, like function/variable names
* be prefixed with the name of the sub crate being changed (without the `ethers-` - 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, prefix) and start with an imperative verb. If modifying `ethers` proper,
omit the crate prefix. omit the crate prefix.
Examples: Examples:
* providers: introduce ENS querying for names and addresses - providers: introduce ENS querying for names and addresses
* re-export the abi, types and utils modules from `ethers_core` - re-export the abi, types and utils modules from `ethers_core`
2. Keep the second line blank. 2. Keep the second line blank.
3. Wrap all other lines at 72 columns (except for long URLs). 3. Wrap all other lines at 72 columns (except for long URLs).
@ -230,10 +230,10 @@ A good commit message should describe what changed and why.
references use `Refs: #`. `Refs` may include multiple issues, separated by a references use `Refs: #`. `Refs` may include multiple issues, separated by a
comma. comma.
Examples: Examples:
- `Fixes: #1337` - `Fixes: #1337`
- `Refs: #1234` - `Refs: #1234`
Sample complete commit message: Sample complete commit message:
@ -326,7 +326,7 @@ Note that only **incremental** improvement is needed to land a PR. This means
that the PR does not need to be perfect, only better than the status quo. Follow that the PR does not need to be perfect, only better than the status quo. Follow
up PRs may be opened to continue iterating. up PRs may be opened to continue iterating.
When changes are necessary, *request* them, do not *demand* them, and **do not When changes are necessary, _request_ them, do not _demand_ them, and **do not
assume that the submitter already knows how to add a test or run a benchmark**. assume that the submitter already knows how to add a test or run a benchmark**.
Specific performance optimization techniques, coding styles and conventions Specific performance optimization techniques, coding styles and conventions
@ -346,7 +346,7 @@ with the appropriate reason to keep the conversation flow concise and relevant.
### Be aware of the person behind the code ### Be aware of the person behind the code
Be aware that *how* you communicate requests and reviews in your feedback can Be aware that _how_ you communicate requests and reviews in your feedback can
have a significant impact on the success of the Pull Request. Yes, we may land have a significant impact on the success of the Pull Request. Yes, we may land
a particular change that makes ethers-rs better, but the individual might just not a particular change that makes ethers-rs better, but the individual might just not
want to have anything to do with ethers-rs ever again. The goal is not just having want to have anything to do with ethers-rs ever again. The goal is not just having
@ -390,8 +390,8 @@ When releasing the workspace:
crate's changelog may also be used for reference. crate's changelog may also be used for reference.
4. **Release the crate.** Run the following command: 4. **Release the crate.** Run the following command:
```bash ```bash
cargo release --workspace <release_type> --execute cargo release --workspace <release_type> --execute
``` ```
[keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md [keep-a-changelog]: https://github.com/olivierlacan/keep-a-changelog/blob/master/CHANGELOG.md

View File

@ -21,7 +21,7 @@ members = [
"ethers-middleware", "ethers-middleware",
"ethers-etherscan", "ethers-etherscan",
"ethers-solc", "ethers-solc",
"examples/ethers-wasm" "examples/ethers-wasm",
] ]
default-members = [ default-members = [
@ -32,7 +32,7 @@ default-members = [
"ethers-core", "ethers-core",
"ethers-middleware", "ethers-middleware",
"ethers-etherscan", "ethers-etherscan",
"ethers-solc" "ethers-solc",
] ]
[package.metadata.docs.rs] [package.metadata.docs.rs]
@ -51,7 +51,7 @@ celo = [
"ethers-signers/celo", "ethers-signers/celo",
"ethers-contract/celo", "ethers-contract/celo",
"ethers-middleware/celo", "ethers-middleware/celo",
"legacy" "legacy",
] ]
legacy = ["ethers-core/legacy", "ethers-contract/legacy"] legacy = ["ethers-core/legacy", "ethers-contract/legacy"]
@ -66,13 +66,13 @@ rustls = [
"ethers-providers/rustls", "ethers-providers/rustls",
"ethers-etherscan/rustls", "ethers-etherscan/rustls",
"ethers-contract/rustls", "ethers-contract/rustls",
"ethers-solc/rustls" "ethers-solc/rustls",
] ]
openssl = [ openssl = [
"ethers-providers/openssl", "ethers-providers/openssl",
"ethers-etherscan/openssl", "ethers-etherscan/openssl",
"ethers-contract/openssl", "ethers-contract/openssl",
"ethers-solc/openssl" "ethers-solc/openssl",
] ]
dev-rpc = ["ethers-providers/dev-rpc"] dev-rpc = ["ethers-providers/dev-rpc"]
## signers ## signers
@ -101,16 +101,16 @@ ethers-etherscan = { version = "^0.17.0", default-features = false, path = "./et
[dev-dependencies] [dev-dependencies]
ethers-contract = { version = "^0.17.0", default-features = false, path = "./ethers-contract", features = [ ethers-contract = { version = "^0.17.0", default-features = false, path = "./ethers-contract", features = [
"abigen", "abigen",
"eip712" "eip712",
] } ] }
ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [ ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [
"ws" "ws",
] } ] }
[target.'cfg(target_family = "unix")'.dev-dependencies] [target.'cfg(target_family = "unix")'.dev-dependencies]
ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [ ethers-providers = { version = "^0.17.0", default-features = false, path = "./ethers-providers", features = [
"ws", "ws",
"ipc" "ipc",
] } ] }
eyre = "0.6" eyre = "0.6"
rand = "0.8.5" rand = "0.8.5"

View File

@ -1,203 +1,176 @@
Copyright (c) 2020 Georgios Konstantopoulos Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Apache License TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions.
1. Definitions. "License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"License" shall mean the terms and conditions for use, reproduction, "Licensor" shall mean the copyright owner or entity authorized by
and distribution as defined by Sections 1 through 9 of this document. the copyright owner that is granting the License.
"Licensor" shall mean the copyright owner or entity authorized by "Legal Entity" shall mean the union of the acting entity and all
the copyright owner that is granting the License. other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"Legal Entity" shall mean the union of the acting entity and all "You" (or "Your") shall mean an individual or Legal Entity
other entities that control, are controlled by, or are under common exercising permissions granted by this License.
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity "Source" form shall mean the preferred form for making modifications,
exercising permissions granted by this License. including but not limited to software source code, documentation
source, and configuration files.
"Source" form shall mean the preferred form for making modifications, "Object" form shall mean any form resulting from mechanical
including but not limited to software source code, documentation transformation or translation of a Source form, including but
source, and configuration files. not limited to compiled object code, generated documentation,
and conversions to other media types.
"Object" form shall mean any form resulting from mechanical "Work" shall mean the work of authorship, whether in Source or
transformation or translation of a Source form, including but Object form, made available under the License, as indicated by a
not limited to compiled object code, generated documentation, copyright notice that is included in or attached to the work
and conversions to other media types. (an example is provided in the Appendix below).
"Work" shall mean the work of authorship, whether in Source or "Derivative Works" shall mean any work, whether in Source or Object
Object form, made available under the License, as indicated by a form, that is based on (or derived from) the Work and for which the
copyright notice that is included in or attached to the work editorial revisions, annotations, elaborations, or other modifications
(an example is provided in the Appendix below). represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Derivative Works" shall mean any work, whether in Source or Object "Contribution" shall mean any work of authorship, including
form, that is based on (or derived from) the Work and for which the the original version of the Work and any modifications or additions
editorial revisions, annotations, elaborations, or other modifications to that Work or Derivative Works thereof, that is intentionally
represent, as a whole, an original work of authorship. For the purposes submitted to Licensor for inclusion in the Work by the copyright owner
of this License, Derivative Works shall not include works that remain or by an individual or Legal Entity authorized to submit on behalf of
separable from, or merely link (or bind by name) to the interfaces of, the copyright owner. For the purposes of this definition, "submitted"
the Work and Derivative Works thereof. means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contribution" shall mean any work of authorship, including "Contributor" shall mean Licensor and any individual or Legal Entity
the original version of the Work and any modifications or additions on behalf of whom a Contribution has been received by Licensor and
to that Work or Derivative Works thereof, that is intentionally subsequently incorporated within the Work.
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity 2. Grant of Copyright License. Subject to the terms and conditions of
on behalf of whom a Contribution has been received by Licensor and this License, each Contributor hereby grants to You a perpetual,
subsequently incorporated within the Work. worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
2. Grant of Copyright License. Subject to the terms and conditions of 3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual, this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of, (except as stated in this section) patent license to make, have made,
publicly display, publicly perform, sublicense, and distribute the use, offer to sell, sell, import, and otherwise transfer the Work,
Work and such Derivative Works in Source or Object form. where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
3. Grant of Patent License. Subject to the terms and conditions of 4. Redistribution. You may reproduce and distribute copies of the
this License, each Contributor hereby grants to You a perpetual, Work or Derivative Works thereof in any medium, with or without
worldwide, non-exclusive, no-charge, royalty-free, irrevocable modifications, and in Source or Object form, provided that You
(except as stated in this section) patent license to make, have made, meet the following conditions:
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the (a) You must give any other recipients of the Work or
Work or Derivative Works thereof in any medium, with or without Derivative Works a copy of this License; and
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or (b) You must cause any modified files to carry prominent notices
Derivative Works a copy of this License; and stating that You changed the files; and
(b) You must cause any modified files to carry prominent notices (c) You must retain, in the Source form of any Derivative Works
stating that You changed the files; and that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(c) You must retain, in the Source form of any Derivative Works (d) If the Work includes a "NOTICE" text file as part of its
that You distribute, all copyright, patent, trademark, and distribution, then any Derivative Works that You distribute must
attribution notices from the Source form of the Work, include a readable copy of the attribution notices contained
excluding those notices that do not pertain to any part of within such NOTICE file, excluding those notices that do not
the Derivative Works; and pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
(d) If the Work includes a "NOTICE" text file as part of its You may add Your own copyright statement to Your modifications and
distribution, then any Derivative Works that You distribute must may provide additional or different license terms and conditions
include a readable copy of the attribution notices contained for use, reproduction, or distribution of Your modifications, or
within such NOTICE file, excluding those notices that do not for any such Derivative Works as a whole, provided Your use,
pertain to any part of the Derivative Works, in at least one reproduction, and distribution of the Work otherwise complies with
of the following places: within a NOTICE text file distributed the conditions stated in this License.
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and 5. Submission of Contributions. Unless You explicitly state otherwise,
may provide additional or different license terms and conditions any Contribution intentionally submitted for inclusion in the Work
for use, reproduction, or distribution of Your modifications, or by You to the Licensor shall be under the terms and conditions of
for any such Derivative Works as a whole, provided Your use, this License, without any additional terms or conditions.
reproduction, and distribution of the Work otherwise complies with Notwithstanding the above, nothing herein shall supersede or modify
the conditions stated in this License. the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
5. Submission of Contributions. Unless You explicitly state otherwise, 6. Trademarks. This License does not grant permission to use the trade
any Contribution intentionally submitted for inclusion in the Work names, trademarks, service marks, or product names of the Licensor,
by You to the Licensor shall be under the terms and conditions of except as required for reasonable and customary use in describing the
this License, without any additional terms or conditions. origin of the Work and reproducing the content of the NOTICE file.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade 7. Disclaimer of Warranty. Unless required by applicable law or
names, trademarks, service marks, or product names of the Licensor, agreed to in writing, Licensor provides the Work (and each
except as required for reasonable and customary use in describing the Contributor provides its Contributions) on an "AS IS" BASIS,
origin of the Work and reproducing the content of the NOTICE file. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
7. Disclaimer of Warranty. Unless required by applicable law or 8. Limitation of Liability. In no event and under no legal theory,
agreed to in writing, Licensor provides the Work (and each whether in tort (including negligence), contract, or otherwise,
Contributor provides its Contributions) on an "AS IS" BASIS, unless required by applicable law (such as deliberate and grossly
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or negligent acts) or agreed to in writing, shall any Contributor be
implied, including, without limitation, any warranties or conditions liable to You for damages, including any direct, indirect, special,
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A incidental, or consequential damages of any character arising as a
PARTICULAR PURPOSE. You are solely responsible for determining the result of this License or out of the use or inability to use the
appropriateness of using or redistributing the Work and assume any Work (including but not limited to damages for loss of goodwill,
risks associated with Your exercise of permissions under this License. work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
8. Limitation of Liability. In no event and under no legal theory, 9. Accepting Warranty or Additional Liability. While redistributing
whether in tort (including negligence), contract, or otherwise, the Work or Derivative Works thereof, You may choose to offer,
unless required by applicable law (such as deliberate and grossly and charge a fee for, acceptance of support, warranty, indemnity,
negligent acts) or agreed to in writing, shall any Contributor be or other liability obligations and/or rights consistent with this
liable to You for damages, including any direct, indirect, special, License. However, in accepting such obligations, You may act only
incidental, or consequential damages of any character arising as a on Your own behalf and on Your sole responsibility, not on behalf
result of this License or out of the use or inability to use the of any other Contributor, and only if You agree to indemnify,
Work (including but not limited to damages for loss of goodwill, defend, and hold each Contributor harmless for any liability
work stoppage, computer failure or malfunction, or any and all incurred by, or claims asserted against, such Contributor by reason
other commercial damages or losses), even if such Contributor of your accepting any such warranty or additional liability.
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing END OF TERMS AND CONDITIONS
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,25 +1,19 @@
Copyright (c) 2020 Georgios Konstantopoulos Copyright (c) 2020 Georgios Konstantopoulos
Permission is hereby granted, free of charge, to any Permission is hereby granted, free of charge, to any person obtaining a copy
person obtaining a copy of this software and associated of this software and associated documentation files (the "Software"), to deal
documentation files (the "Software"), to deal in the in the Software without restriction, including without limitation the rights
Software without restriction, including without to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
limitation the rights to use, copy, modify, merge, copies of the Software, and to permit persons to whom the Software is
publish, distribute, sublicense, and/or sell copies of furnished to do so, subject to the following conditions:
the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice The above copyright notice and this permission notice shall be included in all
shall be included in all copies or substantial portions copies or substantial portions of the Software.
of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR SOFTWARE.
IN CONNECTION WITH THE SOFTWARE O THE USE OR OTHER
DEALINGS IN THE SOFTWARE.R

View File

@ -74,31 +74,31 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["celo"] }
Celo's transactions differ from Ethereum transactions by including 3 new fields: Celo's transactions differ from Ethereum transactions by including 3 new fields:
- `fee_currency`: The currency fees are paid in (None for CELO, otherwise it's an Address) - `fee_currency`: The currency fees are paid in (None for CELO, otherwise it's an Address)
- `gateway_fee_recipient`: The address of the fee recipient (None for no gateway fee paid) - `gateway_fee_recipient`: The address of the fee recipient (None for no gateway fee paid)
- `gateway_fee`: Gateway fee amount (None for no gateway fee paid) - `gateway_fee`: Gateway fee amount (None for no gateway fee paid)
The feature flag enables these additional fields in the transaction request builders and The feature flag enables these additional fields in the transaction request builders and
in the transactions which are fetched over JSON-RPC. in the transactions which are fetched over JSON-RPC.
## Features ## Features
- [x] Ethereum JSON-RPC Client - [x] Ethereum JSON-RPC Client
- [x] Interacting and deploying smart contracts - [x] Interacting and deploying smart contracts
- [x] Type safe smart contract bindings code generation - [x] Type safe smart contract bindings code generation
- [x] Querying past events - [x] Querying past events
- [x] Event monitoring as `Stream`s - [x] Event monitoring as `Stream`s
- [x] ENS as a first class citizen - [x] ENS as a first class citizen
- [x] Celo support - [x] Celo support
- [x] Polygon support - [x] Polygon support
- [x] Avalanche support - [x] Avalanche support
- [x] Websockets / `eth_subscribe` - [x] Websockets / `eth_subscribe`
- [x] Hardware Wallet Support - [x] Hardware Wallet Support
- [x] Parity APIs (`tracing`, `parity_blockWithReceipts`) - [x] Parity APIs (`tracing`, `parity_blockWithReceipts`)
- [x] Geth TxPool API - [x] Geth TxPool API
- [ ] WASM Bindings (see note) - [ ] WASM Bindings (see note)
- [ ] FFI Bindings (see note) - [ ] FFI Bindings (see note)
- [ ] CLI for common operations - [ ] CLI for common operations
### Websockets ### Websockets
@ -126,6 +126,7 @@ If you are looking to connect to a HTTPS endpoint, then you need to enable the `
feature-flags. feature-flags.
To enable `rustls`: To enable `rustls`:
```toml ```toml
[dependencies] [dependencies]
@ -133,6 +134,7 @@ ethers = { git = "https://github.com/gakonst/ethers-rs", features = ["rustls"] }
``` ```
To enable `openssl`: To enable `openssl`:
```toml ```toml
[dependencies] [dependencies]
@ -175,20 +177,20 @@ issues itself: `cargo +nightly clippy --fix -Z unstable-options`
This library would not have been possibly without the great work done in: This library would not have been possibly without the great work done in:
- [`ethers.js`](https://github.com/ethers-io/ethers.js/) - [`ethers.js`](https://github.com/ethers-io/ethers.js/)
- [`rust-web3`](https://github.com/tomusdrw/rust-web3/) - [`rust-web3`](https://github.com/tomusdrw/rust-web3/)
- [`ethcontract-rs`](https://github.com/gnosis/ethcontract-rs/) - [`ethcontract-rs`](https://github.com/gnosis/ethcontract-rs/)
- [`guac_rs`](https://github.com/althea-net/guac_rs/tree/master/web3/src/jsonrpc) - [`guac_rs`](https://github.com/althea-net/guac_rs/tree/master/web3/src/jsonrpc)
A lot of the code was inspired and adapted from them, to a unified and opinionated interface, A lot of the code was inspired and adapted from them, to a unified and opinionated interface,
built with async/await and std futures from the ground up. built with async/await and std futures from the ground up.
## Projects using ethers-rs ## Projects using ethers-rs
- [Yield Liquidator](https://github.com/yieldprotocol/yield-liquidator/): Liquidator for Yield Protocol - [Yield Liquidator](https://github.com/yieldprotocol/yield-liquidator/): Liquidator for Yield Protocol
- [MEV Inspect](https://github.com/flashbots/mev-inspect-rs/): Miner Extractable Value inspector - [MEV Inspect](https://github.com/flashbots/mev-inspect-rs/): Miner Extractable Value inspector
- [Ethers Flashbots](https://github.com/onbjerg/ethers-flashbots): Ethers middleware for [Flashbots](https://docs.flashbots.net) - [Ethers Flashbots](https://github.com/onbjerg/ethers-flashbots): Ethers middleware for [Flashbots](https://docs.flashbots.net)
- [Ethers Fireblocks](https://github.com/gakonst/ethers-fireblocks): Ethers middleware and signer for [Fireblocks](https://fireblocks.io)' API - [Ethers Fireblocks](https://github.com/gakonst/ethers-fireblocks): Ethers middleware and signer for [Fireblocks](https://fireblocks.io)' API
- [Celo Threshold BLS DKG](https://github.com/celo-org/celo-threshold-bls-rs/): CLI for using Celo as a data availability network for the Joint-Feldman BLS DKG - [Celo Threshold BLS DKG](https://github.com/celo-org/celo-threshold-bls-rs/): CLI for using Celo as a data availability network for the Joint-Feldman BLS DKG
- [Celo Plumo Prover](https://github.com/celo-org/plumo-prover): Creates Celo's ultralight client proof from on-chain data - [Celo Plumo Prover](https://github.com/celo-org/plumo-prover): Creates Celo's ultralight client proof from on-chain data
- [Celo SNARK Setup Coordinator](https://github.com/celo-org/snark-setup-operator): Coordinator for executing a pipelined Groth16 SNARK setup - [Celo SNARK Setup Coordinator](https://github.com/celo-org/snark-setup-operator): Coordinator for executing a pipelined Groth16 SNARK setup

View File

@ -27,13 +27,13 @@ hex = { version = "0.4.3", default-features = false, features = ["std"] }
[dev-dependencies] [dev-dependencies]
ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [ ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [
"ws" "ws",
] } ] }
ethers-signers = { version = "^0.17.0", path = "../ethers-signers" } ethers-signers = { version = "^0.17.0", path = "../ethers-signers" }
ethers-contract-abigen = { version = "^0.17.0", path = "ethers-contract-abigen" } ethers-contract-abigen = { version = "^0.17.0", path = "ethers-contract-abigen" }
ethers-contract-derive = { version = "^0.17.0", path = "ethers-contract-derive" } ethers-contract-derive = { version = "^0.17.0", path = "ethers-contract-derive" }
ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false, features = [ ethers-core = { version = "^0.17.0", path = "../ethers-core", default-features = false, features = [
"eip712" "eip712",
] } ] }
ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712" } ethers-derive-eip712 = { version = "^0.17.0", path = "../ethers-core/ethers-derive-eip712" }
ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false } ethers-solc = { version = "^0.17.0", path = "../ethers-solc", default-features = false }

View File

@ -1,7 +1,10 @@
[package] [package]
name = "ethers-contract-abigen" name = "ethers-contract-abigen"
version = "0.17.0" version = "0.17.0"
authors = ["Nicholas Rodrigues Lordello <nlordell@gmail.com>", "Georgios Konstantopoulos <me@gakonst.com>"] authors = [
"Nicholas Rodrigues Lordello <nlordell@gmail.com>",
"Georgios Konstantopoulos <me@gakonst.com>",
]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "Code generation for type-safe bindings to Ethereum smart contracts" description = "Code generation for type-safe bindings to Ethereum smart contracts"
@ -20,7 +23,7 @@ url = "2.1"
serde_json = "1.0.61" serde_json = "1.0.61"
serde = { version = "1.0.124", features = ["derive"] } serde = { version = "1.0.124", features = ["derive"] }
hex = { version = "0.4.2", default-features = false, features = ["std"] } hex = { version = "0.4.2", default-features = false, features = ["std"] }
reqwest = { version = "0.11.3", default-features = false, features = ["blocking"] , optional = true } reqwest = { version = "0.11.3", default-features = false, features = ["blocking"], optional = true }
cfg-if = "1.0.0" cfg-if = "1.0.0"
dunce = "1.0.2" dunce = "1.0.2"
walkdir = "2.3.2" walkdir = "2.3.2"
@ -42,4 +45,7 @@ rustls = ["reqwest/rustls-tls"]
[dev-dependencies] [dev-dependencies]
tempfile = "3.2.0" tempfile = "3.2.0"
ethers-solc = { version = "^0.17.0", path = "../../ethers-solc", default-features = false, features = ["project-util", "svm-solc"] } ethers-solc = { version = "^0.17.0", path = "../../ethers-solc", default-features = false, features = [
"project-util",
"svm-solc",
] }

View File

@ -1,7 +1,10 @@
[package] [package]
name = "ethers-contract-derive" name = "ethers-contract-derive"
version = "0.17.0" version = "0.17.0"
authors = ["Nicholas Rodrigues Lordello <nlordell@gmail.com>", "Georgios Konstantopoulos <me@gakonst.com>"] authors = [
"Nicholas Rodrigues Lordello <nlordell@gmail.com>",
"Georgios Konstantopoulos <me@gakonst.com>",
]
edition = "2018" edition = "2018"
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
description = "Proc macro for type-safe bindings generation to Ethereum and Celo smart contracts" description = "Proc macro for type-safe bindings generation to Ethereum and Celo smart contracts"

View File

@ -1,7 +1,7 @@
# Ethereum types, cryptography and utilities. # Ethereum types, cryptography and utilities.
It is recommended to use the `utils`, `types` and `abi` re-exports instead of It is recommended to use the `utils`, `types` and `abi` re-exports instead of
the `core` module to simplify your imports.\_ the `core` module to simplify your imports.
This library provides type definitions for Ethereum's main datatypes along with This library provides type definitions for Ethereum's main datatypes along with
other utilities for interacting with the Ethereum ecosystem other utilities for interacting with the Ethereum ecosystem
@ -37,7 +37,7 @@ The crate provides utilities for launching local Ethereum testnets by using
# Features # Features
- - ["eip712"] | Provides Eip712 trait for EIP-712 encoding of typed data for - ["eip712"] | Provides Eip712 trait for EIP-712 encoding of typed data for
derived structs derived structs
# ABI Encoding and Decoding # ABI Encoding and Decoding

View File

@ -4,7 +4,7 @@ version = "0.17.0"
rust-version = "1.62" rust-version = "1.62"
authors = [ authors = [
"Matthias Seitz <matthias.seitz@outlook.de>", "Matthias Seitz <matthias.seitz@outlook.de>",
"Georgios Konstantopoulos <me@gakonst.com>" "Georgios Konstantopoulos <me@gakonst.com>",
] ]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
edition = "2018" edition = "2018"

View File

@ -45,7 +45,7 @@ hex = { version = "0.4.3", default-features = false, features = ["std"] }
rand = { version = "0.8.5", default-features = false } rand = { version = "0.8.5", default-features = false }
ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [ ethers-providers = { version = "^0.17.0", path = "../ethers-providers", default-features = false, features = [
"ws", "ws",
"rustls" "rustls",
] } ] }
once_cell = "1.15.0" once_cell = "1.15.0"
ethers-solc = { version = "^0.17.0", path = "../ethers-solc" } ethers-solc = { version = "^0.17.0", path = "../ethers-solc" }

View File

@ -4,18 +4,18 @@ middleware functionalities that you need.
## Available Middleware ## Available Middleware
- [`Signer`](./signer/struct.SignerMiddleware.html): Signs transactions locally, - [`Signer`](./signer/struct.SignerMiddleware.html): Signs transactions locally,
with a private key or a hardware wallet with a private key or a hardware wallet
- [`Nonce Manager`](./nonce_manager/struct.NonceManagerMiddleware.html): Manages - [`Nonce Manager`](./nonce_manager/struct.NonceManagerMiddleware.html): Manages
nonces locally, allowing the rapid broadcast of transactions without having to nonces locally, allowing the rapid broadcast of transactions without having to
wait for them to be submitted wait for them to be submitted
- [`Gas Escalator`](./gas_escalator/struct.GasEscalatorMiddleware.html): Bumps - [`Gas Escalator`](./gas_escalator/struct.GasEscalatorMiddleware.html): Bumps
transaction gas prices in the background transaction gas prices in the background
- [`Gas Oracle`](./gas_oracle/struct.GasOracleMiddleware.html): Allows getting - [`Gas Oracle`](./gas_oracle/struct.GasOracleMiddleware.html): Allows getting
your gas price estimates from places other than `eth_gasPrice`. your gas price estimates from places other than `eth_gasPrice`.
- [`Transformer`](./transformer/trait.Transformer.html): Allows intercepting and - [`Transformer`](./transformer/trait.Transformer.html): Allows intercepting and
transforming a transaction to be broadcasted via a proxy wallet, e.g. transforming a transaction to be broadcasted via a proxy wallet, e.g.
[`DSProxy`](./transformer/struct.DsProxy.html). [`DSProxy`](./transformer/struct.DsProxy.html).
## Example of a middleware stack ## Example of a middleware stack

View File

@ -47,7 +47,7 @@ hashers = "1.0.1"
# tokio # tokio
tokio = { version = "1.18", features = ["time"] } tokio = { version = "1.18", features = ["time"] }
tokio-tungstenite = { version = "0.17.2", default-features = false, features = [ tokio-tungstenite = { version = "0.17.2", default-features = false, features = [
"connect" "connect",
], optional = true } ], optional = true }
[target.'cfg(target_arch = "wasm32")'.dependencies] [target.'cfg(target_arch = "wasm32")'.dependencies]

View File

@ -30,7 +30,7 @@ futures-util = { version = "^0.3", optional = true }
futures-executor = { version = "^0.3", optional = true } futures-executor = { version = "^0.3", optional = true }
semver = { version = "1.0.14", optional = true } semver = { version = "1.0.14", optional = true }
trezor-client = { version = "0.0.6", optional = true, default-features = false, features = [ trezor-client = { version = "0.0.6", optional = true, default-features = false, features = [
"f_ethereum" "f_ethereum",
] } ] }
# aws # aws

View File

@ -7,11 +7,11 @@ signing middleware.
Supported signers: Supported signers:
- [Private key](./src/wallet) - [Private key](./src/wallet)
- [Ledger](./src/ledger) - [Ledger](./src/ledger)
- [Trezor](./src/trezor) - [Trezor](./src/trezor)
- [YubiHSM2](./src/wallet/yubi.rs) - [YubiHSM2](./src/wallet/yubi.rs)
- [AWS KMS](./src/aws) - [AWS KMS](./src/aws)
```no_run ```no_run
# use ethers_signers::{LocalWallet, Signer}; # use ethers_signers::{LocalWallet, Signer};

View File

@ -5,7 +5,7 @@ edition = "2018"
rust-version = "1.62" rust-version = "1.62"
authors = [ authors = [
"Matthias Seitz <matthias.seitz@outlook.de>", "Matthias Seitz <matthias.seitz@outlook.de>",
"Georgios Konstantopoulos <me@gakonst.com>" "Georgios Konstantopoulos <me@gakonst.com>",
] ]
license = "MIT OR Apache-2.0" license = "MIT OR Apache-2.0"
readme = "../README.md" readme = "../README.md"
@ -46,7 +46,7 @@ cfg-if = "1.0.0"
[target.'cfg(not(target_arch = "wasm32"))'.dependencies] [target.'cfg(not(target_arch = "wasm32"))'.dependencies]
home = "0.5.3" home = "0.5.3"
svm = { package = "svm-rs", version = "0.2.18", default-features = false, optional = true, features = [ svm = { package = "svm-rs", version = "0.2.18", default-features = false, optional = true, features = [
"blocking" "blocking",
] } ] }
svm-builds = { package = "svm-rs-builds", version = "0.1.8", optional = true } svm-builds = { package = "svm-rs-builds", version = "0.1.8", optional = true }

View File

@ -6,7 +6,7 @@ To also compile contracts during `cargo build` (so that ethers `abigen!` can pul
First add `ethers-solc` to your cargo build-dependencies. First add `ethers-solc` to your cargo build-dependencies.
Once you compiled the project, you can configure cargo change detection with `rerun_if_sources_changed`, so that cargo will execute the `build.rs` file if a contract in the sources directory has changed Once you compiled the project, you can configure cargo change detection with `rerun_if_sources_changed`, so that cargo will execute the `build.rs` file if a contract in the sources directory has changed
```toml ```toml
[build-dependencies] [build-dependencies]
@ -23,8 +23,8 @@ fn main() {
.build() .build()
.unwrap(); .unwrap();
let output = project.compile().unwrap(); let output = project.compile().unwrap();
// Tell Cargo that if a source file changes, to rerun this build script. // Tell Cargo that if a source file changes, to rerun this build script.
project.rerun_if_sources_changed(); project.rerun_if_sources_changed();
} }
``` ```

View File

@ -8,4 +8,4 @@
<script src="index.js"></script> <script src="index.js"></script>
<h1>ethers WASM</h1> <h1>ethers WASM</h1>
</body> </body>
</html> </html>

View File

@ -4,4 +4,4 @@ ethers
.then(m => { .then(m => {
m.deploy().catch(console.error); m.deploy().catch(console.error);
}) })
.catch(console.error); .catch(console.error);

View File

@ -6,4 +6,4 @@ wrap_comments = true
binop_separator = "Back" binop_separator = "Back"
trailing_comma = "Vertical" trailing_comma = "Vertical"
trailing_semicolon = false trailing_semicolon = false
use_field_init_shorthand = true use_field_init_shorthand = true