* fix(contracts): Add a failing test showing that ContractCall IntoFuture is not Send
* fix(contracts): Add Send bound for IntoFuture implementation of ContractCall
* chore: update CHAGELOG
* chore: fmt
---------
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* 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>
* Build an `Event` without requiring a contract instance
* Contract unit test
* Function to set Event address
* Example
* Typo to improve readability
* CHANGELOG
* cargo +nightly fmt
* FIX conflict
* review: applied Address alias
Co-authored-by: Andrea Simeoni <>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* refactor: make ethers-contract tests it module
* update failing test
* assert console is generated
* chore(clippy): make clippy happy
* update broken test
* move sol files back
* chore: rustfmt
* chore(clippy): make clippy happy
* fix(abigen): contract names can be reserve words
* update changelog
* clippy warning
* module names consistent with other safe_*
* update refs to generated abis
* move reserved words tests to their own fn
* added note to changelog re: module name changes
* convert some helper functions
* use said helpers
* more
* don't derive EthCall on return structs
* move return structs to separate function
* remove unused
* remove duplicate code
* reduce code duplication
also use an iterator instead of a presized vector
* comments
* stuck
* fix wrong field
* rename
* don't generate structs for no-output functions
* cosmetic changes
* test: decode and verify result
* more testing
unnamed output (tuple struct)
no output (doesn't exist) -> can't verify this in code though
* Update ethers-contract/ethers-contract-abigen/src/contract/methods.rs
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
* remove dbg print
oops :(
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
* ci: install anvil
* test: use anvil instead of ganache
* ci: fix anvil ver
* ci: re-enable example tests
* test: remove unnecessary assertions
* test: enable anvil launch test
* docs: typo
* test: fix anvil chain id
* ci: install ganache
Ganache is needed for the Ganache tests
* chore: remove legacy feature from some examples
* ci: correctly build examples
* test: use correct account balance for anvil
* chore: remove sub_id == 1 check
this was only possible in ganache because it gives serial
sub ids, but in every other reasonable client the ids are generated
randomly, so we cannot test for its value
* test: ensure txs are different
There is a bug in Ganache's mempool which accepts duplicate transactions (here with the same nonce), whereas here we pre-set all the nonces so that they end up having a different transaction hash.
* test: ignore ganache tests
* fix: terzor api changes
* ci(examples): install Anvil, remove geth/ganache
* test(provider): Anvil instead of Geth
some tests start to fail now
* fix: revert usage of Anvil in ipc tests
Anvil does not support IPC yet
* fix: update examples script
* ci: use anvil for wasm example
* replace last ganache usage
Co-authored-by: Oliver Nordbjerg <hi@notbjerg.me>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* 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
* Add `call_raw` method that forgoes detokenization for MultiCall. Have `call` wrap around `call_raw` permitting user to handle detokenization themselves if they wish
* Improve documentation: Add details to the documentation example that informs the user of their responsibility to detokenize results
* feat(ethers-contract): add `send_with_receipt` to `Deployer`
The `Deployer` is used to deploy contracts and its `send`
function returns an attached instance of a `Contract`.
There is no way to know the transaction hash of the
deployment transaction, so this commit adds another
method `send_with_receipt` that returns an attached
`Contract` as well as a `TransactionReceipt`.
* changelog: update
* tests: call `send_with_receipt` in tests
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>