diff --git a/src/scripts/pull_and_save_block_events.ts b/src/scripts/pull_and_save_block_events.ts index b661e92d..c42259a2 100644 --- a/src/scripts/pull_and_save_block_events.ts +++ b/src/scripts/pull_and_save_block_events.ts @@ -140,10 +140,13 @@ function parseTransactionEvents(transaction: FullTransaction): ParsedTransaction }; }); + const foundScrapedEventInTx = nestedParsedEvents.map((npe) => npe.events).flat().length > 0; + return { // We need all reverted txs for joining with traces later // toString is needed because we libraries do not match - parsedTransaction: parsedTransaction, + parsedTransaction: + foundScrapedEventInTx || transaction.status!.toString() === 'false' ? parsedTransaction : null, parsedEvents: nestedParsedEvents, }; }