{"id":13746724,"url":"https://github.com/Uniswap/token-lists","last_synced_at":"2025-05-09T07:31:14.195Z","repository":{"id":37609194,"uuid":"271311700","full_name":"Uniswap/token-lists","owner":"Uniswap","description":"📚 The Token Lists specification","archived":false,"fork":false,"pushed_at":"2024-08-19T17:22:36.000Z","size":329,"stargazers_count":1534,"open_issues_count":362,"forks_count":1096,"subscribers_count":170,"default_branch":"main","last_synced_at":"2025-05-04T06:02:54.307Z","etag":null,"topics":["erc20","tokens","uniswap"],"latest_commit_sha":null,"homepage":"https://tokenlists.org","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Uniswap.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-10T15:17:31.000Z","updated_at":"2025-05-02T12:36:49.000Z","dependencies_parsed_at":"2024-03-25T22:26:57.948Z","dependency_job_id":"f06c3b1e-e821-49ad-be23-3aa397abd9fd","html_url":"https://github.com/Uniswap/token-lists","commit_stats":{"total_commits":136,"total_committers":22,"mean_commits":6.181818181818182,"dds":"0.38235294117647056","last_synced_commit":"f57d6be149b47a69c62fd3b3f77d8594b5fdf653"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uniswap%2Ftoken-lists","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uniswap%2Ftoken-lists/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uniswap%2Ftoken-lists/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Uniswap%2Ftoken-lists/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Uniswap","download_url":"https://codeload.github.com/Uniswap/token-lists/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253209300,"owners_count":21871631,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["erc20","tokens","uniswap"],"created_at":"2024-08-03T06:00:59.786Z","updated_at":"2025-05-09T07:31:09.178Z","avatar_url":"https://github.com/Uniswap.png","language":"TypeScript","funding_links":[],"categories":["Automated Market Maker (AMM)","TypeScript"],"sub_categories":[],"readme":"# @uniswap/token-lists (beta)\n\n[![Tests](https://github.com/Uniswap/token-lists/workflows/Tests/badge.svg)](https://github.com/Uniswap/token-lists/actions?query=workflow%3ATests)\n[![npm](https://img.shields.io/npm/v/@uniswap/token-lists)](https://unpkg.com/@uniswap/token-lists@latest/)\n\nThis package includes a JSON schema for token lists, and TypeScript utilities for working with token lists.\n\nThe JSON schema represents the technical specification for a token list which can be used in a dApp interface, such as the Uniswap Interface.\n\n## What are token lists?\n\nUniswap Token Lists is a specification for lists of token metadata (e.g. address, decimals, ...) that can be used by any dApp interfaces that needs one or more lists of tokens.\n\nAnyone can create and maintain a token list, as long as they follow the specification.\n\nSpecifically an instance of a token list is a [JSON](https://www.json.org/json-en.html) blob that contains a list of \n[ERC20](https://github.com/ethereum/eips/issues/20) token metadata for use in dApp user interfaces.\nToken list JSON must validate against the [JSON schema](https://json-schema.org/) in order to be used in the Uniswap Interface.\nTokens on token lists, and token lists themselves, are tagged so that users can easily find tokens.\n\n## JSON Schema $id\n\nThe JSON schema ID is [https://uniswap.org/tokenlist.schema.json](https://uniswap.org/tokenlist.schema.json)\n\n## Validating token lists\n\nThis package does not include code for token list validation. You can easily do this by including a library such as \n[ajv](https://ajv.js.org/) to perform the validation against the JSON schema. The schema is exported from the package\nfor ease of use.\n\n```typescript\n\nimport { schema } from '@uniswap/token-lists'\nimport Ajv from 'ajv'\nimport addFormats from 'ajv-formats'\nimport fetch from 'node-fetch'\n\nconst ARBITRUM_LIST = 'https://bridge.arbitrum.io/token-list-42161.json'\n\nasync function validate() {\n  const ajv = new Ajv({ allErrors: true, verbose: true })\n  addFormats(ajv)\n  const validator = ajv.compile(schema);\n  const response = await fetch(ARBITRUM_LIST)\n  const data = await response.json()\n  const valid = validator(data)\n  if (valid) {\n    return valid\n  }\n  if (validator.errors) {\n    throw validator.errors.map(error =\u003e {\n      delete error.data\n      return error\n    })\n  }\n}\n\nvalidate()\n  .then(console.log(\"Valid List.\"))\n  .catch(console.error)\n\n```\n\n## Authoring token lists\n\n### Manual\n\nThe best way to manually author token lists is to use an editor that supports JSON schema validation. Most popular\ncode editors do, such as [IntelliJ](https://www.jetbrains.com/help/idea/json.html#ws_json_schema_add_custom) or \n[VSCode](https://code.visualstudio.com/docs/languages/json#_json-schemas-and-settings). Other editors\ncan be found [here](https://json-schema.org/implementations.html#editors).\n\nThe schema is registered in the [SchemaStore](https://github.com/SchemaStore/schemastore), and any file that matches\nthe pattern `*.tokenlist.json` should \n[automatically utilize](https://www.jetbrains.com/help/idea/json.html#ws_json_using_schemas) \nthe JSON schema for the [supported text editors](https://www.schemastore.org/json/#editors).\n\nIn order for your token list to be able to be used, it must pass all JSON schema validation.\n\n### Automated\n\nIf you want to automate token listing, e.g. by pulling from a smart contract, or other sources, you can use this\nnpm package to take advantage of the JSON schema for validation and the TypeScript types.\nOtherwise, you are simply working with JSON. All the usual tools apply, e.g.:\n\n```typescript\nimport { TokenList, schema } from '@uniswap/token-lists'\n\n// generate your token list however you like.\nconst myList: TokenList = generateMyTokenList();\n\n// use a tool like `ajv` to validate your generated token list\nvalidateMyTokenList(myList, schema);\n\n// print the resulting JSON to stdout\nprocess.stdout.write(JSON.stringify(myList));\n```\n\n## Semantic versioning\n\nLists include a `version` field, which follows [semantic versioning](https://semver.org/).\n\nList versions must follow the rules:\n\n- Increment major version when tokens are removed\n- Increment minor version when tokens are added\n- Increment patch version when tokens already on the list have minor details changed (name, symbol, logo URL, decimals)\n\nChanging a token address or chain ID is considered both a remove and an add, and should be a major version update.\n\nNote that list versioning is used to improve the user experience, but not for security, i.e. list versions are not meant\nto provide protection against malicious updates to a token list; i.e. the list semver is used as a lossy compression\nof the diff of list updates. List updates may still be diffed in the client dApp.\n\n## Deploying your list\n\nOnce you have authored the list, you can make it available at any URI. Prefer pinning your list to IPFS \n(e.g. via [pinata.cloud](https://pinata.cloud)) and referencing the list by an ENS name that resolves to the \n[contenthash](https://eips.ethereum.org/EIPS/eip-1577).\n\nIf hosted on HTTPS, make sure the endpoint is configured to send an access-control-allow-origin header to avoid CORS errors.\n\n### Linking an ENS name to the list\n\nAn ENS name can be assigned to an IPFS hash via the [contenthash](https://eips.ethereum.org/EIPS/eip-1577) text record.\nThis is the preferred way of referencing your list.\n\n## Examples\n\nYou can find a simple example of a token list in [test/schema/example.tokenlist.json](test/schema/example.tokenlist.json).\n\nA snapshot of the Uniswap default list encoded as a token list is found in [test/schema/bigexample.tokenlist.json](test/schema/bigexample.tokenlist.json).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUniswap%2Ftoken-lists","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FUniswap%2Ftoken-lists","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FUniswap%2Ftoken-lists/lists"}