ethers-rs/ethers-contract/tests/it
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
..
common chore: clippy (#1812) 2022-11-07 15:43:11 -08:00
abigen.rs fix(abigen): ensure correct ABI in `From` impl (#2036) 2023-01-13 10:18:17 -08:00
console.rs test: update broken test and use it module for ethers-contract (#1502) 2022-07-24 14:41:06 -07:00
contract.rs feat(contract): return multicall pending transaction (#2044) 2023-01-11 19:30:56 -08:00
main.rs test: update broken test and use it module for ethers-contract (#1502) 2022-07-24 14:41:06 -07:00