davidgasquez / gitcoin-grants-data-portal

🌲 Open source, serverless, and local-first data hub for Gitcoin Grants data!
https://grantsdataportal.xyz/
MIT License
26 stars 3 forks source link

Add 'chain_metadata' model family #21

Closed DistributedDoge closed 8 months ago

DistributedDoge commented 8 months ago

Current dataset contains a few places where chain_id is used. Reports may want to include links to chain-explorers or human readable name for any chain.

This PR builds chain_metadata table with additional information about chains indexer is operating on (most notably: name, native_currency, info_url, rpc, explorers , chain_id, network_id).

To achieve this, two models were built:

  1. raw_chain_metadata model loads data from https://chainid.network/chains.json.
  2. chain_metadata model transforms table to match naming conventions

As it stands raw_chain_metadata model depends on raw_rounds to fetch list of interesting chain_ids.