199 lines
6.3 KiB
Markdown
199 lines
6.3 KiB
Markdown
|
|
# Token List PR Review — How Each Repo Handles Token Lists
|
||
|
|
|
||
|
|
**Cloned repos:** `/home/intlc/projects/token-lists`, `chains`, `wallet-core`, `DefiLlama-Adapters`
|
||
|
|
**Last Updated:** 2026-02-28
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 1. Uniswap token-lists (`/home/intlc/projects/token-lists`)
|
||
|
|
|
||
|
|
### What it is
|
||
|
|
- **Schema + TypeScript package**, not a registry of token lists
|
||
|
|
- Defines the Uniswap token list JSON schema (`src/tokenlist.schema.json`)
|
||
|
|
- Schema ID: `https://uniswap.org/tokenlist.schema.json`
|
||
|
|
- Used by tokenlists.org, Uniswap Interface, MetaMask, etc.
|
||
|
|
|
||
|
|
### Token list format (from `example.tokenlist.json`)
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"name": "My Token List",
|
||
|
|
"logoURI": "ipfs://...",
|
||
|
|
"keywords": ["audited", "verified"],
|
||
|
|
"tags": { "stablecoin": { "name": "Stablecoin", "description": "..." } },
|
||
|
|
"timestamp": "2020-06-12T00:00:00+00:00",
|
||
|
|
"tokens": [
|
||
|
|
{
|
||
|
|
"chainId": 1,
|
||
|
|
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
|
||
|
|
"symbol": "USDC",
|
||
|
|
"name": "USD Coin",
|
||
|
|
"decimals": 6,
|
||
|
|
"logoURI": "ipfs://..."
|
||
|
|
}
|
||
|
|
],
|
||
|
|
"version": { "major": 1, "minor": 0, "patch": 0 }
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### Cross-chain (from `example-crosschain.tokenlist.json`)
|
||
|
|
- Same structure; tokens can have `extensions.bridgeInfo` mapping chainId → bridged address
|
||
|
|
- Each chain gets its own token entry with `chainId`
|
||
|
|
|
||
|
|
### PR process
|
||
|
|
- **This repo does NOT host token lists** — it only provides the schema
|
||
|
|
- To add a list: host it (GitHub Raw, IPFS, ENS) and submit to **tokenlists.org** via https://github.com/Uniswap/tokenlists-org/issues (template: "add list request")
|
||
|
|
- Or use your own URL (e.g. `explorer.d-bis.org/api/v1/report/token-list`)
|
||
|
|
|
||
|
|
### Chain 138 action
|
||
|
|
- Ensure `proxmox/token-lists/lists/dbis-138.tokenlist.json` validates against schema
|
||
|
|
- Host at GitHub Raw or explorer API
|
||
|
|
- Submit URL to tokenlists.org
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Chainlist / ethereum-lists/chains (`/home/intlc/projects/chains`)
|
||
|
|
|
||
|
|
### What it is
|
||
|
|
- **Chain metadata** (RPC, explorers, native currency) — not token lists
|
||
|
|
- Used by chainlist.org, wallets, MESC, etc.
|
||
|
|
- File: `_data/chains/eip155-{chainId}.json`
|
||
|
|
|
||
|
|
### Chain format (from `eip155-1.json`)
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"name": "Ethereum Mainnet",
|
||
|
|
"chain": "ETH",
|
||
|
|
"icon": "ethereum",
|
||
|
|
"rpc": ["https://mainnet.infura.io/...", "..."],
|
||
|
|
"features": [{"name": "EIP155"}, {"name": "EIP1559"}],
|
||
|
|
"faucets": [],
|
||
|
|
"nativeCurrency": { "name": "Ether", "symbol": "ETH", "decimals": 18 },
|
||
|
|
"infoURL": "https://ethereum.org",
|
||
|
|
"shortName": "eth",
|
||
|
|
"chainId": 1,
|
||
|
|
"networkId": 1,
|
||
|
|
"slip44": 60,
|
||
|
|
"explorers": [{ "name": "etherscan", "url": "https://etherscan.io", "standard": "EIP3091" }]
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### PR process
|
||
|
|
1. Add `_data/chains/eip155-138.json`
|
||
|
|
2. If using `icon`, add `_data/icons/defioraclemeta.json` (IPFS URL for logo)
|
||
|
|
3. Run `./gradlew run` and `npx prettier --write _data/*/*.json`
|
||
|
|
4. Open PR to https://github.com/ethereum-lists/chains
|
||
|
|
|
||
|
|
### Chain 138 status
|
||
|
|
- **Not present** (no eip155-138.json in chains repo)
|
||
|
|
- PR-ready: `proxmox/docs/04-configuration/pr-ready/eip155-138.json`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Trust Wallet wallet-core (`/home/intlc/projects/wallet-core`)
|
||
|
|
|
||
|
|
### What it is
|
||
|
|
- **Coin/chain registry** for Trust Wallet app
|
||
|
|
- `registry.json` — flat array of coins/chains
|
||
|
|
- EVM chains have: `id`, `name`, `coinId`, `symbol`, `blockchain`, `chainId`, `explorer`, `info.rpc`
|
||
|
|
|
||
|
|
### EVM chain format (from registry.json)
|
||
|
|
|
||
|
|
```json
|
||
|
|
{
|
||
|
|
"id": "ethereum",
|
||
|
|
"name": "Ethereum",
|
||
|
|
"coinId": 60,
|
||
|
|
"symbol": "ETH",
|
||
|
|
"decimals": 18,
|
||
|
|
"blockchain": "Ethereum",
|
||
|
|
"derivation": [{ "path": "m/44'/60'/0'/0/0" }],
|
||
|
|
"curve": "secp256k1",
|
||
|
|
"publicKeyType": "secp256k1Extended",
|
||
|
|
"chainId": "1",
|
||
|
|
"addressHasher": "keccak256",
|
||
|
|
"explorer": {
|
||
|
|
"url": "https://etherscan.io",
|
||
|
|
"txPath": "/tx/",
|
||
|
|
"accountPath": "/address/",
|
||
|
|
"sampleTx": "...",
|
||
|
|
"sampleAccount": "..."
|
||
|
|
},
|
||
|
|
"info": {
|
||
|
|
"url": "https://ethereum.org",
|
||
|
|
"source": "https://github.com/ethereum/go-ethereum",
|
||
|
|
"rpc": "https://mainnet.infura.io",
|
||
|
|
"documentation": "..."
|
||
|
|
}
|
||
|
|
}
|
||
|
|
```
|
||
|
|
|
||
|
|
### PR process
|
||
|
|
1. Add entry to `registry.json` (EVM: `blockchain: "Ethereum"`, `chainId`, `explorer`, `info.rpc`)
|
||
|
|
2. Run codegen: `cd codegen-v2 && cargo run -- new-evmchain 138` (or per their CLI)
|
||
|
|
3. Extend derivation tests
|
||
|
|
4. Open PR to https://github.com/trustwallet/wallet-core
|
||
|
|
|
||
|
|
### Chain 138 status
|
||
|
|
- **Not present**
|
||
|
|
- PR-ready: `proxmox/docs/04-configuration/pr-ready/trust-wallet-registry-chain138.json`
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. DefiLlama-Adapters (`/home/intlc/projects/DefiLlama-Adapters`)
|
||
|
|
|
||
|
|
### What it is
|
||
|
|
- **Protocol TVL adapters** — not token lists
|
||
|
|
- Each project (e.g. `dodo`, `1inch`) has `index.js` that exports `tvl(api)` per chain
|
||
|
|
- DefiLlama uses chain keys: `ethereum`, `bsc`, `polygon`, `arbitrum`, `avax`, `optimism`, `base`, etc.
|
||
|
|
|
||
|
|
### Adapter format (from `dodo/index.js`)
|
||
|
|
|
||
|
|
```javascript
|
||
|
|
const config = {
|
||
|
|
ethereum: { dvmFactory: '0x...', fromBlock: 10613640, ... },
|
||
|
|
arbitrum: { dvmFactory: '0x...', fromBlock: 226578, ... },
|
||
|
|
// Add new chain: chain138: { ... }
|
||
|
|
};
|
||
|
|
|
||
|
|
Object.keys(config).forEach(chain => {
|
||
|
|
module.exports[chain] = {
|
||
|
|
tvl: async (api) => {
|
||
|
|
// Fetch balances, return { 'ethereum:0xToken': balance }
|
||
|
|
}
|
||
|
|
};
|
||
|
|
});
|
||
|
|
```
|
||
|
|
|
||
|
|
### PR process
|
||
|
|
1. Add adapter under `projects/{protocol-name}/`
|
||
|
|
2. Export `tvl` (and optionally `staking`, `borrowed`) per chain
|
||
|
|
3. Chain 138 would need DefiLlama to add `chain138` as a supported chain key first (see docs.llama.fi)
|
||
|
|
4. Open PR to https://github.com/DefiLlama/DefiLlama-Adapters
|
||
|
|
|
||
|
|
### Chain 138 action
|
||
|
|
- DefiLlama may not have `chain138` as a chain key yet
|
||
|
|
- Check `helper/chains.js` or similar for supported chains
|
||
|
|
- If adding DODO/other protocol on Chain 138, add config entry + tvl logic
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## Summary: PR Targets by Repo
|
||
|
|
|
||
|
|
| Repo | Content | Chain 138 PR |
|
||
|
|
|------|---------|--------------|
|
||
|
|
| **token-lists** | Schema only; lists hosted elsewhere | N/A — use tokenlists.org issue to add list URL |
|
||
|
|
| **chains** | Chain metadata (eip155-138.json) | Add `_data/chains/eip155-138.json` |
|
||
|
|
| **wallet-core** | Coin/chain registry | Add entry to `registry.json` + codegen |
|
||
|
|
| **DefiLlama-Adapters** | Protocol TVL adapters | Add adapter for DODO/etc. on Chain 138 (if chain supported) |
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## References
|
||
|
|
|
||
|
|
- [PUBLICATION_LOCATIONS_MASTER](PUBLICATION_LOCATIONS_MASTER.md)
|
||
|
|
- [pr-ready/eip155-138.json](pr-ready/eip155-138.json)
|
||
|
|
- [pr-ready/trust-wallet-registry-chain138.json](pr-ready/trust-wallet-registry-chain138.json)
|
||
|
|
- [ADD_CHAIN138_TO_TRUST_WALLET](ADD_CHAIN138_TO_TRUST_WALLET.md)
|