简体   繁体   English

如何在以太坊上获得代币的流通供应?

[英]How to get circulating supply of a token on Ethereum?

I want to get a circulating supply to calculate the marketcap of erc20 token.我想获得一个流通供应来计算 erc20 代币的市值。
In usual, we can check it on etherscan.io.通常,我们可以在 etherscan.io 上进行检查。
For example: https://etherscan.io/token/0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48#tokenInfo例如: 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.但我不想从第三方 api 获取,希望直接从链上获取。
Is there anyway to solve this issue?有没有办法解决这个问题?

You can all totalSupply() function on the token ERC-20 smart contract using its ABI.您可以使用其 ABI 在代币 ERC-20 智能合约上的所有totalSupply() function。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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