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:
git
clone
https
:
/
/
github
.
com
/
corda
/
samples
corda
-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> ...
Get Mastering Corda now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.