> ## Documentation Index
> Fetch the complete documentation index at: https://docs.monad.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# How to index every WMON transfer using QuickNode Streams

In this guide, you will learn how to use QuickNode Streams to index every [WMON](https://testnet.monadvision.com/token/0xFb8bf4c1CC7a94c73D209a149eA2AbEa852BC541) transfer, including internal transactions, on Monad Testnet.

## What is QuickNode Streams?

[QuickNode Streams](https://www.quicknode.com/docs/streams/getting-started) is a web3 data streaming solution supporting real-time and historical Monad data that offers:

* **Reliable Data Delivery** - Exactly-once, guaranteed delivery, seamlessly integrating with your data lake. Streams ensures every block, receipt, or trace is delivered exactly-once in the order of dataset finality, preventing issues like corrupt or missing data
* **Real-Time Data Consistency** - Consistent, live data streaming
* **Efficient Historical Data Handling** - Configurable date ranges and destinations for streamlined historical data management
* **Easy Integration** - Simple setup through a user-friendly interface
* **Transparent User Experience** - Clear logging, metrics, and usage tracking

## Setup Guide

### 1. Initial setup

1. Sign up for [QuickNode](https://dashboard.quicknode.com/?prompt=signup) and log into your dashboard.

2. Click on "Streams" in the left sidebar.

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/1.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=45af743f3b05e07e8893b71d3adf5c95" alt="QuickNode Dashboard" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/1.png" />

3. Click on "Create Stream".

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/2.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=298f9cc7938b656fd8019b91dceabf5f" alt="Create Stream Button" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/2.png" />

### 2. Configure Stream range

1. Give your stream a name. In this example we will name it `monad-quicknode-stream`.

2. In the "Network" section, select `Monad` from the dropdown.

3. In the "Stream Start" section you can choose to start the stream from the latest block or from a specific block number.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/3.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=c6eed146a40724537dc658df231b8f84" alt="Stream Configuration" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/3.png" />

4. In the "Stream End" section you can choose to end the stream until manually paused or at a specific block number.

5. In the "Latest block delay" section, you can set a block number as a delay in receiving data. For this guide we will receive data as soon as it is available.<br /><br />For example: If the block delay is `3`, you will receive data only when there is **new data available** for `3` blocks including latest block, this helps in case there is a reorg.

6. In the "Restream on reorg" section you can decide if you would like to get updated data restreamed in case of a reorg. For this guide we will keep this off.

7. Once done click "Next".

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/4.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=54aa6a2c7ebc006c5e90a54a5a3fade0" alt="Additional Settings" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/4.png" />

### 3. Set up dataset

1. In the "Dataset" dropdown you can select the dataset of your choice according to the use case. For this guide we will select `Block with Receipts` since we want to filter logs with events emitted by WMON contract.

* Optional: Enable "Batch messages" to receive multiple blocks in a single message. This can be useful when the stream is not starting from the latest block.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/5.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=bf3c8e7153b1342bd24bda88017774e0" alt="Dataset Selection" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/5.png" />

2. Feel free to test it out by entering a block number and clicking "Fetch payload".

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/6.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=debec8a048b8005069230c4810e28aba" alt="Raw Payload Example" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/6.png" />

### 4. Create WMON Transfer filter

1. In the "Modify the stream payload" section, you can define filters by clicking **"Customize your payload"**. For this guide, we will filter to only retrieve receipts involving WMON transfers.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/7.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=8e1f01eac7cbe4c6f28effe53eb909f8" alt="modify stream image" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/7.png" />

2. QuickNode has a set of filter templates. Select the **Decoded ERC20 transfers** template:

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/8.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=d03402848962df2305c136f0d5023a81" alt="image for filter" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/8.png" />

3. The editor will appear:

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/9.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=ec754b7b195591df6ab402af673765c5" alt="image of filter editor" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/9.png" />

The current filter allows all ERC20 transfers through. Replace the filter code with:

```js lines theme={null}
function main(stream) {  
  const erc20Abi = `[{
    "anonymous": false,
    "inputs": [
      {"indexed": true, "type": "address", "name": "from"},
      {"indexed": true, "type": "address", "name": "to"},
      {"indexed": false, "type": "uint256", "name": "value"}
    ],
    "name": "Transfer",
    "type": "event"
  }]`;
  
  const data = stream.data ? stream.data : stream;
  
  // Decodes logs from the receipts that match the Transfer event ABI
  var result = decodeEVMReceipts(data[0].receipts, [erc20Abi]);
  
  // Filter for receipts with decoded logs
  result = result.filter(receipt => {
        // Check if there are any ERC20 transfers
        if(receipt.decodedLogs) {
            // Check if there are any WMON transfers
            receipt.decodedLogs = receipt.decodedLogs.filter(log => log.address == "0xFb8bf4c1CC7a94c73D209a149eA2AbEa852BC541");
            
            // Return receipt if there logs which indicate a WMON transfer.
            return receipt.decodedLogs.length > 0;
        }

        // Return nothing if there are no ERC20 transfers.
        return false;
    });
  
  return { result };
}
```

4. Test the filter with "Run test"

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/10.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=785e53afb0ceeec4744ba77291881590" alt="run test image" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/10.png" />

5. "Save & close" to save the filter.

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/11.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=de37ea8a1fc4ad93db19a482924aed09" alt="save & close image" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/11.png" />

6. Click "Next"

### 5. Set up Stream destination

For this guide we will keep the stream destination simple and use `Webhook` as the "Destination Type".

1. Let's use a site like [Svix Play](https://www.svix.com/play/) to quickly get a webhook and test the stream.

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/12.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=86707a59c23625dee43dd9d2d0580814" alt="svix play image" width="3020" height="1572" data-path="static/img/guides/indexers/quicknode-streams/12.png" />

2. Copy the webhook url from Svix Play:

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/13.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=26db768937957f5379075027250b86a5" alt="svix play copy url image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/13.png" />

3. In QuickNode:

* Select `Webhook` as destination type
* Paste your webhook URL
* We can keep the rest of the settings as default

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/14.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=82115bb2f75230195488472879744f48" alt="webhook dropdown image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/14.png" />

4. Click on "Check Connection" to test the webhook url. Check if you received the "PING" message in the Svix Play dashboard.

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/15.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=78479d82f42a7fb1f3e49361b15c536a" alt="check connection image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/15.png" />

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/16.png?fit=max&auto=format&n=c3ZcPFY7YVeS_v57&q=85&s=0baa20bf87e23a3b9a92520c1fd1a164" alt="ping message image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/16.png" />

5. Click "Send Payload" to send a test payload to the webhook.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/17.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=23f8bc7e7f931792e604101467c877fe" alt="add send payload image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/17.png" />

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/18.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=fcb343228f0fab68e78be58a6e002bce" alt="svix payload image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/18.png" />

6. Finally click "Create a Stream" to create the stream.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/19.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=fd0c433eb457899661f7f19d9b7bc19a" alt="create stream image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/19.png" />

### 6. Launch and Monitor

You should now be able to see the stream delivering the messages to the webhook!

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/20.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=205d9d177d072b55d5cbf3cb2ec4ad1f" alt="stream delivering image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/20.png" />

<img src="https://mintcdn.com/monadfoundation-40611fb6/c3ZcPFY7YVeS_v57/static/img/guides/indexers/quicknode-streams/1.gif?s=77b30c3b9d9d3bdc444270b3b7eebeed" alt="svix streaming receiving message video" width="800" height="417" data-path="static/img/guides/indexers/quicknode-streams/1.gif" />

You can pause the stream by clicking the switch in the top right corner.

<img src="https://mintcdn.com/monadfoundation-40611fb6/5Mt9_Scj9fq4fC68/static/img/guides/indexers/quicknode-streams/21.png?fit=max&auto=format&n=5Mt9_Scj9fq4fC68&q=85&s=9a43a8b593176fa0bc2d2990397d1570" alt="pause switch image" width="3020" height="1576" data-path="static/img/guides/indexers/quicknode-streams/21.png" />

## Next Steps

* Monitor your stream's performance in the QuickNode dashboard
* Adjust filter parameters as needed
* Connect to your production webhook endpoint when ready

Your stream will now track all WMON transfers until manually paused or until reaching your specified end block.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.