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: Add 7702 tx enum #1059

Merged
merged 17 commits into from
Aug 8, 2024
Merged

feat: Add 7702 tx enum #1059

merged 17 commits into from
Aug 8, 2024

Conversation

moricho
Copy link
Contributor

@moricho moricho commented Jul 16, 2024

Motivation

The 7702 tx type has been added at #1046, so it would be better to support 7702 tx enum in the consensus layer as well.

Solution

Adds a new variant Eip7702 to the TypedTransaction enum in consensus.

pub enum TypedTransaction {
  ...
  /// EIP-7702 transaction
  #[cfg_attr(feature = "serde", serde(rename = "0x04", alias = "0x4"))]
  Eip7702(TxEip7702),
}

According to the above change, also adds authorization_list field to the TransactionRequest and its accessor to the TransactionBuilder

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

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.

thanks for this!

this type is will be supported by devnet1 soon, but I think we can actually include it already, though we should wait until devnet is up

@moricho
Copy link
Contributor Author

moricho commented Jul 16, 2024

@mattsse thanks, it’s fine to leave this until devnet is ready :)

@moricho moricho marked this pull request as ready for review July 16, 2024 14:41
@onbjerg onbjerg mentioned this pull request Aug 7, 2024
3 tasks
@onbjerg onbjerg self-assigned this Aug 7, 2024
Copy link
Member

@onbjerg onbjerg left a comment

Choose a reason for hiding this comment

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

lgtm, I will rebase it and resolve the conflicts:) thanks for your contribution

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

@onbjerg onbjerg merged commit d000fc6 into alloy-rs:main Aug 8, 2024
26 checks passed
@moricho moricho deleted the 7702-tx-enum branch August 8, 2024 15:17
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