From 9432cecbe71f01bd4f42273b0cce692f8365d083 Mon Sep 17 00:00:00 2001 From: Aditya Anand M C Date: Wed, 6 Nov 2024 10:38:57 +0530 Subject: [PATCH] update --- src/indexer/allo/v1/handleEvent.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/indexer/allo/v1/handleEvent.ts b/src/indexer/allo/v1/handleEvent.ts index bf508d64..547cf2bc 100644 --- a/src/indexer/allo/v1/handleEvent.ts +++ b/src/indexer/allo/v1/handleEvent.ts @@ -797,9 +797,18 @@ export async function handleEvent( } const strategyAddress = parseAddress(event.address); - const round = await db.getRoundByStrategyAddress( + + const roundId = parseAddress( + await readContract({ + contract: "AlloV1/MerklePayoutStrategyImplementation/V2", + address: strategyAddress, + functionName: "roundAddress", + }) + ); + + const round = await db.getRoundById( chainId, - strategyAddress + roundId ); if (!round) { @@ -845,7 +854,7 @@ export async function handleEvent( { type: "UpdateRoundByStrategyAddress", chainId, - strategyAddress, + strategyAddress: strategyAddress, round: { matchingDistribution: distribution.data, },