Instantiating the chaincode

After installing the chaincode, we need to instantiate it. As we discussed previously, we will onboard insuree in the init() chaincode. Therefore, we need to pass the required arguments to create an insuree participant, as follows:

peer chaincode instantiate -o orderer.ic.com:7050 -C icchannel -n iccc -l golang -v 1.0 -c '{"Args":[ "user_001","John","Smith", "9999","4394497111/1"]}' -P "OR    ('Org1MSP.member'

Here is the output for this step:

Creating an insuree participant

We query the insuree to verify that the record has been created in the blockchain, as follows:

peer chaincode query -C $CHANNEL_NAME -n iccc -c '{"Args":["query","user_001"]}'

We can see from this output that the insuree (user_001) was added in our blockchain:

Insuree added in our block chain
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset