解决:VM2040:1 Uncaught TypeError: web3.sha3 is not a function at <anonymous>:1:37
在https://ethernaut.openzeppelin.com/刷题学习时,遇到在控制台执行contract.sendTransaction({data:web3.sha3(“pwn()”).slice(0,10)});报如下图错误:
网上找里一下参考资料可以改成:contract.sendTransaction({data:web3.utils.sha3(“pwn()”).slice(0,10)});如下图就不会报错
参考链接:
https://blog.csdn.net/weixin_410
原创
2022-02-18 17:44:00 ·
206 阅读 ·
1 评论