Issue with getTotalSupply on SUI for some tokens

Issue with getTotalSupply on SUI for some tokens

Hi everyone,

I’m trying to get the total supply of a token on the SUI blockchain using:

client.getTotalSupply({ coinType })

For most tokens, it works fine, but for some tokens, it fails.

Example:
Token: 0x5217def12dd5c456244d6cd643f4360736ba281c7b3cda1d7a7ed45a49119606::hopdog::HOPDOG

Error:

Cannot find object with type [0x2::coin::TreasuryCap<0x5217def12dd5c456244d6cd643f4360736ba281c7b3cda1d7a7ed45a49119606::hopdog::HOPDOG>] from [0x5217def12dd5c456244d6cd643f4360736ba281c7b3cda1d7a7ed45a49119606] package created objects.

Does anyone know why this happens and how to fix it? Any help would be appreciated!

Thanks! :blush: