current position:Home>Teacher, I got the value with Web3 according to your video tutorial, but when calling setinfo with Web3, an error is reported when the set value is set. What is the reason?

Teacher, I got the value with Web3 according to your video tutorial, but when calling setinfo with Web3, an error is reported when the set value is set. What is the reason?

2022-02-03 20:47:56 Q & A of Denglian community




Take the answer 1:

It seems that the address of the user who initiated the transaction cannot be found . Check whether the default account is set , Such as :

web3.eth.defaultAccount = web3.eth.accounts[0];

Or in setinfo Add a parameter to specify from, Such as :

info.setInfo(name,16 , {from: account },  function(error, result){             });

You try .






Other answers 1:

copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032047541527.html

Random recommended