We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f8cfd8a commit cc324b3Copy full SHA for cc324b3
indexer/src/indexer.ts
@@ -135,8 +135,8 @@ async function pullEvents() {
135
136
let blockHash: string | null = null;
137
let txHash: string | null = null;
138
- let txIndex = 0;
139
- let eventIndex = 0;
+ let txIndex = -1;
+ let eventIndex = -1;
140
141
for (const emittedEvent of eventsChunk.events.values()) {
142
if (emittedEvent.block_hash !== blockHash) {
@@ -148,6 +148,7 @@ async function pullEvents() {
148
if (emittedEvent.transaction_hash !== txHash) {
149
txHash = emittedEvent.transaction_hash;
150
txIndex++;
151
+ eventIndex = 0;
152
} else {
153
eventIndex++;
154
}
0 commit comments