Appendix A. The Obligation CorDapp
The Obligation CorDapp is an IOU trading system, where any of the parties, PartyA, PartyB, or PartyC, can issue obligations (i.e., borrow) from another party, transfer obligations between them, or pay down/settle an existing loan obligation. This CorDapp also allows us to create cash on the ledger, cash that could be used to settle an obligation. With these two features, we have all we need for a nifty CorDapp with end-to-end business use cases.
The sample CorDapp provides a nice yet simple web interface, allowing us to forego CRaSH shell commands to invoke flows and instead letting us interact with the CorDapp with a more intuitive frontend. It’s one sample app in a suite of sample apps provided by R3 and can be found on Corda’s GitHub.
Installing the Obligation CorDapp
If you’re not already familiar with the sample set of CorDapps (for example, we refer to the oracle-example app in Chapter 10), it may behoove you to allocate some time to reviewing the offerings. If you haven’t already cloned the sample GitHub repository, you can do so with the following command:
gitclonehttps://github.com/corda/samplescorda-samples
This will pull down the entire catalog of samples. The CorDapp we’ll launch will be obligation-cordapp inside the corda-samples folder that Git just created for us. Inside the corda-samples folder, you’ll find the obligation-cordapp. The CorDapp has codebases in both Java and Kotlin and will look like this:
...\obligation-cordapp> ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access