Skip to content

Commit

Permalink
fix: revert
Browse files Browse the repository at this point in the history
  • Loading branch information
eugypalu committed Sep 9, 2024
1 parent 8691d6f commit 053c824
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions indexer/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,14 @@ export default async function transform({
const store: Array<StoreItem> = [];
const blockLogsBloom = new Bloom();

const processedEvents = Array.isArray(events)
? events
// Can be false if the transaction is not related to a specific instance of the Kakarot contract.
// This is typically the case if there are multiple Kakarot contracts on the same chain.
.filter((event) => isKakarotTransaction(event.transaction))
// Skip if the transaction_executed event contains "eth validation failed".
.filter((event) => !ethValidationFailed(event.event))
.map(processEvent(blockInfo))
.filter((event): event is ProcessedEvent => event !== null)
: [];
const processedEvents = events
// Can be false if the transaction is not related to a specific instance of the Kakarot contract.
// This is typically the case if there are multiple Kakarot contracts on the same chain.
.filter((event) => isKakarotTransaction(event.transaction))
// Skip if the transaction_executed event contains "eth validation failed".
.filter((event) => !ethValidationFailed(event.event))
.map(processEvent(blockInfo))
.filter((event): event is ProcessedEvent => event !== null);

const { cumulativeGasUsed, cumulativeGasUsages } =
accumulateGasAndUpdateStore(processedEvents, store, blockLogsBloom);
Expand Down

0 comments on commit 053c824

Please sign in to comment.