在调用myContract.methods.myfunction(a,b).send()时报错

报错信息: inpage.js:1 MetaMask - RPC Error: Invalid parameters: must provide an Ethereum address. {code: -32602, message: "Invalid parameters: must provide an Ethereum address.", stack: "Error: Invalid parameters: must provide an Ethereu…eogaeaoehlefnkodbefgpgknn/background.js:1:1241245"}

web3.min.js:8 Uncaught (in promise) {code: -32602, message: "Invalid parameters: must provide an Ethereum address.", stack: "Error: Invalid parameters: must provide an Ethereu…eogaeaoehlefnkodbefgpgknn/background.js:1:1241245"} 出错函数:

userAccount='0x132ce95a0421804DDee106821dDA834A062055D8';
    function setinfo(name,age) {
        myContract.methods.setInfo(name,age).send({ from:'userAccount'});
    }

.png

请先 登录 后评论

3 个回答

Mr.Pine
请先 登录 后评论
Tiny熊
  擅长:智能合约,以太坊
请先 登录 后评论
snamon
请先 登录 后评论
  • 3 关注
  • 1 收藏,6454 浏览
  • Mr.Pine 提出于 2020-08-12 11:49