-
Notifications
You must be signed in to change notification settings - Fork 22
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(frontend): signup flow #4
Comments
Question: so we still allow them to add projects to ballot even if they haven't signed up? I suppose they won't see that page until they already signed up. |
Solved by #20 #23 #30 privacy-scaling-explorations/maci#1212 |
As a user, I want to be able to sign up w/ MACI so that I can vote
Requirements
signUp
function (this should pass relevant data to EAS gatekeeper)Notes
EAS attestation
Currently the app relies on the
approval
schema to validate if somone can vote. We should update this to use thebadgeholder
schemaWhen a user connects their wallet, we should query EAS to confirm if the address is an OP badgeholder or not
Note: EasyRetroPGF may already do this check (after they use SIWE to connect?), so let's check out the code & confirm before implementing ourselves
MACI key generation
Once a user connects their wallet & we've confirmed they're an OP badgeholder (by querying the EAS attestation), we should generate a MACI keypair for them so they can sign up
Let's generate the MACI key deterministically, so it's attached to their ETH address (so same implementation as clr.fund). This way, we can completely abstract the MACI keypair away from the user. They don't even need to know it exists. As long as they can connect their wallet & prove ownership of the ETH address, they should be able to generate their MACI private key to sign any messages.
Signup flow
This is a new flow to the EasyRetroPGF app... so I'm thinking this simplest/easiest implementation is this...
Once wallet is connected, allow users to add projects to their ballot (so same UX as current app)
In their ballot view, instead of allowing users to submit ballot, first prompt them to sign up:
So basically: change the text of the button (to "Sign up") & change the tx this triggers - this should call the
signup
function from the MACI contract. Once this tx is submitted & succeeds, then we should change the text back to "Submit ballot".The text was updated successfully, but these errors were encountered: