MCPcopy
hub / github.com/DefiLlama/chainlist

github.com/DefiLlama/chainlist @main sqlite

repository ↗ · DeepWiki ↗
85 symbols 196 edges 460 files 4 documented · 5%
README

Chainlist

Add a chain

Submit a PR that adds a new file to the constants/additionalChainRegistry folder. The new file should be named chainid-{chainid_number}.js and the contents should follow this structure:

{
  "name": "Ethereum Mainnet",
  "chain": "ETH",
  "rpc": [
    "https://eth.llamarpc.com",
  ],
  "faucets": [],
  "nativeCurrency": {
    "name": "Ether",
    "symbol": "ETH",
    "decimals": 18
  },
  "features": [{ "name": "EIP155" }, { "name": "EIP1559" }],
  "infoURL": "https://ethereum.org",
  "shortName": "eth",
  "chainId": 1,
  "networkId": 1,
  "icon": "ethereum",
  "explorers": [{
    "name": "etherscan",
    "url": "https://etherscan.io",
    "icon": "etherscan",
    "standard": "EIP3091"
  }]
}

Add an RPC to a chain that is already listed

If you wish to add your RPC, please submit a PR modifying constants/extraRpcs.js to add your RPC to the given chains.

API

The following API returns all the data in our website, including chain data along with all of their RPCs:

https://chainlist.org/rpcs.json

Core symbols most depended-on inside this repo

fetchWithCache
called by 11
utils/fetch.js
populateChain
called by 5
utils/fetch.js
isObject
called by 4
utils/fetch.js
generateChainData
called by 4
utils/fetch.js
sendDiscordMessage
called by 4
scripts/build-msg.js
renderProviderText
called by 3
utils/index.js
isTestnet
called by 3
utils/index.js
useAccount
called by 3
hooks/useAccount.jsx

Shape

Function 82
Class 2
Method 1

Languages

TypeScript100%

Modules by API surface

utils/fetch.js11 symbols
utils/index.js8 symbols
hooks/useRPCData.js7 symbols
components/AdBanner/index.js6 symbols
tests/check-duplicate-keys.js4 symbols
scripts/build-msg.js4 symbols
purge-cache.js4 symbols
pages/_document.js4 symbols
hooks/useFilteredChains.jsx3 symbols
hooks/useAddToNetwork.jsx3 symbols
pages/zh/chain/[chain].js2 symbols
pages/index.js2 symbols

Dependencies from manifests, versioned

@ariakit/react0.2.17 · 1×
@hypelab/sdk-react1.1.0 · 1×
@tanstack/react-query4.44.0 · 1×
autoprefixer10.5.0 · 1×
axios1.16.0 · 1×
dotenv16.6.1 · 1×
fathom-client3.7.2 · 1×
next14.2.35 · 1×
next-intl2.22.1 · 1×
node-fetch2.7.0 · 1×
postcss8.5.14 · 1×
react18.3.1 · 1×

For agents

$ claude mcp add chainlist \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact