How to Create a CorDapp?

CorDapps take the form of a set of .jar files containing class definitions written in Java and/or Kotlin.

Each CorDapp includes the following components:

  • States – The states represent shared facts on the ledger.

  • Transactions – The transactions update the ledger states.

  • Contracts – The contracts govern the ways in which states can evolve over time.

  • Flows – The flows describe the interactions that must occur between parties to achieve consensus (to satisfy certain business requirements).

To see information on how to write a CorDapp please visit the official Corda guide.

How to Upload a CorDapp?

To upload a CorDapp to a node navigate to the node where you want to install it and click the “Install CorDapp” button. In the pop-up window select a .jar file from your computer with a CorDapp to upload. You can also upload a configuration file if needed.

  • Only one CorDapp along with a configuration file can be installed at a time.

  • The name of a configuration file should match the name of the CordApp (eg; if your CorDapp is called hello-0.1.jar the config should be config/hello-0.1.conf).

  • Please ensure that the CorDapp you want to upload is on the same platform version as a Corda node (4.8.1 in the current release).

To complete the process the node should be restarted. You can choose whether to restart the node draining flows or the node will be restarted killing all the ongoing flows:

  • Restart draining flows is a "soft" install, so that all running flows will be successfully completed before the node restart.

  • Restart killing ongoing flows is a "hard" install so that all running flows will be forcibly ended before uploading a CorDapp.

When the node is restarted, the CorDapp will appear in a CorDapps list of the particular node.

How to Remove a CorDapp?

To remove a CorDapp from a node go to a list of CorDapps installed on the node and click the “Remove” button for the particular CorDapp. Once the removing process is finished the node will be restarted. You can choose to either restart the node killing all ongoing flows or wait for all flows to be finished.