celo-org / celo-token-list

Celo's default token list
https://celo-org.github.io/celo-token-list/celo.tokenlist.json
3 stars 5 forks source link

Consider making it clearer how to consume the celo-token-list #56

Open arthurgousset opened 4 months ago

arthurgousset commented 4 months ago

I noticed the Github repo publishes a Github Page at https://celo-org.github.io/celo-token-list. I assume that's to make the celo.tokenlist.json accessible via HTTP requests to https://celo-org.github.io/celo-token-list/celo.tokenlist.json.

To start I added the URL in the repo description

image

  1. Consider highlighting the URL more clearly in the README, like we did with @celo/compliance:

You can make an API call to retrieve the latest OFAC sanctions list from

https://celo-org.github.io/compliance/ofac.sanctions.json

For example:

export async function getSanctionedAddresses(): Promise<string[]> {
    return await fetch("https://celo-org.github.io/compliance/ofac.sanctions.json")
        .then((response) => {
            return response.json();
        })
        .catch((err) => {
            console.log(err);
        });
}

[!TIP] No changes to your code will be necessary when the list is updated as this API will always return the latest version.

Source: celo-org/compliance > README.md

  1. Confirm we are not intending to publish this package to NPM like Uniswap does @uniswap/token-lists

I think we are intentionally not publishing this to NPM, but just double-checking.