【问题标题】:Getting error "creation of HelloWorld errored: TypeError: Cannot convert undefined or null to object"收到错误“创建 HelloWorld 错误:TypeError:无法将未定义或 null 转换为对象”
【发布时间】: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中复制粘贴了你的代码。它编译时没有任何错误。代码没有错。

标签: ethereum solidity remix


【解决方案1】:

我认为问题出在您的浏览器上。重新加载混音并重新粘贴代码。代码本身没有问题。

【讨论】:

    猜你喜欢
    • 2021-12-12
    • 1970-01-01
    • 2022-10-18
    • 2022-12-17
    • 1970-01-01
    • 2020-08-15
    • 1970-01-01
    • 2021-01-23
    • 1970-01-01
    相关资源
    最近更新 更多