问题
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
And when settling I get this:
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:
Error While Fetching Data from Corda Custom Tables
https://docs.corda.net/api-contract-constraints.html#debugging
But nothing helped.
回答1:
You need to register both packages with the MockNetwork, as follows:
network = MockNetwork(
listOf("net.corda.finance.contracts.asset", "net.corda.finance.schemas")
)
来源:https://stackoverflow.com/questions/49428000/in-corda-3-using-cash-with-a-mock-network-throws-the-following-error-please-re