Official tutorial: https://developer.ibm.com/tutorials/ibm-blockchain-platform-vscode-smart-contract/
In this tutorial, we will learn the process of using IBM Blockchain Platform's VSCode extension to streamline the process of developing, testing, and deploying a smart contract. Once we finish the tutorial, we will understand how to quickly develop, demo, and deploy blockchain application on a local Hyperledger Fabric network using VSCode. This tutorial assumes some basic understanding of Hyperledger Fabric.
- Node v8.x or greater and npm v5.x or greater
- Yeoman (yo) v2.x
- Docker version v17.06.2-ce or greater
- Docker Compose v1.14.0 or greater
- VSCode 1.28.2 or higher
If you are using Windows, you must also ensure the following:
- Your version of Windows supports Hyper-V and Docker:
- 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 have installed the C++ Build Tools for Windows from windows-build-tools
- You have installed OpenSSL v1.0.2 from Win32 OpenSSL
- Install the normal version, not the version marked as "light"
- Install the Win32 version into
C:\OpenSSL-Win32
on 32-bit systems - Install the Win64 version into
C:\OpenSSL-Win64
on 64-bit systems
You can check your installed versions by running the following commands from a terminal:
node --version
npm --version
yo --version
docker --version
docker-compose --version
- Install the IBM Blockchain Platform VSCode Extension
- Create a new JavaScript smart contract
- Package a smart contract
- Create, explore and understand a Hyperledger Fabric Network
- Deploy the smart contract on a local Hyperledger Fabric instance
- Use Node.js SDK to interact with deployed Smart Contract package
- After the prerequisites are installed, this should take approximately 30-45 minutes to complete.
-
Blockchain Code Patterns: Enjoyed this Code Pattern? Check out our other Blockchain Code Patterns
-
Blockchain 101: Learn why IBM believes that blockchain can transform businesses, industries – and even the world. Blockchain 101