code: func invokeCmd(cf *ChaincodeCmdFactory) *cobra.Command {
  	chaincodeInvokeCmd = &cobra.Command{
  		Use:       "invoke",
  		Short:     fmt.Sprintf("Invoke the specified %s.", chainFuncName),
  		Long:      fmt.Sprintf("Invoke the specified %s. It will try to commit the endorsed transaction to the network.", chainFuncName),
  		ValidArgs: []string{"1"},
  		RunE: func(cmd *cobra.Command, args []string) error {
  			return chaincodeInvoke(cmd, cf)
  		},
  	}
  	flagList := []string{
  		"name",
  		"ctor",
  		"channelID",
  		"peerAddresses",
  		"tlsRootCertFiles",
  		"connectionProfile",
  		"waitForEvent",
  		"waitForEventTimeout",
  	}
  	attachFlags(chaincodeInvokeCmd, flagList)
  
  	return chaincodeInvokeCmd
  }
docs: // invokeCmd returns the cobra command for Chaincode Invoke