diff --git a/api/poktroll/application/tx.pulsar.go b/api/poktroll/application/tx.pulsar.go index d00a23849..2f0cbcda3 100644 --- a/api/poktroll/application/tx.pulsar.go +++ b/api/poktroll/application/tx.pulsar.go @@ -4322,6 +4322,925 @@ func (x *fastReflection_MsgUndelegateFromGatewayResponse) ProtoMethods() *protoi } } +var ( + md_MsgTransferApplication protoreflect.MessageDescriptor + fd_MsgTransferApplication_source_address protoreflect.FieldDescriptor + fd_MsgTransferApplication_destination_address protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_application_tx_proto_init() + md_MsgTransferApplication = File_poktroll_application_tx_proto.Messages().ByName("MsgTransferApplication") + fd_MsgTransferApplication_source_address = md_MsgTransferApplication.Fields().ByName("source_address") + fd_MsgTransferApplication_destination_address = md_MsgTransferApplication.Fields().ByName("destination_address") +} + +var _ protoreflect.Message = (*fastReflection_MsgTransferApplication)(nil) + +type fastReflection_MsgTransferApplication MsgTransferApplication + +func (x *MsgTransferApplication) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTransferApplication)(x) +} + +func (x *MsgTransferApplication) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_application_tx_proto_msgTypes[10] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgTransferApplication_messageType fastReflection_MsgTransferApplication_messageType +var _ protoreflect.MessageType = fastReflection_MsgTransferApplication_messageType{} + +type fastReflection_MsgTransferApplication_messageType struct{} + +func (x fastReflection_MsgTransferApplication_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTransferApplication)(nil) +} +func (x fastReflection_MsgTransferApplication_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTransferApplication) +} +func (x fastReflection_MsgTransferApplication_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransferApplication +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgTransferApplication) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransferApplication +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgTransferApplication) Type() protoreflect.MessageType { + return _fastReflection_MsgTransferApplication_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgTransferApplication) New() protoreflect.Message { + return new(fastReflection_MsgTransferApplication) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgTransferApplication) Interface() protoreflect.ProtoMessage { + return (*MsgTransferApplication)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgTransferApplication) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.SourceAddress != "" { + value := protoreflect.ValueOfString(x.SourceAddress) + if !f(fd_MsgTransferApplication_source_address, value) { + return + } + } + if x.DestinationAddress != "" { + value := protoreflect.ValueOfString(x.DestinationAddress) + if !f(fd_MsgTransferApplication_destination_address, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgTransferApplication) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + return x.SourceAddress != "" + case "poktroll.application.MsgTransferApplication.destination_address": + return x.DestinationAddress != "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplication) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + x.SourceAddress = "" + case "poktroll.application.MsgTransferApplication.destination_address": + x.DestinationAddress = "" + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgTransferApplication) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + value := x.SourceAddress + return protoreflect.ValueOfString(value) + case "poktroll.application.MsgTransferApplication.destination_address": + value := x.DestinationAddress + return protoreflect.ValueOfString(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplication) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + x.SourceAddress = value.Interface().(string) + case "poktroll.application.MsgTransferApplication.destination_address": + x.DestinationAddress = value.Interface().(string) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplication) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + panic(fmt.Errorf("field source_address of message poktroll.application.MsgTransferApplication is not mutable")) + case "poktroll.application.MsgTransferApplication.destination_address": + panic(fmt.Errorf("field destination_address of message poktroll.application.MsgTransferApplication is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgTransferApplication) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplication.source_address": + return protoreflect.ValueOfString("") + case "poktroll.application.MsgTransferApplication.destination_address": + return protoreflect.ValueOfString("") + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplication")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplication does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgTransferApplication) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.application.MsgTransferApplication", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgTransferApplication) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplication) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgTransferApplication) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgTransferApplication) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgTransferApplication) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + l = len(x.SourceAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.DestinationAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgTransferApplication) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if len(x.DestinationAddress) > 0 { + i -= len(x.DestinationAddress) + copy(dAtA[i:], x.DestinationAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.SourceAddress) > 0 { + i -= len(x.SourceAddress) + copy(dAtA[i:], x.SourceAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SourceAddress))) + i-- + dAtA[i] = 0xa + } + if input.Buf != nil { + input.Buf = append(input.Buf, dAtA...) + } else { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgTransferApplication) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransferApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransferApplication: 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 SourceAddress", wireType) + } + var stringLen uint64 + 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++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + 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 + } + x.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + 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++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + intStringLen + 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 + } + x.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + +var ( + md_MsgTransferApplicationResponse protoreflect.MessageDescriptor + fd_MsgTransferApplicationResponse_application protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_application_tx_proto_init() + md_MsgTransferApplicationResponse = File_poktroll_application_tx_proto.Messages().ByName("MsgTransferApplicationResponse") + fd_MsgTransferApplicationResponse_application = md_MsgTransferApplicationResponse.Fields().ByName("application") +} + +var _ protoreflect.Message = (*fastReflection_MsgTransferApplicationResponse)(nil) + +type fastReflection_MsgTransferApplicationResponse MsgTransferApplicationResponse + +func (x *MsgTransferApplicationResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgTransferApplicationResponse)(x) +} + +func (x *MsgTransferApplicationResponse) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_application_tx_proto_msgTypes[11] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +var _fastReflection_MsgTransferApplicationResponse_messageType fastReflection_MsgTransferApplicationResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgTransferApplicationResponse_messageType{} + +type fastReflection_MsgTransferApplicationResponse_messageType struct{} + +func (x fastReflection_MsgTransferApplicationResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgTransferApplicationResponse)(nil) +} +func (x fastReflection_MsgTransferApplicationResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgTransferApplicationResponse) +} +func (x fastReflection_MsgTransferApplicationResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransferApplicationResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgTransferApplicationResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgTransferApplicationResponse +} + +// Type returns the message type, which encapsulates both Go and protobuf +// type information. If the Go type information is not needed, +// it is recommended that the message descriptor be used instead. +func (x *fastReflection_MsgTransferApplicationResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgTransferApplicationResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgTransferApplicationResponse) New() protoreflect.Message { + return new(fastReflection_MsgTransferApplicationResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgTransferApplicationResponse) Interface() protoreflect.ProtoMessage { + return (*MsgTransferApplicationResponse)(x) +} + +// Range iterates over every populated field in an undefined order, +// calling f for each field descriptor and value encountered. +// Range returns immediately if f returns false. +// While iterating, mutating operations may only be performed +// on the current field descriptor. +func (x *fastReflection_MsgTransferApplicationResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Application != nil { + value := protoreflect.ValueOfMessage(x.Application.ProtoReflect()) + if !f(fd_MsgTransferApplicationResponse_application, value) { + return + } + } +} + +// Has reports whether a field is populated. +// +// Some fields have the property of nullability where it is possible to +// distinguish between the default value of a field and whether the field +// was explicitly populated with the default value. Singular message fields, +// member fields of a oneof, and proto2 scalar fields are nullable. Such +// fields are populated only if explicitly set. +// +// In other cases (aside from the nullable cases above), +// a proto3 scalar field is populated if it contains a non-zero value, and +// a repeated field is populated if it is non-empty. +func (x *fastReflection_MsgTransferApplicationResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + return x.Application != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", fd.FullName())) + } +} + +// Clear clears the field such that a subsequent Has call reports false. +// +// Clearing an extension field clears both the extension type and value +// associated with the given field number. +// +// Clear is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplicationResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + x.Application = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", fd.FullName())) + } +} + +// Get retrieves the value for a field. +// +// For unpopulated scalars, it returns the default value, where +// the default value of a bytes scalar is guaranteed to be a copy. +// For unpopulated composite types, it returns an empty, read-only view +// of the value; to obtain a mutable reference, use Mutable. +func (x *fastReflection_MsgTransferApplicationResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + value := x.Application + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", descriptor.FullName())) + } +} + +// Set stores the value for a field. +// +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType. +// When setting a composite type, it is unspecified whether the stored value +// aliases the source's memory in any way. If the composite value is an +// empty, read-only value, then it panics. +// +// Set is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplicationResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + x.Application = value.Message().Interface().(*Application) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", fd.FullName())) + } +} + +// Mutable returns a mutable reference to a composite type. +// +// If the field is unpopulated, it may allocate a composite value. +// For a field belonging to a oneof, it implicitly clears any other field +// that may be currently set within the same oneof. +// For extension fields, it implicitly stores the provided ExtensionType +// if not already stored. +// It panics if the field does not contain a composite type. +// +// Mutable is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplicationResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + if x.Application == nil { + x.Application = new(Application) + } + return protoreflect.ValueOfMessage(x.Application.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", fd.FullName())) + } +} + +// NewField returns a new value that is assignable to the field +// for the given descriptor. For scalars, this returns the default value. +// For lists, maps, and messages, this returns a new, empty, mutable value. +func (x *fastReflection_MsgTransferApplicationResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.application.MsgTransferApplicationResponse.application": + m := new(Application) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.application.MsgTransferApplicationResponse")) + } + panic(fmt.Errorf("message poktroll.application.MsgTransferApplicationResponse does not contain field %s", fd.FullName())) + } +} + +// WhichOneof reports which field within the oneof is populated, +// returning nil if none are populated. +// It panics if the oneof descriptor does not belong to this message. +func (x *fastReflection_MsgTransferApplicationResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.application.MsgTransferApplicationResponse", d.FullName())) + } + panic("unreachable") +} + +// GetUnknown retrieves the entire list of unknown fields. +// The caller may only mutate the contents of the RawFields +// if the mutated bytes are stored back into the message with SetUnknown. +func (x *fastReflection_MsgTransferApplicationResponse) GetUnknown() protoreflect.RawFields { + return x.unknownFields +} + +// SetUnknown stores an entire list of unknown fields. +// The raw fields must be syntactically valid according to the wire format. +// An implementation may panic if this is not the case. +// Once stored, the caller must not mutate the content of the RawFields. +// An empty RawFields may be passed to clear the fields. +// +// SetUnknown is a mutating operation and unsafe for concurrent use. +func (x *fastReflection_MsgTransferApplicationResponse) SetUnknown(fields protoreflect.RawFields) { + x.unknownFields = fields +} + +// IsValid reports whether the message is valid. +// +// An invalid message is an empty, read-only value. +// +// An invalid message often corresponds to a nil pointer of the concrete +// message type, but the details are implementation dependent. +// Validity is not part of the protobuf data model, and may not +// be preserved in marshaling or other operations. +func (x *fastReflection_MsgTransferApplicationResponse) IsValid() bool { + return x != nil +} + +// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. +// This method may return nil. +// +// The returned methods type is identical to +// "google.golang.org/protobuf/runtime/protoiface".Methods. +// Consult the protoiface package documentation for details. +func (x *fastReflection_MsgTransferApplicationResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgTransferApplicationResponse) + if x == nil { + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: 0, + } + } + options := runtime.SizeInputToOptions(input) + _ = options + var n int + var l int + _ = l + if x.Application != nil { + l = options.Size(x.Application) + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.unknownFields != nil { + n += len(x.unknownFields) + } + return protoiface.SizeOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Size: n, + } + } + + marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { + x := input.Message.Interface().(*MsgTransferApplicationResponse) + if x == nil { + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + options := runtime.MarshalInputToOptions(input) + _ = options + size := options.Size(x) + dAtA := make([]byte, size) + i := len(dAtA) + _ = i + var l int + _ = l + if x.unknownFields != nil { + i -= len(x.unknownFields) + copy(dAtA[i:], x.unknownFields) + } + if x.Application != nil { + encoded, err := options.Marshal(x.Application) + 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 { + input.Buf = dAtA + } + return protoiface.MarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Buf: input.Buf, + }, nil + } + unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { + x := input.Message.Interface().(*MsgTransferApplicationResponse) + if x == nil { + return protoiface.UnmarshalOutput{ + NoUnkeyedLiterals: input.NoUnkeyedLiterals, + Flags: input.Flags, + }, nil + } + options := runtime.UnmarshalInputToOptions(input) + _ = options + dAtA := input.Buf + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + 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++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransferApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgTransferApplicationResponse: 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 Application", 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.Application == nil { + x.Application = &Application{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Application); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := runtime.Skip(dAtA[iNdEx:]) + if err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + if (iNdEx + skippy) > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + if !options.DiscardUnknown { + x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) + } + iNdEx += skippy + } + } + + if iNdEx > l { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF + } + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil + } + return &protoiface.Methods{ + NoUnkeyedLiterals: struct{}{}, + Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, + Size: size, + Marshal: marshal, + Unmarshal: unmarshal, + Merge: nil, + CheckInitialized: nil, + } +} + // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.27.0 @@ -4686,6 +5605,84 @@ func (*MsgUndelegateFromGatewayResponse) Descriptor() ([]byte, []int) { return file_poktroll_application_tx_proto_rawDescGZIP(), []int{9} } +type MsgTransferApplication struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` +} + +func (x *MsgTransferApplication) Reset() { + *x = MsgTransferApplication{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_application_tx_proto_msgTypes[10] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgTransferApplication) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgTransferApplication) ProtoMessage() {} + +// Deprecated: Use MsgTransferApplication.ProtoReflect.Descriptor instead. +func (*MsgTransferApplication) Descriptor() ([]byte, []int) { + return file_poktroll_application_tx_proto_rawDescGZIP(), []int{10} +} + +func (x *MsgTransferApplication) GetSourceAddress() string { + if x != nil { + return x.SourceAddress + } + return "" +} + +func (x *MsgTransferApplication) GetDestinationAddress() string { + if x != nil { + return x.DestinationAddress + } + return "" +} + +type MsgTransferApplicationResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (x *MsgTransferApplicationResponse) Reset() { + *x = MsgTransferApplicationResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_application_tx_proto_msgTypes[11] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgTransferApplicationResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgTransferApplicationResponse) ProtoMessage() {} + +// Deprecated: Use MsgTransferApplicationResponse.ProtoReflect.Descriptor instead. +func (*MsgTransferApplicationResponse) Descriptor() ([]byte, []int) { + return file_poktroll_application_tx_proto_rawDescGZIP(), []int{11} +} + +func (x *MsgTransferApplicationResponse) GetApplication() *Application { + if x != nil { + return x.Application + } + return nil +} + var File_poktroll_application_tx_proto protoreflect.FileDescriptor var file_poktroll_application_tx_proto_rawDesc = []byte{ @@ -4700,108 +5697,136 @@ var file_poktroll_application_tx_proto_rawDesc = []byte{ 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, - 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, - 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, 0x74, 0x68, - 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, - 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, - 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, - 0x12, 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x09, - 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, - 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x78, - 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x4d, 0x73, 0x67, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, 0x0a, 0x17, + 0x74, 0x6f, 0x1a, 0x20, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x21, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x61, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1d, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x2f, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x0f, 0x4d, 0x73, 0x67, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x36, 0x0a, 0x09, 0x61, 0x75, + 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, + 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, + 0x74, 0x79, 0x12, 0x3f, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, + 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x70, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x3a, 0x39, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x74, 0x79, 0x8a, 0xe7, 0xb0, 0x2a, 0x26, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2f, 0x78, 0x2f, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x4d, + 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x19, + 0x0a, 0x17, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x4d, 0x73, + 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, + 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, + 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, + 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x0c, 0x82, + 0xe7, 0xb0, 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, + 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x15, 0x4d, 0x73, + 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x0c, 0x82, + 0xe7, 0xb0, 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, + 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x01, 0x0a, + 0x14, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, + 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, + 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x41, 0x0a, 0x0f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, + 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, + 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, + 0x67, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, + 0x0f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, + 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, + 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, + 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb9, 0x01, 0x0a, 0x16, 0x4d, 0x73, 0x67, 0x54, 0x72, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x3f, 0x0a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, + 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, + 0x69, 0x6e, 0x67, 0x52, 0x0d, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x49, 0x0a, 0x13, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, + 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x12, 0x64, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x13, 0x82, + 0xe7, 0xb0, 0x2a, 0x0e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x65, 0x0a, 0x1e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, + 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x70, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0b, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x32, 0xcd, 0x05, 0x0a, 0x03, 0x4d, 0x73, + 0x67, 0x12, 0x64, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, + 0x73, 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, + 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, + 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, 0x53, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, + 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x31, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, + 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, + 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, + 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, - 0x32, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x52, 0x05, 0x73, - 0x74, 0x61, 0x6b, 0x65, 0x12, 0x45, 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, - 0x6c, 0x2e, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x2e, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, - 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3f, 0x0a, 0x15, 0x4d, 0x73, 0x67, 0x55, - 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x0c, 0x82, 0xe7, 0xb0, - 0x2a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x4d, 0x73, 0x67, - 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, - 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xa6, 0x01, 0x0a, 0x14, 0x4d, - 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, - 0x77, 0x61, 0x79, 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0a, 0x61, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, - 0x0a, 0x0f, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x0e, 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x3a, 0x10, 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x22, 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, - 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x18, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, - 0x12, 0x39, 0x0a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x0a, 0x61, 0x70, 0x70, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x41, 0x0a, 0x0f, 0x67, - 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0e, - 0x67, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x3a, 0x10, - 0x82, 0xe7, 0xb0, 0x2a, 0x0b, 0x61, 0x70, 0x70, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x22, 0x22, 0x0a, 0x20, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xd2, 0x04, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x64, 0x0a, 0x0c, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x25, 0x2e, 0x70, + 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, + 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x1a, 0x2d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x70, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, - 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x73, 0x0a, 0x11, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, + 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, - 0x67, 0x53, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x1a, 0x31, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x53, 0x74, 0x61, 0x6b, - 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x12, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, - 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, - 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x33, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x6e, 0x73, 0x74, 0x61, 0x6b, 0x65, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x11, - 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, - 0x79, 0x12, 0x2a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, - 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, - 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x32, 0x2e, - 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, - 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, - 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x7f, 0x0a, 0x15, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, 0x36, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x46, - 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, + 0x61, 0x79, 0x1a, 0x32, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, + 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, + 0x65, 0x67, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x15, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x12, + 0x2e, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x1a, + 0x36, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, + 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, 0x6c, 0x65, + 0x67, 0x61, 0x74, 0x65, 0x46, 0x72, 0x6f, 0x6d, 0x47, 0x61, 0x74, 0x65, 0x77, 0x61, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x13, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2c, + 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x1a, 0x34, 0x2e, 0x70, + 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x41, + 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xbf, 0x01, 0xd8, 0xe2, 0x1e, 0x01, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, @@ -4830,7 +5855,7 @@ func file_poktroll_application_tx_proto_rawDescGZIP() []byte { return file_poktroll_application_tx_proto_rawDescData } -var file_poktroll_application_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) +var file_poktroll_application_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 12) var file_poktroll_application_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: poktroll.application.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: poktroll.application.MsgUpdateParamsResponse @@ -4842,29 +5867,35 @@ var file_poktroll_application_tx_proto_goTypes = []interface{}{ (*MsgDelegateToGatewayResponse)(nil), // 7: poktroll.application.MsgDelegateToGatewayResponse (*MsgUndelegateFromGateway)(nil), // 8: poktroll.application.MsgUndelegateFromGateway (*MsgUndelegateFromGatewayResponse)(nil), // 9: poktroll.application.MsgUndelegateFromGatewayResponse - (*Params)(nil), // 10: poktroll.application.Params - (*v1beta1.Coin)(nil), // 11: cosmos.base.v1beta1.Coin - (*shared.ApplicationServiceConfig)(nil), // 12: poktroll.shared.ApplicationServiceConfig + (*MsgTransferApplication)(nil), // 10: poktroll.application.MsgTransferApplication + (*MsgTransferApplicationResponse)(nil), // 11: poktroll.application.MsgTransferApplicationResponse + (*Params)(nil), // 12: poktroll.application.Params + (*v1beta1.Coin)(nil), // 13: cosmos.base.v1beta1.Coin + (*shared.ApplicationServiceConfig)(nil), // 14: poktroll.shared.ApplicationServiceConfig + (*Application)(nil), // 15: poktroll.application.Application } var file_poktroll_application_tx_proto_depIdxs = []int32{ - 10, // 0: poktroll.application.MsgUpdateParams.params:type_name -> poktroll.application.Params - 11, // 1: poktroll.application.MsgStakeApplication.stake:type_name -> cosmos.base.v1beta1.Coin - 12, // 2: poktroll.application.MsgStakeApplication.services:type_name -> poktroll.shared.ApplicationServiceConfig - 0, // 3: poktroll.application.Msg.UpdateParams:input_type -> poktroll.application.MsgUpdateParams - 2, // 4: poktroll.application.Msg.StakeApplication:input_type -> poktroll.application.MsgStakeApplication - 4, // 5: poktroll.application.Msg.UnstakeApplication:input_type -> poktroll.application.MsgUnstakeApplication - 6, // 6: poktroll.application.Msg.DelegateToGateway:input_type -> poktroll.application.MsgDelegateToGateway - 8, // 7: poktroll.application.Msg.UndelegateFromGateway:input_type -> poktroll.application.MsgUndelegateFromGateway - 1, // 8: poktroll.application.Msg.UpdateParams:output_type -> poktroll.application.MsgUpdateParamsResponse - 3, // 9: poktroll.application.Msg.StakeApplication:output_type -> poktroll.application.MsgStakeApplicationResponse - 5, // 10: poktroll.application.Msg.UnstakeApplication:output_type -> poktroll.application.MsgUnstakeApplicationResponse - 7, // 11: poktroll.application.Msg.DelegateToGateway:output_type -> poktroll.application.MsgDelegateToGatewayResponse - 9, // 12: poktroll.application.Msg.UndelegateFromGateway:output_type -> poktroll.application.MsgUndelegateFromGatewayResponse - 8, // [8:13] is the sub-list for method output_type - 3, // [3:8] is the sub-list for method input_type - 3, // [3:3] is the sub-list for extension type_name - 3, // [3:3] is the sub-list for extension extendee - 0, // [0:3] is the sub-list for field type_name + 12, // 0: poktroll.application.MsgUpdateParams.params:type_name -> poktroll.application.Params + 13, // 1: poktroll.application.MsgStakeApplication.stake:type_name -> cosmos.base.v1beta1.Coin + 14, // 2: poktroll.application.MsgStakeApplication.services:type_name -> poktroll.shared.ApplicationServiceConfig + 15, // 3: poktroll.application.MsgTransferApplicationResponse.application:type_name -> poktroll.application.Application + 0, // 4: poktroll.application.Msg.UpdateParams:input_type -> poktroll.application.MsgUpdateParams + 2, // 5: poktroll.application.Msg.StakeApplication:input_type -> poktroll.application.MsgStakeApplication + 4, // 6: poktroll.application.Msg.UnstakeApplication:input_type -> poktroll.application.MsgUnstakeApplication + 6, // 7: poktroll.application.Msg.DelegateToGateway:input_type -> poktroll.application.MsgDelegateToGateway + 8, // 8: poktroll.application.Msg.UndelegateFromGateway:input_type -> poktroll.application.MsgUndelegateFromGateway + 10, // 9: poktroll.application.Msg.TransferApplication:input_type -> poktroll.application.MsgTransferApplication + 1, // 10: poktroll.application.Msg.UpdateParams:output_type -> poktroll.application.MsgUpdateParamsResponse + 3, // 11: poktroll.application.Msg.StakeApplication:output_type -> poktroll.application.MsgStakeApplicationResponse + 5, // 12: poktroll.application.Msg.UnstakeApplication:output_type -> poktroll.application.MsgUnstakeApplicationResponse + 7, // 13: poktroll.application.Msg.DelegateToGateway:output_type -> poktroll.application.MsgDelegateToGatewayResponse + 9, // 14: poktroll.application.Msg.UndelegateFromGateway:output_type -> poktroll.application.MsgUndelegateFromGatewayResponse + 11, // 15: poktroll.application.Msg.TransferApplication:output_type -> poktroll.application.MsgTransferApplicationResponse + 10, // [10:16] is the sub-list for method output_type + 4, // [4:10] 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 } func init() { file_poktroll_application_tx_proto_init() } @@ -4872,6 +5903,7 @@ func file_poktroll_application_tx_proto_init() { if File_poktroll_application_tx_proto != nil { return } + file_poktroll_application_types_proto_init() file_poktroll_application_params_proto_init() if !protoimpl.UnsafeEnabled { file_poktroll_application_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { @@ -4994,6 +6026,30 @@ func file_poktroll_application_tx_proto_init() { return nil } } + file_poktroll_application_tx_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTransferApplication); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_application_tx_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgTransferApplicationResponse); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } type x struct{} out := protoimpl.TypeBuilder{ @@ -5001,7 +6057,7 @@ func file_poktroll_application_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_poktroll_application_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 10, + NumMessages: 12, NumExtensions: 0, NumServices: 1, }, diff --git a/api/poktroll/application/tx_grpc.pb.go b/api/poktroll/application/tx_grpc.pb.go index b8a8e8cee..b0d0aa03d 100644 --- a/api/poktroll/application/tx_grpc.pb.go +++ b/api/poktroll/application/tx_grpc.pb.go @@ -24,6 +24,7 @@ const ( Msg_UnstakeApplication_FullMethodName = "/poktroll.application.Msg/UnstakeApplication" Msg_DelegateToGateway_FullMethodName = "/poktroll.application.Msg/DelegateToGateway" Msg_UndelegateFromGateway_FullMethodName = "/poktroll.application.Msg/UndelegateFromGateway" + Msg_TransferApplication_FullMethodName = "/poktroll.application.Msg/TransferApplication" ) // MsgClient is the client API for Msg service. @@ -39,6 +40,7 @@ type MsgClient interface { UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) } type msgClient struct { @@ -99,6 +101,16 @@ func (c *msgClient) UndelegateFromGateway(ctx context.Context, in *MsgUndelegate return out, nil } +func (c *msgClient) TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgTransferApplicationResponse) + err := c.cc.Invoke(ctx, Msg_TransferApplication_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. // All implementations must embed UnimplementedMsgServer // for forward compatibility @@ -112,6 +124,7 @@ type MsgServer interface { UnstakeApplication(context.Context, *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) DelegateToGateway(context.Context, *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) mustEmbedUnimplementedMsgServer() } @@ -134,6 +147,9 @@ func (UnimplementedMsgServer) DelegateToGateway(context.Context, *MsgDelegateToG func (UnimplementedMsgServer) UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UndelegateFromGateway not implemented") } +func (UnimplementedMsgServer) TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferApplication not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -237,6 +253,24 @@ func _Msg_UndelegateFromGateway_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_TransferApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_TransferApplication_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferApplication(ctx, req.(*MsgTransferApplication)) + } + return interceptor(ctx, in, info, handler) +} + // Msg_ServiceDesc is the grpc.ServiceDesc for Msg service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -264,6 +298,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UndelegateFromGateway", Handler: _Msg_UndelegateFromGateway_Handler, }, + { + MethodName: "TransferApplication", + Handler: _Msg_TransferApplication_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/application/tx.proto", diff --git a/docusaurus/docs/operate/configs/relayminer_config.md b/docusaurus/docs/operate/configs/relayminer_config.md index 1c9d4f6ec..8931d03c2 100644 --- a/docusaurus/docs/operate/configs/relayminer_config.md +++ b/docusaurus/docs/operate/configs/relayminer_config.md @@ -40,6 +40,10 @@ You can find a fully featured example configuration at [relayminer_config_full_e - [Configuring Signing Keys](#configuring-signing-keys) - [Example Configuration](#example-configuration) - [Supported server types](#supported-server-types) +- [Payable Proof Submissions](#payable-proof-submissions) + - [Overview](#overview) + - [Key Requirements for Operators](#key-requirements-for-operators) + - [Recommendations for Supplier Operators](#recommendations-for-supplier-operators) ## Introduction @@ -115,8 +119,9 @@ smt_store_path: _`Required`_ if `suppliers.*.signing_key_names` is not specified. This configuration option specifies a list of key names from the keyring that the -`RelayMiner` will use to sign transactions. These key names are used to derive the public -key and the corresponding address, which are essential for interacting with POKT. +`RelayMiner` will use to sign transactions (i.e. `SupplierOperator`). +These key names are used to derive the public key and the corresponding address, +which are essential for interacting with POKT. Each key name listed here must be present in the keyring used to start the `RelayMiner` instance. @@ -451,3 +456,76 @@ flowchart ## Supported server types The list of supported server types can be found at [pkg/relayer/config/types.go](https://github.com/pokt-network/poktroll/tree/main/pkg/relayer/config/types.go#L8) + +## Payable Proof Submissions + +### Overview + +Submitting `Proofs` requires the payment of a fee, which is defined by the +`proof_submission_fee` governance parameter. + +This fee mechanism is designed to prevent spam attacks (e.g., Sybil bloat attacks) +by discouraging invalid or unnecessary `Proofs`. + +Since `Proofs` are the most block space-consuming primitive in the Pocket Network, +this fee plays a crucial role in maintaining the integrity of the network. + + + +### Key Requirements for Operators + +Due to the probabilistic nature of the `Proof` requirement, `Supplier` operators must +ensure that they maintain sufficient funds to cover the submission fees for all +`Proof`s associated with the `Claim`s they plan to submit. + +Failure to maintain adequate funds can result in missed submissions, which can +result in `Supplier` slashing if the `Proof` is required. + +### Recommendations for Supplier Operators + +- **Sufficient Balance**: Operators should regularly check their account balance +and ensure they have enough funds to cover the submission fees for `Proofs`. + +The following command can be used to check the balance of a `Supplier` operator: +```bash +poktrolld query bank balance upokt --node https://shannon-testnet-grove-seed-rpc.poktroll.com +``` +Which output would look like: +```yaml +balance: + amount: "109999000" + denom: upokt +``` + +- **Automated Monitoring**: It is highly recommended to implement balance monitoring +or alert systems to avoid running out of funds during critical periods. + + + +- **Cost Awareness**: Operators should familiarize themselves with the current +`proof_submission_fee` and plan their funding accordingly, especially if they +anticipate submitting a higher volume of `Proofs`. + +The following command can be used to check the current `proof_submission_fee`: +```bash +poktrolld query proof params --node https://shannon-testnet-grove-seed-rpc.poktroll.com +``` +Which output would look like: +```yaml + proof_submission_fee: + amount: "1000000" + denom: upokt +``` + +The list of `Proof` governance parameters can be found at [proto/proof/params.proto](https://github.com/pokt-network/poktroll/blob/main/proto/poktroll/proof/params.proto) + +:::warning + +If you submit a claim but do not submit its corresponding proof, this could result in SLASHING! + +Having insufficient funds could lead to rejected `Proof` submissions . This +can disrupt the operator’s participation in the Pocket Network. To maintain a +smooth operation, avoid being slashed, and earn your rewards, operators must plan +and manage their account balance as part of their operational procedures. + +::: \ No newline at end of file diff --git a/e2e/tests/0_settlement.feature b/e2e/tests/0_settlement.feature index 4829c4aa9..2cefdd9c8 100644 --- a/e2e/tests/0_settlement.feature +++ b/e2e/tests/0_settlement.feature @@ -26,10 +26,9 @@ Feature: Tokenomics Namespace | proof_missing_penalty | 320 | coin | | proof_submission_fee | 1000000 | coin | And all "proof" module params should be updated - # TODO_IN_THIS_COMMIT: param moved to shared module? - And the "tokenomics" module parameters are set as follows + And the "shared" module parameters are set as follows | compute_units_to_tokens_multiplier | 42 | int64 | - # TODO_IN_THIS_COMMIT: all module params should be updated + And all "shared" module params should be updated When the supplier "supplier1" has serviced a session with "20" relays for service "anvil" for application "app1" # Wait for the Claim & Proof lifecycle And the user should wait for the "proof" module "CreateClaim" Message to be submitted diff --git a/e2e/tests/session.feature b/e2e/tests/session.feature index d695dc5bc..715e7319a 100644 --- a/e2e/tests/session.feature +++ b/e2e/tests/session.feature @@ -12,10 +12,9 @@ Feature: Session Namespace | proof_missing_penalty | 320 | coin | | proof_submission_fee | 1000000 | coin | And all "proof" module params should be updated - # TODO_IN_THIS_COMMIT: param moved to shared module? - And the "tokenomics" module parameters are set as follows + And the "shared" module parameters are set as follows | compute_units_to_tokens_multiplier | 42 | int64 | - # TODO_IN_THIS_COMMIT: all module params should be updated + And all "shared" module params should be updated When the supplier "supplier1" has serviced a session with "5" relays for service "anvil" for application "app1" And the user should wait for the "proof" module "CreateClaim" Message to be submitted And the user should wait for the "proof" module "ClaimCreated" tx event to be broadcast diff --git a/e2e/tests/stake_app_transfer.feature b/e2e/tests/stake_app_transfer.feature new file mode 100644 index 000000000..7f3b6de22 --- /dev/null +++ b/e2e/tests/stake_app_transfer.feature @@ -0,0 +1,21 @@ +Feature: App Stake Transfer Namespace + + Scenario: User can transfer Application stake to non-existing application address + Given the user has the pocketd binary installed + # Unstake the applications in case they're already staked. + And this test ensures the "application" for account "app2" is not staked + And this test ensures the "application" for account "app3" is not staked + # Stake with 1 uPOKT more than the current stake used in genesis to make + # the transaction succeed. + And the account "app2" has a balance greater than "1000070" uPOKT + And an account exists for "app3" + And the user successfully stakes a "application" with "1000070" uPOKT for "anvil" service from the account "app2" + When the user transfers the "application" stake from account "app2" to account "app3" + Then the user should be able to see standard output containing "txhash:" + And the user should be able to see standard output containing "code: 0" + And the pocketd binary should exit without error + And the user should wait for the "application" module "TransferApplication" message to be submitted + And the "application" for account "app3" is staked with "1000070" uPOKT + And the account balance of "app3" should be "0" uPOKT "less" than before + And the user verifies the "application" for account "app2" is not staked + And the account balance of "app2" should be "0" uPOKT "more" than before diff --git a/e2e/tests/stake_app_transfer_steps_test.go b/e2e/tests/stake_app_transfer_steps_test.go new file mode 100644 index 000000000..56f2281c9 --- /dev/null +++ b/e2e/tests/stake_app_transfer_steps_test.go @@ -0,0 +1,51 @@ +//go:build e2e + +package e2e + +import ( + "github.com/stretchr/testify/require" +) + +func (s *suite) TheUserSuccessfullyStakesAWithUpoktForServiceFromTheAccount(actorType string, amount int64, serviceId, accName string) { + s.TheUserStakesAWithUpoktForServiceFromTheAccount(actorType, amount, serviceId, accName) + s.TheUserShouldBeAbleToSeeStandardOutputContaining("txhash:") + s.TheUserShouldBeAbleToSeeStandardOutputContaining("code: 0") + s.ThePocketdBinaryShouldExitWithoutError() + s.TheUserShouldWaitForTheModuleMessageToBeSubmitted("application", "StakeApplication") + s.TheForAccountIsStakedWithUpokt(actorType, accName, amount) + s.TheAccountBalanceOfShouldBeUpoktThanBefore(accName, amount, "less") +} + +func (s *suite) TheUserTransfersTheStakeFromAccountToAccount(actorType, fromAccName, toAccName string) { + fromAddr, fromAddrIsFound := accNameToAddrMap[fromAccName] + require.Truef(s, fromAddrIsFound, "account name %s not found in accNameToAddrMap", fromAccName) + + toAddr, toAddrIsFound := accNameToAddrMap[toAccName] + require.Truef(s, toAddrIsFound, "account name %s not found in accNameToAddrMap", toAccName) + + args := []string{ + "tx", + actorType, + "transfer", + fromAddr, + toAddr, + "--from", + fromAccName, + keyRingFlag, + chainIdFlag, + "-y", + } + res, err := s.pocketd.RunCommandOnHost("", args...) + require.NoError(s, err) + + s.pocketd.result = res +} + +// This helper ensures that the actor is unstaked if it was staked when this step ran. +func (s *suite) ThisTestEnsuresTheForAccountIsNotStaked(actorType, accName string) { + if _, ok := s.getStakedAmount(actorType, accName); ok { + s.TheUserUnstakesAFromTheAccount(actorType, accName) + s.TheUserShouldBeAbleToSeeStandardOutputContaining("txhash:") + s.TheUserShouldBeAbleToSeeStandardOutputContaining("code: 0") + } +} diff --git a/proto/poktroll/application/tx.proto b/proto/poktroll/application/tx.proto index a208d0605..73ce11d30 100644 --- a/proto/poktroll/application/tx.proto +++ b/proto/poktroll/application/tx.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package poktroll.application; option go_package = "github.com/pokt-network/poktroll/x/application/types"; @@ -9,27 +10,27 @@ import "cosmos_proto/cosmos.proto"; import "cosmos/base/v1beta1/coin.proto"; import "cosmos/msg/v1/msg.proto"; import "gogoproto/gogo.proto"; - +import "poktroll/application/types.proto"; import "poktroll/application/params.proto"; import "poktroll/shared/service.proto"; - // Msg defines the Msg service. service Msg { option (cosmos.msg.v1.service) = true; // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. - rpc UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse ); - rpc StakeApplication (MsgStakeApplication ) returns (MsgStakeApplicationResponse ); - rpc UnstakeApplication (MsgUnstakeApplication ) returns (MsgUnstakeApplicationResponse ); - rpc DelegateToGateway (MsgDelegateToGateway ) returns (MsgDelegateToGatewayResponse ); - rpc UndelegateFromGateway (MsgUndelegateFromGateway) returns (MsgUndelegateFromGatewayResponse); + rpc UpdateParams (MsgUpdateParams) returns (MsgUpdateParamsResponse); + rpc StakeApplication (MsgStakeApplication) returns (MsgStakeApplicationResponse); + rpc UnstakeApplication (MsgUnstakeApplication) returns (MsgUnstakeApplicationResponse); + rpc DelegateToGateway (MsgDelegateToGateway) returns (MsgDelegateToGatewayResponse); + rpc UndelegateFromGateway (MsgUndelegateFromGateway) returns (MsgUndelegateFromGatewayResponse); + rpc TransferApplication (MsgTransferApplication) returns (MsgTransferApplicationResponse); } // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "poktroll/x/application/MsgUpdateParams"; + option (amino.name) = "poktroll/x/application/MsgUpdateParams"; // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; @@ -49,10 +50,12 @@ message MsgUpdateParamsResponse {} message MsgStakeApplication { option (cosmos.msg.v1.signer) = "address"; - - string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the application. - cosmos.base.v1beta1.Coin stake = 2; // The total amount of uPOKT the application has staked. Must be ≥ to the current amount that the application has staked (if any) + string address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the application. + cosmos.base.v1beta1.Coin stake = 2; // The total amount of uPOKT the application has staked. Must be ≥ to the current amount that the application has staked (if any) repeated poktroll.shared.ApplicationServiceConfig services = 3; // The list of services this application is staked to request service for + // TODO_POST_MAINNET_CONSIDERATION: Consdier allowing appplications to delegate + // to gateways at time of staking for a better developer experience. + // repeated string gateway_addresss } message MsgStakeApplicationResponse {} @@ -68,7 +71,6 @@ message MsgDelegateToGateway { option (cosmos.msg.v1.signer) = "app_address"; // https://docs.cosmos.network/main/build/building-modules/messages-and-queries string app_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the application. string gateway_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; // The Bech32 address of the gateway the application wants to delegate to. - } message MsgDelegateToGatewayResponse {} @@ -81,3 +83,13 @@ message MsgUndelegateFromGateway { message MsgUndelegateFromGatewayResponse {} +message MsgTransferApplication { + option (cosmos.msg.v1.signer) = "source_address"; + string source_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string destination_address = 2 [(cosmos_proto.scalar) = "cosmos.AddressString"]; +} + +message MsgTransferApplicationResponse { + poktroll.application.Application application = 1; +} + diff --git a/x/application/keeper/msg_server_transfer_application_stake.go b/x/application/keeper/msg_server_transfer_application_stake.go new file mode 100644 index 000000000..b7292f786 --- /dev/null +++ b/x/application/keeper/msg_server_transfer_application_stake.go @@ -0,0 +1,68 @@ +package keeper + +import ( + "context" + "fmt" + + "github.com/pokt-network/poktroll/telemetry" + "github.com/pokt-network/poktroll/x/application/types" +) + +// TransferApplication transfers the stake (held in escrow in the application +// module account) from a source to a (new) destination application account . +func (k msgServer) TransferApplication(ctx context.Context, msg *types.MsgTransferApplication) (*types.MsgTransferApplicationResponse, error) { + isSuccessful := false + defer telemetry.EventSuccessCounter( + "transfer_application_stake", + telemetry.DefaultCounterFn, + func() bool { return isSuccessful }, + ) + + logger := k.Logger().With("method", "TransferApplication") + + if err := msg.ValidateBasic(); err != nil { + return nil, err + } + + // Ensure destination application does not already exist. + _, isDstFound := k.GetApplication(ctx, msg.GetDestinationAddress()) + if isDstFound { + return nil, types.ErrAppDuplicateAddress.Wrapf("destination application (%q) exists", msg.GetDestinationAddress()) + } + + // Ensure source application exists. + srcApp, isAppFound := k.GetApplication(ctx, msg.GetSourceAddress()) + if !isAppFound { + return nil, types.ErrAppNotFound.Wrapf("source application %q not found", msg.GetSourceAddress()) + } + + // Ensure source application is not already unbonding. + // TODO_TEST: Add E2E coverage to assert that an unbonding app cannot be transferred. + if srcApp.IsUnbonding() { + return nil, types.ErrAppIsUnstaking.Wrapf("cannot transfer stake of unbonding source application %q", msg.GetSourceAddress()) + } + + // Create a new application derived from the source application. + dstApp := srcApp + dstApp.Address = msg.GetDestinationAddress() + + // TODO_NEXT(#789): Reconcile app unbonding logic with the new transfer stake logic. + // I.e., the source should not immediately be transferred. + + // TODO_TEST: add E2E coverage to assert #DelegateeGatewayAddresses and #PendingUndelegations + // are present and correct on the dstApp application. + + // Update the dstApp in the store + k.SetApplication(ctx, dstApp) + logger.Info(fmt.Sprintf("Successfully transferred application stake from (%s) to (%s)", srcApp.Address, dstApp.Address)) + + // Remove the transferred app from the store + k.RemoveApplication(ctx, srcApp.GetAddress()) + logger.Info(fmt.Sprintf("Successfully removed the application: %+v", srcApp)) + + isSuccessful = true + + return &types.MsgTransferApplicationResponse{ + Application: &srcApp, + }, nil +} diff --git a/x/application/keeper/msg_server_transfer_application_stake_test.go b/x/application/keeper/msg_server_transfer_application_stake_test.go new file mode 100644 index 000000000..b3b47bf3b --- /dev/null +++ b/x/application/keeper/msg_server_transfer_application_stake_test.go @@ -0,0 +1,136 @@ +package keeper_test + +import ( + "testing" + + "cosmossdk.io/math" + cosmostypes "github.com/cosmos/cosmos-sdk/types" + "github.com/stretchr/testify/require" + + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/testutil/sample" + appkeeper "github.com/pokt-network/poktroll/x/application/keeper" + apptypes "github.com/pokt-network/poktroll/x/application/types" + sharedtypes "github.com/pokt-network/poktroll/x/shared/types" +) + +func TestMsgServer_TransferApplication_Success(t *testing.T) { + k, ctx := keepertest.ApplicationKeeper(t) + srv := appkeeper.NewMsgServerImpl(k) + + // Generate an address for the source and destination applications. + srcAddr := sample.AccAddress() + dstAddr := sample.AccAddress() + + // Verify that the app does not exist yet. + _, isSrcFound := k.GetApplication(ctx, srcAddr) + require.False(t, isSrcFound) + + expectedAppStake := &cosmostypes.Coin{Denom: "upokt", Amount: math.NewInt(100)} + + // Prepare the application. + stakeMsg := &apptypes.MsgStakeApplication{ + Address: srcAddr, + Stake: expectedAppStake, + Services: []*sharedtypes.ApplicationServiceConfig{ + { + ServiceId: "svc1", + }, + }, + } + + // Stake the application. + _, err := srv.StakeApplication(ctx, stakeMsg) + require.NoError(t, err) + + // Verify that the application exists. + srcApp, isSrcFound := k.GetApplication(ctx, srcAddr) + require.True(t, isSrcFound) + require.Equal(t, srcAddr, srcApp.Address) + require.Equal(t, expectedAppStake, srcApp.Stake) + require.Len(t, srcApp.ServiceConfigs, 1) + require.Equal(t, "svc1", srcApp.ServiceConfigs[0].ServiceId) + + // Transfer the application stake from the source to the destination application address. + transferStakeMsg := apptypes.NewMsgTransferApplication(srcAddr, dstAddr) + + transferAppStakeRes, stakeTransferErr := srv.TransferApplication(ctx, transferStakeMsg) + require.NoError(t, stakeTransferErr) + + // Verify that the destination app was created with the correct state. + dstApp, isDstFound := k.GetApplication(ctx, dstAddr) + require.True(t, isDstFound) + require.Equal(t, dstAddr, dstApp.Address) + require.Equal(t, expectedAppStake, dstApp.Stake) + require.Len(t, dstApp.ServiceConfigs, 1) + require.EqualValues(t, &srcApp, transferAppStakeRes.Application) + + srcApp.Address = "" + dstApp.Address = "" + require.EqualValues(t, srcApp, dstApp) + + // Verify that the source app was unstaked. + srcApp, isSrcFound = k.GetApplication(ctx, srcAddr) + require.False(t, isSrcFound) +} + +func TestMsgServer_TransferApplication_Error_DestinationExists(t *testing.T) { + k, ctx := keepertest.ApplicationKeeper(t) + srv := appkeeper.NewMsgServerImpl(k) + + // Generate an address for the source and destination applications. + srcAddr := sample.AccAddress() + dstAddr := sample.AccAddress() + + // Verify that neither the source nor the destination application exists yet. + _, isSrcFound := k.GetApplication(ctx, srcAddr) + require.False(t, isSrcFound) + + _, isDstFound := k.GetApplication(ctx, dstAddr) + require.False(t, isDstFound) + + expectedAppStake := &cosmostypes.Coin{Denom: "upokt", Amount: math.NewInt(100)} + + // Prepare and stake the source application. + appStakeMsg := &apptypes.MsgStakeApplication{ + Address: srcAddr, + Stake: expectedAppStake, + Services: []*sharedtypes.ApplicationServiceConfig{ + { + ServiceId: "svc1", + }, + }, + } + + _, err := srv.StakeApplication(ctx, appStakeMsg) + require.NoError(t, err) + + // Prepare and stake the destination application. + dstAppStakeMsg := &apptypes.MsgStakeApplication{ + Address: dstAddr, + Stake: expectedAppStake, + Services: []*sharedtypes.ApplicationServiceConfig{ + { + ServiceId: "svc1", + }, + }, + } + + _, err = srv.StakeApplication(ctx, dstAppStakeMsg) + require.NoError(t, err) + + // Attempt to transfer the source application stake to the destination. + transferStakeMsg := apptypes.NewMsgTransferApplication(srcAddr, dstAddr) + + _, err = srv.TransferApplication(ctx, transferStakeMsg) + require.ErrorContains(t, err, apptypes.ErrAppDuplicateAddress.Wrapf("destination application (%q) exists", dstAddr).Error()) + + // Verify that the original application still exists. + var foundApp apptypes.Application + foundApp, isSrcFound = k.GetApplication(ctx, srcAddr) + require.True(t, isSrcFound) + require.Equal(t, srcAddr, foundApp.Address) + require.Equal(t, int64(100), foundApp.Stake.Amount.Int64()) + require.Len(t, foundApp.ServiceConfigs, 1) + require.Equal(t, "svc1", foundApp.ServiceConfigs[0].ServiceId) +} diff --git a/x/application/module/autocli.go b/x/application/module/autocli.go index 404c8a366..a39b9694c 100644 --- a/x/application/module/autocli.go +++ b/x/application/module/autocli.go @@ -46,7 +46,7 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Tx: &autocliv1.ServiceCommandDescriptor{ Service: modulev1.Msg_ServiceDesc.ServiceName, EnhanceCustomCommand: true, // only required if you want to use the custom command - RpcCommandOptions: []*autocliv1.RpcCommandOptions{ + RpcCommandOptions: []*autocliv1.RpcCommandOptions{ // { // RpcMethod: "UpdateParams", // Skip: true, // skipped because authority gated @@ -97,6 +97,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { // $ poktrolld tx application undelegate-from-gateway $(GATEWAY_ADDR) --keyring-backend test --from $(APP) --node $(POCKET_NODE) --home $(POKTROLLD_HOME)`, // PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "gateway_address"}}, // }, + { + RpcMethod: "TransferApplication", + Use: "transfer [source app address] [destination app address]", + Short: "Transfer the application from [source app address] to [destination app address] and remove the source application", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "source_address"}, {ProtoField: "destination_address"}}, + }, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/application/module/simulation.go b/x/application/module/simulation.go index 5c0bb42d7..b1dabfa2d 100644 --- a/x/application/module/simulation.go +++ b/x/application/module/simulation.go @@ -39,6 +39,10 @@ const ( // TODO: Determine the simulation weight value defaultWeightMsgUndelegateFromGateway int = 100 + opWeightMsgTransferApplication = "op_weight_msg_transfer_application" + // TODO: Determine the simulation weight value + defaultWeightMsgTransferApplication int = 100 + // this line is used by starport scaffolding # simapp/module/const ) @@ -111,6 +115,17 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp applicationsimulation.SimulateMsgUndelegateFromGateway(am.accountKeeper, am.bankKeeper, am.applicationKeeper), )) + var weightMsgTransferApplication int + simState.AppParams.GetOrGenerate(opWeightMsgTransferApplication, &weightMsgTransferApplication, nil, + func(_ *rand.Rand) { + weightMsgTransferApplication = defaultWeightMsgTransferApplication + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgTransferApplication, + applicationsimulation.SimulateMsgTransferApplication(am.accountKeeper, am.bankKeeper, am.applicationKeeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations @@ -151,6 +166,14 @@ func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.Wei return nil }, ), + simulation.NewWeightedProposalMsg( + opWeightMsgTransferApplication, + defaultWeightMsgTransferApplication, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + applicationsimulation.SimulateMsgTransferApplication(am.accountKeeper, am.bankKeeper, am.applicationKeeper) + return nil + }, + ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/application/simulation/transfer_application_stake.go b/x/application/simulation/transfer_application_stake.go new file mode 100644 index 000000000..ddd37d19c --- /dev/null +++ b/x/application/simulation/transfer_application_stake.go @@ -0,0 +1,32 @@ +package simulation + +import ( + "math/rand" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + + "github.com/pokt-network/poktroll/x/application/keeper" + "github.com/pokt-network/poktroll/x/application/types" +) + +func SimulateMsgTransferApplication( + ak types.AccountKeeper, + bk types.BankKeeper, + k keeper.Keeper, +) simtypes.Operation { + return func(r *rand.Rand, app *baseapp.BaseApp, ctx sdk.Context, accs []simtypes.Account, chainID string, + ) (simtypes.OperationMsg, []simtypes.FutureOperation, error) { + simSrcAppAccount, _ := simtypes.RandomAcc(r, accs) + simDstAppAccount, _ := simtypes.RandomAcc(r, accs) + msg := &types.MsgTransferApplication{ + SourceAddress: simSrcAppAccount.Address.String(), + DestinationAddress: simDstAppAccount.Address.String(), + } + + // TODO: Handling the TransferApplication simulation + + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "TransferApplication simulation not implemented"), nil, nil + } +} diff --git a/x/application/types/codec.go b/x/application/types/codec.go index 0bb895958..bdbcdde42 100644 --- a/x/application/types/codec.go +++ b/x/application/types/codec.go @@ -20,6 +20,9 @@ func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { registry.RegisterImplementations((*sdk.Msg)(nil), &MsgUndelegateFromGateway{}, ) + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgTransferApplication{}, + ) // this line is used by starport scaffolding # 3 registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/application/types/errors.go b/x/application/types/errors.go index 67754829b..b20120506 100644 --- a/x/application/types/errors.go +++ b/x/application/types/errors.go @@ -19,4 +19,5 @@ var ( ErrAppInvalidMaxDelegatedGateways = sdkerrors.Register(ModuleName, 1111, "invalid MaxDelegatedGateways parameter") ErrAppNotDelegated = sdkerrors.Register(ModuleName, 1112, "application not delegated to gateway") ErrAppIsUnstaking = sdkerrors.Register(ModuleName, 1113, "application is in unbonding period") + ErrAppDuplicateAddress = sdkerrors.Register(ModuleName, 1114, "duplicate application address") ) diff --git a/x/application/types/message_transfer_application_stake.go b/x/application/types/message_transfer_application_stake.go new file mode 100644 index 000000000..37d82891a --- /dev/null +++ b/x/application/types/message_transfer_application_stake.go @@ -0,0 +1,40 @@ +package types + +import ( + cosmostypes "github.com/cosmos/cosmos-sdk/types" +) + +var _ cosmostypes.Msg = (*MsgTransferApplication)(nil) + +func NewMsgTransferApplication(srcAddr string, dstAddr string) *MsgTransferApplication { + return &MsgTransferApplication{ + SourceAddress: srcAddr, + DestinationAddress: dstAddr, + } +} + +func (msg *MsgTransferApplication) ValidateBasic() error { + if msg.GetSourceAddress() == "" { + return ErrAppInvalidAddress.Wrap("empty source application address") + } + + if msg.GetDestinationAddress() == "" { + return ErrAppInvalidAddress.Wrap("empty destination application address") + } + + _, srcBech32Err := cosmostypes.AccAddressFromBech32(msg.GetSourceAddress()) + if srcBech32Err != nil { + return ErrAppInvalidAddress.Wrapf("invalid source application address (%s): %v", msg.GetSourceAddress(), srcBech32Err) + } + + _, dstBech32Err := cosmostypes.AccAddressFromBech32(msg.GetDestinationAddress()) + if dstBech32Err != nil { + return ErrAppInvalidAddress.Wrapf("invalid destination application address (%s): %v", msg.GetDestinationAddress(), dstBech32Err) + } + + if msg.GetSourceAddress() == msg.GetDestinationAddress() { + return ErrAppDuplicateAddress.Wrapf("source and destination application addresses are the same: %s", msg.GetSourceAddress()) + } + + return nil +} diff --git a/x/application/types/message_transfer_application_stake_test.go b/x/application/types/message_transfer_application_stake_test.go new file mode 100644 index 000000000..a2426549f --- /dev/null +++ b/x/application/types/message_transfer_application_stake_test.go @@ -0,0 +1,67 @@ +package types + +import ( + "strings" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/testutil/sample" +) + +func TestMsgTransferApplication_ValidateBasic(t *testing.T) { + dupAddr := sample.AccAddress() + + tests := []struct { + name string + msg MsgTransferApplication + err error + }{ + { + name: "invalid duplicate source address", + msg: MsgTransferApplication{ + SourceAddress: dupAddr, + DestinationAddress: dupAddr, + }, + err: ErrAppDuplicateAddress, + }, + { + name: "invalid bech32 source address", + msg: MsgTransferApplication{ + SourceAddress: "invalid_address", + DestinationAddress: sample.AccAddress(), + }, + err: ErrAppInvalidAddress, + }, + { + name: "invalid bech32 destination address", + msg: MsgTransferApplication{ + SourceAddress: sample.AccAddress(), + DestinationAddress: "invalid_address", + }, + err: ErrAppInvalidAddress, + }, + { + name: "valid source and destination addresses", + msg: MsgTransferApplication{ + SourceAddress: sample.AccAddress(), + DestinationAddress: sample.AccAddress(), + }, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + err := tt.msg.ValidateBasic() + if tt.err != nil { + require.ErrorIs(t, err, tt.err) + if strings.Contains(err.Error(), tt.msg.GetSourceAddress()) { + require.Contains(t, err.Error(), tt.msg.GetSourceAddress()) + } else { + require.Contains(t, err.Error(), tt.msg.GetDestinationAddress()) + } + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/application/types/tx.pb.go b/x/application/types/tx.pb.go index eb938d65d..7a9b0cefa 100644 --- a/x/application/types/tx.pb.go +++ b/x/application/types/tx.pb.go @@ -439,6 +439,94 @@ func (m *MsgUndelegateFromGatewayResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUndelegateFromGatewayResponse proto.InternalMessageInfo +type MsgTransferApplication struct { + SourceAddress string `protobuf:"bytes,1,opt,name=source_address,json=sourceAddress,proto3" json:"source_address,omitempty"` + DestinationAddress string `protobuf:"bytes,2,opt,name=destination_address,json=destinationAddress,proto3" json:"destination_address,omitempty"` +} + +func (m *MsgTransferApplication) Reset() { *m = MsgTransferApplication{} } +func (m *MsgTransferApplication) String() string { return proto.CompactTextString(m) } +func (*MsgTransferApplication) ProtoMessage() {} +func (*MsgTransferApplication) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{10} +} +func (m *MsgTransferApplication) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferApplication) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgTransferApplication) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferApplication.Merge(m, src) +} +func (m *MsgTransferApplication) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferApplication) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferApplication.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferApplication proto.InternalMessageInfo + +func (m *MsgTransferApplication) GetSourceAddress() string { + if m != nil { + return m.SourceAddress + } + return "" +} + +func (m *MsgTransferApplication) GetDestinationAddress() string { + if m != nil { + return m.DestinationAddress + } + return "" +} + +type MsgTransferApplicationResponse struct { + Application *Application `protobuf:"bytes,1,opt,name=application,proto3" json:"application,omitempty"` +} + +func (m *MsgTransferApplicationResponse) Reset() { *m = MsgTransferApplicationResponse{} } +func (m *MsgTransferApplicationResponse) String() string { return proto.CompactTextString(m) } +func (*MsgTransferApplicationResponse) ProtoMessage() {} +func (*MsgTransferApplicationResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_bed224e38ab1cc6d, []int{11} +} +func (m *MsgTransferApplicationResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgTransferApplicationResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil +} +func (m *MsgTransferApplicationResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgTransferApplicationResponse.Merge(m, src) +} +func (m *MsgTransferApplicationResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgTransferApplicationResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgTransferApplicationResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgTransferApplicationResponse proto.InternalMessageInfo + +func (m *MsgTransferApplicationResponse) GetApplication() *Application { + if m != nil { + return m.Application + } + return nil +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.application.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.application.MsgUpdateParamsResponse") @@ -450,54 +538,63 @@ func init() { proto.RegisterType((*MsgDelegateToGatewayResponse)(nil), "poktroll.application.MsgDelegateToGatewayResponse") proto.RegisterType((*MsgUndelegateFromGateway)(nil), "poktroll.application.MsgUndelegateFromGateway") proto.RegisterType((*MsgUndelegateFromGatewayResponse)(nil), "poktroll.application.MsgUndelegateFromGatewayResponse") + proto.RegisterType((*MsgTransferApplication)(nil), "poktroll.application.MsgTransferApplication") + proto.RegisterType((*MsgTransferApplicationResponse)(nil), "poktroll.application.MsgTransferApplicationResponse") } func init() { proto.RegisterFile("poktroll/application/tx.proto", fileDescriptor_bed224e38ab1cc6d) } var fileDescriptor_bed224e38ab1cc6d = []byte{ - // 670 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x55, 0x4f, 0x4f, 0x13, 0x41, - 0x14, 0xef, 0x82, 0xa0, 0x3c, 0x88, 0xc0, 0x5a, 0x42, 0x59, 0x61, 0xa9, 0x4d, 0x34, 0x50, 0xc3, - 0x4e, 0x5a, 0x0c, 0x09, 0x5c, 0x08, 0xe0, 0x9f, 0x53, 0x13, 0x53, 0xf4, 0xe2, 0x85, 0x4c, 0xdb, - 0x71, 0xd8, 0xd0, 0xee, 0x4c, 0x76, 0x86, 0x02, 0x27, 0x8d, 0x47, 0x4f, 0x7e, 0x0a, 0x63, 0x3c, - 0x71, 0xf0, 0x2b, 0x98, 0x70, 0x93, 0x70, 0xe2, 0x64, 0x4c, 0x39, 0xf0, 0x35, 0xcc, 0x76, 0x66, - 0xb7, 0xb0, 0xdd, 0x4a, 0xb9, 0x79, 0x69, 0xbb, 0xf3, 0x7e, 0xef, 0xf7, 0xe7, 0xcd, 0xcc, 0x16, - 0xe6, 0x38, 0xdb, 0x93, 0x3e, 0xab, 0xd7, 0x11, 0xe6, 0xbc, 0xee, 0x56, 0xb1, 0x74, 0x99, 0x87, - 0xe4, 0xa1, 0xc3, 0x7d, 0x26, 0x99, 0x99, 0x0e, 0xcb, 0xce, 0x95, 0xb2, 0x35, 0x89, 0x1b, 0xae, - 0xc7, 0x50, 0xfb, 0x53, 0x01, 0xad, 0x99, 0x2a, 0x13, 0x0d, 0x26, 0x76, 0xda, 0x4f, 0x48, 0x3d, - 0xe8, 0x92, 0xad, 0x9e, 0x50, 0x05, 0x0b, 0x82, 0x9a, 0x85, 0x0a, 0x91, 0xb8, 0x80, 0xaa, 0xcc, - 0xf5, 0x74, 0x7d, 0x5a, 0xd7, 0x1b, 0x82, 0xa2, 0x66, 0x21, 0xf8, 0xd2, 0x85, 0x34, 0x65, 0x94, - 0x29, 0xc2, 0xe0, 0x97, 0x5e, 0x7d, 0x94, 0xe8, 0x98, 0x63, 0x1f, 0x37, 0x42, 0xc5, 0x4e, 0x28, - 0xb1, 0x8b, 0x7d, 0x52, 0x43, 0x82, 0xf8, 0x4d, 0xb7, 0x4a, 0x54, 0x39, 0xf7, 0xd3, 0x80, 0xf1, - 0x92, 0xa0, 0x6f, 0x79, 0x0d, 0x4b, 0xf2, 0xba, 0xdd, 0x68, 0xae, 0xc0, 0x08, 0xde, 0x97, 0xbb, - 0xcc, 0x77, 0xe5, 0x51, 0xc6, 0xc8, 0x1a, 0x0b, 0x23, 0x9b, 0x99, 0xb3, 0x1f, 0x4b, 0x69, 0x9d, - 0x64, 0xa3, 0x56, 0xf3, 0x89, 0x10, 0xdb, 0xd2, 0x77, 0x3d, 0x5a, 0xee, 0x40, 0xcd, 0x75, 0x18, - 0x56, 0xd2, 0x99, 0x81, 0xac, 0xb1, 0x30, 0x5a, 0x9c, 0x75, 0x92, 0x26, 0xe6, 0x28, 0x95, 0xcd, - 0x91, 0x93, 0xdf, 0xf3, 0xa9, 0x6f, 0x97, 0xc7, 0x79, 0xa3, 0xac, 0xdb, 0xd6, 0x56, 0x3f, 0x5d, - 0x1e, 0xe7, 0x3b, 0x84, 0x9f, 0x2f, 0x8f, 0xf3, 0x4f, 0x22, 0xfb, 0x87, 0xd7, 0x32, 0xc6, 0x3c, - 0xe7, 0x66, 0x60, 0x3a, 0xb6, 0x54, 0x26, 0x82, 0x33, 0x4f, 0x90, 0xdc, 0x2f, 0x03, 0x1e, 0x94, - 0x04, 0xdd, 0x96, 0x78, 0x8f, 0x6c, 0x74, 0x28, 0xcc, 0x22, 0xdc, 0xc5, 0x2a, 0xca, 0x8d, 0x21, - 0x43, 0xa0, 0x89, 0x60, 0x48, 0x04, 0x3c, 0x3a, 0xe1, 0x8c, 0xa3, 0xe1, 0xc1, 0x7e, 0x3a, 0x7a, - 0x3f, 0x9d, 0x2d, 0xe6, 0x7a, 0x65, 0x85, 0x33, 0x5f, 0xc0, 0x3d, 0x3d, 0x70, 0x91, 0x19, 0xcc, - 0x0e, 0x2e, 0x8c, 0x16, 0x17, 0x3b, 0x53, 0x51, 0x3b, 0xe2, 0x5c, 0x31, 0xb5, 0xad, 0xb0, 0x5b, - 0xcc, 0x7b, 0xef, 0xd2, 0x72, 0xd4, 0xba, 0x36, 0x16, 0x4c, 0x26, 0x74, 0x91, 0x9b, 0x83, 0x87, - 0x09, 0x81, 0xa2, 0xc0, 0xeb, 0x30, 0x15, 0xcc, 0xc2, 0x13, 0xf1, 0xc4, 0x99, 0x58, 0xe2, 0x28, - 0x57, 0x8c, 0x7f, 0x1e, 0xe6, 0x12, 0x09, 0x22, 0x85, 0xaf, 0x06, 0xa4, 0x4b, 0x82, 0x3e, 0x27, - 0x75, 0x42, 0xb1, 0x24, 0x6f, 0xd8, 0x2b, 0x2c, 0xc9, 0x01, 0x3e, 0x32, 0x57, 0x61, 0x14, 0x73, - 0xbe, 0xd3, 0xef, 0x5c, 0x01, 0x73, 0xae, 0x57, 0xcc, 0x0d, 0x18, 0xa7, 0x8a, 0x25, 0x6a, 0x1f, - 0xb8, 0xa1, 0xfd, 0xbe, 0x6e, 0xd0, 0xab, 0x6b, 0x13, 0x41, 0x8a, 0xab, 0x06, 0x72, 0x36, 0xcc, - 0x26, 0xf9, 0x8c, 0x82, 0x7c, 0x37, 0x20, 0xd3, 0x8e, 0x5a, 0xd3, 0x90, 0x97, 0x3e, 0x6b, 0xfc, - 0xaf, 0x61, 0x72, 0x90, 0xed, 0xe5, 0x35, 0x0c, 0x54, 0x3c, 0xbb, 0x03, 0x83, 0x25, 0x41, 0xcd, - 0x1a, 0x8c, 0x5d, 0xbb, 0xd3, 0x8f, 0x93, 0xef, 0x62, 0xec, 0xce, 0x58, 0x4b, 0x7d, 0xc1, 0x42, - 0x35, 0x93, 0xc3, 0x44, 0xd7, 0xb5, 0x5a, 0xec, 0x49, 0x11, 0x87, 0x5a, 0x85, 0xbe, 0xa1, 0x91, - 0x62, 0x13, 0xcc, 0x84, 0x83, 0xfd, 0xb4, 0xb7, 0xed, 0x2e, 0xb0, 0xb5, 0x7c, 0x0b, 0x70, 0xa4, - 0x2b, 0x60, 0xb2, 0xfb, 0xb4, 0xe7, 0x7b, 0x32, 0x75, 0x61, 0xad, 0x62, 0xff, 0xd8, 0x48, 0xf4, - 0x03, 0x4c, 0x25, 0x9f, 0x4c, 0xe7, 0x1f, 0x11, 0x12, 0xf0, 0xd6, 0xca, 0xed, 0xf0, 0xa1, 0x01, - 0x6b, 0xe8, 0x63, 0xf0, 0x7e, 0xde, 0x2c, 0x9f, 0xb4, 0x6c, 0xe3, 0xb4, 0x65, 0x1b, 0xe7, 0x2d, - 0xdb, 0xf8, 0xd3, 0xb2, 0x8d, 0x2f, 0x17, 0x76, 0xea, 0xf4, 0xc2, 0x4e, 0x9d, 0x5f, 0xd8, 0xa9, - 0x77, 0xcf, 0xa8, 0x2b, 0x77, 0xf7, 0x2b, 0x4e, 0x95, 0x35, 0x50, 0x20, 0xb3, 0xe4, 0x11, 0x79, - 0xc0, 0xfc, 0x3d, 0xd4, 0xe3, 0xd5, 0x2d, 0x8f, 0x38, 0x11, 0x95, 0xe1, 0xf6, 0xff, 0xcf, 0xf2, - 0xdf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x6e, 0x43, 0x0b, 0x7e, 0x75, 0x07, 0x00, 0x00, + // 772 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xcc, 0x96, 0xcd, 0x4e, 0xdb, 0x4a, + 0x14, 0xc7, 0x63, 0x10, 0xdc, 0xcb, 0x09, 0x97, 0x0f, 0x27, 0x5c, 0x82, 0x0b, 0x26, 0x44, 0x6a, + 0x05, 0x69, 0xb1, 0x95, 0x80, 0x90, 0x60, 0x83, 0x80, 0x7e, 0xa8, 0x8b, 0x48, 0x55, 0xa0, 0x9b, + 0x6e, 0xd0, 0x24, 0x19, 0x8c, 0x45, 0xe2, 0xb1, 0x3c, 0x43, 0x20, 0xab, 0x56, 0x5d, 0x76, 0xd5, + 0xa7, 0xa8, 0xaa, 0xae, 0x58, 0x74, 0xd3, 0x07, 0xa8, 0xc4, 0xa6, 0x2a, 0xea, 0x8a, 0x55, 0x55, + 0x85, 0x05, 0xaf, 0x51, 0xd9, 0x1e, 0x3b, 0xc6, 0x99, 0x94, 0xb0, 0xeb, 0x06, 0xe2, 0x39, 0xff, + 0x73, 0xce, 0xff, 0x77, 0x46, 0x33, 0x36, 0xcc, 0xd9, 0xe4, 0x88, 0x39, 0xa4, 0x5e, 0xd7, 0x91, + 0x6d, 0xd7, 0xcd, 0x2a, 0x62, 0x26, 0xb1, 0x74, 0x76, 0xaa, 0xd9, 0x0e, 0x61, 0x44, 0x4e, 0x07, + 0x61, 0x2d, 0x12, 0x56, 0x26, 0x51, 0xc3, 0xb4, 0x88, 0xee, 0xfd, 0xf5, 0x85, 0xca, 0x4c, 0x95, + 0xd0, 0x06, 0xa1, 0xfb, 0xde, 0x93, 0xee, 0x3f, 0xf0, 0x90, 0xea, 0x3f, 0xe9, 0x15, 0x44, 0xb1, + 0xde, 0x2c, 0x54, 0x30, 0x43, 0x05, 0xbd, 0x4a, 0x4c, 0x8b, 0xc7, 0xa7, 0x79, 0xbc, 0x41, 0x0d, + 0xbd, 0x59, 0x70, 0xff, 0xf1, 0x40, 0xda, 0x20, 0x06, 0xf1, 0x0b, 0xba, 0xbf, 0xf8, 0x6a, 0x56, + 0xec, 0xb8, 0x65, 0xe3, 0xa0, 0xe1, 0x82, 0x50, 0x61, 0x23, 0x07, 0x35, 0x02, 0x49, 0x07, 0x9b, + 0x1e, 0x22, 0x07, 0xd7, 0x74, 0x8a, 0x9d, 0xa6, 0x59, 0xc5, 0x7e, 0x38, 0xf7, 0x55, 0x82, 0xf1, + 0x12, 0x35, 0x5e, 0xda, 0x35, 0xc4, 0xf0, 0x0b, 0x2f, 0x51, 0x5e, 0x83, 0x11, 0x74, 0xcc, 0x0e, + 0x89, 0x63, 0xb2, 0x56, 0x46, 0xca, 0x4a, 0x8b, 0x23, 0xdb, 0x99, 0x1f, 0x9f, 0x97, 0xd3, 0x9c, + 0x75, 0xab, 0x56, 0x73, 0x30, 0xa5, 0xbb, 0xcc, 0x31, 0x2d, 0xa3, 0xdc, 0x91, 0xca, 0x9b, 0x30, + 0xec, 0xb7, 0xce, 0x0c, 0x64, 0xa5, 0xc5, 0x64, 0x71, 0x56, 0x13, 0xcd, 0x54, 0xf3, 0xbb, 0x6c, + 0x8f, 0x9c, 0xff, 0x9c, 0x4f, 0x7c, 0xbc, 0x3e, 0xcb, 0x4b, 0x65, 0x9e, 0xb6, 0xb1, 0xfe, 0xf6, + 0xfa, 0x2c, 0xdf, 0x29, 0xf8, 0xee, 0xfa, 0x2c, 0xff, 0x20, 0xb4, 0x7f, 0x7a, 0x83, 0x31, 0xe6, + 0x39, 0x37, 0x03, 0xd3, 0xb1, 0xa5, 0x32, 0xa6, 0x36, 0xb1, 0x28, 0xce, 0x7d, 0x97, 0x20, 0x55, + 0xa2, 0xc6, 0x2e, 0x43, 0x47, 0x78, 0xab, 0x53, 0x42, 0x2e, 0xc2, 0x3f, 0xc8, 0x47, 0xb9, 0x15, + 0x32, 0x10, 0xca, 0x3a, 0x0c, 0x51, 0xb7, 0x0e, 0x27, 0x9c, 0xd1, 0xb8, 0xdc, 0xdd, 0x71, 0x8d, + 0xef, 0xb8, 0xb6, 0x43, 0x4c, 0xab, 0xec, 0xeb, 0xe4, 0x27, 0xf0, 0x2f, 0x1f, 0x38, 0xcd, 0x0c, + 0x66, 0x07, 0x17, 0x93, 0xc5, 0xa5, 0xce, 0x54, 0xfc, 0x1d, 0xd1, 0x22, 0xa6, 0x76, 0x7d, 0xed, + 0x0e, 0xb1, 0x0e, 0x4c, 0xa3, 0x1c, 0xa6, 0x6e, 0x8c, 0xba, 0x93, 0x09, 0x5c, 0xe4, 0xe6, 0xe0, + 0x9e, 0x00, 0x28, 0x04, 0xde, 0x84, 0x29, 0x77, 0x16, 0x16, 0x8d, 0x13, 0x67, 0x62, 0xc4, 0x21, + 0x57, 0xac, 0xfe, 0x3c, 0xcc, 0x09, 0x0b, 0x84, 0x1d, 0x3e, 0x48, 0x90, 0x2e, 0x51, 0xe3, 0x31, + 0xae, 0x63, 0x03, 0x31, 0xbc, 0x47, 0x9e, 0x21, 0x86, 0x4f, 0x50, 0x4b, 0x5e, 0x87, 0x24, 0xb2, + 0xed, 0xfd, 0x7e, 0xe7, 0x0a, 0xc8, 0xb6, 0xf9, 0x8a, 0xbc, 0x05, 0xe3, 0x86, 0x5f, 0x25, 0x4c, + 0x1f, 0xb8, 0x25, 0x7d, 0x8c, 0x27, 0xf0, 0xd5, 0x8d, 0x09, 0x97, 0x22, 0x6a, 0x20, 0xa7, 0xc2, + 0xac, 0xc8, 0x67, 0x08, 0xf2, 0x49, 0x82, 0x8c, 0x87, 0x5a, 0xe3, 0x92, 0xa7, 0x0e, 0x69, 0xfc, + 0xad, 0x30, 0x39, 0xc8, 0xf6, 0xf2, 0x1a, 0x02, 0x7d, 0x91, 0xe0, 0xff, 0x12, 0x35, 0xf6, 0x1c, + 0x64, 0xd1, 0x03, 0xec, 0x44, 0x77, 0x7f, 0x13, 0xc6, 0x28, 0x39, 0x76, 0xaa, 0xb8, 0x6f, 0xa2, + 0xff, 0x7c, 0x7d, 0x00, 0xf5, 0x1c, 0x52, 0x35, 0x4c, 0x99, 0x69, 0x79, 0xf5, 0xfa, 0x06, 0x93, + 0x23, 0x49, 0x01, 0x5c, 0xca, 0x85, 0x8b, 0xd9, 0xc9, 0x61, 0x50, 0xc5, 0xd6, 0x03, 0x3a, 0x79, + 0xc7, 0xdb, 0x91, 0x60, 0xd9, 0xf3, 0x9f, 0x2c, 0x2e, 0x88, 0xaf, 0x99, 0x68, 0x7e, 0x34, 0xab, + 0xf8, 0x6d, 0x08, 0x06, 0x4b, 0xd4, 0x90, 0x6b, 0x30, 0x7a, 0xe3, 0xda, 0xbb, 0x2f, 0xae, 0x13, + 0xbb, 0x56, 0x94, 0xe5, 0xbe, 0x64, 0xa1, 0x65, 0x1b, 0x26, 0xba, 0x6e, 0x9e, 0xa5, 0x9e, 0x25, + 0xe2, 0x52, 0xa5, 0xd0, 0xb7, 0x34, 0xec, 0xd8, 0x04, 0x59, 0x70, 0xf6, 0x1f, 0xf6, 0xb6, 0xdd, + 0x25, 0x56, 0x56, 0xee, 0x20, 0x0e, 0xfb, 0x52, 0x98, 0xec, 0xbe, 0x10, 0xf2, 0x3d, 0x2b, 0x75, + 0x69, 0x95, 0x62, 0xff, 0xda, 0xb0, 0xe9, 0x6b, 0x98, 0x12, 0x1f, 0x5e, 0xed, 0x0f, 0x08, 0x02, + 0xbd, 0xb2, 0x76, 0x37, 0x7d, 0x68, 0xa0, 0x05, 0x29, 0xd1, 0x61, 0x7b, 0xd4, 0xb3, 0x9c, 0x40, + 0xad, 0xac, 0xde, 0x45, 0x1d, 0xb4, 0x56, 0x86, 0xde, 0xb8, 0x6f, 0xcf, 0xed, 0xf2, 0x79, 0x5b, + 0x95, 0x2e, 0xda, 0xaa, 0x74, 0xd9, 0x56, 0xa5, 0x5f, 0x6d, 0x55, 0x7a, 0x7f, 0xa5, 0x26, 0x2e, + 0xae, 0xd4, 0xc4, 0xe5, 0x95, 0x9a, 0x78, 0xb5, 0x6a, 0x98, 0xec, 0xf0, 0xb8, 0xa2, 0x55, 0x49, + 0x43, 0x77, 0x9b, 0x2c, 0x5b, 0x98, 0x9d, 0x10, 0xe7, 0x48, 0xef, 0xf1, 0x62, 0xf5, 0x3e, 0x2f, + 0x2a, 0xc3, 0xde, 0xd7, 0xc1, 0xca, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xa2, 0x5c, 0x80, + 0x35, 0x09, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -519,6 +616,7 @@ type MsgClient interface { UnstakeApplication(ctx context.Context, in *MsgUnstakeApplication, opts ...grpc.CallOption) (*MsgUnstakeApplicationResponse, error) DelegateToGateway(ctx context.Context, in *MsgDelegateToGateway, opts ...grpc.CallOption) (*MsgDelegateToGatewayResponse, error) UndelegateFromGateway(ctx context.Context, in *MsgUndelegateFromGateway, opts ...grpc.CallOption) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) } type msgClient struct { @@ -574,6 +672,15 @@ func (c *msgClient) UndelegateFromGateway(ctx context.Context, in *MsgUndelegate return out, nil } +func (c *msgClient) TransferApplication(ctx context.Context, in *MsgTransferApplication, opts ...grpc.CallOption) (*MsgTransferApplicationResponse, error) { + out := new(MsgTransferApplicationResponse) + err := c.cc.Invoke(ctx, "/poktroll.application.Msg/TransferApplication", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // MsgServer is the server API for Msg service. type MsgServer interface { // UpdateParams defines a (governance) operation for updating the module @@ -583,6 +690,7 @@ type MsgServer interface { UnstakeApplication(context.Context, *MsgUnstakeApplication) (*MsgUnstakeApplicationResponse, error) DelegateToGateway(context.Context, *MsgDelegateToGateway) (*MsgDelegateToGatewayResponse, error) UndelegateFromGateway(context.Context, *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) + TransferApplication(context.Context, *MsgTransferApplication) (*MsgTransferApplicationResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -604,6 +712,9 @@ func (*UnimplementedMsgServer) DelegateToGateway(ctx context.Context, req *MsgDe func (*UnimplementedMsgServer) UndelegateFromGateway(ctx context.Context, req *MsgUndelegateFromGateway) (*MsgUndelegateFromGatewayResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UndelegateFromGateway not implemented") } +func (*UnimplementedMsgServer) TransferApplication(ctx context.Context, req *MsgTransferApplication) (*MsgTransferApplicationResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method TransferApplication not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -699,6 +810,24 @@ func _Msg_UndelegateFromGateway_Handler(srv interface{}, ctx context.Context, de return interceptor(ctx, in, info, handler) } +func _Msg_TransferApplication_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgTransferApplication) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).TransferApplication(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.application.Msg/TransferApplication", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).TransferApplication(ctx, req.(*MsgTransferApplication)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "poktroll.application.Msg", HandlerType: (*MsgServer)(nil), @@ -723,6 +852,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UndelegateFromGateway", Handler: _Msg_UndelegateFromGateway_Handler, }, + { + MethodName: "TransferApplication", + Handler: _Msg_TransferApplication_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/application/tx.proto", @@ -1043,6 +1176,78 @@ func (m *MsgUndelegateFromGatewayResponse) MarshalToSizedBuffer(dAtA []byte) (in return len(dAtA) - i, nil } +func (m *MsgTransferApplication) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferApplication) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferApplication) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.DestinationAddress) > 0 { + i -= len(m.DestinationAddress) + copy(dAtA[i:], m.DestinationAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.DestinationAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.SourceAddress) > 0 { + i -= len(m.SourceAddress) + copy(dAtA[i:], m.SourceAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.SourceAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgTransferApplicationResponse) Marshal() (dAtA []byte, err error) { + size := m.Size() + dAtA = make([]byte, size) + n, err := m.MarshalToSizedBuffer(dAtA[:size]) + if err != nil { + return nil, err + } + return dAtA[:n], nil +} + +func (m *MsgTransferApplicationResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgTransferApplicationResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Application != nil { + { + size, err := m.Application.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 +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -1184,6 +1389,36 @@ func (m *MsgUndelegateFromGatewayResponse) Size() (n int) { return n } +func (m *MsgTransferApplication) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.SourceAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.DestinationAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgTransferApplicationResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Application != nil { + l = m.Application.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -2017,6 +2252,206 @@ func (m *MsgUndelegateFromGatewayResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgTransferApplication) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferApplication: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferApplication: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field SourceAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.SourceAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field DestinationAddress", wireType) + } + var stringLen uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + stringLen |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + intStringLen := int(stringLen) + if intStringLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + intStringLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.DestinationAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *MsgTransferApplicationResponse) Unmarshal(dAtA []byte) error { + l := len(dAtA) + iNdEx := 0 + for iNdEx < l { + preIndex := iNdEx + var wire uint64 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + wire |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + fieldNum := int32(wire >> 3) + wireType := int(wire & 0x7) + if wireType == 4 { + return fmt.Errorf("proto: MsgTransferApplicationResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgTransferApplicationResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Application", 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.Application == nil { + m.Application = &Application{} + } + if err := m.Application.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipTx(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthTx + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipTx(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/supplier/keeper/msg_server_stake_supplier.go b/x/supplier/keeper/msg_server_stake_supplier.go index a31ea9db8..d3478cab7 100644 --- a/x/supplier/keeper/msg_server_stake_supplier.go +++ b/x/supplier/keeper/msg_server_stake_supplier.go @@ -123,6 +123,7 @@ func (k msgServer) StakeSupplier(ctx context.Context, msg *types.MsgStakeSupplie logger.Info(fmt.Sprintf("Successfully updated supplier stake for supplier: %+v", supplier)) sdkCtx := sdk.UnwrapSDKContext(ctx) + // Emit an event which signals that the supplier staked. event := &types.EventSupplierStaked{ Supplier: &supplier, } diff --git a/x/supplier/keeper/msg_server_unstake_supplier.go b/x/supplier/keeper/msg_server_unstake_supplier.go index e6c04685f..c96feb66b 100644 --- a/x/supplier/keeper/msg_server_unstake_supplier.go +++ b/x/supplier/keeper/msg_server_unstake_supplier.go @@ -69,6 +69,7 @@ func (k msgServer) UnstakeSupplier( supplier.UnstakeSessionEndHeight = uint64(shared.GetSessionEndHeight(&sharedParams, currentHeight)) k.SetSupplier(ctx, supplier) + // Emit an event which signals that the supplier successfully began unbonding their stake. unbondingHeight := shared.GetSupplierUnbondingHeight(&sharedParams, &supplier) event := &types.EventSupplierUnbondingBegin{ Supplier: &supplier, diff --git a/x/supplier/keeper/unbond_suppliers.go b/x/supplier/keeper/unbond_suppliers.go index 24f4f2dd0..1a3198ee7 100644 --- a/x/supplier/keeper/unbond_suppliers.go +++ b/x/supplier/keeper/unbond_suppliers.go @@ -69,6 +69,7 @@ func (k Keeper) EndBlockerUnbondSuppliers(ctx context.Context) error { k.RemoveSupplier(ctx, supplierOperatorAddress.String()) logger.Info(fmt.Sprintf("Successfully removed the supplier: %+v", supplier)) + // Emit an event which signals that the supplier has sucessfully unbonded. event := &types.EventSupplierUnbondingEnd{ Supplier: &supplier, UnbondingHeight: unbondingHeight, diff --git a/x/tokenomics/types/tx.pb.go b/x/tokenomics/types/tx.pb.go index 9f18a148c..e4fec264c 100644 --- a/x/tokenomics/types/tx.pb.go +++ b/x/tokenomics/types/tx.pb.go @@ -125,6 +125,7 @@ type MsgUpdateParam struct { // specified in the `Params` message in `proof/params.proto.` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Types that are valid to be assigned to AsType: + // // *MsgUpdateParam_AsString // *MsgUpdateParam_AsInt64 // *MsgUpdateParam_AsBytes