Automatically fetch a new token list every midnight (time local to host server) and update a list of tokens in repo (for each supported chain).
- install dependencies with
yarn install
- run
yarn tsc
to compile your typescript - run
yarn start
to run the script
1: mainnet 4: rinkeby 56: bsc 137: polygon 246: energyweb 1285: moonriver
You can checkout ManualVerification.md for instructions on how to use Postman to manually verify your token lists are being created correctly.
Keep in mind the PR's for adding a chain directly to this repository will only be accepted if they are supported on Datapolis, and will only work if there is an Ocean Protocol subgraph for that chain.
The file naming convention for token lists is standard in this repository as well as funcitons in datax.js:
chain<chainId>
You can add a chain to this script by just adding the chainId to the array passed to the main function, as well as adding the chain name to the chains object here The token list will then be created and kept in this repository.
Extensive changes to the request body, etc., are best done on a fork.