Prepare the ground for developing Corda 5 CorDapps

September 28, 2021

Before starting Corda5 CorDapp development, perform the below steps to set up your development environment:

Step 1 – Setup Java 11 and Gradle version 6

We want to be compliant with the current industry standard and hence Corda 5 is built and tested on Java 11. Corda 5 is not backwards compatible with any older Java versions. So make sure you download Open JDK or Azul. We have upgraded to Gradle version 6, considering the various security bugs fixes made in this version.

Step 2 – Setup Docker

Download and install docker. We use docker to deploy individual nodes in individual docker containers.

Step 3 – Setup Corda CLI tool 

We have downloaded docker and Java 11. This means we  are ready to start up individual nodes on individual docker containers. But how do we generate the correct docker configuration to start a node? How do we deploy a node onto a docker container? How do we start the complete network? How do we install CPB’s onto individual nodes?. All of this and much more is taken care of by the Corda CLI tool. You can either perform a manual installation in which case download the tar or zip folder and add the path to the bin/ directory to your PATH.

Alternatively, use  the below command to automate these manual steps. This script downloads the Corda CLI and adds it to the path:

curl "https://download.corda.net/corda-cli/1.0.0-DevPreview/get-corda-cli.sh" | bash

Make sure the setup is correct by using the below command in your terminal:

corda-cli -version

Corda CLI

Version: 1.0.0-DevPreview-1.0

You can read more about the Corda CLI tool here and or refer to this blog.

Step 4 – Setup CorDapp builder tool

To perform a manual installation, you download the tar or zip folder and add the path to the bin/ directory to your PATH.

Make sure the setup is correct by using the below command in your terminal:

cordapp-builder --version

cordapp-builder

version: 5.0.0-DevPreview-1.0

You can read more about cordapp-builder here.

Step 5 – Setup Corda Node CLI

This tool is used to interact with your node, and you can use the endpoint command to hit a particular flow. You can even use either Swagger UI or the Postman to hit the exposed APIs or to call a flow. To perform a manual installation, you download the tar or zip folder and add the path to the bin/ directory to your PATH. You can read more about Corda Node CLI here.

Conclusion

You need to download docker, java 11, tools like Corda-CLI tool, Cordapp-builder tool to get started with your Corda 5 CorDapp development.

Further Reading

This blog talks about the Corda 5 packaging model.

This blog talks about how to run your first CorDapp sample.

This blog talks about the Corda CLI tool.

You can read more about Corda 5 on the docs site.


— Sneha Damle is a Developer Evangelist at R3, an enterprise blockchain software firm working with a global ecosystem of more than 350 participants across multiple industries from both the private and public sectors to develop on Corda, its open-source blockchain platform, Corda Enterprise, a commercial version of Corda for enterprise usage, and Conclave, a confidential computing platform.

Follow Sneha on LinkedIn here.