Developers can create their own SubGraph and create a pull-request of their ipfs_hash and deployed.
REI has provided The Graph, a decentralized protocol for indexing and querying data from blockchains.
- IPFS: A peer-to-peer hypermedia protocol designed to preserve and grow humanity's knowledge by making the web upgradeable, resilient, and more open.
Init graph from contract
graph init --product hosted-service --from-contract 0xC437190E5c4F85EbBdE74c86472900b323447603
- Protocol - ethereum
- Name - In format
[group]/[name]It will be part of endpoint
- Ethereum network - any (will edit later)
After successfully generate the project, the following structure are generated
network should be
- kind: ethereum
- name: FoodcourtFactory
- event: PairCreated(indexed address,indexed address,address,uint256)
npm run codegen
buildand upload to ipfs server to get
graph build --ipfs http://localhost:5001 subgraph.yaml
Build completed: Qm____HASH____
After deploy and indexing is done, you should get endpoint like this to query your analytics data