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

Contract handling helper #29

Closed
2 tasks done
fryorcraken opened this issue Oct 5, 2022 · 3 comments · Fixed by waku-org/examples.waku.org#225
Closed
2 tasks done

Contract handling helper #29

fryorcraken opened this issue Oct 5, 2022 · 3 comments · Fixed by waku-org/examples.waku.org#225
Assignees
Labels
track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications

Comments

@fryorcraken
Copy link
Contributor

fryorcraken commented Oct 5, 2022

Problem

Retrieving membership details and adding them to the RlnInstance is something that any user of js-rln should do and are likely to copy-paste from https://github.com/waku-org/js-waku-examples/blob/b6d9942b113e51298ba9e4405997c3dc52bec908/rln-js/index.html#L259

Same re listening to contract event add new memberships to RlnInstance.

Same re registering membership in contract: https://github.com/waku-org/js-waku-examples/blob/b6d9942b113e51298ba9e4405997c3dc52bec908/rln-js/index.html#L287

Solution

Provide a function helper that does that.

2 possibilities:

  1. Function helper uses ethers, hence we can set ethers as an optional dependency
  2. Function helper gets passed an object that implement an interface so to give the choice to the user between ethers and web3js.

Not sure (2) is straight forward, might be easier to just go with (1) for now

Acceptance Criteria

  • User can call 1 function to retrieve members from contract, add them to RlnInstance and add new members to RlnInstance by listening to contract
  • User can call 1 function to add credentials to contract.
@fryorcraken fryorcraken added the track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications label Oct 5, 2022
@weboko
Copy link
Contributor

weboko commented Jan 26, 2023

I am still not able to determine good API to cover this so @fryorcraken do you see other points for improvement here?

@weboko weboko self-assigned this Jan 26, 2023
@fryorcraken
Copy link
Contributor Author

I see you have done improvement already with #43 . Let's use it in the examples and see how it looks.

@weboko
Copy link
Contributor

weboko commented Jan 27, 2023

Ok, so I'll define as follow up item next thing:

  • use contract abstraction in the example;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
track:rln RLN Track (Secure Messaging/Applied ZK), e.g. relay and applications
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants