-
Notifications
You must be signed in to change notification settings - Fork 5
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
feat: ref should be an array #26
Comments
could we instead create a combined single ref by hashing the individual ones? like:
|
No because we need to check each of the ref, not all at once. Otherwise if someone have multiple tweetId but a single voteId, he will be able to claim multiple time. |
okay, well we will need to redesign some part as you cannot use an array as a key for a mapping, so we will not be able to store who has claimed so far here ill have a think |
@Orland0x Can't you just store each of the ref in the same variable |
yeah we could do that, it adds 20k gas for each ref used though.
The guard has to sign each claim so why cant they just check that refs have not been reused? |
I'll need to think about it. If it's not enforced at the contract level the guard would need to assume everytime it issue a coupon that it can be claimed, but we may have user who request a coupon and not claim it directly then ask a coupon again. On solution could be to store the issued coupons so we can send it again |
We should change
ref
to be an array, currently if we want define within a Boost strategy multiple requirement like doing a vote on Snapshot and do a retweet, we wouldn't be able to mark both the address and the Twitter username as id that have already claimed.The text was updated successfully, but these errors were encountered: