0

I have application that uses fabric-sdk-java to join new peers to the existing fabric network. When joining peer I want to install chaincode on the peer and instantiate it (in case it had not been instantiated on the channel).

Is there any way to check using sdk if a specific chaincode is instantiated on the channel?

Ivan
  • 340
  • 3
  • 14
  • 1
    Yes. I found `queryInstantiatedChaincodes` function [here](https://sdkjavadocs.github.io/org/hyperledger/fabric/sdk/Channel.html#queryInstantiatedChaincodes-org.hyperledger.fabric.sdk.Peer-). I'm not familiar with fabric-java-sdk but the flow might be the same with fabric-node-sdk, which is: create an instance of your `Channel` then call the `queryInstantiatedChaincodes` function to get a list of instantiated chaincodes – Hnampk Jul 05 '19 at 07:30
  • Thank you @HoaiNam ! That just what I was looking for! – Ivan Jul 05 '19 at 07:41

0 Answers0