HM Land Registry Digital Street Proof of Concept
This is a CorDapp for demonstrating a simple transfer of ownership on Corda, including smart contracts and digital signatures.
Directory | Description |
---|---|
/config | contains log4j configs |
/cordapp-common | module defining common/reusable pieces of code |
/cordapp-contracts-states | module defining states, contracts, data Models and ORM schemas |
/cordapp-flows | module defining corda flows |
/gradle | contains the gradle wrapper, which allows the use of gradle without installing it yourself and worrying about which version is required |
/lib | contains the quasar jar which rewrites our CorDapp’s flows to be checkpointable |
/src | contains end to end integration test of CorDapp |
Please refer to the Getting set up instructions.
You will also need a running instance of Title API within the Digital Street development Environment
Note: The HMLR CorDapp depends on land title data from the external Title API service. The API URL has to be set as a gradle property (as shown in the commands below), or by modifying gradle.properties.
./gradlew deployNodes -PtitleApiUrl=http://localhost:8005/v1/titles/
gradlew.bat deployNodes -PtitleApiUrl=http://localhost:8005/v1/titles/
Start the nodes by running the following command from the root of the digital-street-cordapp folder
kotlin-source/build/nodes/runnodes
kotlin-source\build\nodes\runnodes.bat
This will start 6 Corda Nodes
HMLR
Conveyancer1
Conveyancer2
Lender1
SettlingParty
Notary
Note: The flow-tests depends on land title data from the external Title API service. The API URL has to be set as a gradle property (as shown in the commands below), or by modifying gradle.properties.
Note: Instructions for running JUnit tests from an IDE.
./gradlew test -PtitleApiUrl=http://localhost:8005/v1/titles/
gradlew.bat test -PtitleApiUrl=http://localhost:8005/v1/titles/
Note: The flow-tests depends on land title data from the external Title API service. The API URL has to be set as a gradle property (as shown in the commands below), or by modifying gradle.properties.
./gradlew clean integrationTest --info -PtitleApiUrl=http://localhost:8005/v1/titles/
gradlew.bat clean integrationTest --info -PtitleApiUrl=http://localhost:8005/v1/titles/
The integration test script covers the end to end journey of the CorDapp as described below:
This will create a transaction with RequestIssuanceState between the HMLR and the Conveyancer node
----------------------------
| |
| |
| RequestIssuanceState |
| |
| - titleID |
| - titleIssuer |
| - seller |
| - sellerConveyancer |
| - status |
| |
| |
----------------------------
This will create a transaction with new LandTitleState, ProposedChargesAndRestrictionState being issued on the HMLR, Seller’s Conveyancer and Seller’s Lender nodes
---------------------------------
| |
| |
| LandTitleState |
| |
| - titleID |
| - landTitleProperties |
| - titleIssuer |
| - titleType |
| - lastSoldValue |
| - status |
| |
---------------------------------
---------------------------------------
| |
| |
| ProposedChargesAndRestrictionsState|
| |
| - titleID |
| - ownerConveyancer |
| - buyerConveyancer |
| - restrictions |
| - charges |
| - status |
| |
| |
| |
---------------------------------------
---------------------------------------
| |
| |
| ProposedChargesAndRestrictionsState|
| |
| - titleID |
| - ownerConveyancer |
| - buyerConveyancer |
| - restrictions |
| - charges |
| - status |
| |
| |
| |
---------------------------------------
REQUEST_TO_ADD_CONSENT_FOR_DISCHARGE
CONSENT_FOR_DISCHARGE
This will create a transaction with new LandAgreementState, PaymentConfirmationState issued on both conveyancer’s nodes and SettlingParty node
---------------------------------
| |
| |
| LandAgreementState |
| |
| - titleID |
| - buyer |
| - seller |
| - buyerConveyancer |
| - sellerconveyacner |
| - creationDate |
| - completionDate |
| - contractRate |
| - purchasePrice |
| - deposit |
| - contentsPrice |
| - balance |
| - titleStateLinearId |
| - specificIncumbrances |
| - titleGuarantee |
| - status |
| |
---------------------------------
----------------------------------
| |
| |
| PaymentConfirmationState |
| |
| - titleID |
| - seller |
| - buyer |
| - purchasePrice |
| - landAgreementStateLinearId|
| - settlingParty |
| - buyerConveyancer |
| - status |
| |
----------------------------------
----------------------------------
| |
| |
| PaymentConfirmationState |
| |
| - titleID |
| - seller |
| - buyer |
| - purchasePrice |
| - landAgreementStateLinearId|
| - settlingParty |
| - buyerConveyancer |
| - status |
| |
----------------------------------
CONSENT_FOR_NEW_CHARGE
APPROVED
SIGNED
CONFIRM_PAYMENT_RECEIVED_IN_ESCROW
COMPLETED
./gradlew copyConfig -PtitleApiUrl=http://localhost:8005/v1/titles/
gradlew.bat copyConfig -PtitleApiUrl=http://localhost:8005/v1/titles/
-javaagent:../../lib/quasar.jar
as a VM option.build/tests
.