How Check Names of Installed Smart Contracts


Brian Carpenter
 

Is there a terminal command I can run that will list the smart contracts installed on a peer?


Or some other way to get this information?  Need it to debug some issues I'm having.

  

Tks.



Chris Gabriel
 

Hi Brian,
From within the peer container, run:
peer chaincode list —installed -C <channel name>




On Apr 17, 2021, at 4:33 PM, Brian Carpenter <bmc121177@...> wrote:



Is there a terminal command I can run that will list the smart contracts installed on a peer?


Or some other way to get this information?  Need it to debug some issues I'm having.

  

Tks.



Chris Gabriel
 

Brian,
Sorry, I sent you the command for earlier fabric networks which would be correct if you are on Fabric 1.x   If you are on Fabric 2.x you will need to use the new peer lifecycle chaincode commands.

So from within the peer container, run:
peer lifecycle chaincode queryinstalled -o <your orderer> 

If tls is enabled you need to add the --tls flag and path to your tls cert like this:
peer lifecycle chaincode queryinstalled -o <your orderer> —tls —cafile <path to your cert file>





On Apr 17, 2021, at 4:41 PM, Gmail <alaskadd@...> wrote:

Hi Brian,
From within the peer container, run:
peer chaincode list —installed -C <channel name>




On Apr 17, 2021, at 4:33 PM, Brian Carpenter <bmc121177@...> wrote:


Is there a terminal command I can run that will list the smart contracts installed on a peer?

Or some other way to get this information?  Need it to debug some issues I'm having.

  

Tks.