code: func (t *EventSender) invoke(stub shim.ChaincodeStubInterface, args []string) pb.Response {
  	b, err := stub.GetState("noevents")
  	if err != nil {
  		return shim.Error("Failed to get state")
  	}
  	noevts, _ := strconv.Atoi(string(b))
  
  	tosend := "Event " + string(b)
  	for _, s := range args {
  		tosend = tosend + "," + s
  	}
  
  	err = stub.PutState("noevents", []byte(strconv.Itoa(noevts+1)))
  	if err != nil {
  		return shim.Error(err.Error())
  	}
  
  	err = stub.SetEvent("evtsender", []byte(tosend))
  	if err != nil {
  		return shim.Error(err.Error())
  	}
  	return shim.Success(nil)
  }
docs: // Invoke function