Skip to content

feat: Export inner encoding / decoding functions from Tx* types#529

Merged
prestwich merged 2 commits intoalloy-rs:mainfrom
clabby:cl/consensus-expose-encoding
Apr 16, 2024
Merged

feat: Export inner encoding / decoding functions from Tx* types#529
prestwich merged 2 commits intoalloy-rs:mainfrom
clabby:cl/consensus-expose-encoding

Conversation

@clabby
Copy link
Copy Markdown
Contributor

@clabby clabby commented Apr 13, 2024

Overview

Exports a few of the Tx* types' inner encoding & decoding functions for use in the op-alloy-consensus wrapper. Doing so allows us to re-use all of these types in the expanded transaction envelope enum.

@clabby clabby force-pushed the cl/consensus-expose-encoding branch 2 times, most recently from 82ed4e3 to 842bf91 Compare April 13, 2024 20:25
Copy link
Copy Markdown
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.

doc nit

@prestwich I think we need to make them pub so that the tx types can be reused externally, for example in a network specific enum that needs to implement rlp

@clabby clabby force-pushed the cl/consensus-expose-encoding branch from 842bf91 to 1956325 Compare April 14, 2024 14:35
@clabby clabby requested a review from mattsse April 14, 2024 14:35
@prestwich
Copy link
Copy Markdown
Member

prestwich commented Apr 14, 2024

i agree that we need to do this. i would like to open a follow up issue for improving naming, and maybe for feature-gating pub status

Copy link
Copy Markdown
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.

can we mark these as #[doc(hidden)]? so that they don't show up in autosuggestions

@clabby clabby force-pushed the cl/consensus-expose-encoding branch from c5f2436 to b9f93b8 Compare April 16, 2024 02:10
@clabby clabby requested a review from mattsse April 16, 2024 02:10
@prestwich prestwich merged commit 1727751 into alloy-rs:main Apr 16, 2024
@clabby clabby deleted the cl/consensus-expose-encoding branch April 16, 2024 14:20
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
…loy-rs#529)

* feat: Export inner encoding / decoding functions from `Tx*` types

* Add `#[doc(hidden)]` to exposed low-level encoding functions
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.

3 participants