semaphore
semaphore copied to clipboard
Add Semaphore event listeners
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)
Hey @cedoor, would love to work on this ? Could you clarify the remaining tasks for this issue? Any additional context would be appreciated. Thanks!
Hi @0xshikhar, ofc! The following listeners need to be added to the SemaphoreEthers class:
onGroup(GroupCreatedevent): should return the group id of the newly created group.onMember(MemberRemoved,MemberUpdated,MemberAddedevents): 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 (
ProofValidatedevent): should return the parameters of a validated proof. - onGroupAdmin (
GroupAdminUpdatedevent): should return the address of the old admin and the new one.
Ethers doc: https://docs.ethers.org/v6/api/utils/events/
Hey @cedoor . Can I take this issue?
Hey @Lauman! Yes. Would you like me to assign you this issue?
Done! Feel free to ask any questions.