在最近学习以太坊项目DAPP开发的时候,出现from is undefined,是因为 web3.eth.accounts 返回地址是undefined导致出现from is undefined错误,获取地址方式可以写成这样web3.eth.getAccounts().then(function(res){ account = res }),这样就不会报错from is undefined
在最近学习以太坊项目DAPP开发的时候,出现from is undefined,是因为 web3.eth.accounts 返回地址是undefined导致出现from is undefined错误,获取地址方式可以写成这样web3.eth.getAccounts().then(function(res){ account = res }),这样就不会报错from is undefined