{"id":29177853,"url":"https://github.com/gitcoinco/gitcoin-chain-data","last_synced_at":"2025-09-18T13:47:12.883Z","repository":{"id":238598608,"uuid":"796949765","full_name":"gitcoinco/gitcoin-chain-data","owner":"gitcoinco","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-13T08:42:29.000Z","size":4567,"stargazers_count":3,"open_issues_count":4,"forks_count":4,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-06-16T11:48:24.554Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gitcoinco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-05-06T23:24:31.000Z","updated_at":"2025-04-04T02:15:30.000Z","dependencies_parsed_at":"2024-05-19T17:52:36.198Z","dependency_job_id":"aec6ace1-b048-449e-8be2-59a2a2a77f51","html_url":"https://github.com/gitcoinco/gitcoin-chain-data","commit_stats":null,"previous_names":["codenamejason/gitcoin-common-data"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gitcoinco/gitcoin-chain-data","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitcoinco%2Fgitcoin-chain-data","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitcoinco%2Fgitcoin-chain-data/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitcoinco%2Fgitcoin-chain-data/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitcoinco%2Fgitcoin-chain-data/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gitcoinco","download_url":"https://codeload.github.com/gitcoinco/gitcoin-chain-data/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gitcoinco%2Fgitcoin-chain-data/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263013738,"owners_count":23399815,"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":[],"created_at":"2025-07-01T18:08:54.069Z","updated_at":"2025-09-18T13:47:07.807Z","avatar_url":"https://github.com/gitcoinco.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitcoin Common Data Package\n\nThe Gitcoin Common Data Package sources all the chains and supported tokens used by Gitcoin for:\n- Grants-stack DApps\n- Grants-stack-indexer\n- Any other side-car aiming to leverage the supported chains/tokens\n\n## Installation\n\nTo install the package, use the following command:\n\n```bash\nnpm i \"@gitcoin/gitcoin-chain-data\"\n```\n\n## Functions\n\nThe package exposes the following functions, found in [index.ts](./src/index.ts):\n\n- `getChains()`: Returns `TChain[]`\n- `getChainById(chainId)`: Returns `TChain`\n- `getTokens()`: Returns `TToken[]`\n- `getTokensByChainId(chainId)`: Returns `TToken[]`\n- `getTokenByChainIdAndAddress(chainId, address)`: Returns `TToken`\n\nThe types can be found in [types.ts](./src/types.ts).\n\n## Adding a New Chain\n\nTo add a new chain, follow these steps:\n\n1. Run the following command:\n   ```bash\n   npm run new-chain \u003cCHAIN_ID\u003e\n   ```\n2. A new file will be created at `src/data/chains/\u003cCHAIN_ID\u003e/chain.ts`.\n3. Update `chain.ts` with the specific data for the new chain.\n4. Update `src/chains/chainImportMap.ts` to add the new chain\n\n## Adding a New Token to a Chain\n\nTo add a new token to an existing chain:\n\n1. Open the file at `src/data/chains/\u003cCHAIN_ID\u003e/chain.ts`.\n2. Update the `tokens` array to include the new token information.\n\n## Contributing\n\nTo contribute to the project, follow these steps:\n\n### Install Dependencies\n\nInstall the necessary dependencies with:\n\n```bash\nnpm i\n```\n\n### Build\n\nBuild the project with:\n\n```bash\nnpm run build\n```\n\n### Publish\n\nTo publish the package, use:\n\n```bash\nnpm publish\n```\n\n---\n\nThis version improves readability, structure, and clarity. It provides clear instructions for installation, usage, adding new chains and tokens, and contributing to the project.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoinco%2Fgitcoin-chain-data","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgitcoinco%2Fgitcoin-chain-data","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgitcoinco%2Fgitcoin-chain-data/lists"}