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

feat(rpc): Split off eth namespace in alloy-rpc-types to alloy-rpc-types-eth #847

Merged
merged 11 commits into from
Jun 10, 2024

Conversation

zerosnacks
Copy link
Member

@zerosnacks zerosnacks commented Jun 7, 2024

Motivation

Closes #198

Solution

  • Converts alloy-rpc-types into a metacrate linking the individual type crates
  • Split off eth namespace in alloy-rpc-types to alloy-rpc-types-eth

Given that

use crate::WithOtherFields;
and
use crate::{Log, WithOtherFields};
rely on WithOtherFields moving this to the alloy-rpc-types metacrate creates a circular dependency. Therefore I've included it in the alloy-rpc-types-eth crate for now. If we do want to move it to core I'm not sure where we should put it.

Given that there are some open questions: #198 (comment) I think it is best to see this as a draft - open to feedback

Tested against alloy/examples, no changes required there

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

crates/rpc-types/Cargo.toml Outdated Show resolved Hide resolved
@zerosnacks zerosnacks marked this pull request as ready for review June 7, 2024 12:43
crates/rpc-types/Cargo.toml Outdated Show resolved Hide resolved
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@prestwich
Copy link
Member

needs rebase onto main then g2g i think

@zerosnacks zerosnacks merged commit 5814686 into main Jun 10, 2024
24 checks passed
@zerosnacks zerosnacks deleted the zerosnacks/split-eth-namespace branch June 10, 2024 09:05
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
…pc-types-eth` (alloy-rs#847)

* start with eth namespace split

* continue

* move with_other to rpc-types

* add back WithOtherFields into `rpc-types-eth` due to circular dependency in request / receipt

* avoid defaulting features in meta-crate

* re-add feature flags

* use metacrate

* add rpc-types-eth as enabled flag as default-features are disabled in alloy metacrate

* export as *

* trim rpc-types- prefix
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.

[Feature] Split off eth namespace in alloy-rpc-types to alloy-rpc-types-eth
3 participants