【问题标题】:Member "name" not found or not visible after argument-dependent lookup in struct xxx storage ref[] storage ref在 struct xxx storage ref[] storage ref 中进行参数相关查找后,成员“名称”未找到或不可见
【发布时间】:2021-11-20 16:27:15
【问题描述】:

独创性 0.8.0

带结构

结构占位符{ 字符串 a; uint256 b; }

mapping(uint256 => Placeholder[]) 公共占位符;

为什么会出现这个错误

在 struct TestSM.Placeholderstorage ref[] storage ref 中进行参数相关查找后,成员“b”未找到或不可见。

当我尝试获取值时抛出?

占位符[token_id].b

任何帮助都非常感激。我被屏蔽了:/

【问题讨论】:

    标签: ethereum solidity smartcontracts


    【解决方案1】:

    我解决了:

    mapping(uint256 => Placeholder) public placeholder;
    

    【讨论】:

      猜你喜欢
      • 2021-06-11
      • 2021-10-21
      • 2021-06-22
      • 2019-04-29
      • 2023-03-05
      • 2021-12-29
      • 1970-01-01
      相关资源
      最近更新 更多