Skip to content

Build Tokens Table #934

Closed
0 of 1 issue completed
Closed
0 of 1 issue completed
@MSilb7

Description

@MSilb7

Pre-Reqs:

Steps:

  1. Get list of ERC20/721/1155 tokens from either 1) logs (filter to token transfer events) or 2) token transfer pipelines
  2. Call the token contract using an RPC, and read values for relevant fields (i.e. name, symbol, decimals) - also assign a field for token standard
    i. Note: We also need to pull the mint/burn address for interop, but need to check what function this is.
  3. Build a tokens data table with the schema: blockchain | contract_address |symbol | name | decimals (if available) | token standard | ... [other columns]

Other Notes:

  • For table sizing, we may want to only select tokens once they've reached some total transfer volume (i.e. don't pull until a token has been transferred 10 times)
  • If tokens have upgradable/changeable storage values, we want to catch those (i.e. we need to see if the mint/burn changes for interop). So we may need some workflow where we regularly re-check tokens? And also we'd need to store the changelog table for each tokens (i.e. first run on date X get values, 1, 2, 3 - no changes until the pull on date Y, when we saw values 1, 2, 4).
  • If we want to build a historical token supply data source, we can call each token whenever it's transferred and pull totalSupply
  • Tokens must contain certain functions, per the standards (see ERC20), but tokens may contain any number of extra functions. There may be ~more that we want to try to pull if available?

Use cases:

  • Any token-based query or data model. Right now we pull from external APIs which are super cumbersome, we should have this data in our own database.
  • (If we call token supply) Total

Next steps:

  • Interop / SuperchainERC20 upgrade monitoring
  • Token prices data source
  • Token Supply

Sub-issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions