tornado-subgraph/src/mapping-echo-account.ts
2021-06-10 12:47:29 +03:00

13 lines
400 B
TypeScript

import { Echo } from '../generated';
import { NoteAccount as NoteAccountEntity } from '../generated/schema';
export function handleEcho(event: Echo): void {
let entity = new NoteAccountEntity(event.transaction.hash.toHex() + '-' + event.logIndex.toString());
entity.index = event.logIndex;
entity.address = event.params.who;
entity.encryptedAccount = event.params.data;
entity.save();
}