【发布时间】:2022-08-15 16:12:54
【问题描述】:
问题
我正在尝试通过Remix 部署智能合约。不幸的是,它失败并显示非常无用的错误消息。
错误信息
创建 MyContract 错误:错误编码参数:错误:无效的数组化值(argument=\"value\",value=\"\",code=INVALID_ARGUMENT,version=bytes/5.5.0)
代码
这是
contract使用的构造函数:struct RRSet { uint32 inception; uint32 expiration; bytes20 hash; } constructor(bytes memory _anchors) { // Insert the \'trust anchors\' - the key hashes that start the chain // of trust for all other records. anchors = _anchors; rrsets[keccak256(hex\"00\")][DNSTYPE_DS] = RRSet({ inception: uint32(0), expiration: uint32(3767581600), // May 22 2089 - the latest date we can encode as of writing this hash: bytes20(keccak256(anchors)) }); emit RRSetUpdated(hex\"00\", anchors); }一些想法
我的合约使用
is从抽象合约以及常规合约继承。有没有办法查看错误或源自何处,或者是否有可能对其进行调试?
-
似乎有一个构造函数需要一些参数,但您传递的是空值或格式不正确的值。您可以分享构造函数代码以及您传递给它的内容吗?
-
我用构造函数更新了代码
标签: blockchain ethereum solidity smartcontracts remix