For this use case, we’re going to track Uniswap v2, v3, and v4 swap events. Notably, this will also pick up any protocols that have forked from Uniswap.Here’s a transformation function to pull out all of those events from an EVM block:
If we save the above code as swaps.js, then we can leverage it to test against any EVM network + block using the test endpoint. Here’s how we could do it as a CURL request:
The second, and final step, is simply deploying the pipeline! Use an existing webhook or head over to webhook.site to get a temporary one.You can create the pipeline with the following payload: