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
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...