Skip to content

feat: add claim task for project payouts#677

Open
lordshashank wants to merge 1 commit into
privacy-ethereum:mainfrom
lordshashank:feat/claim-script
Open

feat: add claim task for project payouts#677
lordshashank wants to merge 1 commit into
privacy-ethereum:mainfrom
lordshashank:feat/claim-script

Conversation

@lordshashank

Copy link
Copy Markdown
Contributor

Description

This pull request adds a new Hardhat task for claiming payouts for a specific project, and registers it in the Hardhat configuration. The new claim task allows users to claim a payout by providing a poll ID, a tally file, and a project index, handling contract interactions and proof generation.

New claim task functionality:

  • Added a new claim Hardhat task in tasks/runner/claim.ts that enables claiming a payout for a project by reading tally data from a file, validating inputs, generating Merkle proofs, and interacting with the Tally contract to execute the claim transaction.
  • Registered the new claim task in hardhat.config.ts so it is available as a CLI command.

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.

@JohnGuilding JohnGuilding left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good. Since we don't validate in other tasks like you have here, will leave it up to you whether you change validation to remove eslint-disable

Comment thread packages/contracts/tasks/runner/claim.ts Outdated
Comment on lines +11 to +18
/**
* Interface that represents claim task arguments
*/
interface IClaimParams {
poll: string;
tallyFile: string;
index: number;
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Types should not be defined here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

There were types in initPoll task as well, where should I put them?

Comment thread packages/contracts/tasks/runner/claim.ts
Comment thread packages/contracts/tasks/runner/claim.ts Outdated
@JohnGuilding

Copy link
Copy Markdown
Collaborator

@0xmad what do you think about the failing e2e test?

@0xmad

0xmad commented Oct 7, 2025

Copy link
Copy Markdown
Collaborator

E2E tests fail if it’s fork, we had the same situation with maci.

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.

4 participants