diff --git a/api/poktroll/service/tx.pulsar.go b/api/poktroll/service/tx.pulsar.go index c4e61fa8a..df5b6af63 100644 --- a/api/poktroll/service/tx.pulsar.go +++ b/api/poktroll/service/tx.pulsar.go @@ -2474,12 +2474,14 @@ func (x *fastReflection_MsgAddService) ProtoMethods() *protoiface.Methods { } var ( - md_MsgAddServiceResponse protoreflect.MessageDescriptor + md_MsgAddServiceResponse protoreflect.MessageDescriptor + fd_MsgAddServiceResponse_service protoreflect.FieldDescriptor ) func init() { file_poktroll_service_tx_proto_init() md_MsgAddServiceResponse = File_poktroll_service_tx_proto.Messages().ByName("MsgAddServiceResponse") + fd_MsgAddServiceResponse_service = md_MsgAddServiceResponse.Fields().ByName("service") } var _ protoreflect.Message = (*fastReflection_MsgAddServiceResponse)(nil) @@ -2547,6 +2549,12 @@ func (x *fastReflection_MsgAddServiceResponse) Interface() protoreflect.ProtoMes // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_MsgAddServiceResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Service != nil { + value := protoreflect.ValueOfMessage(x.Service.ProtoReflect()) + if !f(fd_MsgAddServiceResponse_service, value) { + return + } + } } // Has reports whether a field is populated. @@ -2562,6 +2570,8 @@ func (x *fastReflection_MsgAddServiceResponse) Range(f func(protoreflect.FieldDe // a repeated field is populated if it is non-empty. func (x *fastReflection_MsgAddServiceResponse) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + return x.Service != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2578,6 +2588,8 @@ func (x *fastReflection_MsgAddServiceResponse) Has(fd protoreflect.FieldDescript // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddServiceResponse) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + x.Service = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2594,6 +2606,9 @@ func (x *fastReflection_MsgAddServiceResponse) Clear(fd protoreflect.FieldDescri // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_MsgAddServiceResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + value := x.Service + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2614,6 +2629,8 @@ func (x *fastReflection_MsgAddServiceResponse) Get(descriptor protoreflect.Field // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddServiceResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + x.Service = value.Message().Interface().(*shared.Service) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2634,6 +2651,11 @@ func (x *fastReflection_MsgAddServiceResponse) Set(fd protoreflect.FieldDescript // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_MsgAddServiceResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + if x.Service == nil { + x.Service = new(shared.Service) + } + return protoreflect.ValueOfMessage(x.Service.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2647,6 +2669,9 @@ func (x *fastReflection_MsgAddServiceResponse) Mutable(fd protoreflect.FieldDesc // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_MsgAddServiceResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { + case "poktroll.service.MsgAddServiceResponse.service": + m := new(shared.Service) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.service.MsgAddServiceResponse")) @@ -2716,6 +2741,10 @@ func (x *fastReflection_MsgAddServiceResponse) ProtoMethods() *protoiface.Method var n int var l int _ = l + if x.Service != nil { + l = options.Size(x.Service) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -2745,6 +2774,20 @@ func (x *fastReflection_MsgAddServiceResponse) ProtoMethods() *protoiface.Method i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.Service != nil { + encoded, err := options.Marshal(x.Service) + if err != nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, err + } + i -= len(encoded) + copy(dAtA[i:], encoded) + i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) + i-- + dAtA[i] = 0xa + } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) } else { @@ -2794,6 +2837,42 @@ func (x *fastReflection_MsgAddServiceResponse) ProtoMethods() *protoiface.Method return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgAddServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow + } + if iNdEx >= l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if postIndex > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if x.Service == nil { + x.Service = &shared.Service{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Service); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -3093,6 +3172,8 @@ type MsgAddServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Service *shared.Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` } func (x *MsgAddServiceResponse) Reset() { @@ -3115,6 +3196,13 @@ func (*MsgAddServiceResponse) Descriptor() ([]byte, []int) { return file_poktroll_service_tx_proto_rawDescGZIP(), []int{5} } +func (x *MsgAddServiceResponse) GetService() *shared.Service { + if x != nil { + return x.Service + } + return nil +} + var File_poktroll_service_tx_proto protoreflect.FileDescriptor var file_poktroll_service_tx_proto_rawDesc = []byte{ @@ -3175,38 +3263,41 @@ var file_poktroll_service_tx_proto_rawDesc = []byte{ 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x3a, 0x12, 0x82, 0xe7, 0xb0, 0x2a, 0x0d, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x17, 0x0a, 0x15, 0x4d, 0x73, 0x67, + 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x4b, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0x9d, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, - 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x29, 0x2e, + 0x73, 0x65, 0x12, 0x32, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, + 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x07, 0x73, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x32, 0x9d, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x5c, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x21, + 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x1a, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, + 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, + 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0b, + 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x2e, 0x70, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, - 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0b, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x12, 0x20, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x28, 0x2e, 0x70, 0x6f, 0x6b, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, - 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x1a, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x53, 0x65, 0x72, 0x76, - 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, - 0x2a, 0x01, 0x42, 0xa7, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, 0x6f, 0x6d, 0x2e, 0x70, - 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x42, - 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x21, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xa2, 0x02, 0x03, - 0x50, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x53, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, 0x50, 0x6f, 0x6b, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x50, 0x6f, 0x6b, 0x74, 0x72, - 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x62, 0x06, 0x70, 0x72, - 0x6f, 0x74, 0x6f, 0x33, + 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0a, 0x41, 0x64, 0x64, 0x53, 0x65, + 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x1f, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, 0x53, + 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x1a, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x4d, 0x73, 0x67, 0x41, 0x64, 0x64, + 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, + 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xa7, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x14, 0x63, + 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x65, 0x72, 0x76, + 0x69, 0x63, 0x65, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x21, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0xa2, 0x02, 0x03, 0x50, 0x53, 0x58, 0xaa, 0x02, 0x10, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xca, 0x02, 0x10, 0x50, 0x6f, 0x6b, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0xe2, 0x02, 0x1c, + 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x11, 0x50, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3238,17 +3329,18 @@ var file_poktroll_service_tx_proto_depIdxs = []int32{ 7, // 1: poktroll.service.MsgUpdateParam.as_coin:type_name -> cosmos.base.v1beta1.Coin 6, // 2: poktroll.service.MsgUpdateParamResponse.params:type_name -> poktroll.service.Params 8, // 3: poktroll.service.MsgAddService.service:type_name -> poktroll.shared.Service - 0, // 4: poktroll.service.Msg.UpdateParams:input_type -> poktroll.service.MsgUpdateParams - 2, // 5: poktroll.service.Msg.UpdateParam:input_type -> poktroll.service.MsgUpdateParam - 4, // 6: poktroll.service.Msg.AddService:input_type -> poktroll.service.MsgAddService - 1, // 7: poktroll.service.Msg.UpdateParams:output_type -> poktroll.service.MsgUpdateParamsResponse - 3, // 8: poktroll.service.Msg.UpdateParam:output_type -> poktroll.service.MsgUpdateParamResponse - 5, // 9: poktroll.service.Msg.AddService:output_type -> poktroll.service.MsgAddServiceResponse - 7, // [7:10] is the sub-list for method output_type - 4, // [4:7] is the sub-list for method input_type - 4, // [4:4] is the sub-list for extension type_name - 4, // [4:4] is the sub-list for extension extendee - 0, // [0:4] is the sub-list for field type_name + 8, // 4: poktroll.service.MsgAddServiceResponse.service:type_name -> poktroll.shared.Service + 0, // 5: poktroll.service.Msg.UpdateParams:input_type -> poktroll.service.MsgUpdateParams + 2, // 6: poktroll.service.Msg.UpdateParam:input_type -> poktroll.service.MsgUpdateParam + 4, // 7: poktroll.service.Msg.AddService:input_type -> poktroll.service.MsgAddService + 1, // 8: poktroll.service.Msg.UpdateParams:output_type -> poktroll.service.MsgUpdateParamsResponse + 3, // 9: poktroll.service.Msg.UpdateParam:output_type -> poktroll.service.MsgUpdateParamResponse + 5, // 10: poktroll.service.Msg.AddService:output_type -> poktroll.service.MsgAddServiceResponse + 8, // [8:11] is the sub-list for method output_type + 5, // [5:8] is the sub-list for method input_type + 5, // [5:5] is the sub-list for extension type_name + 5, // [5:5] is the sub-list for extension extendee + 0, // [0:5] is the sub-list for field type_name } func init() { file_poktroll_service_tx_proto_init() } diff --git a/proto/poktroll/service/tx.proto b/proto/poktroll/service/tx.proto index b80a5d5d2..c5c32807a 100644 --- a/proto/poktroll/service/tx.proto +++ b/proto/poktroll/service/tx.proto @@ -73,5 +73,7 @@ message MsgAddService { poktroll.shared.Service service = 2 [(gogoproto.nullable) = false]; // The Service being added to the network } -message MsgAddServiceResponse {} +message MsgAddServiceResponse { + poktroll.shared.Service service = 1; +} diff --git a/x/service/keeper/msg_server_add_service.go b/x/service/keeper/msg_server_add_service.go index 2d3dd69c0..4596883f9 100644 --- a/x/service/keeper/msg_server_add_service.go +++ b/x/service/keeper/msg_server_add_service.go @@ -111,5 +111,7 @@ func (k msgServer) AddService( k.SetService(ctx, msg.Service) isSuccessful = true - return &types.MsgAddServiceResponse{}, nil + return &types.MsgAddServiceResponse{ + Service: &msg.Service, + }, nil } diff --git a/x/service/keeper/msg_server_add_service_test.go b/x/service/keeper/msg_server_add_service_test.go index 48268469b..ce913e568 100644 --- a/x/service/keeper/msg_server_add_service_test.go +++ b/x/service/keeper/msg_server_add_service_test.go @@ -43,11 +43,12 @@ func TestMsgServer_AddService(t *testing.T) { keepertest.AddAccToAccMapCoins(t, oldServiceOwnerAddr, volatile.DenomuPOKT, oneUPOKTGreaterThanFee) // Add the service to the store - _, err := srv.AddService(ctx, &types.MsgAddService{ + addSvcRes, err := srv.AddService(ctx, &types.MsgAddService{ OwnerAddress: oldServiceOwnerAddr, Service: oldService, }) require.NoError(t, err) + require.Equal(t, &oldService, addSvcRes.GetService()) // Validate the service was added serviceFound, found := k.GetService(ctx, oldService.Id) diff --git a/x/service/types/tx.pb.go b/x/service/types/tx.pb.go index c6c9e1259..5d7dd88e7 100644 --- a/x/service/types/tx.pb.go +++ b/x/service/types/tx.pb.go @@ -314,6 +314,7 @@ func (m *MsgAddService) GetService() types1.Service { } type MsgAddServiceResponse struct { + Service *types1.Service `protobuf:"bytes,1,opt,name=service,proto3" json:"service,omitempty"` } func (m *MsgAddServiceResponse) Reset() { *m = MsgAddServiceResponse{} } @@ -345,6 +346,13 @@ func (m *MsgAddServiceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgAddServiceResponse proto.InternalMessageInfo +func (m *MsgAddServiceResponse) GetService() *types1.Service { + if m != nil { + return m.Service + } + return nil +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.service.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.service.MsgUpdateParamsResponse") @@ -357,45 +365,46 @@ func init() { func init() { proto.RegisterFile("poktroll/service/tx.proto", fileDescriptor_31ba9559706e649e) } var fileDescriptor_31ba9559706e649e = []byte{ - // 607 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0xbf, 0x6f, 0xd3, 0x4e, - 0x14, 0xf7, 0xb5, 0xf9, 0xb6, 0x5f, 0x5f, 0x7f, 0x00, 0x56, 0xa1, 0x8e, 0x25, 0x9c, 0xe0, 0x85, - 0x50, 0x51, 0xbb, 0x29, 0x50, 0xa1, 0x20, 0x86, 0x98, 0xa5, 0x42, 0x0a, 0x42, 0xae, 0x8a, 0x04, - 0x42, 0x8a, 0x2e, 0xf1, 0xc9, 0xb1, 0x5a, 0xfb, 0x2c, 0xdf, 0x25, 0x6d, 0x37, 0xc4, 0xc8, 0xc4, - 0x1f, 0x00, 0x3b, 0x63, 0x06, 0x56, 0xf6, 0x8e, 0x15, 0x53, 0xa7, 0x08, 0x25, 0x43, 0x50, 0xff, - 0x0a, 0x64, 0xfb, 0x9c, 0xd4, 0x49, 0x44, 0x24, 0x96, 0xe4, 0xee, 0x7d, 0x3e, 0xef, 0xc7, 0xe7, - 0xbd, 0x77, 0x86, 0xf9, 0x80, 0x1c, 0xb1, 0x90, 0x1c, 0x1f, 0x1b, 0x14, 0x87, 0x1d, 0xb7, 0x89, - 0x0d, 0x76, 0xaa, 0x07, 0x21, 0x61, 0x44, 0xba, 0x99, 0x42, 0x3a, 0x87, 0x94, 0x5b, 0xc8, 0x73, - 0x7d, 0x62, 0xc4, 0xbf, 0x09, 0x49, 0x51, 0x9b, 0x84, 0x7a, 0x84, 0x1a, 0x0d, 0x44, 0xb1, 0xd1, - 0x29, 0x37, 0x30, 0x43, 0x65, 0xa3, 0x49, 0x5c, 0x9f, 0xe3, 0x9b, 0x1c, 0xf7, 0xa8, 0x63, 0x74, - 0xca, 0xd1, 0x1f, 0x07, 0xf2, 0x09, 0x50, 0x8f, 0x6f, 0x46, 0x72, 0xe1, 0xd0, 0x86, 0x43, 0x1c, - 0x92, 0xd8, 0xa3, 0x13, 0xb7, 0xde, 0x9d, 0xaa, 0x34, 0x40, 0x21, 0xf2, 0xe8, 0x34, 0xdc, 0x42, - 0x21, 0xb6, 0x53, 0x56, 0x02, 0x6b, 0x3f, 0x00, 0xbc, 0x51, 0xa3, 0xce, 0x61, 0x60, 0x23, 0x86, - 0x5f, 0xc7, 0x8e, 0xd2, 0x1e, 0x14, 0x51, 0x9b, 0xb5, 0x48, 0xe8, 0xb2, 0x33, 0x19, 0x14, 0x41, - 0x49, 0x34, 0xe5, 0x9f, 0xdf, 0xb7, 0x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0x00, 0xff, 0xff, 0xb4, 0xe3, 0x94, 0x22, 0x2a, 0x05, 0x00, 0x00, + // 615 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x3f, 0x6f, 0xd3, 0x4e, + 0x18, 0xf6, 0xb5, 0xf9, 0xb5, 0x3f, 0x5f, 0xff, 0x00, 0x56, 0xa1, 0x8e, 0x25, 0x9c, 0xe0, 0x85, + 0x50, 0x51, 0xbb, 0x2d, 0x50, 0xa1, 0x22, 0x86, 0x9a, 0xa5, 0x02, 0x05, 0x21, 0x57, 0x45, 0x02, + 0x21, 0x45, 0x97, 0xf8, 0xe4, 0x58, 0xad, 0x7d, 0x96, 0xef, 0x92, 0xb6, 0x1b, 0x62, 0x64, 0xe2, + 0x03, 0xc0, 0xce, 0x98, 0x81, 0x95, 0xbd, 0x63, 0xc5, 0xd4, 0x29, 0x42, 0xc9, 0x10, 0xd4, 0x4f, + 0x81, 0x6c, 0x9f, 0x9d, 0x3a, 0x89, 0x1a, 0x89, 0x25, 0xb9, 0x7b, 0x9f, 0xe7, 0x7d, 0x9f, 0xf7, + 0xdf, 0x19, 0x16, 0x03, 0x72, 0xc8, 0x42, 0x72, 0x74, 0x64, 0x50, 0x1c, 0xb6, 0xdd, 0x06, 0x36, + 0xd8, 0x89, 0x1e, 0x84, 0x84, 0x11, 0xe9, 0x66, 0x0a, 0xe9, 0x1c, 0x52, 0x6e, 0x21, 0xcf, 0xf5, + 0x89, 0x11, 0xff, 0x26, 0x24, 0x45, 0x6d, 0x10, 0xea, 0x11, 0x6a, 0xd4, 0x11, 0xc5, 0x46, 0x7b, + 0xb3, 0x8e, 0x19, 0xda, 0x34, 0x1a, 0xc4, 0xf5, 0x39, 0xbe, 0xca, 0x71, 0x8f, 0x3a, 0x46, 0x7b, + 0x33, 0xfa, 0xe3, 0x40, 0x31, 0x01, 0x6a, 0xf1, 0xcd, 0x48, 0x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3f, 0x85, 0x90, 0xc6, 0x55, 0xfe, 0xfb, 0x18, 0x3d, + 0x4e, 0xf3, 0xf5, 0x59, 0x4f, 0x05, 0xe7, 0x3d, 0x15, 0x5c, 0xf4, 0x54, 0xf0, 0xbb, 0xa7, 0x82, + 0x2f, 0x7d, 0x55, 0x38, 0xef, 0xab, 0xc2, 0x45, 0x5f, 0x15, 0xde, 0x6f, 0x38, 0x2e, 0x6b, 0xb6, + 0xea, 0x7a, 0x83, 0x78, 0x46, 0x14, 0x77, 0xdd, 0xc7, 0xec, 0x98, 0x84, 0x87, 0xc6, 0x84, 0x77, + 0x1b, 0xad, 0x29, 0xad, 0xcf, 0xc5, 0x1f, 0x9d, 0x47, 0x7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0xd8, + 0x94, 0xfb, 0x9f, 0x5e, 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -791,6 +800,18 @@ func (m *MsgAddServiceResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Service != nil { + { + size, err := m.Service.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + } return len(dAtA) - i, nil } @@ -904,6 +925,10 @@ func (m *MsgAddServiceResponse) Size() (n int) { } var l int _ = l + if m.Service != nil { + l = m.Service.Size() + n += 1 + l + sovTx(uint64(l)) + } return n } @@ -1477,6 +1502,42 @@ func (m *MsgAddServiceResponse) Unmarshal(dAtA []byte) error { return fmt.Errorf("proto: MsgAddServiceResponse: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Service", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Service == nil { + m.Service = &types1.Service{} + } + if err := m.Service.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:])