This is a general purpose tokenlist generation app that Balancer uses to generate it's tokenlist.
To make changes to the balancer tokenlist edit the files in src/tokenlists/balancer.
metadata.ts
- Edit this to change the highlevel tokenlist metadata.tokens/<network>.ts
- Edit this to add or remove tokens from the generated tokenlist. E.g Tokens for Arbitrum go intokens/arbitrum.ts
, tokens for Ethereum go intokens/ethereum.ts
.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:
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.
Although this repo is primarily for maintaing the balancer.tokenlist.json file, it can be forked and used to generate any kind of tokenlist. Simply run:
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.
To run the generate
command locally or in the Github actions of a fork you
will need to add these ENV variables:
INFURA_KEY=xxx
POKT_KEY=xxx
You'll need to sign up to each of those services to get keys: