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(aa-sdk/core): add erc7677 middleware #823

Merged
merged 1 commit into from
Jul 17, 2024

Conversation

moldy530
Copy link
Collaborator

@moldy530 moldy530 commented Jul 9, 2024

Pull Request Checklist


PR-Codex overview

The focus of this PR is to introduce a new middleware function erc7677Middleware and update related imports and configurations.

Detailed summary

  • Added a new erc7677Middleware function for interacting with ERC-7677 enabled clients
  • Updated imports and configurations related to the new middleware function
  • Updated middleware actions and gas manager configurations with new middleware functions

The following files were skipped due to too many changes: aa-sdk/core/src/middleware/erc7677middleware.ts

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Jul 9, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
aa-sdk-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 7:56pm
aa-sdk-ui-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 17, 2024 7:56pm

@moldy530
Copy link
Collaborator Author

moldy530 commented Jul 9, 2024

TODO:

  • update the migration guide as the API for setting paymaster middleware is different now (dummyPaymasterAndData is itself a middleware function now)
  • (later) swap out the gasManagerMiddleware to use the erc7677 middleware

Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

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

Looks good! Left a question inline.

aa-sdk/core/src/middleware/erc7677middleware.ts Outdated Show resolved Hide resolved
aa-sdk/core/src/middleware/erc7677middleware.ts Outdated Show resolved Hide resolved
dphilipson
dphilipson previously approved these changes Jul 17, 2024
Copy link
Contributor

@dphilipson dphilipson left a comment

Choose a reason for hiding this comment

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

Looks great!

Parameters: [UserOperationRequest, Address, Hex, Record<string, any>];
ReturnType: {
sponsor?: { name: string; icon?: string }; // Sponsor info
paymaster?: Hex; // Paymaster address (entrypoint v0.7)
Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry for the nit, but for clarity it might be better to use Address for paymaster here and below.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

all good! yea I'll update this

@moldy530 moldy530 merged commit 81ad480 into v4.x.x Jul 17, 2024
6 checks passed
@moldy530 moldy530 deleted the moldy/add-erc7677-support branch July 17, 2024 20:42
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.

Add a generic EIP 7677 middleware function that users can use to interact with any compliant paymaster
2 participants