小编Chr*_*son的帖子

Solidity:UnimplementedFeatureError:此处未实现嵌套动态数组

当我尝试在 Solidity 中执行此操作时,它给了我 UnimplementedFeatureError: 嵌套动态数组未在此处实现。

我在代码示例中看到了这一点。Solidity不支持这个吗?

编辑 - 下面发布了完整的代码。所以我发现问题只出在最后一个函数中。它不喜欢我返回动态数组。我如何实现相同的功能(我想返回数据的字符串数组)?

pragma solidity ^0.4.6;

contract EmailIntegrity {

  // Map an array of EmailIntegrityStructs for each email address.
  // The first element will be used for the integrity record.
  // The rest will be used for audit records.

  enum ItemType { Integrity, Audit }
  
  struct EmailIntegrityStruct {
    ItemType itemType;
    uint timestamp;
    string data;
  }

  mapping(address => EmailIntegrityStruct[])  emailIntegrityStructs;

  function hasEmailIntegrityData(address emailAddress) public constant returns(bool isEmail) {
    return emailIntegrityStructs[emailAddress][0].timestamp == 0;
  }

  function insertIntegrityData(address …
Run Code Online (Sandbox Code Playgroud)

arrays blockchain ethereum solidity smartcontracts

5
推荐指数
2
解决办法
2673
查看次数

标签 统计

arrays ×1

blockchain ×1

ethereum ×1

smartcontracts ×1

solidity ×1