本文介绍了在Corda 3中,将Cash与模拟网络一起使用会引发以下错误:请注册实体< ENTITY_NAME>的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在Corda 3上运行义务CorDapp"(此处).发行现金:
I am trying to run the Obligation CorDapp here on Corda 3. I am getting following error when issuing cash:
Cannot find contract attachments for [net.corda.finance.contracts.asset.Cash]. See https://docs.corda.net/api-contract-constraints.html#debugging
解决时,我得到了:
Please register the entity ‘net.corda.finance.schemas.CashSchemaV1’ See https://docs.corda.net/api-persistence.html#custom-schema-registration for more information
我尝试了以下解决方案:
I have tried following solutions:
https://docs.corda.net/api-contract-constraints.html#debugging
但没有任何帮助.
推荐答案
您需要使用 MockNetwork
注册这两个程序包,如下所示:
You need to register both packages with the MockNetwork
, as follows:
network = MockNetwork(
listOf("net.corda.finance.contracts.asset", "net.corda.finance.schemas")
)
这篇关于在Corda 3中,将Cash与模拟网络一起使用会引发以下错误:请注册实体< ENTITY_NAME>的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!