Prerequisites to Deploy your smart Contract with IBM BlockChain Platform VS Code extension

0
171
Ref from: BITCOIN BLACK

If you are new to the IBM Block Chain Platform or Hyper ledger Fabric follow our tutorials on how to get started locally, then how to set up and submit transactions to a Block Chain network deployed to IBM Cloud. Here you will actually learn to set up the environment for the IBM Block Chain Platform in VS Code Extension.

What can you actually do with this IBM Block Chain Platform Extension ?

It allows you to create a basement, i.e. like foundation or skeleton for your smart contracts. Where you can choose between the languages which are more comfortable for you. It gives you a variety of options like JavaScript, Type Script, Go and Java.

Let’s now look into the prerequisites which is actually needed for this project, which you will need the following installed in order to use the extension:

  • VS Code Link
  • Node v8.x or greater and npm v5.x or greater Link
  • Docker version v17.06.2-ce or greater Link
  • Docker Compose v1.14.0 or greater Link

If you’re a windows user then you need to worry about the following too, your version of Windows supports Hyper-V and Docker

i.e. you need to make sure that Hyper-V is enabled in your Local Machine, for that you need to search for Turn Windows Features On or Off in your start menu or else in your control panel.

Make sure that you have turned on Hyper-V features in it as shown below,

Windows Features

Operating System Req:

Windows 10 Enterprise, Pro, or Education with 1607 Anniversary Update or later

Docker for Windows is configured to use Linux containers (this is the default)

You should install the C++ Build Tools for Windows from windows-build-tools.

You have to install OpenSSL v1.0.2 from Win32 OpenSSL, as follows:

To install the normal version, not the version marked as “light” Link

Install the Win32 version into C:\OpenSSL-Win32 on 32-bit systems

Install the Win64 version into C:\OpenSSL-Win64 on 64-bit systems

The above mentioned requirements for OpenSSL actually didn’t work for me, so I used the Git bash, which actually OpenSSL installed i.e. Pre-built in. Where I just set the environmental path for it.
Git SCM Link to download

Once you’re done with your git installation go to your location where Git has been installed in your Local Machine.

i.e. in my Local Machine I have in the following location you can verify the same

“C:\Program Files\Git\usr\bin”
OpenSSL Location in C Drive

Here you can see the location which I have mentioned → you need to update this location of OpenSSL in the environment variable path now as shown below

Start menu → type Environment variables then follow the image shown below

Environment Variables setup

First, we need to update the system variables and then we need to update the user variables for your Local Machine as shown and make sure to locate openssl.cnf file

If you have installed in C drive, then it will also be in the following location as shown below,

“C:\Program Files\Git\usr\ssl”

Now you need to update this in the create a new User Variables under the name OPENSSL_CONF as shown in the image

Update User Variable for your Local Machine for Openssl CNF
In the Variable name give → OPENSSL_CONF
In the Variable value give → C:\Program Files\Git\usr\ssl\openssl.cnf

Once you’re done with dependencies, you can check your installed versions by running the following commands from a terminal:

node — version
npm — version
docker — version
docker-compose — version
Openssl
Verification

Hope you have got the same output with different versions,

Now all you need to do is install the IBM Block Chain Platform Extension in your Visual studio code

Link

You can either install it by opening with this link which when clicked will redirect you to your own VS Code in your Local Machine or you can download it from the VS Code extension.

You need to select the Extension Marketplace and search for IBM Block Chain and click install.

VS Code Extension Manager

Since we have already installed the dependencies we will have the Prerequisites page opened as shown below, which actually shows if something is missing.

Prerequisites

Since we have already installed the dependencies we will have the Prerequisites page opened as shown below, which actually shows if something is missing.

Once you’re done, your will have the following where you can install your own Smart Contract and enable gateways and other stuffs as shown below

IBM BlockChain Platform
Reference: https://developer.ibm.com/technologies/blockchain/tutorials/ibm-blockchain-platform-vscode-smart-contract/
If you wish to stay connected,
LinkedIn
Or
you can just google “ narenltk / narendiran krishnan ” or just drop a mail to → narenltk@gmail.com → Happy to help..!!!

Prerequisites to Deploy your smart Contract with IBM BlockChain Platform VS Code extension was originally published in Coinmonks on Medium, where people are continuing the conversation by highlighting and responding to this story.