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

EIP-7702: change chain_id type to U256 #21

Merged

Conversation

programskillforverification
Copy link
Contributor

Motivation

close #20

@programskillforverification programskillforverification changed the title init EIP-7702: change chain_id type to U256 Dec 23, 2024
@programskillforverification programskillforverification marked this pull request as draft December 23, 2024 14:28
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.

nits

@@ -48,7 +48,7 @@ impl RecoveredAuthority {
pub struct Authorization {
/// The chain ID of the authorization.
#[cfg_attr(feature = "serde", serde(with = "quantity"))]
Copy link
Member

Choose a reason for hiding this comment

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

this attribute is no longer necessary

@@ -62,7 +62,7 @@ impl Authorization {
/// # Note
///
/// Implementers should check that this matches the current `chain_id` *or* is 0.
pub const fn chain_id(&self) -> u64 {
pub const fn chain_id(&self) -> U256 {
Copy link
Member

Choose a reason for hiding this comment

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

I'd rather return an &U256 here and leave the copy up to the caller

@mattsse mattsse marked this pull request as ready for review December 23, 2024 15:12
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

@mattsse mattsse merged commit 7814ca0 into alloy-rs:main Dec 23, 2024
26 checks passed
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.

EIP-7702: change chain_id type to U256
2 participants