Commit Graph

114 Commits

Author SHA1 Message Date
Georgios Konstantopoulos dc4c2a807e
feat(providers): add tracing (#113)
* feat(provider): add async tracing

* feat(middleware): add tracing to gas escalator

* chore: make clippy happy
2020-12-24 22:23:05 +02:00
Georgios Konstantopoulos d9db40402b
feat: derives &, Arc and Box for Middleware (#109)
* test: can stack Middlewares with Arcs

* feat: derive &, Box and Arc impls for Middleware

* chore: fix spacing
2020-12-18 13:15:19 +02:00
Georgios Konstantopoulos 1ece5d2020
Contract & Provider eth_subscribe support (#100)
* fix(block): fix block decoding from ws

* feat(pubsub): add pubsub traits and sub stream

Also use DeserializeOwned alias

* feat(transports): add notification type

* feat(ws): rewrite Ws for subscription support

* feat(provider): add eth_subscribe

* fix(celo): disable some celo tests due to ganache incompatibilities

* test(rinkeby): fix flaky test

* feat(contract): WS subscription bindings (#101)

* feat(middleware): add subscriptions to middleware methods

* feat(contract): add subscribe method to contracts
2020-11-30 11:33:06 +02:00
Rohit Narurkar 237f011259
(feat) gas oracle support (#56)
* (feat) gas oracle support

* (refactor) make a separate module | fix clippy warning

* add gas oracle to client using dynamic dispatch

* fix doc build in multicall module

* gas oracle returns U256

* support gas price fetching from client

* avoid querying for unsupported gas categories

* changes based on PR review

* add support for gasnow API, refactor gwei to wei
2020-08-18 21:47:56 +03:00
Georgios Konstantopoulos da20a042d7
chore(provider): make websockets optional (#45) 2020-07-02 18:33:16 +03:00
Georgios Konstantopoulos bb1ac9c666
Improve Ganache Flexibility (#37)
* feat(core): add more features to ganache

* test(provider): choose endpoint dynamically

* test(signer): choose endpoint and accounts dynamically

* test(contract): choose endpoint and accounts dynamically

* fix: dynamic port / accounts in examples

* core(chore): fix doctest
2020-06-22 16:42:34 +03:00
Georgios Konstantopoulos 0cfeadadf4
Websockets + TLS for Async-Std / Tokio (#30)
* fix: relax trait bounds on JsonRpcClient

* refactor(provider): move http client to separate dir

* feat(provider): add initial Websocket support over Stream/Sink + Tungstenite

* test(provider): add websocket test

* feat(provider): add convenience method using tokio/async-std behind a feature flag

* test(provider): add websocket ssl test

* feat(provider): add TLS websockets for tokio/async-std

* docs(provider): add websocket docs / examples

* fix(provider): make tokio an optional dep
2020-06-21 10:17:11 +03:00
Georgios Konstantopoulos 4ff466a593
fix intradoc links and add missing cargo metadata (#29) 2020-06-20 16:55:07 +03:00
Georgios Konstantopoulos 7ff8b8222c
Dual license under MIT/Apache 2 (#28)
* fix: dual license MIT / Apache 2

* provider: add missing license
2020-06-18 08:20:20 +03:00
Georgios Konstantopoulos ba5ae5a894
Add Celo support (#8)
* feat(types): add optional Celo support

* feat: add Celo feature flags to all crates

* test(provider): add get_transaction celo test

* test(signer): add send_transaction celo test

* test(contract): add deploy and call contract function celo test
2020-06-17 12:22:01 +03:00
Georgios Konstantopoulos 20493e0190
Fix Pending Transactions and EIP-155 (#22)
* fix(provider): ensure the Pending transaction calls the waker to get polled again

* feat(core): allow setting the blocktime in ganache

* test(provider): move pending txs test to integration tests + use block time

* fix(signers): make EIP-155 optional and fix sighash generation bug
2020-06-17 11:02:03 +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 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 cd4914d37f
refactor: pull crates to root dir 2020-06-01 21:24:22 +03:00