ethers-rs/ethers-contract
Nick 9e559aefeb
fix(abigen): ensure correct ABI in `From` impl (#2036)
* fix(abigen): ensure correct ABI in `From` impl

`new` creates a `Contract` with the correct ABI, but the `From` impl
simply wraps the source `Contract`, which could have a completely
different ABI. In effect this was an unsafe cast, and indeed was
observed to trigger a "method not found (this should never happen)"
panic for subsequent method lookups. Implementing `From` in terms of
`new` fixes this, at the cost of an extra `Arc::clone()` (which I can't
see how to eliminate without piercing the `ethers::contract::Contract`
public API).

* Remove unnecessary `async` from test

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>

Co-authored-by: DaniPopes <57450786+DaniPopes@users.noreply.github.com>
2023-01-13 10:18:17 -08:00
..
ethers-contract-abigen fix(abigen): ensure correct ABI in `From` impl (#2036) 2023-01-13 10:18:17 -08:00
ethers-contract-derive docs(abigen): rename `event_derives` to `derives` (#2018) 2023-01-13 10:17:32 -08:00
src feat(contract): return multicall pending transaction (#2044) 2023-01-11 19:30:56 -08:00
tests fix(abigen): ensure correct ABI in `From` impl (#2036) 2023-01-13 10:18:17 -08:00
Cargo.toml chore(deps): bump once_cell from 1.16.0 to 1.17.0 (#1987) 2022-12-30 14:43:05 +02: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.