Skip to content

Commit 6834ac8

Browse files
authored
docs: add coingeckoId and bridgeInfo extension fields to tokenlist guide (#204)
* docs: add coingeckoId and bridgeInfo extension fields to tokenlist guide * rename Token Extensions to Token Data * revert: rename back to Token Extensions * docs: simplify token extensions table
1 parent 19f8a43 commit 6834ac8

1 file changed

Lines changed: 43 additions & 1 deletion

File tree

src/pages/quickstart/tokenlist.mdx

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,56 @@ As an example, here's Tempo's tokenlist, fetched from [tokenlist.tempo.xyz/list/
3838
"symbol": "PiUSD",
3939
"decimals": 6,
4040
"chainId": 4217,
41-
"address": "0x..."
41+
"address": "0x...",
42+
"extensions": {
43+
"chain": "tempo",
44+
"coingeckoId": "pi-usd"
45+
}
4246
}
4347
```
4448

4549
3. **Add icon** to `data/<chain_id>/icons/<address>.svg` (lowercase address) in `apps/tokenlist`
4650

4751
4. **Submit PR** with as much information as you think is helpful for review.
4852

53+
54+
### Token Extensions
55+
56+
Tokens support optional `extensions` for richer metadata:
57+
58+
| Field | Description |
59+
|-------|-------------|
60+
| `chain` | Always `"tempo"` by convention |
61+
| `coingeckoId` | [CoinGecko](https://www.coingecko.com) identifier for price mapping |
62+
| `label` | Display label override (used by the Explorer) |
63+
| `bridgeInfo` | Origin chain and contract info for bridged tokens |
64+
65+
For **bridged tokens**, include `bridgeInfo` so aggregators like DeFi Llama can automatically map to the canonical asset:
66+
67+
```json
68+
{
69+
"extensions": {
70+
"chain": "tempo",
71+
"coingeckoId": "usd-coin",
72+
"bridgeInfo": {
73+
"sourceChainId": 1,
74+
"sourceAddress": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
75+
}
76+
}
77+
}
78+
```
79+
80+
For **native tokens** (e.g., PathUSD), omit `bridgeInfo`:
81+
82+
```json
83+
{
84+
"extensions": {
85+
"chain": "tempo",
86+
"coingeckoId": "pathusd"
87+
}
88+
}
89+
```
90+
4991
### Icon Requirements
5092

5193
- Format: SVG

0 commit comments

Comments
 (0)