Commit Graph

9 Commits

Author SHA1 Message Date
Georgios Konstantopoulos fb8f5a8ec9
Nonce manager (#59)
* feat: first stab at a NonceManager

* test: adjust the test

* fix: reset nonce if nonce manager errors

* feat: make nonce manager opt in

* fix: add read-only nonce call

* feat: improve http provider errors

* feat: convert to Atomic datatypes

* refactor: move to own file

* chore: remove tokio dep

* fix: improve nonce retry logic readability

* fix: use other privkey to avoid nonce races with other tests
2020-09-07 13:26:42 +03:00
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
Georgios Konstantopoulos 4ff466a593
fix intradoc links and add missing cargo metadata (#29) 2020-06-20 16:55:07 +03:00
Georgios Konstantopoulos 1a47e933ae
feat(signers): implement Serde and make Wallet API smaller (#20)
* feat(signers): implement Serde and make API smaller

* fix: add abigen as a dev-dependency feature
2020-06-17 09:38:04 +03:00
Georgios Konstantopoulos 6156c4bf90
feat(signers): join the transaction futures 2020-06-10 13:34:48 +03:00
Georgios Konstantopoulos e051cffe47
contract: allow connecting to many clients/addresses 2020-06-02 13:36:29 +03:00
Georgios Konstantopoulos b5a1b27e3a
remove provider/signers trait bound 2020-06-02 02:12:12 +03:00
Georgios Konstantopoulos 27ca5dd55a
simplify signers 2020-06-02 01:27:23 +03:00
Georgios Konstantopoulos cd4914d37f
refactor: pull crates to root dir 2020-06-01 21:24:22 +03:00