Commit Graph

165 Commits

Author SHA1 Message Date
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 8240b26a80
docs: add missing attribution to Gnosis for codegen & macros 2020-06-20 17:02:57 +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 570b45eb10
ABI Encoder v2 + ABI Spec v6.6 (#17)
* feat(core): update ethabi and enable more Toeknize impls

* feat(contract/abigen): implement simple AbiEncoderV2

* tests(ethers): add abigen example

* fix(core): fix abi tests

* chore: make clippy happy
2020-06-16 15:08:42 +03:00
Georgios Konstantopoulos d90b03da06
Add streamed logs to the provider (#9)
* feat(provider): implement Streamed logs

This utilizes eth_getFilterChanges. The stream struct must be instantiated with a factory that yields logs/hashes.
Consumers are expected to use the `FilterStream` trait in order to simplify their type definitions

* feat(provider): expose streaming methods

* test(provider): add new blocks/pending txs test

* feat(contract): allow events to be streamed

* test(contract): add integration test for streaming event logs

* perf(contract-factory): take abi and bytecode by value instead of reference

The abi, bytecode and the factory's deploy method now consume the structs instead of being passed by reference. While this means that
consumers might need to clone before using them, this gives us some more flexiblity around factories inside helper functions

* refactor(contract): use test helpers to reduce code dup

* chore: make clippy happy
2020-06-15 11:46:07 +03:00
Georgios Konstantopoulos a1096f8705
chore(abigen): fix doctest 2020-06-11 12:16:36 +03:00
Georgios Konstantopoulos 9cad87a879
chore: fix examples 2020-06-11 09:45:14 +03:00
Georgios Konstantopoulos aa454b945b
chore(abigen): remove unnecessary stuff 2020-06-10 22:46:55 +03:00
Georgios Konstantopoulos f562b47fd2
docs(abigen): update struct 2020-06-10 22:34:39 +03:00
Georgios Konstantopoulos 73b502ed5f
macro: re-enable paths/etherscan and enable more complex tokens 2020-06-04 00:05:05 +03:00
Georgios Konstantopoulos ba7fedc7d3
abigen: simplify structs and re-enable file/remote codegen 2020-06-03 23:09:46 +03:00
Georgios Konstantopoulos b0feff2432
fix: serialize null filters 2020-06-03 00:10:46 +03:00
Georgios Konstantopoulos 701e442f94
fix(proc-macro): adjust to rest of contract fixes 2020-06-02 14:56:09 +03:00
Georgios Konstantopoulos cd4914d37f
refactor: pull crates to root dir 2020-06-01 21:24:22 +03:00