Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(prelude): enable rpc-client exports, enable pubsub on provider and add missing exports from alloy/core #392

Closed
wants to merge 5 commits into from

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Mar 25, 2024

Motivation

Related to #391, has a mirror PR for alloy/examples here: alloy-rs/examples#37

Solution

  • Enables the pubsub feature on alloy-provider when using provider-ws or provider-ipc
  • Exports rpc-client-http-reqwest, rpc-client-http-hyper, rpc-client-ws, rpc-client-ipc as feature flags. It possibly makes sense to add a rpc-client-pubsub feature flag but I did not see an immediate reason.

Additive:

  • Added missing native-keccak flag that was not re-exported from alloy/core.

This PR is intended to be non-breaking.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@zerosnacks
Copy link
Member Author

zerosnacks commented Mar 28, 2024

I noticed the alloy/serde crate is currently not exported in alloy. Is this something we would want @prestwich? It would be useful for the create_instances example in alloy/examples as it currently does not implement a case showing the use of ethers-rs equivalent of serde_helpers::Numeric.

https://github.com/alloy-rs/examples/blob/main/examples/big-numbers/examples/create_instances.rs

vs

https://github.com/gakonst/ethers-rs/blob/master/examples/big-numbers/examples/create_instances.rs

@prestwich
Copy link
Member

It should be included for the benefit of people implementing their own network types

@zerosnacks zerosnacks marked this pull request as draft March 28, 2024 15:14
@zerosnacks zerosnacks changed the title fix(alloy): improve alloy namespace feature flag compatibility fix(prelude): enable rpc-client exports, enable pubsub on provider and add missing exports from alloy/core Mar 28, 2024
@zerosnacks
Copy link
Member Author

zerosnacks commented Mar 28, 2024

It should be included for the benefit of people implementing their own network types

Makes sense, I've decided to split up #391 into two parts, one with non-breaking changes with relatively high priority (this PR) and a follow up more major PR that would include a larger refactor, additional exports (like serde) with proposed breaking changes and will likely requires some further discussion (see #391).

I'm moving this out of draft again so it can be reviewed and downstream tickets can become unblocked.

@zerosnacks zerosnacks marked this pull request as ready for review March 28, 2024 16:16
@zerosnacks
Copy link
Member Author

zerosnacks commented Mar 29, 2024

Closing this in favor of PR #421 that handles the refactor as more issues have popped up and the impact of (if any) breaking changes appears to be small.

@zerosnacks zerosnacks closed this Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants