-
Notifications
You must be signed in to change notification settings - Fork 464
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
Implement Cached Score Retrieval in Gitcoin Passport Smart Contracts #1924
Comments
To be discussed further: we could also change the number of digits in the value that we store in the EAS attestations. |
Waiting to review this with somebody. |
This looks good to me. Imo we should wait on deploying this until #1928 is also deployed it seems like it could introduce some confusion about the score value if not deployed together. |
These changes have been merged let us know if we should deploy this before #1928 is completed |
Putting these back in progress as I have found some bugs:
|
The work on these branches has been merged int the branch for #1928 |
User Story:
As a passport developer and integrator,
I want a gas-efficient method, like a
getCachedScore
function within the resolver,To retrieve the numeric score of a user’s Passport from a cached mapping, thus ensuring minimal gas costs during operations like gating smart contract calls.
Acceptance Criteria
GIVEN I am a developer integrating with the Gitcoin Passport system,
WHEN I call the
getCachedScore(address user)
function of the GitcoinResolver smart contract,THEN I expect the cached Score structure for the user's Passport to be returned from a cached mapping within the resolver smart contract,
AND the function should revert the transaction if no score is available for the provided ETH address.
Product & Design Links:
Not applicable.
Tech Details:
mapping (address => Score)
, in the GitcoinResolver smart contract where:attest
hookrevoke
hookOpen Questions:
Not applicable.
Notes/Assumptions:
The text was updated successfully, but these errors were encountered: