简体   繁体   中英

How to get circulating supply of a token on Ethereum?

I want to get a circulating supply to calculate the marketcap of erc20 token.
In usual, we can check it on etherscan.io.
For example: https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#tokenInfo
But I do not want to get it from third party api, hope to get from on-chain directly.
Is there anyway to solve this issue?

You can all totalSupply() function on the token ERC-20 smart contract using its ABI.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM