Skip to main content

How to use Filters with Streams

Updated on
Sep 25, 2024

21 min read

Overview

Creating an end-to-end data pipeline for blockchain data can be complex. This is where Streams comes to assist. Streams is a real-time blockchain data solution that allows users to retrieve historical and real-time blockchain data to several destinations (e.g., Webhook, PostgreSQL, Snowflake, etc.). Not only can Streams get you blockchain data to where you need it, but you can also filter the data you receive before it reaches your destination, preventing you from parsing or paying for unwanted data.

In this guide, we will show you how to utilize Streams to retrieve real-time blockchain data and Filters to selectively parse the data you need and send it to your Webhook destination. We'll showcase this by filtering swaps on Uniswap V3 and aggregating them into a single JSON file. This is particularly effective for Streams with a specified starting and ending block, combining all the receipts into one file.

What You Will Do


  • Create a Stream on QuickNode
  • Filter incoming Stream data and send it to the Webhook destination
  • Aggregate Uniswap V3 swaps from your Webhook destination into a JSON file

What You Will Need


Prepare the Webhook

Set Up Project Directory

Navigate into the directory you want to create your project in and create the following virtual environment using Python:

python -m venv venv
source venv/bin/activate

Install Flask

Then, install Flask, which is a web development framework we'll use to set an API route that our Stream will send blockchain data to:

pip install Flask

Prepare Python Script

Next, create a file called app.py in the same directory and input the following code:

from flask import Flask, request, jsonify
import json
import logging
import os

app = Flask(__name__)
logging.basicConfig(level=logging.DEBUG)

receipts_file = 'combined_receipts.json'
all_receipts = []

def load_data():
"""Load existing receipts data from the file into memory."""
global all_receipts
if os.path.exists(receipts_file):
try:
with open(receipts_file, 'r') as f:
all_receipts = json.load(f)
logging.info("Data loaded successfully from file.")
except Exception as e:
logging.error(f"Error loading data: {str(e)}")

@app.route('/webhook', methods=['POST'])
def webhook():
"""Handle incoming webhook requests to process and save receipts data."""
logging.info("Received a request!")
try:
if request.is_json:
data = request.get_json()
logging.debug(f"Received data: {data}")
if data and 'data' in data:
for item in data['data']:
if 'filteredReceipts' in item and item['filteredReceipts']:
all_receipts.extend(item['filteredReceipts'])
logging.debug(f"Processed receipts: {item['filteredReceipts']}")
else:
logging.warning("No 'data' key found in the JSON or 'data' key is empty")
else:
logging.error("Request content type is not JSON")
return jsonify({"error": "Content type must be 'application/json'"}), 200

save_data()
return jsonify({"status": "Data received and saved"}), 200
except Exception as e:
logging.error(f"Error processing request: {str(e)}")
return jsonify({"error": str(e)}), 500

def save_data():
"""Save the combined receipts data to a file."""
global receipts_file
try:
if os.path.exists(receipts_file):
with open(receipts_file, 'r') as f:
existing_receipts = json.load(f)
else:
existing_receipts = []

combined_receipts = existing_receipts + all_receipts

with open(receipts_file, 'w') as f:
json.dump(combined_receipts, f, indent=4)

logging.info("Data saved successfully to file.")
all_receipts.clear()
except Exception as e:
logging.error(f"Error saving data: {str(e)}")

if __name__ == '__main__':
load_data()
app.run(host='0.0.0.0', port=8000)

Let's recap the code.

First, we import the required dependencies, such as Flask, json, logging, and os. Then, we initialize a Flask instance and empty array all_receipts. We then define a route called /webhook with the command @app.route and set it up as POST route. Within the /webhook route, we'll check if the request content-type is application/json, then look at the response's filtered receipts and add them to the array (i.e., all_receipts). After processing the data, the save_data function writes the accumulated receipts to a file named combined_receipts.json and clears the list to prepare for future data. In any case the payload is not in JSON format or is missing necessary data, the script responds with an error.

Start the Flask Server

Now, to start the server, run the following command within the same directory:

python app.py

This will start your server locally on localhost at port 8000.

Set Up ngrok

The next step to make our Flask server live on a remote server, for this we'll use ngrok. First, you'll need to ensure that ngrok is installed and your ngrok account is authenticated with your authtoken.

You can set up authentication with the following ngrok command:

ngrok authtoken [your_authtoken_here]

Once authenticated, start the remote server:

ngrok http 8000

You'll see an output similar to this:

ngrok remote 8000

The URL shown forwards API calls to your localhost. Now that our Flask server is accessible publicly, we can move on to the next step, which is creating our Stream on QuickNode.

Set Up the Stream

Navigate to QuickNode Streams page and click Create Stream button.

On the Stream settings page, align the Stream to the following configuration:


  • Chain: Ethereum
  • Network: Mainnet
  • Dataset: Receipts
  • Stream start: Input a block number start value here
  • Stream end: Input a block number end value here
  • Stream payload: Modify the Stream before streaming

Then, utilize the following code to Filter the Stream. The code filters transaction receipts containing Uniswap V3 swaps. Feel free to modify the filter to suit your filtering criteria.

function main(data) {
try {
var data = data.streamData;
var filteredReceipts = [];
data.forEach(receipt => {
let relevantLogs = receipt.logs.filter(log =>
log.topics[0] === "0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67"
);
if (relevantLogs.length > 0) {
filteredReceipts.push(receipt);
}
});

return {
filteredReceipts
};
} catch (e) {
return {error: e.message};
}
}

You can click the Run Test button to ensure your filter is syntactically correct. You'll see an example response that tested your filter code on the Receipts dataset.

For purposes of retrieving historical data, you don't need to enable the re-org handling option, however if you want to stream real-time data, you can enable the Latest block delay or Restream on reorg feature to handle re-orgs. You can learn more about re-orgs here. Once the page is finished, click Next and you'll need to configure your Stream destination.

Then, on the Stream destination page, set up the destination as Webhook and configure it to align with the following details below. If a field is not mentioned, you can leave it as-is.


After filling in the details, click the Test Destination button to verify the setup. This will send a sample of real data from Streams (raw or filtered, depending on your configuration) along with any custom headers you've defined.

Finally, click the Create a Stream button. Once the Stream has started, check the combined_receipts.json file in your project directory to see if the data is being saved correctly.

You'll see data similar to the following:

