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

Consider renaming `Event.logIndex` to `Event.blockLogIndex`

Open PaulRBerg opened this issue 7 months ago • 0 comments

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.logIndex to Event.blockLogIndex.
  • [ ] For backward-compatibility, maintain Event.logIndex, but annotate it as deprecated.

Related

  • https://github.com/graphprotocol/graph-tooling/issues/2037

PaulRBerg avatar May 18 '25 12:05 PaulRBerg