Created
February 4, 2026 14:52
-
-
Save gayleQN/ceffb95987c2f51f3aeedb730e0e0fc5 to your computer and use it in GitHub Desktop.
Track Activity of Specific Builders Using Hypercore Streams on Quicknode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function main(payload) { | |
| const { data = [], metadata } = payload; | |
| const builders = new Set([ | |
| "0xb84168cf3be63c6b8dad05ff5d755e97432ff80b", | |
| ]); | |
| const matchedEvents = []; | |
| for (const block of data) { | |
| const events = Array.isArray(block?.events) ? block.events : []; | |
| for (const event of events) { | |
| const trade = event?.[1]; | |
| const builder = trade?.builder; | |
| if (typeof builder === "string" && builders.has(builder)) { | |
| matchedEvents.push(event); | |
| } | |
| } | |
| } | |
| if (matchedEvents.length === 0) { | |
| return null; | |
| } | |
| return { | |
| data: { | |
| events: matchedEvents, | |
| metadata, | |
| }, | |
| }; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://dashboard.quicknode.com/streams/new