ponder-sh / ponder

A backend framework for crypto apps
https://ponder.sh
MIT License
613 stars 95 forks source link

bug: request transaction receipts only for filters with `includeTransactionReceipt: true` #1128

Closed kyscott18 closed 1 week ago

kyscott18 commented 2 weeks ago

Description

Transaction receipts should only be fetched when a specific tx hash corresponds to a filter with includeTransactionReceipts: true.

The current logic is not granular enough and is wasteful.

https://github.com/ponder-sh/ponder/blob/5402ddcf3c751b979745c11afd6c56856e49ea68/packages/core/src/sync-realtime/index.ts#L492-L504

khaidarkairbek commented 1 week ago

Added the fix in the pull request above, would be perfect to get a feedback on the logic.