graph-tooling
graph-tooling copied to clipboard
Consider renaming `Event.logIndex` to `Event.blockLogIndex`
Which packages are impacted by your issue?
@graphprotocol/graph-ts
Describe the issue
Problem
When looking at these types:
https://github.com/graphprotocol/graph-tooling/blob/4b4ad3e22322ea30ae8e27143a759c1fcc6b12e0/packages/ts/chain/ethereum.ts#L626-L627
It's not obvious that the logIndex is the index of the event in the entire block, whereas transactionLogIndex is the index of the event in the transaction.
Confused Users
- https://github.com/graphprotocol/graph-tooling/discussions/2035
- https://discord.com/channels/438038660412342282/438070183794573313/950636887436054538
Solution
- [ ] Rename
Event.logIndextoEvent.blockLogIndex. - [ ] For backward-compatibility, maintain
Event.logIndex, but annotate it as deprecated.
Related
- https://github.com/graphprotocol/graph-tooling/issues/2037