【问题标题】:How do I run this smart contract function using nethereum to return a result?如何使用 nethereum 运行此智能合约功能以返回结果?
【发布时间】:2018-06-05 20:49:57
【问题描述】:

我在网上关注了一篇很棒的文章,用 CRUD 操作创建了一个智能合约。

这是我无法使用的功能:

function getUserAtIndex(uint index)
    public
    constant
    returns(bytes32 userKey)
  {
    return userIndex[index];
  }

我已经部署了合约并且可以使用:

  var getUserAtIndex = contract.GetFunction("getUserAtIndex");

我想知道如何通过该函数使用它来获取该索引处的用户详细信息?

谢谢。

【问题讨论】:

    标签: c# visual-studio ethereum geth


    【解决方案1】:

    这样的?

    var result = getUserAtIndex.CallAsync<byte[]>(123);
    

    【讨论】:

      猜你喜欢
      • 2022-09-28
      • 2021-10-29
      • 1970-01-01
      • 2022-07-06
      • 1970-01-01
      • 1970-01-01
      • 2021-12-26
      • 1970-01-01
      • 2022-12-06
      相关资源
      最近更新 更多