Skip to content

Conversation

@JohnGuilding
Copy link
Collaborator

Description

Adds an event to the addTallyResult function to make it easier to retrieve information on completed tallies. For example, pulling the data for a subgraph.

Additional Notes

Related issue(s)

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.

@vercel
Copy link

vercel bot commented Jan 12, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
maci-website Error Error Jan 12, 2026 9:31pm


previous.value = _tallyResult;

emit ResultAdded(_voteOptionIndex, _tallyResult);
Copy link
Member

Choose a reason for hiding this comment

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

I like the idea but should the event be emitted on addTallyResults rather than addTallyResult ? My understanding is that the coordinator calls once addTallyResults and then addTallyResult is called multiple times internally.

I feel it might be more helpful to get an event after all results have been tallied rather than on every execution of partial results tallying 😊

Copy link
Collaborator

Choose a reason for hiding this comment

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

addTallyResults won't be called once. It can be called multiple times.

Copy link
Member

Choose a reason for hiding this comment

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

@0xmad so is it better to emit the event in addTallyResult or in addTallyResults?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Better to use it in addTallyResult to use it simplier with subgraph.

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