首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >geth - web3 :不支持checkBalance

geth - web3 :不支持checkBalance
EN

Ethereum用户
提问于 2018-03-03 13:06:06
回答 1查看 188关注 0票数 1

以下是我所做的:

第一航站楼:

代码语言:javascript
复制
geth --syncmode "light"

第2航站楼:

代码语言:javascript
复制
geth attach
> web3.fromWei(eth.getBalance(eth.coinbase), "ether")
Error: not supported
    at web3.js:3104:20
    at web3.js:6191:15
    at get (web3.js:6091:38)
    at <unknown>

我遗漏了什么?

EN

回答 1

Ethereum用户

发布于 2019-05-10 21:22:12

不使用光同步模式,也不使用web3js,但它对我有效。也许可以将geth更新为最新版本(我的版本是:Geth/v1.8.27-stable/linux-amd64/go1.10.5)

代码语言:javascript
复制
# geth attach http://127.0.0.1:8545/
> web3.fromWei(eth.getBalance(eth.coinbase), "ether")
4710

我在一个私人网络上>:)

票数 0
EN
页面原文内容由Ethereum提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://ethereum.stackexchange.com/questions/41555

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档