* feat(providers): load previous logs before subscribing
Load previous logs and stream it back to the user before establishing
a new stream for streaming future logs.
Closes#988
* docs: add subscribe_logs example
* fix clippy errors
* refactor: use VecDeque and address review
* refactors ipc transport internals
ran cargo +nightly fmt
fixes typo
remove some commented out code
* remove one unnecessary return stmt
Co-authored-by: Oliver Giersch <oliver.giersch@b-tu.de>
Co-authored-by: Oliver Giersch <oliver.giersch@gmail.com>
In tungstenite 0.17 a change was introduced considering the logic of
`IntoClientRequest`. When using this trait on a `HttpRequest` it just
uses the request without any changes to inititate the websocket
connection.
This makes it necessary for the consumer of the api to supply the
correct http headers for initiating a websocket connection when using
`IntoClientRequest` on `HttpRequest`.
This commit adapts the logic in `connect_with_auth` to this new
behavior.
* fix(providers): Propogate gas price with access list
* Update CHANGELOG.md
* Fix clippy lint
* Clarify fill_transaction comments
* Fill tx gas price before gas limit
Updates Provider::fill_transaction() to fill the gas price of a
transaction before filling the gas limit. There are cases where the gas
used by a transaction may be dependent on the gas price. For example,
the following contract bytecode branches based on the result of the GASPRICE
opcode:
GASPRICE PUSH1 0xff GT PUSH1 {label} JUMPI
* Cleanup
* Propogate eth_estimateGas failure
* Add ENS avatar resolution
As well as arbitrary fields.
* Use try_join
* Improve reqwest's error passing
* Split avatar resolution in ERC token parsing and resolution
* no_run examples
* Rename token to NFT
* A bit more documentation
* Nightly cargo fmt
* Use different ERC-721 test
* Update CHANGELOG
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* Added basic and bearer authentication for http and websocket transport
* Improved api for websocket `connect_with_auth`
* Bugfix in doc
* Moved use statement into non-wasm imports
* Adapted changelog
* Fixed doc test
* Added constructors for Authorization
* Improved code quality and implemented feedback
* Made bas64 crate for basic auth encoding non-optional
* Added `Display` for `Authorization` instead of `into_auth_string`
* fix(ws): propagate error when deserialization fails
* fix(ws): tolerate case-insensitive match on the jsonrpc field
Infura streams notifications with jsonrpc all capitalized. This fails to
deserialize on our end because serde expect a precise match ressembling
the Notification jsonrpc field.
Fixes#684.
* chore(fmt): use nightly rustfmt
* chore: fmt
* chore: fix failing celo test
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* Implement trace_callMany
* cargo fix and ignore flaky test for now
* Update ethers-providers/src/provider.rs
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* feature: set nonce in fill transaction
* chore: update changelog
* refactor: remove nonce_setting in fill_transaction
* refactor: set nonce in send_escalating
* ci: test on windows targets
* make ipc optional
* fix: only activate ipc on unix families
* add cfg
* only check default members
* no parallel limits
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
* Serialize eth_feeHistory block count as QUANTITY
* update changelog
* Make sure to first convert to U256 :face_palm:
* Fix issue with move of `block_count` value.
* fix merge issue
* Revert changelog