graph-node
graph-node copied to clipboard
Can't access event parameters if they are a struct
Hey,
I have an event with struct as a parameter
event UserUpdated(User _user);
On the event handler handleUserUpdated
I access the event parameter this way
event.params._user.amountOfAsset1
When I access events, I get this error on the graph studio
Ethereum value is not a tuple.
I checked the generated file (generated/contractName/fileName.ts) and found this
get _user(): UserUpdated_userStruct { return changetype<UserUpdated_userStruct>( this._event.parameters[0].value.toTuple() ); }
Any idea how to fix it, please?
Hello - can you provide an example subgraph with this issue? Specifically of interest is the ABI and the event signature used to define the handler, which should be a tuple, rather than a named struct
Looks like this issue has been open for 6 months with no activity. Is it still relevant? If not, please remember to close it.
it was an ABI problem, Sorry I didn't see your reply @azf20