Skip to content

Instantly share code, notes, and snippets.

@axiomatic-aardvark
Last active August 20, 2021 18:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save axiomatic-aardvark/d6f66f963cd25f699fc66bda39fd41eb to your computer and use it in GitHub Desktop.
Save axiomatic-aardvark/d6f66f963cd25f699fc66bda39fd41eb to your computer and use it in GitHub Desktop.
import { NewCustomEntity } from "../generated/MyDataSource/Example";
import { CustomEntity } from '../generated/schema';
export function handleNewCustomEntity(event: NewCustomEntity): void {
let customEntity = new CustomEntity(event.params.id.toString());
customEntity.name = event.params.name;
customEntity.save();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment