Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: uni list mapping #766

Merged
merged 16 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,33 @@ There's a script that will fetch all images form the CowSwap list and store them
```bash
yarn downloadImages
```

### Generating Auxiliary Token Lists

To generate updated token lists from Coingecko and Uniswap:

```bash
yarn generateAuxLists
```

This script fetches and processes token data from both Coingecko and Uniswap APIs to create auxiliary token lists. These lists are used to enhance token metadata and support across different networks.

- Coingecko lists contain up to the top 500 tokens per chain, sorted by volume
- Uniswap lists are a combination of:
- Token for given chain already existing in the default Uniswap list
- Mainnet tokens, mapped to the target chain, via Coingecko api

The version and timestamp are bumped according to [token list standard](https://github.com/Uniswap/token-lists?tab=readme-ov-file#semantic-versioning).

#### Required Environment Variables

- `COINGECKO_API_KEY`: Your Coingecko API key (required for API access)

#### Generated Files

The script generates token list files in `src/public/` for the following networks:

- Ethereum (CoinGecko.1.json)
- Arbitrum (CoinGecko.42161.json, Uniswap.42161.json)
- Base (CoinGecko.8453.json, Uniswap.8453.json)
- Gnosis Chain (CoinGecko.100.json, Uniswap.100.json)
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"coingecko": "yarn run-script src/scripts/coingecko.js",
"downloadImages": "yarn run-script src/scripts/downloadImages",
"cowFi:tokens": "yarn run-script ./src/scripts/cowFi-tokens.js",
"coingeckoTop500": "node src/scripts/coingeckoTop500.js",
"generateAuxLists": "yarn run-script ./src/scripts/auxLists/index.ts",
"uniswapToGnosisChainList": "yarn run-script src/scripts/mapTokenListToBridge.ts 100 uniswap",
"coingeckoToGnosisChainList": "yarn run-script src/scripts/mapTokenListToBridge.ts 100 coingecko",
"coingeckoToArbitrumOneList": "yarn run-script src/scripts/mapTokenListToBridge.ts 42161 coingecko",
Expand Down Expand Up @@ -56,4 +56,4 @@
"prettier": "^3.0.3",
"typescript": "^5.2.2"
}
}
}
Loading
Loading