semaphore icon indicating copy to clipboard operation
semaphore copied to clipboard

Add Semaphore event listeners

Open andyguzmaneth opened this issue 2 years ago • 2 comments

Description

The @semaphore-protocol/data library currently provides functions to download data from deployed contracts using mainly events with Ethers or TheGraph subgraphs.

However, there are no listeners, which can be useful for keeping the list of local groups, members, or proofs up-to-date.

Resources

  • https://docs.ethers.org/v6/getting-started/#starting-contracts (Listening to events)

andyguzmaneth avatar May 16 '23 14:05 andyguzmaneth

Hey @cedoor, would love to work on this ? Could you clarify the remaining tasks for this issue? Any additional context would be appreciated. Thanks!

0xshikhar avatar Oct 14 '24 20:10 0xshikhar

Hi @0xshikhar, ofc! The following listeners need to be added to the SemaphoreEthers class:

  • onGroup (GroupCreated event): should return the group id of the newly created group.
  • onMember (MemberRemoved, MemberUpdated, MemberAdded events): should return the identity commitment of members who are added/updated/removed. In case of updates or removals, the old id commitment should also be returned.
  • onValidatedProof (ProofValidated event): should return the parameters of a validated proof.
  • onGroupAdmin (GroupAdminUpdated event): should return the address of the old admin and the new one.

Ethers doc: https://docs.ethers.org/v6/api/utils/events/

cedoor avatar Oct 15 '24 10:10 cedoor

Hey @cedoor . Can I take this issue?

Lauman avatar Oct 17 '25 20:10 Lauman

Hey @Lauman! Yes. Would you like me to assign you this issue?

vplasencia avatar Oct 17 '25 20:10 vplasencia

Hey @Lauman! Yes. Would you like me to assign you this issue?

Yes,please. Thanks!

Lauman avatar Oct 17 '25 20:10 Lauman

Done! Feel free to ask any questions.

vplasencia avatar Oct 17 '25 20:10 vplasencia