graph-tooling icon indicating copy to clipboard operation
graph-tooling copied to clipboard

Indexed Struct in event fails when attempting to sync subgraph

Open MJYoung114 opened this issue 3 years ago • 3 comments

Currently facing an issue where an event with an indexed struct fails to sync when deploying to the hosted service with the following error:

Event with the signature "EventName((indexed uint8,uint8),uint256,indexed address,indexed uint32)" not found in contract

The event is as below

event EventName( eventStruct indexed x, uint256 y, address indexed z, uint32 indexed a, );

the struct is as below:

struct eventStruct { enum type; uint8 index; }

When running the codegen all runs smoothly and the graph is built and deployed however the graph fails to sync with the above error. Any indication on what the issue here could be?

Additionally, when the codegen is run the above struct becomes of Bytes type instead of type Tuple:

get x(): Bytes { return this._event.parameters[0].value.toBytes(); }

Is this the expected behaviour?

Thanks in advance for the help.

MJYoung114 avatar Jul 25 '22 06:07 MJYoung114

Running into this same issue, almost a year later

Any update on this?

dmihal avatar Jun 01 '23 22:06 dmihal

@leoyvens should this be a graph-node issue? why does this break at indexing time?

azf20 avatar Aug 09 '23 11:08 azf20

Additionally, when the codegen is run the above struct becomes of Bytes type instead of type Tuple:

get x(): Bytes { return this._event.parameters[0].value.toBytes(); }

Is this the expected behaviour?

On this, I think the answer is yes it is expected behaviour as the tuple is indexed. I wonder if this is also contributing to the observed error

azf20 avatar Aug 14 '23 11:08 azf20