Skip to content

Instantly share code, notes, and snippets.

View axiomatic-aardvark's full-sized avatar
:octocat:
Keep buidling

Petko Pavlovski axiomatic-aardvark

:octocat:
Keep buidling
View GitHub Profile
import { NewEntity } from "../generated/Example/Example";
import { CustomEntity } from '../../generated/schema';
export function handleNewEntity(event: NewEntity): void {
let customEntity = new CustomEntity(event.params.id.toHex());
customEntity.name = event.params.displayName;
customEntity.save();
}