Folder Structure for Chaincode Folder #

Please note that infra-basic-network has all the stuff we used earlier to bring up a network. We will use the same network now and deploy our landrec chaincode on it.

Now lets look at important files inside the chaincode folder.

  1. lib/landrec.js: This contains the chaincode logic which reads and writes values to key value-based data store (state db). This defines valid transactions on the ledger.

  2. index.js: This is used to expose the landrec chaincode module.

  3. docker-compose.yml: This defines the fabric-tools container from which we will deploy our chaincode. This container will access the chaincode as mounted volume and will connect to same docker network as our fabric network components.

Get hands-on with 1200+ tech skills courses.