2017-07-17 11:23:14 +00:00
|
|
|
Introduction
|
|
|
|
============
|
|
|
|
|
2017-09-20 13:52:33 +00:00
|
|
|
.. note:: This tutorial extends the CorDapp built during the :doc:`Hello, World tutorial <hello-world-index>`.
|
2017-07-17 11:23:14 +00:00
|
|
|
|
|
|
|
In the Hello, World tutorial, we built a CorDapp allowing us to model IOUs on ledger. Our CorDapp was made up of three
|
|
|
|
elements:
|
|
|
|
|
|
|
|
* An ``IOUState``, representing IOUs on the ledger
|
|
|
|
* An ``IOUContract``, controlling the evolution of IOUs over time
|
|
|
|
* An ``IOUFlow``, orchestrating the process of agreeing the creation of an IOU on-ledger
|
|
|
|
|
2017-08-17 11:02:44 +00:00
|
|
|
However, in our original CorDapp, only the IOU's lender was required to sign transactions issuing IOUs. The borrower
|
2017-07-17 11:23:14 +00:00
|
|
|
had no say in whether the issuance of the IOU was a valid ledger update or not.
|
|
|
|
|
2017-08-17 11:02:44 +00:00
|
|
|
In this tutorial, we'll update our code so that the lender requires the borrower's agreement before they can issue an
|
2017-07-17 11:23:14 +00:00
|
|
|
IOU onto the ledger. We'll need to make two changes:
|
|
|
|
|
2017-08-17 11:02:44 +00:00
|
|
|
* The ``IOUContract`` will need to be updated so that transactions involving an ``IOUState`` will require the borrower's
|
|
|
|
signature (as well as the lender's) to become valid ledger updates
|
|
|
|
* The ``IOUFlow`` will need to be updated to allow for the gathering of the borrower's signature
|
2017-07-17 11:23:14 +00:00
|
|
|
|
2017-10-16 13:39:28 +00:00
|
|
|
We'll start by updating the contract.
|