ethers-rs/ethers/examples
Georgios Konstantopoulos 1cfbc7b3c3
Replace contract client references with Arc (#35)
* feat(provider): allow specifying a default polling interval param

This parameter is going to be used for all subsequent client calls by default. It can still be overriden with the internal
`interval` calls

* feat(contract): replace reference to Client with Arc

* feat(abigen): adjusts codegen to use Arcs

* fix(ethers): adjust examples to new apis

* fix(provider): return TxHash instead of PendingTransaction on tx submission

Returning a PendingTransaction allowed us to have nice ethers.js-like syntax where you submit
a transaction and then can immediately await it. Unfortunately, now that we use Arcs and not lifetimes
this meant that we would need to bind the function call in a variable, and then await on it, which is pretty
bad UX.

To fix this, we revert back to returning a TxHash and introduce a convenience method on the provider and the
contract which takes a tx_hash and returns a PendingTransaction object. The syntax ends up being slightly
more verbose (although more explicit), but the issue is fixed.
2020-06-22 11:44:08 +03:00
..
abigen.rs ABI Encoder v2 + ABI Spec v6.6 (#17) 2020-06-16 15:08:42 +03:00
contract.rs Replace contract client references with Arc (#35) 2020-06-22 11:44:08 +03:00
contract.sol refactor: pull crates to root dir 2020-06-01 21:24:22 +03:00
ens.rs Replace contract client references with Arc (#35) 2020-06-22 11:44:08 +03:00
local_signer.rs Replace contract client references with Arc (#35) 2020-06-22 11:44:08 +03:00
sign.rs fix(core): make Signature.v a u64 instead of a u8 and expose `verify` (#21) 2020-06-17 09:45:15 +03:00
transfer_eth.rs Replace contract client references with Arc (#35) 2020-06-22 11:44:08 +03:00
watch_blocks.rs Replace contract client references with Arc (#35) 2020-06-22 11:44:08 +03:00