You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to run the build command, I get the following error
UNCAUGHT EXCEPTION: Error: The AssemblyScript compiler crashed when compiling this file: 'src\gravatar-registry.ts'
Suggestion: try to comment the whole file and uncomment it little by little while re-running the graph-cli until you isolate the line where the problem happens.
I followed the Suggestion to locate the offending code:
let id = Bytes.fromBigInt(event.params.id);
let gravatar = new Gravatar(Bytes.fromBigInt(event.params.id));
The complete code is as follows
import {
NewGravatar as NewGravatarEvent,
UpdatedGravatar as UpdatedGravatarEvent
} from "../generated/GravatarRegistry/GravatarRegistry"
import { Gravatar} from "../generated/schema"
import { Bytes } from '@graphprotocol/graph-ts'
export function handleNewGravatar(event: NewGravatarEvent): void {
let id = Bytes.fromBigInt(event.params.id);
let gravatar = new Gravatar(Bytes.fromBigInt(event.params.id));
// gravatar.owner = event.params.owner
// gravatar.displayName = event.params.displayName
// gravatar.imageUrl = event.params.imageUrl
// gravatar.blockNumber = event.block.number
// gravatar.blockTimestamp = event.block.timestamp
// gravatar.save()
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
When I try to run the build command, I get the following error
I followed the Suggestion to locate the offending code:
The complete code is as follows
the event:
event NewGravatar(uint id, address owner, string displayName, string imageUrl);
If I change the code to look like this,it will build success;
let gravatar = new Gravatar(event.params.owner);
The error message does not contain any critical information. What should I do?
Beta Was this translation helpful? Give feedback.
All reactions