Book Image

Blockchain across Oracle

By : Robert van Molken
Book Image

Blockchain across Oracle

By: Robert van Molken

Overview of this book

Blockchain across Oracle gives you the professional orientation to Blockchain that you need as an Oracle developer in today’s changing world. Written and prepared for you by Oracle Developer Champion Robert van Mölken, this book gets you up to speed with the details of the Blockchain - core concepts, how to implement Oracle’s Blockchain Cloud Service, industry implications for the Blockchain, and how the Blockchain will affect your Oracle customers. Robert van Mölken introduces you to the history and concepts of the Blockchain. You’ll really get to understand the Blockchain inside and out, as an Oracle developer or solution architect. You’ll understand the Blockchain flow, and how the hashes and chains create a new decentralised paradigm for you as an Oracle developer. You’ll gain insights into how the Blockchain affects Oracle developers and customers in this modern and disruptive era. You’ll see how the Blockchain concepts work in this new world where Assets, Transactions, Security, and Privacy, can all be sustained across a decentralized system for your customers. Then you'll find a detailed look at the cutting-edge Oracle middleware solutions. You’ll learn about Hyperledger Fabric, the opensource Blockchain framework used by Oracle as its core, and how to set up your own Oracle Blockchain Network. You’ll design and develop a smart contract, and learn how to run it on the Oracle Blockchain Cloud Service. The final part of the book looks at how the Blockchain will affect your customers across various industry sectors. By studying industry trends in the financial services sector, healthcare industry, and the transport industry, you’ll discover how the options and possibilities for you and your clients are being transformed by the Blockchain across Oracle. You’ll complete this professional orientation by looking at Blockchain trends and future directions.
Table of Contents (24 chapters)
Title Page
Packt Upsell
Contributors
Preface
3
Blockchain 101 - Assets, Transactions, and Hashes
4
Blockchain 101 - Blocks, Chains, and Consensus
Index

Programming the smart contract


Up until this point in the chapter, we have designed the data model for our assets, transactions, and events, and have installed the development tools necessary to write our smart contract. The next step is to program the actual smart contract (called chaincode from this point forward) in the Go language. In the following sections, we will do the following:

  • Set up a workspace in VSCode for our chaincode project(s)
  • Install and initialize some missing Go packages/commands
  • Program the actual chaincode, including the data objects, transactions, and events

Setting up a workspace in VSCode

Back in VSCode, either select the menu item File | Add Folder to Workspace, or if you see the Add Folder button, click on that. A window will open where you can select the folder to add to your workspace. Select goapps under your user's home folder, and click the Add button in the lower-right corner of the window:

Select the goapps folder to add to your VSCode workspace

This will add...