问题:
连着打印两行数据:
console.log(web3.eth);
console.log(web3.eth.accounts);
输出结果是,web3.eth下的accounts是个数组,且里边有值。但是打印web3.eth.accounts确是个空数组。。。。
解决:
解决是很好解决了,查资料说用web3.eth.getAccounts(err,res => {})
就可以了。但是还没搞明白web3.eth.accounts是个什么东东呢?
连着打印两行数据:
console.log(web3.eth);
console.log(web3.eth.accounts);
输出结果是,web3.eth下的accounts是个数组,且里边有值。但是打印web3.eth.accounts确是个空数组。。。。
解决是很好解决了,查资料说用web3.eth.getAccounts(err,res => {})
就可以了。但是还没搞明白web3.eth.accounts是个什么东东呢?
本文标题:2018-05-16(web3.eth.accounts)
本文链接:https://www.haomeiwen.com/subject/lzdmdftx.html
网友评论