tornado-subgraph/src/mapping-echo-account.ts

13 lines
398 B
TypeScript
Raw Normal View History

2021-06-07 13:43:31 +03:00
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();
}