Deploying the corprem smart contract

We need to set up a new chaincode directory for our contract. In your Hyperledger Fabric fabric-samples directory, navigate to the chaincode directory. By default, it will be at the following location:

/fabric-samples/chaincode/

Let's look at how to setup the contract project environment:

  1. In the chaincode folder, create a new folder, with the name corprem.
  2. In the corprem folder, create an index.js file, with the following values:
/* * SPDX-License-Identifier: Apache-2.0 */'use strict';const corprem = require('./lib/corprem');module.exports.corprem = corprem;module.exports.contracts = [ corprem ];

This will declare the corprem object, which will be used by our peer chaincode to install and instantiate ...

Get Blockchain Development for Finance Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.