A community controlled repository of relay and parachain information in the Polkadot ecosystem.
The goals of this repo are:
- Provide a community-managed index of Polkadot parachains and their connection information (rpcs, chainspecs)
- Provide a source of chain and token assets across the ecosystem
- Enable developers to retrieve this information via an API suitable to their project (json/rest, npm soon™)
- Move towards a decentralised model
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 in the dist
directory of this repo.
The published files can be browsed at this URL: https://raw.githubusercontent.com/TalismanSociety/chaindata/main/dist/index.txt
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://raw.githubusercontent.com/TalismanSociety/chaindata/main/dist/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.
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.
- Identify the chain
id
fromchaindata.json
ortestnets-chaindata.json
- Add your logo (in
svg
format) toassets/chains/${id}.svg
- Identify the chain
id
from https://chainlist.org
Use the base-10 id (e.g.1
, or137
), not the base-16 id (e.g.0x1
, or0x89
) - Add your logo (in
svg
format) toassets/chains/${id}.svg
- Identify the token symbol (e.g.
KSM
) - Add your logo (in
svg
format) toassets/tokens/${symbol}.svg
- Install pnpm
- Clone the repo via
git clone [email protected]:TalismanSociety/chaindata.git
- Install the deps via
pnpm install
- Copy
.env.sample
to.env
and fill in the variables - Run the build via
pnpm build
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 |
---|---|---|
data/chaindata.json |
manual | A list of all parachains and relay chains in the Polkadot ecosystem |
data/testnets-chaindata.json |
manual | A list of all parachains and relay chains in the Polkadot ecosystem |
data/generated/chains-extras-cache.json |
automatic | Caches static data for each substrate chain |
data/evm-networks.json |
manual | List of EVM chains supported by default in Talisman |
data/generated/known-evm-networks.json |
automatic | List of EVM networks, generated from ethereum-lists |
data/known-evm-networks-overrides.json |
manual | Overrides to known-evm-networks.json , matched by chain id |
data/cache/known-evm-networks-icons-cache.json |
automatic | Caches images for each network defined in ethereum-lists |
data/cache/known-evm-tokens-cache.json |
automatic | Caches static data for ERC20 tokens |