From 7dff5223e88a3d84fe05d37177db067b03976062 Mon Sep 17 00:00:00 2001 From: Tornado Contrib Date: Thu, 4 Apr 2024 19:27:42 +0000 Subject: [PATCH] Add blocknumber entity for echo accounts --- schema.graphql | 1 + src/mapping-echo-account.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/schema.graphql b/schema.graphql index b2a7fa9..538e2f8 100644 --- a/schema.graphql +++ b/schema.graphql @@ -34,6 +34,7 @@ type EncryptedNote @entity { type NoteAccount @entity { id: ID! index: BigInt! + blockNumber: BigInt! address: Bytes! encryptedAccount: Bytes! } diff --git a/src/mapping-echo-account.ts b/src/mapping-echo-account.ts index ab34f85..d83b02b 100644 --- a/src/mapping-echo-account.ts +++ b/src/mapping-echo-account.ts @@ -5,6 +5,7 @@ export function handleEcho(event: Echo): void { let entity = new NoteAccountEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString()); entity.index = event.logIndex; + entity.blockNumber = event.block.number; entity.address = event.params.who; entity.encryptedAccount = event.params.data;