I've forked Uniswap v2 contracts including WETH, and Deployed on Rinkeby. the functionality of Creating Pools, adding and removing liquidity works fine.
Now to get the stats like TVL, Volume, 24hr volume, 7-day volume, etc I 'v forked the subgraph code of this repo https://github.com/ArchTaqi/uniswap-v2-subgraph/tree/rinkeby and deployed it for rinkbey with added my factory contract and WETH address (that was passed to Router address of uniswap),
Afterward, I created a couple of Pairs of ERC-20 tokens, adding Liq. Now when I get stats from Subgraph it returns the token data but Zero in VolumeUSD, VolumeETH, and ReserveETH.
{
"data": {
"uniswapFactories": [
{
"id": "0xe7f16Be722602d5d12d3a1f5cFd91D34d8bbC0AC",
"pairCount": 7,
"totalVolumeUSD": "0",
"totalVolumeETH": "0"
}
]
}
}
and
{
"data": {
"pair": {
"token0": {
"id": "0x061d0c9f280781da4d550539bf43339a05be3e59",
"symbol": "OTG",
"name": "Octagon",
"derivedETH": "0"
},
"token1": {
"id": "0x33d499d24c5b0dba57860ec56dd3a79161073184",
"symbol": "WETH",
"name": "Wrapped Ether",
"derivedETH": "0"
},
"reserve0": "1000",
"reserve1": "1",
"reserveUSD": "0",
"trackedReserveETH": "0",
"token0Price": "1000",
"token1Price": "0.001",
"volumeUSD": "0",
"txCount": "1",
"totalSupply": "31.622776601683792319",
"reserveETH": "0"
}
}
}
See in above response totalVolumeUSD
, totalVolumeETH
, derivedETH
, reserveETH
, volumeUSD
, reserveUSD
is all zero.
I've also Created ETH, DAI pair added ETH, DAI and ETH/DAI addresses in the code. https://github.com/zsulocal/uniswap-v2-subgraph/compare/master...ArchTaqi:uniswap-v2-subgraph:rinkeby
But still getting Zero values, What's wrong here?