2018-05-16(web3.eth.accounts)
2018-05-16 本文已影响0人
嘿喵heyMeow
问题:
连着打印两行数据:
console.log(web3.eth);
console.log(web3.eth.accounts);
输出结果是,web3.eth下的accounts是个数组,且里边有值。但是打印web3.eth.accounts确是个空数组。。。。
解决:
解决是很好解决了,查资料说用web3.eth.getAccounts(err,res => {})
就可以了。但是还没搞明白web3.eth.accounts是个什么东东呢?