Add blocknumber entity for echo accounts

This commit is contained in:
Tornado Contrib 2024-04-04 19:27:42 +00:00
parent 92b18c448c
commit 7dff5223e8
Signed by: tornadocontrib
GPG Key ID: 60B4DF1A076C64B1
2 changed files with 2 additions and 0 deletions

@ -34,6 +34,7 @@ type EncryptedNote @entity {
type NoteAccount @entity {
id: ID!
index: BigInt!
blockNumber: BigInt!
address: Bytes!
encryptedAccount: Bytes!
}

@ -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;