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

make factory and paymaster fields optional in PackedUserOperation #1330

Merged

Conversation

dastanbeksamatov
Copy link
Contributor

@dastanbeksamatov dastanbeksamatov commented Sep 23, 2024

Motivation

Factory and paymaster related fields don't need to be required, as it forces to pass some default value, i.e null address for Address, 0 for gas limits, etc. which leads to invalid user ops.

Solution

make factory and paymaster related fields optional

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.

all of these should probably be ignored if missing?

see for ref

#[cfg_attr(feature = "serde", serde(default, skip_serializing_if = "Option::is_none"))]

makes sense, q about optional fields

@mattsse mattsse merged commit 56552ac into alloy-rs:main Sep 23, 2024
26 checks passed
lwedge99 pushed a commit to sentioxyz/alloy that referenced this pull request Oct 8, 2024
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