A Step-by-Step guideline for deploying the smart contract.
Installation and approval of Chaincode
Smart Contracts are officially called as chaincode in Fabric. A peer node can install a smart contract, meaning the smart contract is physically installed to the peer node.
After installation, the chaincode should be approved by all organizations in the channel. Once a smart contract is approved and committed, the smart contract is now active.
The functions in the smart contract can be invoked as transactions. However, only those nodes who have installed the same smart contract can invoke functions (transactions).
Create a Fabric smart contract package using Fabric command "peer"
Chaincode definition for chaincode 'cyliu-chaincode', version '0', sequence '1' on channel 'cyliu-channel' approval status by org:
greatinsurance: true
police: true
smartinsurance: true
If any organization show false, wait a few seconds and execute the command again until all organization show true
Execute the following command to commit the approved smart contract