{"id":20001987,"url":"https://github.com/pooltogether/pooltogether-subgraph-v3","last_synced_at":"2025-05-04T15:33:46.781Z","repository":{"id":42823439,"uuid":"267119395","full_name":"pooltogether/pooltogether-subgraph-v3","owner":"pooltogether","description":"Subgraph currently hosted on The Graph network for reading existing PoolTogether smart contract data.","archived":false,"fork":false,"pushed_at":"2023-01-24T04:02:06.000Z","size":1534,"stargazers_count":18,"open_issues_count":16,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-04-23T21:42:39.415Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://pooltogether.com","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/pooltogether.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}},"created_at":"2020-05-26T18:21:06.000Z","updated_at":"2024-02-03T14:35:49.000Z","dependencies_parsed_at":"2023-02-13T16:45:18.779Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/pooltogether-subgraph-v3","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-subgraph-v3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-subgraph-v3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-subgraph-v3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Fpooltogether-subgraph-v3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/pooltogether-subgraph-v3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224394292,"owners_count":17303895,"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":"2024-11-13T05:19:21.255Z","updated_at":"2024-11-13T05:19:22.528Z","avatar_url":"https://github.com/pooltogether.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://github.com/pooltogether/pooltogether--brand-assets\"\u003e\n    \u003cimg src=\"https://github.com/pooltogether/pooltogether--brand-assets/blob/977e03604c49c63314450b5d432fe57d34747c66/logo/pooltogether-logo--purple-gradient.png?raw=true\" alt=\"PoolTogether Brand\" style=\"max-width:100%;\" width=\"200\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cbr /\u003e\n\n## PoolTogether v3 Subgraph\n\nThe official PoolTogether v3 subgraph.\n\n#### Quick-use:\n\n```sh\n$ yarn clean \u0026\u0026 yarn prepare:local \u0026\u0026 graph gen:local \u0026\u0026 yarn create:local \u0026\u0026 yarn deploy:local\n```\n\n###### For Kovan:\n```sh\n$ yarn clean \u0026\u0026 yarn prepare:kovan \u0026\u0026 yarn gen:kovan \u0026\u0026 yarn deploy:kovan\n```\n\n###### For Rinkeby:\n```sh\n$ yarn clean \u0026\u0026 yarn prepare:rinkeby \u0026\u0026 yarn gen:rinkeby \u0026\u0026 yarn deploy:rinkeby\n```\n\n#### Local Setup\n\nFirst you'll need to setup a graph node, then you can deploy the project to it.\n\n###### Local Graph Node\n\n1. Clone the Graph Node repo:\n\n```bash\n$ git clone https://github.com/graphprotocol/graph-node/\n```\n\n2. Enter the dir\n\n```bash\n$ cd graph-node/docker\n```\n\n3. If using Linux, fix the local IP address:\n\n```bash\n$ ./setup.sh\n```\n\n4. Spin up the node\n\n```bash\n$ sudo docker-compose up\n```\n\n###### Deploying the PoolTogether Contracts Locally\n\nMake sure you've already deployed the PoolTogether contracts.  If you haven't done so, check out the [contracts repo](https://github.com/pooltogether/pooltogether-contracts-v3).  \n\n1. Change the `localhost` target url to 0.0.0.0:8545 in `builder.network.js`\n\n2. Run `yarn` to install the contract repo dependencies.\n\n3. Start a local ganache-cli instance using `ganache-cli -h 0.0.0.0 --chainId 31337`. This facilates the local subgraph docker node to observe the local blockchain instance.\n\n4. In a different terminal window, run `yarn deploy localhost` to compile and deploy the smart contracts to the local ganache-cli blockchain instance.\n\n5. In a different terminal window, run `yarn console localhost` to interact with the contracts.\n\n\n\n###### Deploying the Subgraph Locally\n\nOnce the contracts are deployed, you can now set up the subgraph:\n\n1. In this subgraph repo, install deps\n\n```bash\n$ yarn\n```\n\n2. Ensure generated code is up-to-date:\n\n```bash\n$ yarn codegen\n```\n\n3. Update `networks/local.json` to the correct contract addresses deployed locally\n\n4. Run `yarn clean \u0026\u0026 yarn prepare:local \u0026\u0026 graph gen:local \u0026\u0026 yarn create:local \u0026\u0026 yarn deploy:local`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-subgraph-v3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Fpooltogether-subgraph-v3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Fpooltogether-subgraph-v3/lists"}