Closed ccerv1 closed 6 months ago
I'm curious if they can use the metadata? We store the allowlist in the metadata, so that's an easy way to check without updating the contracts.
It's a possibility, though that would still require them to do some form of indexing. They are interested in validating whether an address owns a hypercert that came from an allowlist or not.
Using the metadata is a good idea. The Graph allows for reading IPFS since a few months, so this would be a nice validation of the functionality. If that works, we could potentially scale it to getting all metadata from the Graph.
Sounds reasonable to me
Minor nit:
- If metadata.allowlist is not empty, label as "hasAllowlist"
Could the label be "fromAllowlist"
FWIW hasAllowlist
is more idiomatic if its a boolean, but it doesn't really matter I guess
Ok, it's being pushed on Goerli right now. We already indexed the Allowlist so I simply updated the mapping. Because all hypercerts from a claim originate from an allowlist, if they have an allowlist, they should have a relationship.
This way, we also have the set up to store all the metadata in the Graph under the Allowlist entity.
Query:
{
claimTokens {
claim {
allowlist {
id
root
}
}
id
units
}
}
Data:
"data": {
"claimTokens": [
{
"claim": {
"allowlist": null
},
"id": "0x822f17a9a5eecfd66dbaff7946a8071c265d1d07-0",
"units": "0"
},
{
"claim": {
"allowlist": null
},
"id": "0x822f17a9a5eecfd66dbaff7946a8071c265d1d07-10208471007628153903901238222953046343681",
"units": "10000"
},
{
"claim": {
"allowlist": {
"id": "0x822f17a9a5eecfd66dbaff7946a8071c265d1d07-10548753374549092367364612830384814555136",
"root": "0x6c1cd4cb48b2907fe68a724d9a75b81a0682d42c25d4c77810e955d280d58f41"
}
},
}
@ccerv1 would this work for the case you envision?
Also @ccerv1 one consideration: This marks all fractions that belong to the claim as 'from allowlist' even if it's after splitting, merging and selling
Also @ccerv1 one consideration: This marks all fractions that belong to the claim as 'from allowlist' even if it's after splitting, merging and selling
Hmmm ... good point. You've given me an idea for an alternative approach.
Query:
{
claimTokens{
claim {
tokenID
creator
owner
}
}
}
And then in the app check that claim.creator !== claim.owner
wdyt?
Can you help me understand how this would help the validation process for Passport?
The goal for GC Passport is to use Hypercerts as one variable in the passport score? How about these checks:
I understand rules can be perceived as guidelines for cheating, but this increases the cost from having 1 or 2 accounts mint faux hypercerts to operating a set of accounts to mint and claim. In addition with the other Passport parameters, this might be sufficient.
Yes, the goal is to have a GC Passport check for a user, ideally without Passport needing to do a lot of indexing.
As you can see on Dune, there are a lot of spammy hypercerts that have been created recently. I think what you're proposing eventually leads to there being some concept of a verified hypercert. Let me set up a chat with Lucian on Discord so we can come up with a Pareto optimal solution :)
Notes from chatting with @ccerv1 and Gitcoin team:
I'll try to sneak this in over the next week
As discussed in person, this isn't something that makes sense in the long-term, so I would deprioritize this (except this is useful for some other use case or it doesn't take much time at all)
Technically this is currently in the new indexer, closing this for now
Describe the feature you'd like to request
a way of flagging in the subgraph whether a hypercert token was claimed from an allowlist (or claimed by creating a degenerate hypercert with no allowlist)
Describe the solution you'd like
a boolean field in
claimToken
that specifies whether it was claimed from an allowlist or notDescribe alternatives you've considered
From Lucian at Gitcoin: