Overview
The Ring Subgraph
Ring uses multiple subgraphs for indexing and organizing data from the Ring smart contracts. These subgraphs are hosted on The Graph and can be used to query Ring data.
Versions and Production Endpoints
Each version of Ring for each chain has its own dedicated subgraph. As hosted subgraphs have been depreciated, you will now need to call through their decentralized subgraphs.
Each subgraph has a dedicated endpoint for querying data, as well as a page on The Graph explorer that exposes the schema and available fields to query.
Creating an API Key
API Keys can be created by users inside the Studio. This key will be included into the endpoint to associate a consumers usage to their billing.
v4 (Mainnet)
- Subgraph
- Graphql Endpoint:
https://gateway.thegraph.com/api/<YOUR_API_KEY_HERE>/subgraphs/id/DiYPVdygkfjDWhbxGSqAQxwBKmfKnkWQojqeM2rkLb3G - Code: https://github.com/RingProtocol/v4-subgraph
v3 (Mainnet)
- Subgraph
- Graphql Endpoint:
https://gateway.thegraph.com/api/<YOUR_API_KEY_HERE>/subgraphs/id/5zvR82QoaXYFyDEKLZ9t6v9adgnptxYpKpSbxtgVENFV - Code: https://github.com/RingProtocol/v3-subgraph
v2 (Mainnet)
- Subgraph
- Graphql Endpoint:
https://gateway.thegraph.com/api/<YOUR_API_KEY_HERE>/subgraphs/id/A3Np3RQbaBA6oKJgiwDJeo5T3zrYfGHPWFYayMwtNDum - Code: https://github.com/RingProtocol/v2-subgraph
v1 (Mainnet)
- Explorer Page
- Graphql Endpoint:
https://gateway.thegraph.com/api/<YOUR_API_KEY_HERE>/subgraphs/id/ESnjgAG9NjfmHypk4Huu4PVvz55fUwpyrRqHF21thoLJ - Code: https://github.com/graphprotocol/uniswap-subgraph
v3 Subgraphs for other chains
| Chain | V3 |
|---|---|
| Arbitrum | Subgraph |
| Base | Subgraph |
| Optimism | Subgraph |
| Polygon | Subgraph |
| BSC | Subgraph |
| Avalanche | Subgraph |
| Celo | Subgraph |
| Blast | Subgraph |