個人博客原文
web3js調用獲取當前賬戶
記得加
, from: web3.eth.accounts[0]}
VotingContract.deployed().then(function(instance){
instance.giveRightToVote(address,{gas: 140000, from: web3.eth.accounts[0]}).then(function(result){
$("#msg2").html("<p>已授權</p>")
})
}).catch(function(err){
console.error("ERROR! " + err.message)
})
公衆號每週推送區塊鏈技術文章
個人踩坑日記