Scout Chart Creator
  • Overview
  • Get Started
    • Tutorial 1: NMR Daily Transaction Count
    • Tutorial 2: LPT Weekly Volume (USD)
    • Tutorial 3: NMR vs LPT Daily comparison
  • Pipeline
    • Filter
    • Project
    • Group
      • Accumulators
    • Sort
    • Unwind
    • Custom
  • Data Source
    • Transactions
    • States
    • Contracts
    • Aragon
    • Livepeer
    • dYdX
    • Set
    • Token holders
  • Operators
    • Math operators
    • Logic operators
    • Function operators
    • Array operators
    • String operators
  • Config
  • Protocols
    • Dodo
      • 24H trade volume
      • Deposit & Withdraw
    • Livepeer
    • dYdX
      • Making sense of the trade data
    • MakerDao
    • Pickle Finance
      • Example: Daily deposit and withdraw of jar 0.88
      • Example: Listing all borrows of a strategy
  • FAQ
    • Dealing with "logs" field in "Transaction"
    • How to handle "Query Timeout" error?
    • How to use a variable in a Pipeline
  • Research
    • The circulating supply of DODO tokens
    • How are bitcoins doing on Ethereum? (as of Jan 20th 2021)
Powered by GitBook
On this page

Was this helpful?

  1. Pipeline

Filter

To filter the input data that matches your conditions before passing to the next step.

PreviousPipelineNextProject

Last updated 4 years ago

Was this helpful?

This is the required first step when building a pipeline. The most basic component in a Filter is called a condition. By using a combination of conditions, you can instruct the Filter to only process the data that matches your conditions. Let's look at an example:

To find all the Livepeer token (LPT) transactions which were initiated by the address 0x6bA604963 and happened before June 1st 2020.

A simple token transaction can be identified by two things: a log called "Transfer" and a log address. In this case, we look for the "Transfer" log and the log address 0x58b6A8A3302369DAEc383334672404Ee733aB239 which is the address of the Livepeer Token contract.

$$NOW - $$24H: Past 24 hours

$$NOW - $$30D: Past 30 Days

Sometimes the conditions can be a bit complicated. For example, you might run into a condition like (A and B) or (C and D) . To achieve that, you would need to use "grouping" . For example, let's try to find the transactions which happened after 2020-08-01 and contain the log "TournamentCreated" or transactions which happened before 2020-05-04and contain the log "Unbond".

Tips on how to deal with a dynamic date range: For example if you want to display certain transactions in the past 24 hours, you can use a combination of system reserved words (start with $$): "NOW", "24H", "30D" to achieve that:

💡
Understand "Filter" in 4 minutesLoom
Understand "Filter" in 4 minutes
A and B and C
(A and B) or (C and D)
Show me everything that happened in the past 24 hours
Logo