v2-subgraph
v2-subgraph copied to clipboard
What does this even do?
https://github.com/Uniswap/uniswap-v2-subgraph/blob/9692685423f9a16fa30a2cf08ceeff69fcdd8367/src/mappings/pricing.ts#L71
Ive ran test after test and it always returns 0.
token.derivedETH seems to only be set here
https://github.com/Uniswap/uniswap-v2-subgraph/blob/master/src/mappings/core.ts#L241
and its set by this function https://github.com/Uniswap/uniswap-v2-subgraph/blob/9692685423f9a16fa30a2cf08ceeff69fcdd8367/src/mappings/pricing.ts#L71
but this function references ANOTHER token.derivedETH, but if it never gets set anywhere its always 0, because something times zero is always zero. This function is everywhere.
Is it getting set somewhere else that im unaware of?
Just come across this while looking why it's zero.
The derivedETH for BNB is 0 but I see it on etherscan as 0.137450 Eth and I know it's not 0, so what's wrong here?
{
token(id: "0xb8c77482e45f1f44de1745f52c74426c631bdd52") {
name
symbol
decimals
derivedETH
}
}
{
"data": {
"token": {
"name": "BNB",
"symbol": "BNB",
"decimals": "18",
"derivedETH": "0"
}
}
}
I'm facing the same issue - the derivedETH
is always 0. @chrisfranko have you managed to workaround the problem?
That was a long time ago for me and I cant remember now
On Sun, 1 Oct 2023 at 14:39, Oleh Kalenyk @.***> wrote:
I'm facing the same issue - the derivedETH is always 0. @chrisfranko https://github.com/chrisfranko have you managed to workaround the problem?
— Reply to this email directly, view it on GitHub https://github.com/Uniswap/v2-subgraph/issues/82#issuecomment-1742163914, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA3BBMKU7HAT4J5O4KRMAHTX5G2F5ANCNFSM4Y2FI3PA . You are receiving this because you were mentioned.Message ID: @.***>
Hopefully it will help someone who is looking for the answear.
I've been facing the same issue and spent a couple of days figuring out the reason.
So the issue is the addresses you provide all over the place to the graph, like WETH_ADDRESS
and USDC_WETH_PAIR
. You should provide them in lower case
to make sure IDs in the graph are equal to the addresses provided, e.g.:
The address 0xa510358AA
96eB
9D
09b84a8D
9037EF
51F
010DA
086 should become '0xa510358aa
96eb
9d
09b84a8d
9037ef
51f
010da
086' and so on.
@chrisfranko possibly it will be interesting for you, just in case).