上QQ阅读APP看书,第一时间看更新
Instantiating the assermgr chaincode
Next, we will instantiate the assermgr chaincode. As we discussed earlier, in order to create an asset record, we need to pass assetId, assetType, and deviceId. Let's assume that the school needs to trace an ipad with the 0e83ff device ID and the 100 asset ID. We can instantiate our ipad asset by running the following command:
peer chaincode instantiate -n mycc -v 0 -c '{"Args":["100","ipad", "0e83ff"]}' -C myc
The result is as follows:
We have now successfully installed and instantiated our assetmgr chaincode.