{"id":13448909,"url":"https://github.com/graphprotocol/contracts","last_synced_at":"2025-05-16T03:07:06.857Z","repository":{"id":38285161,"uuid":"161252517","full_name":"graphprotocol/contracts","owner":"graphprotocol","description":"Contracts repository for The Graph protocol","archived":false,"fork":false,"pushed_at":"2025-05-09T19:11:14.000Z","size":35598,"stargazers_count":350,"open_issues_count":75,"forks_count":157,"subscribers_count":45,"default_branch":"main","last_synced_at":"2025-05-09T19:31:19.775Z","etag":null,"topics":["contracts","ethereum","graphprotocol","graphql","solidity","thegraph","thegraphprotocol"],"latest_commit_sha":null,"homepage":"https://thegraph.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/graphprotocol.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,"zenodo":null}},"created_at":"2018-12-11T00:01:48.000Z","updated_at":"2025-05-08T20:13:45.000Z","dependencies_parsed_at":"2023-12-11T14:31:12.113Z","dependency_job_id":"7f59823e-f74f-4d3c-b1c1-b104389b3000","html_url":"https://github.com/graphprotocol/contracts","commit_stats":{"total_commits":1173,"total_committers":21,"mean_commits":"55.857142857142854","dds":0.59846547314578,"last_synced_commit":"02eedcf9b7a593e75c9fdcbececa3f14bc784323"},"previous_names":[],"tags_count":131,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fcontracts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fcontracts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fcontracts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/graphprotocol%2Fcontracts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/graphprotocol","download_url":"https://codeload.github.com/graphprotocol/contracts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253314568,"owners_count":21889040,"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":["contracts","ethereum","graphprotocol","graphql","solidity","thegraph","thegraphprotocol"],"created_at":"2024-07-31T06:00:24.305Z","updated_at":"2025-05-16T03:07:01.849Z","avatar_url":"https://github.com/graphprotocol.png","language":"TypeScript","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://thegraph.com/\"\u003e\u003cimg src=\"https://storage.thegraph.com/logos/grt.png\" alt=\"The Graph\" width=\"200\"\u003e\u003c/a\u003e \n\u003c/p\u003e\n\n\u003ch3 align=\"center\"\u003eThe Graph Protocol\u003c/h3\u003e\n\u003ch4 align=\"center\"\u003eA decentralized network for querying and indexing blockchain data.\u003c/h4\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/graphprotocol/contracts/actions/workflows/build.yml\"\u003e\n    \u003cimg src=\"https://github.com/graphprotocol/contracts/actions/workflows/build.yml/badge.svg\" alt=\"Build\"\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/graphprotocol/contracts/actions/workflows/ci-contracts.yml\"\u003e\n    \u003cimg src=\"https://github.com/graphprotocol/contracts/actions/workflows/ci-contracts.yml/badge.svg\" alt=\"CI-Contracts\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"#packages\"\u003ePackages\u003c/a\u003e •\n  \u003ca href=\"#development\"\u003eDevelopment\u003c/a\u003e •\n  \u003ca href=\"#documentation\"\u003eDocs\u003c/a\u003e •\n  \u003ca href=\"#contributing\"\u003eContributing\u003c/a\u003e •\n  \u003ca href=\"#security\"\u003eSecurity\u003c/a\u003e •\n  \u003ca href=\"#license\"\u003eLicense\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n[The Graph](https://thegraph.com/) is an indexing protocol for querying networks like Ethereum, IPFS, Polygon, and other blockchains. Anyone can build and Publish open APIs, called subgraphs, making data easily accessible.\n\n## Packages\n\nThis repository is a Yarn workspaces monorepo containing the following packages:\n\n| Package | Latest version | Description |\n| --- | --- | --- |\n| [contracts](./packages/contracts) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fcontracts.svg)](https://badge.fury.io/js/@graphprotocol%2Fcontracts) | Contracts enabling the open and permissionless decentralized network known as The Graph protocol. |\n| [eslint-graph-config](./packages/eslint-graph-config) | - | Shared linting and formatting rules for TypeScript projects. |\n| [token-distribution](./packages/token-distribution) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Ftoken-distribution.svg)](https://badge.fury.io/js/@graphprotocol%2Ftoken-distribution) | Contracts managing token locks for network participants |\n| [sdk](./packages/sdk) | [![npm version](https://badge.fury.io/js/@graphprotocol%2Fsdk.svg)](https://badge.fury.io/js/@graphprotocol%2Fsdk) | TypeScript based SDK to interact with the protocol contracts |\n| [solhint-graph-config](./packages/solhint-graph-config) | - | Shared linting and formatting rules for Solidity projects. |\n\n\n## Development\n\n### Setup\nTo set up this project you'll need [git](https://git-scm.com) and [yarn](https://yarnpkg.com/) installed. Note that Yarn v4 is required to install the dependencies and build the project. \n\nFrom your command line:\n\n```bash\n# Enable Yarn v4\ncorepack enable\nyarn set version stable\n\n# Clone this repository\n$ git clone https://github.com/graphprotocol/contracts\n\n# Go into the repository\n$ cd contracts\n\n# Install dependencies\n$ yarn\n\n# Build projects\n$ yarn build\n```\n\n### Versioning and publishing packages\n\nWe use [changesets](https://github.com/changesets/changesets) to manage package versioning, this ensures that all packages are versioned together in a consistent manner and helps with generating changelogs.\n\n#### Step 1: Creating a changeset\n\nA changeset is a file that describes the changes that have been made to the packages in the repository. To create a changeset, run the following command from the root of the repository:\n\n```bash\n$ yarn changeset\n```\n\nChangeset files are stored in the `.changeset` directory until they are packaged into a release. You can commit these files and even merge them into your main branch without publishing a release.\n\n#### Step 2: Creating a package release\n\nWhen you are ready to create a new package release, run the following command to package all changesets, this will also bump package versions and dependencies:\n\n```bash\n$ yarn changeset version\n```\n\n### Step 3: Tagging the release\n\n__Note__: this step is meant to be run on the main branch.\n\nAfter creating a package release, you will need to tag the release commit with the version number. To do this, run the following command from the root of the repository:\n\n```bash\n$ yarn changeset tag\n$ git push --follow-tags\n```\n\n#### Step 4: Publishing a package release\n\n__Note__: this step is meant to be run on the main branch.\n\nPackages are published and distributed via NPM. To publish a package, run the following command from the root of the repository:\n\n```bash\n# Publish the package\n$ yarn npm publish --access public --tag \u003ctag\u003e\n```\n\nAlternatively, there is a GitHub action that can be manually triggered to publish a package.\n\n## Documentation\n\n\u003e Coming soon\n\nFor now, each package has its own README with more specific documentation you can check out.\n\n## Contributing\n\nContributions are welcomed and encouraged! You can do so by:\n\n- Creating an issue\n- Opening a PR\n\nIf you are opening a PR, it is a good idea to first go to [The Graph Discord](https://discord.com/invite/vtvv7FP) or [The Graph Forum](https://forum.thegraph.com/) and discuss your idea! Discussions on the forum or Discord are another great way to contribute.\n\n## Security\n\nIf you find a bug or security issue please go through the official channel, [The Graph Security Bounties on Immunefi](https://immunefi.com/bounty/thegraph/). Responsible disclosure procedures must be followed to receive bounties.\n\n## License\n\nCopyright \u0026copy; 2021 The Graph Foundation\n\nLicensed under [GPL license](LICENSE).\n","funding_links":[],"categories":["Resources","Educational resources","Web 3.0","NoSQL Databases"],"sub_categories":["Blockchain"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fcontracts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgraphprotocol%2Fcontracts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgraphprotocol%2Fcontracts/lists"}