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

chore(eips): Add serde to Authorization types #964

Merged
merged 3 commits into from
Jun 24, 2024
Merged

Conversation

rakita
Copy link
Contributor

@rakita rakita commented Jun 24, 2024

Small PR that adds serde to new types.

And adds Eq, PartialEq for SignedAuthorization

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.

few suggestions

crates/eips/src/eip7702/auth_list.rs Show resolved Hide resolved
Comment on lines +148 to 149
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
pub struct OptionalNonce(Option<u64>);
Copy link
Member

@mattsse mattsse Jun 24, 2024

Choose a reason for hiding this comment

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

do we want to serialize this as list? probably not, so this is okay

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not sure, this would depend on jsonrpc and how it is defined there. Are you okay with leaving it as it is, until more info is known?

crates/eips/src/eip7702/auth_list.rs Show resolved Hide resolved
@mattsse mattsse merged commit a1c9f8a into main Jun 24, 2024
22 checks passed
@mattsse mattsse deleted the rakita/auths_serde branch June 24, 2024 21:00
ben186 pushed a commit to ben186/alloy that referenced this pull request Jul 27, 2024
* chore(eips): Add serde to Authorization types

* Add Eq and PartialEq

* added nits
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.

2 participants