Skip to main content
Copy-paste these configs into the Beam pipeline builder or use them with the API.

Filter logs by contract address

Monitor USDC transfer logs on Polygon by filtering to the USDC contract address.
USDC log filter pipeline in Beam UI
{
  "name": "USDC Transfer Monitor",
  "description": "Monitor USDC transfers on Polygon",
  "source": {
    "chain": "polygon",
    "entity": "log"
  },
  "transforms": [
    {
      "type": "redis_set_filter",
      "set_values": [
        "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359"
      ],
      "filter_expr": "root = this.address"
    }
  ],
  "sinks": [
    {
      "type": "kafka",
      "name": "usdc-logs"
    }
  ]
}
Uses filter_expr: "root = this.address" to match the address field (the contract that emitted the log) against the USDC contract.

Filter + JavaScript transform

Filter for DEX swap events by topic signature, then enrich with a JavaScript transform.
DEX trade parser pipeline in Beam UI
{
  "name": "DEX Trade Parser",
  "description": "Parse DEX swap events and extract trade details",
  "source": {
    "chain": "polygon",
    "entity": "log"
  },
  "transforms": [
    {
      "type": "redis_set_filter",
      "set_values": [
        "0xd78ad95fa46c994b6551d0da85fc275fe613ce37657fb8d5e3d130840159d822"
      ],
      "filter_expr": "root = this.topic0"
    },
    {
      "type": "v8",
      "script": "function transform(record) { record.parsed = true; return record; }"
    }
  ],
  "sinks": [
    {
      "type": "kafka",
      "name": "dex-trades"
    }
  ]
}
The set filter narrows to swap events using topic0 (the event signature hash). The v8 transform then enriches each matching record. Transforms are chained — data flows through the filter first, then the JavaScript.

ERC-20 token transfers on Base

Track USDC token transfers on Base using the erc20_token_transfer entity instead of raw logs.
Base USDC token transfer pipeline in Beam UI
{
  "name": "Base Token Transfer Tracker",
  "description": "Monitor ERC-20 token transfers on Base",
  "source": {
    "chain": "base",
    "entity": "erc20_token_transfer"
  },
  "transforms": [
    {
      "type": "redis_set_filter",
      "set_values": [
        "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913"
      ],
      "filter_expr": "root = this.address"
    }
  ],
  "sinks": [
    {
      "type": "kafka",
      "name": "base-usdc-transfers"
    }
  ]
}
The erc20_token_transfer entity provides pre-parsed transfer data (from, to, amount) so you don’t need to decode raw logs yourself.

Multiple contract addresses

Monitor USDC and USDT on Polygon in a single pipeline by providing multiple addresses in set_values.
Multi-token monitor pipeline in Beam UI
{
  "name": "Multi-Token Monitor",
  "description": "Monitor USDC and USDT on Polygon",
  "source": {
    "chain": "polygon",
    "entity": "log"
  },
  "transforms": [
    {
      "type": "redis_set_filter",
      "set_values": [
        "0x3c499c542cef5e3811e1192ce70d8cc03d5c3359",
        "0xc2132d05d31c914a87c6611c10748aeb04b58e8f"
      ],
      "filter_expr": "root = this.address"
    }
  ],
  "sinks": [
    {
      "type": "kafka",
      "name": "stablecoin-logs"
    }
  ]
}
All addresses in set_values are matched with OR logic — a record passes if its address matches any value in the set. You can include hundreds or thousands of addresses (100K+ supported for wallet set lookups).