5 Star 29 Fork 12

楠木/etherscan-api

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
stat.go 831 Bytes
一键复制 编辑 原始数据 按行查看 历史
楠木 提交于 2018-08-06 14:20 . [dev] token-related method
/*
* Copyright (c) 2018 LI Zhennan
*
* Use of this work is governed by a MIT License.
* You may find a license copy in project root.
*/
package etherscan
// EtherTotalSupply gets total supply of ether
func (c *Client) EtherTotalSupply() (totalSupply *BigInt, err error) {
err = c.call("stats", "ethsupply", nil, &totalSupply)
return
}
// EtherLatestPrice gets the latest ether price, in BTC and USD
func (c *Client) EtherLatestPrice() (price LatestPrice, err error) {
err = c.call("stats", "ethprice", nil, &price)
return
}
// TokenTotalSupply gets total supply of token on specified contract address
func (c *Client) TokenTotalSupply(contractAddress string) (totalSupply *BigInt, err error) {
param := M{
"contractaddress": contractAddress,
}
err = c.call("stats", "tokensupply", param, &totalSupply)
return
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/nanmu42/etherscan-api.git
git@gitee.com:nanmu42/etherscan-api.git
nanmu42
etherscan-api
etherscan-api
master

搜索帮助

23e8dbc6 1850385 7e0993f3 1850385