hypercerts-org / hypercerts

Hypercerts are a tool to build scalable retrospective reward systems for impact.
https://hypercerts.org/
Other
93 stars 30 forks source link

[FRONTEND] Allowlist minting support #1335

Closed Jipperism closed 4 months ago

Jipperism commented 4 months ago

What is it?

When a user mint a hypercert using an allowlist, there are 2 options:

  1. User specifies allowlist entries using UI
  2. User specifies existing and already uploaded IPFS CID for an allowlist csv/merkletree dump file.

Case 1 steps:

  1. User specifies allowlist entries
  2. Upon closing allowlist modal entries get validated using hypercerts-api endpoint (create merkltetree, call .dump() and provide that to the API)
  3. When minting, they get passed as the optional x'th argument to hyperclient.mintClaim().
  4. Hypercertclient parses and validates allowlist again, then stores allowlist using hypercert-api
  5. Hypercertclient parses and validates metadata, stores metadata using hypercert-api
  6. Hypercertclient calls correct minting method (either mintClaim or createAllowlist) depending on whether allowlist entries were provided

Case 2 steps:

  1. User already upload an allowlist file to ipfs/http using tool of choice
  2. User provides cid in the UI
  3. Allowlist modal form gets prefilled using data in file
  4. Continue from step 2 in case 1.
Jipperism commented 4 months ago

Implemented in https://github.com/hypercerts-org/hypercert-app/pull/99 and https://github.com/hypercerts-org/hypercert-app/pull/98