code: func (rc *Client) QueryInstantiatedChaincodes(channelID string, options ...RequestOption) (*pb.ChaincodeQueryResponse, error) {
  
  	opts, err := rc.prepareRequestOpts(options...)
  	if err != nil {
  		return nil, err
  	}
  
  	chCtx, err := contextImpl.NewChannel(
  		func() (context.Client, error) {
  			return rc.ctx, nil
  		},
  		channelID,
  	)
  	if err != nil {
  		return nil, errors.WithMessage(err, "failed to create channel context")
  	}
  
  	var target fab.ProposalProcessor
  	if len(opts.Targets) >= 1 {
  		target = opts.Targets[0]
  	} else {
  		// select random channel peer
  		var srcpErr error
  		target, srcpErr = rc.selectRandomChannelPeer(chCtx)
  		if srcpErr != nil {
  			return nil, srcpErr
  		}
  	}
  
  	l, err := channel.NewLedger(channelID)
  	if err != nil {
  		return nil, err
  	}
  
  	reqCtx, cancel := rc.createRequestContext(opts, fab.PeerResponse)
  	defer cancel()
  
  	// Channel service membership is required to verify signature
  	channelService := chCtx.ChannelService()
  
  	membership, err := channelService.Membership()
  	if err != nil {
  		return nil, errors.WithMessage(err, "membership creation failed")
  	}
  
  	responses, err := l.QueryInstantiatedChaincodes(reqCtx, []fab.ProposalProcessor{target}, &verifier.Signature{Membership: membership})
  	if err != nil {
  		return nil, err
  	}
  
  	return responses[0], nil
  }
docs: // QueryInstantiatedChaincodes queries the instantiated chaincodes on a peer for specific channel. If peer is not specified in options it will query random peer on this channel.
  //  Parameters:
  //  channel is manadatory channel name
  //  options hold optional request options
  //
  //  Returns:
  //  list of instantiated chaincodes