The Graph App
A sample app for integrating The Graph with Chainlink price feeds to monitor address changes
The Graph App is a demo for The Graph queries that monitor address changes for given Chainlink price feed.
Setup
1. Clone the repository
https://github.com/thisonedev/vault.git2. Enter chainlink-graph-app directory
cd chainlink-graph-app3. Install dependencies
npm install4. Set up configs
Create .env file and add the following keys:
ENS_API- an API endpoint for ENS subgraph queriesRESOLVER_ADDRESS- a Chainlink resolver address for your price feed (e.g.BTC/USD)FEED_DOMAIN_ID- an ENS domain id for a corresponding Chainlink price feed (e.g.0xfb3362a97947a1804738d871b660275dff443b48fb7da009b2c605969b2045e9)AGGREGATOR_DOMAIN- an ENS domain for a corresponding Chainlink price feed (e.g.aggregator.btc-usd.data.eth)
The .env.example file has default values for BTC/USD pair.
Run one of the scripts
Aggregator Address Monitoring. Method A
This script monitors aggregator address changes for BTC/USD price feed via Resolver entity.
npm run ens-aggregator-aAggregator Address Monitoring. Method B
This script monitors aggregator address changes for BTC/USD price feed via Domain entity.
npm run ens-aggregator-b