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: voice credit per tokens (ERC20 or ETH sent to an address) #1998

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

NicoSerranoP
Copy link
Member

Description

We need a feature to give each voter a specific voice credit amount depending on how much ERC-20 tokens or ETH the user has send to an address. Related to #1968

Steps:

  1. Deploy the PerTokenVoiceCreditProxy contract
  2. Send ERC20 tokens or ETH to the contract using registerVoiceCredits (this is happening outside any Poll or MACI function. Should it stay that way or should we integrate it into the joinPoll step?)
  3. Vote into a specific poll. The contract will use getVoiceCredits to calculate how much credit a voter has

Related issue(s)

Close #1968

Confirmation

Important

We do not accept minor grammatical fixes (e.g., correcting typos, rewording sentences) unless they significantly improve clarity in technical documentation. These contributions, while appreciated, are not a priority for merging. If there is a grammatical error feel free to message the team.

NicoSerranoP and others added 17 commits December 17, 2024 14:24
- [x] Add relayer package
- [x] Add boilerplate package for relayer
- [x] Add controller api method for message publishing
- [x] Add tests
- [x] Add dto and validation
- [x] Add mongodb integration
- [x] Add message repository
- [x] Add message batch repository
- [x] Add message batch service
- [x] Add message and message batch schemas
- [x] Integrate message repository into message service
- [x] Integrate message batch service into message service
@NicoSerranoP NicoSerranoP added the enhancement New feature or request label Jan 13, 2025
@NicoSerranoP NicoSerranoP self-assigned this Jan 13, 2025
Copy link

vercel bot commented Jan 13, 2025

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

Name Status Preview Updated (UTC)
maci-website ✅ Ready (Inspect) Visit Preview Jan 13, 2025 9:55pm

@ctrlc03
Copy link
Collaborator

ctrlc03 commented Jan 14, 2025

please rebase to dev

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: In Progress
Development

Successfully merging this pull request may close these issues.

Create a InitialVoiceCreditPerToken for voice credit depending on amount of tokens
7 participants