{"id":20002037,"url":"https://github.com/pooltogether/loot-box-subgraph","last_synced_at":"2025-05-04T15:33:52.313Z","repository":{"id":54247434,"uuid":"313796477","full_name":"pooltogether/loot-box-subgraph","owner":"pooltogether","description":"Subgraph for Loot Box","archived":false,"fork":false,"pushed_at":"2021-03-01T20:02:51.000Z","size":403,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-04-23T21:42:36.266Z","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/pooltogether.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}},"created_at":"2020-11-18T02:05:55.000Z","updated_at":"2024-04-23T21:42:36.267Z","dependencies_parsed_at":"2022-08-13T10:00:27.910Z","dependency_job_id":null,"html_url":"https://github.com/pooltogether/loot-box-subgraph","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Floot-box-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Floot-box-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Floot-box-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pooltogether%2Floot-box-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pooltogether","download_url":"https://codeload.github.com/pooltogether/loot-box-subgraph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224394371,"owners_count":17303906,"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:34.016Z","updated_at":"2024-11-13T05:19:34.518Z","avatar_url":"https://github.com/pooltogether.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## PoolTogether LootBox Subgraph\n\nThe official PoolTogether LootBox subgraph.\n\n#### Quick-use:\n\n```sh\n$ yarn clean \u0026\u0026 yarn prepare:local \u0026\u0026 graph codegen subgraph.local.yaml \u0026\u0026 graph build subgraph.local.yaml \u0026\u0026 yarn create:local \u0026\u0026 yarn deploy:local\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$ docker-compose up\n```\n\n###### Deploying the Subgraph Locally\n\nMake sure you've already deployed the LootBox contracts.  If you haven't done so, check out https://github.com/pooltogether/loot-box.  Once the contracts are deployed locally on ganache-cli (remember to use 0.0.0.0 as the IP address for the RPC endpoint), you can set up the subgraph:\n\n1. 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. Create a new local manifest called `subgraph.local.yaml`\n\n```bash\n$ cp subgraph.template.yaml subgraph.local.yaml\n```\n\n4. Update the corresponding addresses in `networks/local.json`\n\n\n5. Allocate the subgraph in the local Graph node\n\n```bash\n$ yarn create-local\n```\n\n6. Update the local subgraph\n\n```bash\n$ yarn deploy-local\n```\n\n###### Deploying to Rinkeby\n\nDeploy to staging:\n\n```\n$ yarn prepare:rinkeby \u0026\u0026 yarn gen:rinkeby \u0026\u0026 yarn build:rinkeby \u0026\u0026 yarn deploy:rinkeby-stg\n```\n\n# Tag a Release\n\nTo git tag a new release using the `version` in the `package.json` use the command:\n\n```\n$ yarn tag-release\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Floot-box-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpooltogether%2Floot-box-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpooltogether%2Floot-box-subgraph/lists"}