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

Move AnyNetwork related types into their own crates #1715

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

moricho
Copy link
Contributor

@moricho moricho commented Nov 30, 2024

Motivation

Closes #1598
Continued from #1609

Currently alloy-consensus contains Any types for Receipt and Header that are then bubbled up through alloy-rpc-types-eth to alloy-network. These types are not eth types and it is somewhat messy to put them alongside the eth types. We have a standard pattern for adding networks to alloy, that AnyNetwork is currently not following, which is to create consensus-* and rpc-types-* crates

Solution

consensus-any

  • Moved AnyTypedTransaction, AnyTxEnvelope and AnyTxType to consensus-any from network
  • Moved UnknownTypedTransaction, UnknownTxEnvelope to consensus-any/unknown from network

rpc-types-any

  • Moved AnyRpcTransaction and AnyRpcBlock to rpc-types-any from network
  • Introduced a catch-all transaction request type struct AnyTransactionRequest(pub WithOtherFields<TransactionRequest>)

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@moricho moricho marked this pull request as ready for review November 30, 2024 08:13
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] Move AnyNetwork types into their own crate(s)
1 participant