https://github.com/balancer/tokenlists
https://github.com/balancer/tokenlists
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/balancer/tokenlists
- Owner: balancer
- License: mit
- Created: 2023-03-13T10:43:22.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2025-04-02T12:41:02.000Z (about 1 year ago)
- Last Synced: 2025-04-02T13:36:42.989Z (about 1 year ago)
- Language: TypeScript
- Size: 70.9 MB
- Stars: 34
- Watchers: 2
- Forks: 248
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Balancer tokenlists
This is a general purpose tokenlist generation app that Balancer uses to
generate it's
[tokenlist](https://github.com/balancer/tokenlists/blob/main/generated/balancer.tokenlist.json).
## Make changes to the Balancer tokenlist
To make changes to the balancer tokenlist edit the files in
[src/tokenlists/balancer](https://github.com/balancer/tokenlists/tree/main/src/tokenlists/balancer).
1. `metadata.ts` - Edit this to change the highlevel tokenlist metadata.
1. `tokens/.ts` - Edit this to add or remove tokens from the generated
tokenlist. E.g Tokens for Arbitrum go in `tokens/arbitrum.ts`, tokens for
Ethereum go in `tokens/ethereum.ts`.
1. `overwrites.ts` - Edit this to overwrite any token data that is incorrect
when generated automatically.
Once changes are made, the tokenlist can be regenerated by running:
```shell
npm run generate
```
This updates the generated file at `/generated/balancer.tokenlist.json`
**However, you do not need to run this command locally. Simply make changes to
the mentioned files and merge them with the `main` branch. Following this, an
autogenerated PR will be created to update the generated tokenlist files.**
## Create a new tokenlist
Although this repo is primarily for maintaining the balancer.tokenlist.json file,
it can be forked and used to generate any kind of tokenlist. Simply run:
```shell
npm run tokenlist:create my-new-tokenlist
```
This will create a new template tokenlist in `/src/tokenlists` with the
necessary files. Then, just add token addresses to the `tokens.ts` file and run
`npm run generate` to generate your tokenlist json file.
## Development
To run the `generate` command locally or in the Github actions of a fork you
will need to add these ENV variables:
```
DRPC_KEY=xxx
INFURA_KEY=xxx
ALCHEMY_KEY=xxx
COINGECKO_API_KEY=xxx
```
You'll need to sign up for each of those services to get keys:
- https://www.infura.io/
- https://www.pokt.network/