Oracle Blockchain Cloud Service — Chaincode Deployment and Instantiation

Chaincode Deployment

by Juarez Junior

Introduction

Now, this blog post provides the steps required to perform the chaincode (smart contract) deployment and instantiation.

You can check the official documentation and the related steps by using a couple of resources provided by the official documentation: Typical Workflow to Deploy Chaincodes

This blog post then has the summarized steps that will allow you to deploy chaincode as well as enable the chaincode in REST proxy as required.

So without further ado, let’s configure our Blockchain network as per the Hyperledger Fabric requirements and conventions.

How to deploy Chaincode to Oracle Blockchain Cloud Service

Let’s start with the Network Founder role. You will need to access the network founder console in order to deploy the chaincode.

Besides, you also need to get the example chaincode source code (golang) and package it in a ZIP file. Just copy the source code file (carTrace.go) from the Gist below and then create a zip file that contains the source code file.

Select the Chaincode tab and then click the Deploy a New Chaincode button as shown below:

Select the Quick Deployment option as it suffices for the vast majority of chaincode deployment needs. The Advanced Deployment option gives you more flexibility regarding the deployment arguments but the Quick Deployment one is the usual path.

You will see the deployment options form. Provide the required information such as the Chaincode Name, Version, Channel, and REST Proxy. Select and upload the Chaincode deployment file as shown below. Click the Submit button.

Confirm that you want to deploy your chaincode as it cannot be removed after deployment, similar to channels as per the Hyperledger Fabric contract.

The deployment process starts as shown below. The deployment process takes a while as several steps need to be performed in the background, including compilation, container provisioning, and others. You will see a progress bar with the Instantiating chaincode message first.

Then it will be updated and show the Enabling in REST proxy message as well as you can see below:

At last, a confirmation message will be shown:

You can then check the chaincode tab again and you will see the chaincode as deployed and listed as shown below.

At last, remember that you can also deploy chaincode by using the consoles of other Participant Organizations as required.

Wrap up

In the next blog post, we’ll provide the steps required to invoke the chaincode (smart contract) we’ve just deployed by means of a REST client, a REST proxy, and the related REST API. Stay tuned!

Oracle Developers and Oracle OCI Free Tier

Build, test, and deploy your applications on Oracle Cloud — for free! Get access to OCI Cloud Free Tier!

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Juarez Junior

Senior Principal #Java Developer Evangelist @ Oracle. Invite me to speak about #Java #OracleDatabase #OracleCloud #Blockchain #DevRel ☕️🥑