Skip to content

Commit

Permalink
chore: update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-schultz committed Nov 27, 2023
1 parent 50c5302 commit 2837a5e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docs/00-onchain-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ recipient, in order for the call to `verifyAndAttest` to get through. It will be
reverted otherwise.

## GitcoinResolver

You can find the implementation of the GitcoinResolver _[here](../contracts/GitcoinResolver.sol)_

EAS provides a mechanism to perform additional validations for stamps and
Expand Down Expand Up @@ -196,7 +197,7 @@ smart contract shall only validate and store data from trusted sources:

### Caching users scores

In order to provide faster access to a users score, the informatio from score
In order to provide faster access to a users score, the information from score
attestations is cached in an attribute of the `GitcoinResolver` smart contract:

```sol
Expand All @@ -215,7 +216,7 @@ struct CachedScore {
}
```

Retreiving the latest score for a user becomes much cheaper in terms of gas costs
Retrieving the latest score for a user becomes much cheaper in terms of gas costs
and easier using the helper function:

```sol
Expand All @@ -224,6 +225,8 @@ function getCachedScore(
) external view returns (CachedScore memory);
```

NOTE: the `getCachedScore` function and `struct CachedScore` will convert the `score` attribute to a value that is offset by 4 decimals regardless of what value is set as `Score_decimals` within the attestation. This is done for more cost efficient storage and retrieval. If integrating with the `GitcoinResolver` be sure to adjust the value accordingly.

## GitcoinPassportDecoder

This is a convenience smart contract that can be used by any party to check for
Expand Down

0 comments on commit 2837a5e

Please sign in to comment.