Created
August 11, 2021 09:30
-
-
Save axiomatic-aardvark/19159ac7c41025ea5dad945cb4a60481 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 { 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(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment