Last active
August 20, 2021 18:52
-
-
Save axiomatic-aardvark/d6f66f963cd25f699fc66bda39fd41eb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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