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

Voting flow #7

Closed
6 tasks done
kittybest opened this issue Jan 26, 2024 · 1 comment · Fixed by #27
Closed
6 tasks done

Voting flow #7

kittybest opened this issue Jan 26, 2024 · 1 comment · Fixed by #27
Assignees
Labels
enhancement New feature or request

Comments

@kittybest
Copy link
Contributor

kittybest commented Jan 26, 2024

As a user/badgeholder, I want to submit my ballot to vote on projects

Dependencies

Requirements

  • allow badgeholders to add projects to /ballot page (already implemented in EasyRetroPGF)
  • allow badgeholders who have 1. connected their wallet & 2. signed up w/ MACI to submit their ballot
  • disable ability to vote if user has already submitted a ballot
  • Integrate maci sdk message publishing for saved ballot

Details

For this demo, let's just assume the "happy path" that each badgeholder will only submit 1 ballot. Looks like the app already enforces this:
Image 2024-01-29 at 13 48 56

Submitting the ballot should trigger publishMessage on the Poll contract.

Questions to sort out

  • Do we need to submit a tx for every single project in the ballot, or how can we batch these messages (to reduce number of txs & gas costs)? clr.fund does some batching of their votes, so perhaps we can use a similar approach?
  • Need to reverse array of votes, since they’re processed in reverse order? Sort out appropriate nonce for each
@samajammin samajammin changed the title Feat(frontend): support user message publish Feat(frontend): support user voting Jan 29, 2024
@samajammin samajammin added this to MACI Jan 29, 2024
@samajammin samajammin moved this to Todo in MACI Jan 29, 2024
@samajammin samajammin moved this from Todo to Backlog in MACI Jan 29, 2024
@samajammin samajammin changed the title Feat(frontend): support user voting Feat(frontend): voting flow Jan 29, 2024
@samajammin
Copy link
Member

Do we need to submit a tx for every single project in the ballot, or how can we batch these messages (to reduce number of txs & gas costs)? clr.fund does some batching of their votes, so perhaps we can use a similar approach?

Looks like this is where they batch the messages: https://github.com/clrfund/monorepo/blob/develop/contracts/contracts/FundingRound.sol#L196

Then they call that from the frontend to submit votes/contributions:
https://github.com/clrfund/monorepo/blob/develop/vue-app/src/components/ContributionModal.vue#L194

We'll want to investigate how we might optimize this, so that a user is submitting as few on-chain txs as possible...

@0xmad 0xmad changed the title Feat(frontend): voting flow Voting flow Feb 22, 2024
@0xmad 0xmad self-assigned this Feb 22, 2024
@0xmad 0xmad added the enhancement New feature or request label Feb 22, 2024
@0xmad 0xmad moved this from Backlog to In Progress in MACI Feb 22, 2024
@0xmad 0xmad closed this as completed in #27 Mar 1, 2024
@github-project-automation github-project-automation bot moved this from In Progress to Done in MACI Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants