【发布时间】:2020-12-22 00:36:18
【问题描述】:
刚接触 Solidity,刚刚在 Remix IDE 中尝试了第一个 HelloWorld 智能合约,在尝试部署智能合约时偶然发现了这个错误。
creation of HelloWorld pending...
creation of HelloWorld errored: TypeError: Cannot convert undefined or null to object
我的代码:
pragma solidity ^0.5.16;
contract HelloWorld {
string public greet = "Hello World!";
}
编译器版本设置为0.5.16+commit.9c3226ce
不确定我错过了什么,因此非常感谢所有帮助和指导。
【问题讨论】:
-
我在solidity remix在线IDE中复制粘贴了你的代码。它编译时没有任何错误。代码没有错。