ethers-rs/ethers-contract
Dan Cline 1d14f9d26e
Ensure a consistent chain ID between a signer and provider in SignerMiddleware (#1095)
* feat(middleware): fetch chainid from middleware

Require SignerMiddleware to fetch the inner middleware's to set for the
signer. SignerMiddleware now requires an instantiated middleware with
an accessible get_chainid method.

* ci: update ganache

newer ganache version is needed to specify the ganache provider chain id
in tests

* set SignerMiddleware constructor return to result

* create new method for pulling chainid

* add consistent chainid CHANGELOG entry

* remove awaits

* switch test_derive_eip712 to use consistent signer

 * remove gas estimation equality assert in deploy_and_call_contract -
   updated version of ganache no longer returns the same value for gas
   estimation and gas_used

* revert with_signer to non-async non-result

* cargo fmt

* expand SignerMiddleware::new comment

* remove doc indent
2022-04-10 10:55:30 -07:00
..
ethers-contract-abigen chore(clippy): add some deny lints (#1064) 2022-03-19 10:05:39 -07:00
ethers-contract-derive chore(clippy): add some deny lints (#1064) 2022-03-19 10:05:39 -07:00
src chore(clippy): add some deny lints (#1064) 2022-03-19 10:05:39 -07:00
tests Ensure a consistent chain ID between a signer and provider in SignerMiddleware (#1095) 2022-04-10 10:55:30 -07:00
Cargo.toml chore(clippy): add some deny lints (#1064) 2022-03-19 10:05:39 -07:00
README.md release: 0.6.0 (#611) 2021-11-23 21:23:12 +02:00

README.md

Type-safe abstractions for interacting with Ethereum smart contracts

Interacting with a smart contract requires broadcasting carefully crafted transactions where the data field contains the function's selector along with the arguments of the called function.

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