Using the Blockchain App Builder Command Line Interface

The Blockchain App Builder command line interface helps you build and scaffold a fully-functional chaincode project from a specification file.

After the project is built, you can run and test it on a local Hyperledger Fabric network, or your provisioned Oracle Blockchain Platform network. You can then run SQL rich queries, debug the chaincode, or write and run unit tests using the generated code.

Blockchain App Builder workflow diagram

Table 7-1 Workflow When Using the CLI

Task Description Related Topics
Install and configure Download the Blockchain App Builder CLI from your Oracle Blockchain Platform console and install it and any prerequisite software.
Create the chaincode project Create a specification file for the chaincode project.
Generate the chaincode Edit the specification file to define the assets and chaincodes to generate, and then run the CLI initialization process to generate your chaincode from the specification file.
Detailed reference information about the structure and contents of the specification file and the generated chaincode project:
Deploy the chaincode

After your chaincode project is created, you can deploy it locally to the included pre-configured Hyperledger Fabric network, or remotely to your Oracle Blockchain Platform Cloud or Enterprise Edition.

You can also package the chaincode project for manual deployment to Oracle Blockchain Platform.

Test the chaincode

After your chaincode is running on a network, you can test any of the generated methods.

Additionally, If you chose to create the executeQuery method during your chaincode development, you can run SQL rich queries if your chaincode is deployed to an Oracle Blockchain Platform network.

Debug the chaincode The Blockchain App Builder extension for Visual Studio Code includes line-by-line debugging of your chaincode.
Synchronize your updates When you update your specification file, you can synchronize the changes with the generated chaincode files.
Apply patches to the Blockchain App Builder CLI You can use the patch command to apply a patch to the Blockchain App Builder CLI.
Run unit tests A basic unit test case setup is included in the project. Additional tests can be added and run.