本文介绍了如何解决Hyperledger Composer运动场上的此错误(t:标识符不能从超级类型扩展)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在遵循Hyperledger教程 Youtube链接,然后讲师修改示例合同.但是,对于可以在线访问的当前版本的Hyperledger Fabric Playground,进入accountTransfer函数后没有提及状态.这将导致错误,如下所示:

Im following the Hyperledger tutorial Youtube Link and the instructor modifies a sample contract. However with the current version of Hyperledger fabric playground which can be accessed online, there is no mention of state after entering the accountTransfer function. This leads to an error as shown below:

如何解决相同问题?我曾尝试寻找答案,但找不到能解决此特定问题的任何答案.

How to solve the same? I have tried searching for answers but I couldnt find any which addresses this specific issue.

推荐答案

t:代表交易.

您的模型有两个问题

  1. transactionId已被保留(您无需建模/定义-提交交易时将返回交易ID-如果您将其用于自己的交易目的,则可以调用该字段) -文档确实提到了有关transactionId https://hyperledger.github.io/composer/reference/cto_language.html

与交易者和资产不同,您在交易定义中不使用标识人"

you do not use 'identified by' in your definition of the transaction - unlike Participants and Assets

请参阅-> https://hyperledger.github.io/composer/reference/js_scripts .html 和我们的示例网络(您可以浏览)显示了建模交易的示例-> https://github.com/hyperledger/composer-sample-networks

see -> https://hyperledger.github.io/composer/reference/js_scripts.html and our sample networks (which you can browse) show examples of modeled transactions -> https://github.com/hyperledger/composer-sample-networks

我要补充一点,有关建模交易的更多信息应包含在上述1.的页面ref中.

I would add that more info about modeling transactions should be included in the page ref in 1. above.

最后,针对此上下文无关的"t:"错误(即,上面的项目1)-我们有一个未解决的Github问题(产生错误的另一种问题,但仍然会导致相同的错误). https://github.com/hyperledger/composer/issues/1497

Finally for this out-of-context 't:' error (ie item 1 above) - we have an outstanding Github issue (a different kind of problem producing the error, but the same error results nonetheless). https://github.com/hyperledger/composer/issues/1497

这篇关于如何解决Hyperledger Composer运动场上的此错误(t:标识符不能从超级类型扩展)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-13 23:51