GithubHelp home page GithubHelp logo

ekaanth / chaindata Goto Github PK

View Code? Open in Web Editor NEW

This project forked from talismansociety/chaindata

0.0 0.0 0.0 170.08 MB

A community controlled repository of relay and parachain information in the Polkadot ecosystem.

Home Page: https://talismansociety.github.io/chaindata

License: GNU General Public License v3.0

JavaScript 19.28% TypeScript 80.72%

chaindata's Introduction

Chaindata

Talisman

api-link discord-link

A community controlled repository of relay and parachain information in the Polkadot ecosystem.

The goals of this repo are:

  1. Provide a community-managed index of Polkadot parachains and their connection information (rpcs, chainspecs)
  2. Provide a source of chain and token assets across the ecosystem
  3. Enable developers to retrieve this information via an API suitable to their project (json/rest, npm soon™)
  4. Move towards a decentralised model

Usage

The files in this repo, chaindata.json, testnets-chaindata.json and evm-networks.json are used to configure a GitHub workflow which scrapes information from each chain and publishes it as a collection of JSON files on GitHub Pages.

The published files can be browsed at this URL: https://talismansociety.github.io/chaindata

As an example, you could use this request to get a summary of all chains including the the names, logos, genesisHashes and address type prefixes:

const chainsSummaryUrl = "https://talismansociety.github.io/chaindata/chains/summary.json"
const summary = await fetch(chainsSummaryUrl).then(result => result.json())

For an example of a more advanced use-case, you can check out the Talisman wallet source code.
The wallet uses chaindata to populate a database of chains and tokens which is used for features like account balance subscriptions and sending funds.

Contributing

To make a contribution, please fork this repo and make your changes in your fork, then open a PR to merge your changes back into this repo.

To add chain or token logos:

Substrate chain logos

  1. Identify the chain id from chaindata.json or testnets-chaindata.json
  2. Add your logo (in svg format) to assets/chains/${id}.svg

EVM chain logos

  1. Identify the chain id from https://chainlist.org
    Use the base-10 id (e.g. 1, or 137), not the base-16 id (e.g. 0x1, or 0x89)
  2. Add your logo (in svg format) to assets/chains/${id}.svg

Token logos

  1. Identify the token symbol (e.g. KSM)
  2. Add your logo (in svg format) to assets/tokens/${symbol}.svg

To build the github pages endpoint locally:

  1. Install pnpm
  2. Clone the repo via
    git clone [email protected]:TalismanSociety/chaindata.git
  3. Install the deps via
    pnpm install
  4. Copy .env.sample to .env and fill in the variables
  5. Run the build via
    pnpm build

File structure

Some files are edited manually, some other are generated automatically as part of the CI.

The table below describes the purpose of each file and how it is edited.

File name Edit Type Purpose
chaindata.json manual A list of all parachains and relay chains in the Polkadot ecosystem
testnets-chaindata.json manual A list of all parachains and relay chains in the Polkadot ecosystem
chains-extras-cache.json automatic Caches static data for each substrate chain
evm-networks.json manual List of EVM chains supported by default in Talisman
known-evm-networks.json automatic List of EVM networks, generated from ethereum-lists
known-evm-networks-overrides.json manual Overrides to known-evm-networks.json, matched by chain id
known-evm-networks-icons-cache.json automatic Caches images for each network defined in ethereum-lists
known-evm-tokens-cache.json automatic Caches static data for ERC20 tokens
tokens-buyable.json manual List of tokens displayed in Talisman's Buy Tokens form

chaindata's People

Contributors

alecdwm avatar chaindata-ci-superuser[bot] avatar 0xkheops avatar jonathanpdunne avatar jahimaz avatar swamitlsm avatar danielharrison-flex avatar chidg avatar daniel-flex avatar tien avatar anaelleltd avatar ashi20192020 avatar danielvul avatar eteissonniere avatar ank4n avatar wi-ry avatar tugytur avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.