From 2422d326d2e0775cf405f2b0104fedc4c4fcd9ca Mon Sep 17 00:00:00 2001 From: Krishna Upadhyaya Date: Tue, 3 May 2022 21:02:43 +0530 Subject: [PATCH] Add rawData to state-sync event --- root/schema.graphql | 1 + root/src/mappings/state-sync.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/root/schema.graphql b/root/schema.graphql index 0453674..439a5b5 100644 --- a/root/schema.graphql +++ b/root/schema.graphql @@ -19,6 +19,7 @@ type StateSync @entity { depositorOrRootToken: String! depositedTokenOrChildToken: String! data: String! + rawData: String! logIndex: String! transactionHash: Bytes! timestamp: BigInt! diff --git a/root/src/mappings/state-sync.ts b/root/src/mappings/state-sync.ts index 5b4654f..949304f 100644 --- a/root/src/mappings/state-sync.ts +++ b/root/src/mappings/state-sync.ts @@ -54,6 +54,7 @@ export function handleStateSynced(event: StateSynced): void { entity.depositorOrRootToken = decoded.value1.toHex() entity.depositedTokenOrChildToken = decoded.value2.toHex() entity.data = decoded.value3.toHexString() + entity.rawData = event.params.data.toHexString() // save entity entity.save()