这是web3.js开发者在创建合约对象时很容易发生的错误,其实就是不同版本web3.js带来的API变化问题。

请检查你的web3.js版本:

  • 如果version<1.0.0,使用:
web3.eth.contract(studentFactoryArtifact,address);// 注意区分contract大小写
  • 1
  • 如果version>1.0.0,使用:
new web3.eth.Contract(studentFactoryArtifact,address); // 注意区分Contract大小写

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-18
  • 2021-12-06
  • 2022-12-23
  • 2022-12-23
  • 2021-12-06
  • 2021-07-15
猜你喜欢
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
  • 2021-10-13
  • 2021-05-24
  • 2022-12-23
相关资源
相似解决方案