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

13 lines
400 B
TypeScript
Raw Normal View History

2021-06-09 17:39:13 +03:00
import { Echo } from '../generated';
import { NoteAccount as NoteAccountEntity } from '../generated/schema';
2021-06-07 13:43:31 +03:00
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();
}