从坚固性到ReactJS的查询结构属性

时间:2019-03-16 15:02:26

标签: javascript reactjs solidity

我想从智能合约中调用函数属性到我的API,但我不知道该怎么做。

智能合约功能是

 Function getFile(uint id) external constant returns (string, string) {
      file storage F = files[id];

      return (F.description, F.hash);
    }

有人知道使用API​​中的getFile(id)提取特定文件的描述和哈希值的语法是什么吗?

<p> The description is {this.state.description} and the hash is {this.state.hash} </p>

谢谢!

0 个答案:

没有答案