From d79bf0685221786e6f8b49043d2c0c7f34e00a59 Mon Sep 17 00:00:00 2001 From: Mahdi Date: Mon, 29 Jul 2024 14:31:55 +0330 Subject: [PATCH] Add created date condition for attestations --- .gitignore | 3 +++ src/weighted-api/eas/attest-utils.ts | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index f81354d..b56d2bb 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,9 @@ yarn-debug.log* yarn-error.log* lerna-debug.log* +# outputs +/src/results + # OS .DS_Store diff --git a/src/weighted-api/eas/attest-utils.ts b/src/weighted-api/eas/attest-utils.ts index 68e7b8f..12fbb06 100644 --- a/src/weighted-api/eas/attest-utils.ts +++ b/src/weighted-api/eas/attest-utils.ts @@ -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 } } `; @@ -78,6 +79,9 @@ export const getAllAttestations = async ( schemaId: { equals: schemaId, }, + timeCreated: { + lte: 1721224800, // Jul 17 14:00 UTC + }, ...condition, }, by: null,