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

Add universal email recovery module #100

Merged

Conversation

JohnGuilding
Copy link
Contributor

@JohnGuilding JohnGuilding commented Nov 27, 2024

This PR:

Open questions

  • UniversalEmailRecoveryModule is currently only deployed on Base, so this module would only be installable on Base. We do plan on supporting more evm chains but probably not quite as many as Rhinestone and no immediate plans to make more deployments. Are there any additional changes we need to make to account for this?

^I added a helper function that uses the correct address based on chain ID. We will likely have differing addresses for different chains initially (Base and testnets). Future deployments will be more consistent with deterministic addresses

  • Don't know what you guys wanted to do about documentation, might be one for a future PR but curious what your thoughts are here? Also happy to add some basic documentation in this PR if helpful

@JohnGuilding JohnGuilding marked this pull request as ready for review November 28, 2024 06:09
@JohnGuilding JohnGuilding force-pushed the feat/add-universal-email-recovery-module branch from 909e616 to 453ba3c Compare December 3, 2024 06:06
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 haven't added tests for the following actions:

getHandleAcceptanceAction,
getHandleRecoveryAction,
getCompleteRecoveryAction,
getCancelRecoveryAction,
getCancelExpiredRecoveryAction,

This is because we would have to generate a valid proof to pass here, I haven't had time to do this. Module developers would not be directly calling the main recovery functions initially, so I don't think it's super critical that these are covered in the e2e tests right now. This is because these functions are currently called by our relayer infrastructure instead:

handleAcceptance
handleRecovery
completeRecovery

For the cancel actions, would need start a recovery request so again would need to generate a proof to get to that state I guess.

ofc feel free to block on this if you think this is important. I do think we should add these eventually especially when we have client-side proving in 2025, and then it is more likely devs would be calling these functions directly

Copy link
Member

Choose a reason for hiding this comment

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

yep I think that makes sense - happy to revisit this down the line

@JohnGuilding
Copy link
Contributor Author

Question on the unit tests, when I used a deployed module on Sepolia for the e2e tests. Some of my unit tests started failing. I assume they were grabbing state from Sepolia so the assertions became invalid - see commit Update unit tests.

So should we keep things like this? Is there a risk that state will change on Sepolia and then the unit tests will start failing again?

@kopy-kat
Copy link
Member

kopy-kat commented Dec 5, 2024

ah so you ran the e2e on actual sepolia not the forked one? yeah this is annoying but I think we can leave it like this for now

@JohnGuilding
Copy link
Contributor Author

ah so you ran the e2e on actual sepolia not the forked one? yeah this is annoying but I think we can leave it like this for now

I ran:

  1. docker-compose up
  2. pnpm test:e2e accounts/7579

This runs tests on the fork?

@kopy-kat kopy-kat merged commit 4b4174f into rhinestonewtf:main Dec 9, 2024
1 check failed
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