Hello!
I’m trying to run this fairly simple query on a SushiSwap pool contract. I’m trying to find the total number of LP tokens issued by the contract:
{
ethereum {
address(address: {is: "0xfffae4a0f4ac251f4705717cd24cadccc9f33e06"}) {
smartContract {
attributes {
name
value
}
}
}
}
}
As-is, this query gives me a null result. However, if I delete the value clause, I do get a normal result (just not a very useful one!).
I’ve submitted a support request to Bitquery, but in the meantime, does anyone have any idea what’s going on and how to work around it?
What I’m ultimately trying to do is calculate the market value of an LP token for this pool. I’ve got the prices of the pool tokens from Coin Gecko, I’ve got the number of each tokens in the pool, so I can calculate the TVL for the pool. From there I planned to divide by the number of issued tokens to get the value per token.
Am I doing this the hard way?