Skip to content
This repository has been archived by the owner on Sep 30, 2024. It is now read-only.

219 additional zk email recovery reference implementations #224

Merged

Conversation

JohnGuilding
Copy link
Contributor

@JohnGuilding JohnGuilding commented Mar 27, 2024

What is this PR doing?

  • Adds base for zk email recovery implementation for SimpleAccount
  • Adds base for zk email recovery implementation for erc 7579
  • Adds base for zk email recovery implementation for erc 6900
  • Updates dependencies
  • Updates plugin contracts to 4337 contracts v0.7.0
    • @account-abstraction/utils v0.7.0 has not been published, so some helper functions that are compatible with 0.7.0 contracts were pulled from eth-infinitism/bundler. The helper functions are located in the new file userOpUtils.ts - these functions are basically a copy and paste except updating to ethers v6 and copying one ethers v5 function that has behaviour that zero pads variables in a way that the new functions expect (the ethers v6 equivalent broke things).
    • While these changes update things so that the e2e tests pass. Because the structure of UserOps has changed in 0.7.0, these changes will break compression functionality in the inpage demo. Since we have a deadline for zk email recovery for next week, going to raise a separate issue to update the compression demo to 0.7.0 - Update compression to 4337 contracts v0.7.0 #226
  • Removes patched bundler. After updating to the v0.7.0 bundler, the tests e2e tests pass fine

Since this PR has got quite big from the 0.7.0 update, and we have that deadline (which involves the Safe plugins rather than these new implementations), going to add tests for the new implementations in a separate issue - #227. Note: while the new contracts compile and abide by the required interfaces, there will be issues with the logic so a meticulous review of these probably isn't needed until #227. Feel free to point out any issues regardless ofc.

How can these changes be manually tested?

  • Run e2e tests

Does this PR resolve or contribute to any issues?

Checklist

  • I have manually tested these changes
  • Post a link to the PR in the group chat

Guidelines

  • If your PR is not ready, mark it as a draft
  • The resolve conversation button is for reviewers, not authors
    • (But add a 'done' comment or similar)

@JohnGuilding JohnGuilding marked this pull request as ready for review March 29, 2024 12:09
@jacque006 jacque006 mentioned this pull request Apr 2, 2024
2 tasks
Copy link
Contributor

@jacque006 jacque006 left a comment

Choose a reason for hiding this comment

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

Did not dig too deeply into SimpleAccount, ERC-7579, & ERC-6900 modules per notes, will do so with tests & EmailAuth integrations later. Nice work & good notes 👍

Comment on lines +11 to +13
/*//////////////////////////////////////////////////////////////////////////
THIS CONTRACT IS STILL IN ACTIVE DEVELOPMENT. NOT FOR PRODUCTION USE
//////////////////////////////////////////////////////////////////////////*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding these. In the future, I think we may need a better way to delineate this, such as placing them in a different directory when ready for production use.

@jacque006 jacque006 merged commit 29b8099 into main Apr 2, 2024
2 checks passed
@jacque006 jacque006 deleted the 219-additional-zk-email-recovery-reference-implementations branch April 2, 2024 05:54
@jacque006
Copy link
Contributor

FYI @voltrevo

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants