Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 807 Bytes

HowToScan.md

File metadata and controls

28 lines (18 loc) · 807 Bytes

01.How to scan on-chain data

tokens

Point

KeyValue: On-chain data ----> SQL: Relational database

How to read on-chain data?

  1. Real-time data:
    1. Call contract functions: e.g. Read Alice's deposit balance
  2. History data:
    1. Parsing Transaction Events: e.g. Keep a record of all deposits
    2. Call contract functions with block number
    3. Subscription Events

Key RPC APIs

  1. eth_call
  2. eth_getlogs
  3. eth_gettransactionreceipt
  4. Eth_balance

Example

  1. Show all deposits/withdraw records