contract method call
but how can call contract method in web3 beta version always show error unknown account
not work unlock account here any solutions
try this brefore you call conract method web3.personal.unlockAccount(AccountAddress, Password)
@lakshmankashyap - you are going to have to provide more context for anyone to help you. Can you show us some example code that you're having trouble with?
@gburtini i have the same error when call contract method in web3, the code is
let options = {
from: from,
gasPrice: self.web3.utils.toHex(results.gasPrice),
gas: self.web3.utils.toHex(800000)
}
const erc20Contract = new self.web3.eth.Contract(erc20Abi, contractaddr, options)
erc20Contract.methods.transferFrom(to, from, 1).send({from: from}, function(err, result) {
if (err) return reject(err)
return resolve(result)
})
the error is ' Error: Returned error: unknown account at Object.ErrorResponse (errors.js?aaea:29) at eval (index.js?abfa:137) at XMLHttpRequest.request.onreadystatechange (index.js?9620:77)'
how to solve it ? thank you
Please ask this question on https://ethereum.stackexchange.com/