{"id":22873967,"url":"https://github.com/angleprotocol/subgraphs","last_synced_at":"2025-07-26T17:40:12.424Z","repository":{"id":44456398,"uuid":"422316399","full_name":"AngleProtocol/subgraphs","owner":"AngleProtocol","description":"📈 Subgraphs for the Angle Protocol","archived":false,"fork":false,"pushed_at":"2023-09-25T09:03:48.000Z","size":449,"stargazers_count":4,"open_issues_count":2,"forks_count":2,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-06T19:12:20.325Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AngleProtocol.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2021-10-28T18:35:50.000Z","updated_at":"2024-06-07T06:19:15.000Z","dependencies_parsed_at":"2024-12-13T14:32:23.876Z","dependency_job_id":"7a4fb086-014a-4d78-ba59-35768be7a473","html_url":"https://github.com/AngleProtocol/subgraphs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fsubgraphs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fsubgraphs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fsubgraphs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AngleProtocol%2Fsubgraphs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AngleProtocol","download_url":"https://codeload.github.com/AngleProtocol/subgraphs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252752060,"owners_count":21798723,"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-12-13T14:32:08.789Z","updated_at":"2025-05-06T19:12:31.025Z","avatar_url":"https://github.com/AngleProtocol.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Angle subgraphs\n\nTo run a graph-node locally in Docker: start docker deamon on your system and run:\n`docker-compose up`\nYou can then deploy your subgraphs using `yarn create-local \u0026\u0026 yarn deploy-local`\nWhen you're done, don't forget to clean up: `docker-compose down \u0026\u0026 rm -rf data`\n\n## Developpment setup\n\nThe following procedure will allow you to fork a remote network like Rinkeby or Mainnet, to make some local changes to it and then index it with a local graph-node instance.\nThis is very convenient to debug your subgraph with real network state without the latency and cost of making real transactions.\n\nFirst, fork a remote network with hardhat:\n```\nFORK=true yarn hardhat node --tags none --hostname 0.0.0.0\n```\n\nRun any script you want on this local fork to update its state, e.g:\n```\nyarn hardhat run myScript.ts --network localhost\n```\n\nPoint the ethereum RPC parameter in `docker-compose.yml` to localhost, e.g:\n\n`ethereum: 'rinkeby:http://host.docker.internal:8545'`\n\nKill, clean and relaunch graph-node containers via `docker-compose`:\n```\nsudo docker-compose down \u0026\u0026 sudo rm -rf data \u0026\u0026 sudo docker-compose up\n```\n\nUpload a subgraph to your node, e.g:\n```\ncd angle-subgraph-borrow\nyarn create-local \u0026\u0026 yarn deploy-local:rinkeby\n```\n\nThat's it, you can now make queries to your subgraph.\nA visual tool is available at http://localhost:8000/subgraphs/name/angle/sub/graphql\n\n## Fast Sync\nThe borrow subgraph has the particularity of updating its entities on every oracle price update. This can be disabled to decrease crash recovery time by setting `FAST_SYNC_THRESHOLD` to a recent date in `constants.ts`.\nOracle updates happening before this timestamp will be sampled to compute at most 1 oracle-induced refresh every 3 hours.\nUpdates happening above this timestamp will be processed normally.\nOnce crash is recovered, `FAST_SYNC_THRESHOLD` can be set back to `0`, and slower indexing can be relaunched in background to get better historical data.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fsubgraphs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fangleprotocol%2Fsubgraphs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fangleprotocol%2Fsubgraphs/lists"}