[
{
"status": "0x1",
"cumulativeGasUsed": "0x68c6f",
"logs": [
{
"address": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x00000000000000000000000088e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"0x0000000000000000000000009def7cde171841a9f0724124ca0b01a622d749e4"
],
"data": "0x000000000000000000000000000000000000000000000000000000258d374bbb",
"blockHash": "0xc905fe077d226558d3b6a2bc639884b9781b020437eeaaf523553e82adf6b644",
"blockNumber": "0x130442c",
"blockTimestamp": "0x6650a6bf",
"transactionHash": "0x6fe22c82b1cd99f7fd9182e8eb868553370849105449004b5cf9c74da5f4c443",
"transactionIndex": "0x2",
"logIndex": "0xd",
"removed": false
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000009def7cde171841a9f0724124ca0b01a622d749e4",
"0x00000000000000000000000088e6a0c2ddd26feeb64f039a2c41296fcb3f5640"
],
"data": "0x000000000000000000000000000000000000000000000002594b71a4d5ee53c1",
"blockHash": "0xc905fe077d226558d3b6a2bc639884b9781b020437eeaaf523553e82adf6b644",
"blockNumber": "0x130442c",
"blockTimestamp": "0x6650a6bf",
"transactionHash": "0x6fe22c82b1cd99f7fd9182e8eb868553370849105449004b5cf9c74da5f4c443",
"transactionIndex": "0x2",
"logIndex": "0xe",
"removed": false
},
{
"address": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000009def7cde171841a9f0724124ca0b01a622d749e4",
"0x0000000000000000000000009def7cde171841a9f0724124ca0b01a622d749e4"
],
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffffffda72c8b445000000000000000000000000000000000000000000000002594b71a4d5ee53c1000000000000000000000000000000000000400388e482fbc934c0066081e9f0000000000000000000000000000000000000000000000000f1a828618b323899000000000000000000000000000000000000000000000000000000000002f62f",
"blockHash": "0xc905fe077d226558d3b6a2bc639884b9781b020437eeaaf523553e82adf6b644",
"blockNumber": "0x130442c",
"blockTimestamp": "0x6650a6bf",
"transactionHash": "0x6fe22c82b1cd99f7fd9182e8eb868553370849105449004b5cf9c74da5f4c443",
"transactionIndex": "0x2",
"logIndex": "0xf",
"removed": false
}
],
"logsBloom": "0x00000000010000000000000000000000000000000000000000000000040000000000000000000000000008400000000002000000080020000000000000800000000000000000000808000008000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010000800000000000000000000000000000000000000000000010000000000000000000000000000000000200000000000000000000000000000000000002000000008000000000002000000000000000000000000000000000000000000000000000000000000200000000000000010000000000000000000800000000000000000000000",
"type": "0x2",
"transactionHash": "0x6fe22c82b1cd99f7fd9182e8eb868553370849105449004b5cf9c74da5f4c443",
"transactionIndex": "0x2",
"blockHash": "0xc905fe077d226558d3b6a2bc639884b9781b020437eeaaf523553e82adf6b644",
"blockNumber": "0x130442c",
"gasUsed": "0x1d9f7",
"effectiveGasPrice": "0xa8246f9fc",
"from": "0x93793bd1f3e35a0efd098c30e486a860a0ef7551",
"to": "0x9def7cde171841a9f0724124ca0b01a622d749e4",
"contractAddress": null
},
{
"status": "0x1",
"cumulativeGasUsed": "0xc62b8",
"logs": [
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0xf",
"removed": false
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x000000000000000000000000ebfeb540282bbea9721c4d486f53c609b87f95da"
],
"data": "0x0000000000000000000000000000000000000000000000000853a0d2313c0000",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x10",
"removed": false
},
{
"address": "0x66e564819340cc2f54abceb4e49941fa07e426b4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000ebfeb540282bbea9721c4d486f53c609b87f95da",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x000000000000000000000000000000000000000000000000036697761f973fa4",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x11",
"removed": false
},
{
"address": "0xebfeb540282bbea9721c4d486f53c609b87f95da",
"topics": [
"0x1c411e9a96e071241c2f21f7726b17ae89e3cab4c78be50e062b03a9fffbbad1"
],
"data": "0x00000000000000000000000000000000000000000000000050ea511347ec7722000000000000000000000000000000000000000000000000cdda1c0209b77814",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x12",
"removed": false
},
{
"address": "0xebfeb540282bbea9721c4d486f53c609b87f95da",
"topics": [
"0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000853a0d2313c0000000000000000000000000000000000000000000000000000036697761f973fa40000000000000000000000000000000000000000000000000000000000000000",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x13",
"removed": false
},
{
"address": "0x68bbed6a47194eff1cf514b50ea91895597fc91e",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000002b8574482d62d8df670dfd3be15f2f092941284e",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x0000000000000000000000000000000000000000000b4f18646f6874fb65b31d",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x14",
"removed": false
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000002b8574482d62d8df670dfd3be15f2f092941284e"
],
"data": "0x00000000000000000000000000000000000000000000000004db732547630000",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x15",
"removed": false
},
{
"address": "0x2b8574482d62d8df670dfd3be15f2f092941284e",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0xfffffffffffffffffffffffffffffffffffffffffff4b0e79b90978b049a4ce300000000000000000000000000000000000000000000000004db7325476300000000000000000000000000000000000000000000000a7c404a6cd2bb64e76782000000000000000000000000000000000000000000002e45a21439ca94d0d3aefffffffffffffffffffffffffffffffffffffffffffffffffffffffffffd551f",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x16",
"removed": false
},
{
"address": "0x66e564819340cc2f54abceb4e49941fa07e426b4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x000000000000000000000000a4ef9c8f5ee1ccfb9cf4499ab7ee89bb7ac41caa",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x00000000000000000000000000000000000000000000000001fbf9b8f35e5746",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x17",
"removed": false
},
{
"address": "0x68bbed6a47194eff1cf514b50ea91895597fc91e",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x000000000000000000000000a4ef9c8f5ee1ccfb9cf4499ab7ee89bb7ac41caa"
],
"data": "0x0000000000000000000000000000000000000000000b4f18646f6874fb65b31d",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x18",
"removed": false
},
{
"address": "0xa4ef9c8f5ee1ccfb9cf4499ab7ee89bb7ac41caa",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0xfffffffffffffffffffffffffffffffffffffffffffffffffe0406470ca1a8ba0000000000000000000000000000000000000000000b4f18646f6874fb65b31d000000000000000000000000000000000000267903f285ae1d44c1860a03e09f000000000000000000000000000000000000000000000c0eacd5d9007b99e432000000000000000000000000000000000000000000000000000000000002ce67",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x19",
"removed": false
},
{
"address": "0x66e564819340cc2f54abceb4e49941fa07e426b4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000001ef4dea419b28c6622ea4e7b6e2a4186ff267ac8",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0x000000000000000000000000000000000000000000000000004b13787801e7e3",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x1a",
"removed": false
},
{
"address": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000001ef4dea419b28c6622ea4e7b6e2a4186ff267ac8"
],
"data": "0x00000000000000000000000000000000000000000000000000b1a2bc2ec50000",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x1b",
"removed": false
},
{
"address": "0x1ef4dea419b28c6622ea4e7b6e2a4186ff267ac8",
"topics": [
"0xc42079f94a6350d7e6235f29174924f928cc2ac818eb64fed8004e115fbcca67",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad"
],
"data": "0xffffffffffffffffffffffffffffffffffffffffffffffffffb4ec8787fe181d00000000000000000000000000000000000000000000000000b1a2bc2ec50000000000000000000000000000000000000000000191293fea73e228553ada5cf30000000000000000000000000000000000000000000000000982c07252b3adc50000000000000000000000000000000000000000000000000000000000002318",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x1c",
"removed": false
},
{
"address": "0x66e564819340cc2f54abceb4e49941fa07e426b4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x000000000000000000000000000000fee13a103a10d593b9ae06b3e05f2e7e1c"
],
"data": "0x0000000000000000000000000000000000000000000000000003a254e61b7fad",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x1d",
"removed": false
},
{
"address": "0x66e564819340cc2f54abceb4e49941fa07e426b4",
"topics": [
"0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef",
"0x0000000000000000000000003fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"0x000000000000000000000000aec3212a9b44ee9846c86d1f8ba80c2d70a358a4"
],
"data": "0x00000000000000000000000000000000000000000000000005aa0252a4dbff20",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"blockTimestamp": "0x6650a6cb",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"logIndex": "0x1e",
"removed": false
}
],
"logsBloom": "0x002100000000000000000000d0000000000000010000000000000000080000000000000000000000000000000000000002800000080120800000000000000000000004080000000800000008000000200000000000000080000000008020000000000000000000200000000000000010001400010000000000004012000880000000000000000000010000000020010000000001000000080000004000000000100000000001000000000000000000020000000000000000000000000000000000000002240000000000000000000000001000000001801100000000000000000000280000000000000000000010002040001000000000c00000000000000000",
"type": "0x2",
"transactionHash": "0x6a35cbca8c9beae3b0305cb615bd16ce18af5624059c8158712d52ae4b30cba1",
"transactionIndex": "0x2",
"blockHash": "0xe1ec24b04014fb62f8742d8fc65ebe190957136cf7b0b02d70122e62d1461cc6",
"blockNumber": "0x130442d",
"gasUsed": "0x62a16",
"effectiveGasPrice": "0x1e67349d7",
"from": "0xaec3212a9b44ee9846c86d1f8ba80c2d70a358a4",
"to": "0x3fc91a3afd70395cd496c647d5a6cc9d4b2b7fad",
"contractAddress": null
}
]

& that's it! You just created an end-to-end blockchain data pipeline in minutes with Streams and filters. To learn more, check out the following resources below.

More resources


Final Thoughts

If you have questions, please contact us directly. If you have any ideas or suggestions, such as new destinations, features, metrics, or datasets, you want us to support.

Also, stay up to date with the latest by following us on Twitter and joining our Discord and Telegram announcement channel.

We ❤️ Feedback!

Let us know if you have any feedback or requests for new topics. We'd love to hear from you.

Share this guide