-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
totalsupply not working #149
Comments
Hey anyone working on it? |
@simple-marvin The team wrote The token.totalSupply is not a great field to try to utilize in this subgraph. When a token has a hard cap upon launch it should be fine, but we're making an eth call when the token is first recognized by the subgraph to get the totalSupply, then we don't update it afterwards. If they really want totalSupply for USDC, WETH, WSDT etc., this would probably need to be a different subgraph that can properly track this, or they can use RPC. |
@itsjerryokolo Thanks for the reponse. All totalSupplys are wrong, i know that weth, usdc, usdt,... have changing totalSupply, it just was an example (a bad example). The totalSupply field seems to return a random number or is wrong or i dont know how to read it. The ERC20 tokens from below have a completely wrong totalSupply and it's not just them, so far I haven't found a token that has a correct totalSupply. 0xb8a87405d9a4f2f866319b77004e88dff66c0d92 Query: Result: https://etherscan.io/token/0xaaeE1A9723aaDB7afA2810263653A34bA2C21C7a#readContract |
https://thegraph.com/explorer/subgraphs/A3Np3RQbaBA6oKJgiwDJeo5T3zrYfGHPWFYayMwtNDum?v=1&view=Playground&chain=arbitrum-one
or
https://thegraph.com/hosted-service/subgraph/ianlapham/uniswap-v2-dev
when i use one of the above links and the below query, it also shows me weird numbers
query:
{
tokens(first: 5, orderBy:tradeVolumeUSD orderDirection:desc) {
id
symbol
name
decimals
totalSupply
}
}
result:
{
"data": {
"tokens": [
{
"id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
"symbol": "WETH",
"name": "Wrapped Ether",
"decimals": "18",
"totalSupply": "15640"
},
{
"id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
"symbol": "USDC",
"name": "USD//C",
"decimals": "6",
"totalSupply": "14864"
},
{
"id": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"symbol": "USDT",
"name": "Tether USD",
"decimals": "6",
"totalSupply": "14448"
},
{
"id": "0xa47c8bf37f92abed4a126bda807a7b7498661acd",
"symbol": "UST",
"name": "Wrapped UST Token",
"decimals": "18",
"totalSupply": "14448"
},
{
"id": "0xc8d674114bac90148d11d3c1d33c61835a0f9dcd",
"symbol": "mNFLX",
"name": "Wrapped Mirror NFLX Token",
"decimals": "18",
"totalSupply": "14448"
}
]
}
token with correct totalSupply from etherscan:
weth - 15640 - 3276063798496846980898561
usdc - 14864 - 23398309739224635
usdt - 14448 - 44005847706828943
ust - 14448 - 295788247260048794239793908
mNFLX- 14448 - 3083201876426681305152
V3 shows the right totalSupply
https://thegraph.com/explorer/subgraphs/HUZDsRpEVP2AvzDCyzDHtdc64dyDxx8FQjzsmqSg4H3B?view=Playground&chain=arbitrum-one
The text was updated successfully, but these errors were encountered: