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. Get Started

Tutorial 3: NMR vs LPT Daily comparison

PreviousTutorial 2: LPT Weekly Volume (USD)NextPipeline

Last updated 4 years ago

Was this helpful?

Let's build a bar chart to compare the daily transaction volume between Livepeer token (LPT) and Numerai token (NRM).

Step1: Use to find transactions which contain logs with name called "Transfer" and address of both tokens.

Many smart contracts have a log called Transfer (but with different parameters). Make sure you choose Transfer(from, to, value). If you are familiar with the raw data on Ethereum, the hash (also known as methodId) of Transfer(from, to, value) is: ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Don't forget to carry over blockTimestamp field with "blockTimestamp=Display" since it's not included in the above screenshot due to my screen size. We will need it in the next step.

At this point, we have made sure that each transaction from now on will only have Numerai and Livepeer token "Transfer" logs.

At this point, we are 100% certain that we have factored in all the possible scenarios. Now let's group!

Step5: Choose the bar chart and assign the right fields to both x and y axis. And that's it!

One day, you will get there!

Step2: Since each transaction could contain many different token transactions, it means each transaction could have multiple Transfer logs which belong to the same or different tokens. To make our life easier, use to get rid of token transactions which are not from Livepeer or Numerai.

Step3: Use and the operator "arraySize" to count how many token transfers per transactions. A transaction could contain more than one Livepeer token transfer or Numerai token transfer.

Step4: Use to do the final touch. Group by "blockTimestamp" and set the interval to "daily".

Seems like lots of steps, right? Well, as you get better, you will be able to combine Step2, 3 and 4 into one step like below:

Project
Project
Group
Group
Filter