Skip to content

Commit

Permalink
Add created date condition for attestations
Browse files Browse the repository at this point in the history
  • Loading branch information
mmahdigh committed Jul 29, 2024
1 parent 723f83e commit d79bf06
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# outputs
/src/results

# OS
.DS_Store

Expand Down
6 changes: 5 additions & 1 deletion src/weighted-api/eas/attest-utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,12 @@ export const getAllAttestations = async (
query AllAttestationsQuery($where: AttestationWhereInput) {
groupByAttestation(
where: $where,
by: [id, decodedDataJson, attester]
by: [id, decodedDataJson, attester, timeCreated]
) {
id
decodedDataJson
attester
timeCreated
}
}
`;
Expand All @@ -78,6 +79,9 @@ export const getAllAttestations = async (
schemaId: {
equals: schemaId,
},
timeCreated: {
lte: 1721224800, // Jul 17 14:00 UTC
},
...condition,
},
by: null,
Expand Down

0 comments on commit d79bf06

Please sign in to comment.