{"id":21082750,"url":"https://github.com/renproject/renvm-subgraph","last_synced_at":"2025-10-24T01:05:25.915Z","repository":{"id":42829427,"uuid":"258065601","full_name":"renproject/renvm-subgraph","owner":"renproject","description":"Subgraph for querying RenVM stats on EVM chains","archived":false,"fork":false,"pushed_at":"2022-12-07T00:39:51.000Z","size":20213,"stargazers_count":7,"open_issues_count":12,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2023-03-02T04:22:07.036Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://thegraph.com/explorer/subgraph/renproject/renvm","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/renproject.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-04-23T01:45:47.000Z","updated_at":"2022-12-11T08:01:15.000Z","dependencies_parsed_at":"2023-01-24T12:45:21.060Z","dependency_job_id":null,"html_url":"https://github.com/renproject/renvm-subgraph","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Frenvm-subgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Frenvm-subgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Frenvm-subgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/renproject%2Frenvm-subgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/renproject","download_url":"https://codeload.github.com/renproject/renvm-subgraph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225419562,"owners_count":17471434,"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-19T20:15:12.564Z","updated_at":"2025-10-24T01:05:25.842Z","avatar_url":"https://github.com/renproject.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Subgraph](./subgraph.png)\n\n### RenVM Subgraph\n\nCurrently deployed at\n\n-   Mainnet: https://thegraph.com/explorer/subgraph/renproject/renvm\n-   Testnet: https://thegraph.com/explorer/subgraph/renproject/renvm-testnet\n\n## Examples\n\n### Send a QUERY with cURL:\n\nShell command:\n\n```sh\ncurl \\\n  -X POST \\\n  -H \"Content-Type: application/json\" \\\n  --data '{ \"query\": \"{ transactions { id, amount } }\" }' \\\n  https://api.thegraph.com/subgraphs/name/renproject/renvm\n```\n\n### Get daily BTC volume\n\nGraphQL query:\n\n```graphql\n{\n    renVM(id: 1) {\n        volume {\n            symbol\n            amountInUsd\n        }\n    }\n    epoches(first: 5, orderBy: timestamp, orderDirection: desc) {\n        numberOfDarknodes\n        rewardShares {\n            symbol\n            amountInUsd\n        }\n    }\n}\n```\n\n## Developing locally\n\nTo setup the graph node, follow the instructions at \u003chttps://thegraph.com/docs/quick-start\u003e.\n\nSome things to note:\n\n1. Pass `-d` to `ganache-cli` so generate contracts with the same addresses as `config/ganache.json`.\n2. If you restart `ganache-cli`, you may have to run `sudo rm -r data/postgres` in the `graph-node/docker` directory.\n\nOnce everything is set-up, restarting will look like:\n\n```sh\n# In darknode-sol\nyarn\nyarn ganache-cli -h 0.0.0.0 -d\n# In a different terminal\nyarn truffle migrate\n\n# In graph-node\ncd docker\nsudo rm -rf data/postgres\n./setup.sh # (may have to update docker-compose.yml manually, replace ethereum address with `host.docker.internal` or correct IP)\ndocker-compose up\n\n# In renvm-subgraph\nyarn\nyarn create:local\nyarn deploy:local\n```\n\n## Deploying to thegraph.com\n\nAuthorize, using the AUTH_CODE found in your thegraph.com account:\n\n```sh\ngraph auth https://api.thegraph.com/deploy/ \u003cAUTH_CODE\u003e\n```\n\nThen run one of:\n\n```sh\nyarn deploy:mainnet\nyarn deploy:testnet\nyarn deploy:devnet\n```\n\nNote: only run one deployment at a time, as they all have to generate `./src/_config.ts` with values specific to the network.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Frenvm-subgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frenproject%2Frenvm-subgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frenproject%2Frenvm-subgraph/lists"}