November 2018
Intermediate to advanced
528 pages
13h 21m
English
Once the Chaincode is deployed and installed, we can then instantiate the Chaincode as follows:
peer Chaincode instantiate -o orderer.fsc.com:7050 -C $CHANNEL_NAME -n fsccc -v 1.0 -c '{"Args":["init","order_001","John_1","100","5"]}' -P "OR('Org1MSP.member','Org2MSP.member','Org3MSP.member')"
Here we pass a JSON array of arguments to trigger the Init function defined earlier, using the -c option (lowercase). If you remember, when Init is executed it calls the setupFoodSupplyChainOrder function internally, which initiates the order details. Along with this, we assign the values order_001, John_1, 100, and 5 to the variables orderId , consumerId , orderPrice and shippingPrice respectively. The -P flag represents the ...
Read now
Unlock full access