From 9100f3db9d23a4b6310838095f6b375dbd6b0cb3 Mon Sep 17 00:00:00 2001 From: Bryan White Date: Mon, 20 Jan 2025 13:21:20 +0100 Subject: [PATCH] chore: update proto field types & naming --- api/poktroll/migration/tx.pulsar.go | 1210 +++++++++++++++++++++++++- api/poktroll/migration/tx_grpc.pb.go | 38 + proto/poktroll/migration/tx.proto | 14 +- x/migration/types/tx.pb.go | 556 +++++++++++- 4 files changed, 1746 insertions(+), 72 deletions(-) diff --git a/api/poktroll/migration/tx.pulsar.go b/api/poktroll/migration/tx.pulsar.go index a00e13f16..4786ddfb0 100644 --- a/api/poktroll/migration/tx.pulsar.go +++ b/api/poktroll/migration/tx.pulsar.go @@ -3,6 +3,7 @@ package migration import ( _ "cosmossdk.io/api/amino" + v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" _ "cosmossdk.io/api/cosmos/msg/v1" fmt "fmt" _ "github.com/cosmos/cosmos-proto" @@ -1713,6 +1714,991 @@ func (x *fastReflection_MsgUploadMorseStateResponse) ProtoMethods() *protoiface. } } +var ( + md_MsgClaimMorsePokt protoreflect.MessageDescriptor + fd_MsgClaimMorsePokt_shannon_dest_address protoreflect.FieldDescriptor + fd_MsgClaimMorsePokt_morse_src_address protoreflect.FieldDescriptor + fd_MsgClaimMorsePokt_morse_signature protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_tx_proto_init() + md_MsgClaimMorsePokt = File_poktroll_migration_tx_proto.Messages().ByName("MsgClaimMorsePokt") + fd_MsgClaimMorsePokt_shannon_dest_address = md_MsgClaimMorsePokt.Fields().ByName("shannon_dest_address") + fd_MsgClaimMorsePokt_morse_src_address = md_MsgClaimMorsePokt.Fields().ByName("morse_src_address") + fd_MsgClaimMorsePokt_morse_signature = md_MsgClaimMorsePokt.Fields().ByName("morse_signature") +} + +var _ protoreflect.Message = (*fastReflection_MsgClaimMorsePokt)(nil) + +type fastReflection_MsgClaimMorsePokt MsgClaimMorsePokt + +func (x *MsgClaimMorsePokt) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClaimMorsePokt)(x) +} + +func (x *MsgClaimMorsePokt) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_tx_proto_msgTypes[4] + 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_MsgClaimMorsePokt_messageType fastReflection_MsgClaimMorsePokt_messageType +var _ protoreflect.MessageType = fastReflection_MsgClaimMorsePokt_messageType{} + +type fastReflection_MsgClaimMorsePokt_messageType struct{} + +func (x fastReflection_MsgClaimMorsePokt_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClaimMorsePokt)(nil) +} +func (x fastReflection_MsgClaimMorsePokt_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClaimMorsePokt) +} +func (x fastReflection_MsgClaimMorsePokt_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimMorsePokt +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClaimMorsePokt) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimMorsePokt +} + +// 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_MsgClaimMorsePokt) Type() protoreflect.MessageType { + return _fastReflection_MsgClaimMorsePokt_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClaimMorsePokt) New() protoreflect.Message { + return new(fastReflection_MsgClaimMorsePokt) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClaimMorsePokt) Interface() protoreflect.ProtoMessage { + return (*MsgClaimMorsePokt)(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_MsgClaimMorsePokt) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.ShannonDestAddress != "" { + value := protoreflect.ValueOfString(x.ShannonDestAddress) + if !f(fd_MsgClaimMorsePokt_shannon_dest_address, value) { + return + } + } + if x.MorseSrcAddress != "" { + value := protoreflect.ValueOfString(x.MorseSrcAddress) + if !f(fd_MsgClaimMorsePokt_morse_src_address, value) { + return + } + } + if len(x.MorseSignature) != 0 { + value := protoreflect.ValueOfBytes(x.MorseSignature) + if !f(fd_MsgClaimMorsePokt_morse_signature, 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_MsgClaimMorsePokt) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + return x.ShannonDestAddress != "" + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + return x.MorseSrcAddress != "" + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + return len(x.MorseSignature) != 0 + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + x.ShannonDestAddress = "" + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + x.MorseSrcAddress = "" + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + x.MorseSignature = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + value := x.ShannonDestAddress + return protoreflect.ValueOfString(value) + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + value := x.MorseSrcAddress + return protoreflect.ValueOfString(value) + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + value := x.MorseSignature + return protoreflect.ValueOfBytes(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + x.ShannonDestAddress = value.Interface().(string) + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + x.MorseSrcAddress = value.Interface().(string) + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + x.MorseSignature = value.Bytes() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + panic(fmt.Errorf("field shannon_dest_address of message poktroll.migration.MsgClaimMorsePokt is not mutable")) + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + panic(fmt.Errorf("field morse_src_address of message poktroll.migration.MsgClaimMorsePokt is not mutable")) + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + panic(fmt.Errorf("field morse_signature of message poktroll.migration.MsgClaimMorsePokt is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePokt.shannon_dest_address": + return protoreflect.ValueOfString("") + case "poktroll.migration.MsgClaimMorsePokt.morse_src_address": + return protoreflect.ValueOfString("") + case "poktroll.migration.MsgClaimMorsePokt.morse_signature": + return protoreflect.ValueOfBytes(nil) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePokt")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePokt 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_MsgClaimMorsePokt) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MsgClaimMorsePokt", 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_MsgClaimMorsePokt) 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_MsgClaimMorsePokt) 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_MsgClaimMorsePokt) 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_MsgClaimMorsePokt) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClaimMorsePokt) + 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.ShannonDestAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MorseSrcAddress) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + l = len(x.MorseSignature) + 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().(*MsgClaimMorsePokt) + 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.MorseSignature) > 0 { + i -= len(x.MorseSignature) + copy(dAtA[i:], x.MorseSignature) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MorseSignature))) + i-- + dAtA[i] = 0x1a + } + if len(x.MorseSrcAddress) > 0 { + i -= len(x.MorseSrcAddress) + copy(dAtA[i:], x.MorseSrcAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.MorseSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(x.ShannonDestAddress) > 0 { + i -= len(x.ShannonDestAddress) + copy(dAtA[i:], x.ShannonDestAddress) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ShannonDestAddress))) + 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().(*MsgClaimMorsePokt) + 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: MsgClaimMorsePokt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimMorsePokt: 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 ShannonDestAddress", 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.ShannonDestAddress = 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 MorseSrcAddress", 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.MorseSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MorseSignature", wireType) + } + var byteLen 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++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength + } + postIndex := iNdEx + byteLen + 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.MorseSignature = append(x.MorseSignature[:0], dAtA[iNdEx:postIndex]...) + if x.MorseSignature == nil { + x.MorseSignature = []byte{} + } + 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_MsgClaimMorsePoktResponse protoreflect.MessageDescriptor + fd_MsgClaimMorsePoktResponse_balance protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_tx_proto_init() + md_MsgClaimMorsePoktResponse = File_poktroll_migration_tx_proto.Messages().ByName("MsgClaimMorsePoktResponse") + fd_MsgClaimMorsePoktResponse_balance = md_MsgClaimMorsePoktResponse.Fields().ByName("balance") +} + +var _ protoreflect.Message = (*fastReflection_MsgClaimMorsePoktResponse)(nil) + +type fastReflection_MsgClaimMorsePoktResponse MsgClaimMorsePoktResponse + +func (x *MsgClaimMorsePoktResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgClaimMorsePoktResponse)(x) +} + +func (x *MsgClaimMorsePoktResponse) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_tx_proto_msgTypes[5] + 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_MsgClaimMorsePoktResponse_messageType fastReflection_MsgClaimMorsePoktResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgClaimMorsePoktResponse_messageType{} + +type fastReflection_MsgClaimMorsePoktResponse_messageType struct{} + +func (x fastReflection_MsgClaimMorsePoktResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgClaimMorsePoktResponse)(nil) +} +func (x fastReflection_MsgClaimMorsePoktResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgClaimMorsePoktResponse) +} +func (x fastReflection_MsgClaimMorsePoktResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimMorsePoktResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgClaimMorsePoktResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgClaimMorsePoktResponse +} + +// 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_MsgClaimMorsePoktResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgClaimMorsePoktResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgClaimMorsePoktResponse) New() protoreflect.Message { + return new(fastReflection_MsgClaimMorsePoktResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgClaimMorsePoktResponse) Interface() protoreflect.ProtoMessage { + return (*MsgClaimMorsePoktResponse)(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_MsgClaimMorsePoktResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Balance != nil { + value := protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) + if !f(fd_MsgClaimMorsePoktResponse_balance, 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_MsgClaimMorsePoktResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + return x.Balance != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + x.Balance = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + value := x.Balance + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + x.Balance = value.Message().Interface().(*v1beta1.Coin) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + if x.Balance == nil { + x.Balance = new(v1beta1.Coin) + } + return protoreflect.ValueOfMessage(x.Balance.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgClaimMorsePoktResponse.balance": + m := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgClaimMorsePoktResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgClaimMorsePoktResponse 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_MsgClaimMorsePoktResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MsgClaimMorsePoktResponse", 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_MsgClaimMorsePoktResponse) 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_MsgClaimMorsePoktResponse) 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_MsgClaimMorsePoktResponse) 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_MsgClaimMorsePoktResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgClaimMorsePoktResponse) + 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.Balance != nil { + l = options.Size(x.Balance) + 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().(*MsgClaimMorsePoktResponse) + 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.Balance != nil { + encoded, err := options.Marshal(x.Balance) + 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().(*MsgClaimMorsePoktResponse) + 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: MsgClaimMorsePoktResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgClaimMorsePoktResponse: 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 Balance", 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.Balance == nil { + x.Balance = &v1beta1.Coin{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance); 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 @@ -1871,6 +2857,93 @@ func (*MsgUploadMorseStateResponse) Descriptor() ([]byte, []int) { return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{3} } +// MsgClaimMorsePokt is used to self-claim owned POKT tokens from the "Morse migration" state. +type MsgClaimMorsePokt struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ShannonDestAddress string `protobuf:"bytes,1,opt,name=shannon_dest_address,json=shannonDestAddress,proto3" json:"shannon_dest_address,omitempty"` + MorseSrcAddress string `protobuf:"bytes,2,opt,name=morse_src_address,json=morseSrcAddress,proto3" json:"morse_src_address,omitempty"` + MorseSignature []byte `protobuf:"bytes,3,opt,name=morse_signature,json=morseSignature,proto3" json:"morse_signature,omitempty"` +} + +func (x *MsgClaimMorsePokt) Reset() { + *x = MsgClaimMorsePokt{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_tx_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClaimMorsePokt) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClaimMorsePokt) ProtoMessage() {} + +// Deprecated: Use MsgClaimMorsePokt.ProtoReflect.Descriptor instead. +func (*MsgClaimMorsePokt) Descriptor() ([]byte, []int) { + return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{4} +} + +func (x *MsgClaimMorsePokt) GetShannonDestAddress() string { + if x != nil { + return x.ShannonDestAddress + } + return "" +} + +func (x *MsgClaimMorsePokt) GetMorseSrcAddress() string { + if x != nil { + return x.MorseSrcAddress + } + return "" +} + +func (x *MsgClaimMorsePokt) GetMorseSignature() []byte { + if x != nil { + return x.MorseSignature + } + return nil +} + +type MsgClaimMorsePoktResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Balance *v1beta1.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (x *MsgClaimMorsePoktResponse) Reset() { + *x = MsgClaimMorsePoktResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_tx_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgClaimMorsePoktResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgClaimMorsePoktResponse) ProtoMessage() {} + +// Deprecated: Use MsgClaimMorsePoktResponse.ProtoReflect.Descriptor instead. +func (*MsgClaimMorsePoktResponse) Descriptor() ([]byte, []int) { + return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{5} +} + +func (x *MsgClaimMorsePoktResponse) GetBalance() *v1beta1.Coin { + if x != nil { + return x.Balance + } + return nil +} + var File_poktroll_migration_tx_proto protoreflect.FileDescriptor var file_poktroll_migration_tx_proto_rawDesc = []byte{ @@ -1881,7 +2954,9 @@ var file_poktroll_migration_tx_proto_rawDesc = []byte{ 0x72, 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, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, + 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, + 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, + 0x69, 0x6e, 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, 0x1f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, @@ -1908,32 +2983,57 @@ var file_poktroll_migration_tx_proto_rawDesc = []byte{ 0x61, 0x74, 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x1d, 0x0a, 0x1b, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x32, 0xdc, 0x01, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x60, 0x0a, 0x0c, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, 0x2e, 0x70, 0x6f, 0x6b, - 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, - 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x1a, - 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 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, 0x6c, 0x0a, 0x10, - 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, - 0x6f, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x2f, 0x2e, 0x70, 0x6f, 0x6b, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, - 0x73, 0x67, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, - 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, - 0x01, 0x42, 0xaf, 0x01, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x54, 0x78, - 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, - 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, - 0x4d, 0x58, 0xaa, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x4d, 0x69, - 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, - 0x6c, 0x6c, 0x5c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1e, 0x50, - 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, - 0x6e, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, - 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x65, 0x22, 0xcf, 0x01, 0x0a, 0x11, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, + 0x6f, 0x72, 0x73, 0x65, 0x50, 0x6f, 0x6b, 0x74, 0x12, 0x4a, 0x0a, 0x14, 0x73, 0x68, 0x61, 0x6e, + 0x6e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x74, 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, 0x12, 0x73, 0x68, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x44, 0x65, 0x73, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x2a, 0x0a, 0x11, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x5f, 0x73, 0x72, + 0x63, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0f, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x53, 0x72, 0x63, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x5f, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, + 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0e, 0x6d, 0x6f, 0x72, 0x73, 0x65, + 0x53, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x3a, 0x19, 0x82, 0xe7, 0xb0, 0x2a, 0x14, + 0x73, 0x68, 0x61, 0x6e, 0x6e, 0x6f, 0x6e, 0x5f, 0x64, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x50, 0x0a, 0x19, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, + 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x50, 0x6f, 0x6b, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x33, 0x0a, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x01, 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, 0x07, 0x62, + 0x61, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x32, 0xc4, 0x02, 0x0a, 0x03, 0x4d, 0x73, 0x67, 0x12, 0x60, + 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x23, + 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x50, 0x61, 0x72, + 0x61, 0x6d, 0x73, 0x1a, 0x2b, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 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, 0x6c, 0x0a, 0x10, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x12, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, + 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x6c, + 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x2f, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x55, 0x70, 0x6c, 0x6f, 0x61, 0x64, 0x4d, 0x6f, 0x72, 0x73, + 0x65, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, + 0x0a, 0x0e, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x50, 0x6f, 0x6b, 0x74, + 0x12, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, + 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, 0x6f, + 0x72, 0x73, 0x65, 0x50, 0x6f, 0x6b, 0x74, 0x1a, 0x2d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x73, 0x67, + 0x43, 0x6c, 0x61, 0x69, 0x6d, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x50, 0x6f, 0x6b, 0x74, 0x52, 0x65, + 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xaf, 0x01, + 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x23, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, + 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xa2, 0x02, 0x03, 0x50, 0x4d, 0x58, 0xaa, 0x02, + 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0xca, 0x02, 0x12, 0x50, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x5c, 0x4d, + 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0xe2, 0x02, 0x1e, 0x50, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x5c, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x50, 0x6f, 0x6b, 0x74, + 0x72, 0x6f, 0x6c, 0x6c, 0x3a, 0x3a, 0x4d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -1948,25 +3048,31 @@ func file_poktroll_migration_tx_proto_rawDescGZIP() []byte { return file_poktroll_migration_tx_proto_rawDescData } -var file_poktroll_migration_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) +var file_poktroll_migration_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 6) var file_poktroll_migration_tx_proto_goTypes = []interface{}{ (*MsgUpdateParams)(nil), // 0: poktroll.migration.MsgUpdateParams (*MsgUpdateParamsResponse)(nil), // 1: poktroll.migration.MsgUpdateParamsResponse (*MsgUploadMorseState)(nil), // 2: poktroll.migration.MsgUploadMorseState (*MsgUploadMorseStateResponse)(nil), // 3: poktroll.migration.MsgUploadMorseStateResponse - (*Params)(nil), // 4: poktroll.migration.Params + (*MsgClaimMorsePokt)(nil), // 4: poktroll.migration.MsgClaimMorsePokt + (*MsgClaimMorsePoktResponse)(nil), // 5: poktroll.migration.MsgClaimMorsePoktResponse + (*Params)(nil), // 6: poktroll.migration.Params + (*v1beta1.Coin)(nil), // 7: cosmos.base.v1beta1.Coin } var file_poktroll_migration_tx_proto_depIdxs = []int32{ - 4, // 0: poktroll.migration.MsgUpdateParams.params:type_name -> poktroll.migration.Params - 0, // 1: poktroll.migration.Msg.UpdateParams:input_type -> poktroll.migration.MsgUpdateParams - 2, // 2: poktroll.migration.Msg.UploadMorseState:input_type -> poktroll.migration.MsgUploadMorseState - 1, // 3: poktroll.migration.Msg.UpdateParams:output_type -> poktroll.migration.MsgUpdateParamsResponse - 3, // 4: poktroll.migration.Msg.UploadMorseState:output_type -> poktroll.migration.MsgUploadMorseStateResponse - 3, // [3:5] is the sub-list for method output_type - 1, // [1:3] is the sub-list for method input_type - 1, // [1:1] is the sub-list for extension type_name - 1, // [1:1] is the sub-list for extension extendee - 0, // [0:1] is the sub-list for field type_name + 6, // 0: poktroll.migration.MsgUpdateParams.params:type_name -> poktroll.migration.Params + 7, // 1: poktroll.migration.MsgClaimMorsePoktResponse.balance:type_name -> cosmos.base.v1beta1.Coin + 0, // 2: poktroll.migration.Msg.UpdateParams:input_type -> poktroll.migration.MsgUpdateParams + 2, // 3: poktroll.migration.Msg.UploadMorseState:input_type -> poktroll.migration.MsgUploadMorseState + 4, // 4: poktroll.migration.Msg.ClaimMorsePokt:input_type -> poktroll.migration.MsgClaimMorsePokt + 1, // 5: poktroll.migration.Msg.UpdateParams:output_type -> poktroll.migration.MsgUpdateParamsResponse + 3, // 6: poktroll.migration.Msg.UploadMorseState:output_type -> poktroll.migration.MsgUploadMorseStateResponse + 5, // 7: poktroll.migration.Msg.ClaimMorsePokt:output_type -> poktroll.migration.MsgClaimMorsePoktResponse + 5, // [5:8] is the sub-list for method output_type + 2, // [2:5] is the sub-list for method input_type + 2, // [2:2] is the sub-list for extension type_name + 2, // [2:2] is the sub-list for extension extendee + 0, // [0:2] is the sub-list for field type_name } func init() { file_poktroll_migration_tx_proto_init() } @@ -2024,6 +3130,30 @@ func file_poktroll_migration_tx_proto_init() { return nil } } + file_poktroll_migration_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClaimMorsePokt); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgClaimMorsePoktResponse); 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{ @@ -2031,7 +3161,7 @@ func file_poktroll_migration_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_poktroll_migration_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 4, + NumMessages: 6, NumExtensions: 0, NumServices: 1, }, diff --git a/api/poktroll/migration/tx_grpc.pb.go b/api/poktroll/migration/tx_grpc.pb.go index 555b607e6..1791ba859 100644 --- a/api/poktroll/migration/tx_grpc.pb.go +++ b/api/poktroll/migration/tx_grpc.pb.go @@ -21,6 +21,7 @@ const _ = grpc.SupportPackageIsVersion8 const ( Msg_UpdateParams_FullMethodName = "/poktroll.migration.Msg/UpdateParams" Msg_UploadMorseState_FullMethodName = "/poktroll.migration.Msg/UploadMorseState" + Msg_ClaimMorsePokt_FullMethodName = "/poktroll.migration.Msg/ClaimMorsePokt" ) // MsgClient is the client API for Msg service. @@ -33,6 +34,7 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) + ClaimMorsePokt(ctx context.Context, in *MsgClaimMorsePokt, opts ...grpc.CallOption) (*MsgClaimMorsePoktResponse, error) } type msgClient struct { @@ -63,6 +65,16 @@ func (c *msgClient) UploadMorseState(ctx context.Context, in *MsgUploadMorseStat return out, nil } +func (c *msgClient) ClaimMorsePokt(ctx context.Context, in *MsgClaimMorsePokt, opts ...grpc.CallOption) (*MsgClaimMorsePoktResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgClaimMorsePoktResponse) + err := c.cc.Invoke(ctx, Msg_ClaimMorsePokt_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 @@ -73,6 +85,7 @@ type MsgServer interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) + ClaimMorsePokt(context.Context, *MsgClaimMorsePokt) (*MsgClaimMorsePoktResponse, error) mustEmbedUnimplementedMsgServer() } @@ -86,6 +99,9 @@ func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (* func (UnimplementedMsgServer) UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadMorseState not implemented") } +func (UnimplementedMsgServer) ClaimMorsePokt(context.Context, *MsgClaimMorsePokt) (*MsgClaimMorsePoktResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimMorsePokt not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -135,6 +151,24 @@ func _Msg_UploadMorseState_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Msg_ClaimMorsePokt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimMorsePokt) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimMorsePokt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_ClaimMorsePokt_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimMorsePokt(ctx, req.(*MsgClaimMorsePokt)) + } + 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) @@ -150,6 +184,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UploadMorseState", Handler: _Msg_UploadMorseState_Handler, }, + { + MethodName: "ClaimMorsePokt", + Handler: _Msg_ClaimMorsePokt_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/tx.proto", diff --git a/proto/poktroll/migration/tx.proto b/proto/poktroll/migration/tx.proto index a9730f38c..bf399845c 100644 --- a/proto/poktroll/migration/tx.proto +++ b/proto/poktroll/migration/tx.proto @@ -5,6 +5,7 @@ package poktroll.migration; import "amino/amino.proto"; import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; +import "cosmos/base/v1beta1/coin.proto"; import "gogoproto/gogo.proto"; import "poktroll/migration/params.proto"; @@ -42,20 +43,23 @@ message MsgUpdateParamsResponse {} // for subsequent migration operations on Shannon. message MsgUploadMorseState { option (cosmos.msg.v1.signer) = "authority"; + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; bytes state = 2; } message MsgUploadMorseStateResponse {} +// MsgClaimMorsePokt is used to self-claim owned POKT tokens from the "Morse migration" state. message MsgClaimMorsePokt { - option (cosmos.msg.v1.signer) = "shannonDestAddress"; - string shannonDestAddress = 1; - string morseSrcAddress = 2; - string morseSignature = 3; + option (cosmos.msg.v1.signer) = "shannon_dest_address"; + + string shannon_dest_address = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + string morse_src_address = 2; + bytes morse_signature = 3; } message MsgClaimMorsePoktResponse { - string balance = 1; + cosmos.base.v1beta1.Coin balance = 1; } diff --git a/x/migration/types/tx.pb.go b/x/migration/types/tx.pb.go index dfbffaef7..1aa70510d 100644 --- a/x/migration/types/tx.pb.go +++ b/x/migration/types/tx.pb.go @@ -7,6 +7,7 @@ import ( context "context" fmt "fmt" _ "github.com/cosmos/cosmos-proto" + types "github.com/cosmos/cosmos-sdk/types" _ "github.com/cosmos/cosmos-sdk/types/msgservice" _ "github.com/cosmos/cosmos-sdk/types/tx/amino" _ "github.com/cosmos/gogoproto/gogoproto" @@ -214,43 +215,161 @@ func (m *MsgUploadMorseStateResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUploadMorseStateResponse proto.InternalMessageInfo +// MsgClaimMorsePokt is used to self-claim owned POKT tokens from the "Morse migration" state. +type MsgClaimMorsePokt struct { + ShannonDestAddress string `protobuf:"bytes,1,opt,name=shannon_dest_address,json=shannonDestAddress,proto3" json:"shannon_dest_address,omitempty"` + MorseSrcAddress string `protobuf:"bytes,2,opt,name=morse_src_address,json=morseSrcAddress,proto3" json:"morse_src_address,omitempty"` + MorseSignature []byte `protobuf:"bytes,3,opt,name=morse_signature,json=morseSignature,proto3" json:"morse_signature,omitempty"` +} + +func (m *MsgClaimMorsePokt) Reset() { *m = MsgClaimMorsePokt{} } +func (m *MsgClaimMorsePokt) String() string { return proto.CompactTextString(m) } +func (*MsgClaimMorsePokt) ProtoMessage() {} +func (*MsgClaimMorsePokt) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{4} +} +func (m *MsgClaimMorsePokt) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimMorsePokt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimMorsePokt.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgClaimMorsePokt) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimMorsePokt.Merge(m, src) +} +func (m *MsgClaimMorsePokt) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimMorsePokt) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimMorsePokt.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimMorsePokt proto.InternalMessageInfo + +func (m *MsgClaimMorsePokt) GetShannonDestAddress() string { + if m != nil { + return m.ShannonDestAddress + } + return "" +} + +func (m *MsgClaimMorsePokt) GetMorseSrcAddress() string { + if m != nil { + return m.MorseSrcAddress + } + return "" +} + +func (m *MsgClaimMorsePokt) GetMorseSignature() []byte { + if m != nil { + return m.MorseSignature + } + return nil +} + +type MsgClaimMorsePoktResponse struct { + Balance *types.Coin `protobuf:"bytes,1,opt,name=balance,proto3" json:"balance,omitempty"` +} + +func (m *MsgClaimMorsePoktResponse) Reset() { *m = MsgClaimMorsePoktResponse{} } +func (m *MsgClaimMorsePoktResponse) String() string { return proto.CompactTextString(m) } +func (*MsgClaimMorsePoktResponse) ProtoMessage() {} +func (*MsgClaimMorsePoktResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{5} +} +func (m *MsgClaimMorsePoktResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgClaimMorsePoktResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_MsgClaimMorsePoktResponse.Marshal(b, m, deterministic) + } else { + b = b[:cap(b)] + n, err := m.MarshalToSizedBuffer(b) + if err != nil { + return nil, err + } + return b[:n], nil + } +} +func (m *MsgClaimMorsePoktResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgClaimMorsePoktResponse.Merge(m, src) +} +func (m *MsgClaimMorsePoktResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgClaimMorsePoktResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgClaimMorsePoktResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgClaimMorsePoktResponse proto.InternalMessageInfo + +func (m *MsgClaimMorsePoktResponse) GetBalance() *types.Coin { + if m != nil { + return m.Balance + } + return nil +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.migration.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.migration.MsgUpdateParamsResponse") proto.RegisterType((*MsgUploadMorseState)(nil), "poktroll.migration.MsgUploadMorseState") proto.RegisterType((*MsgUploadMorseStateResponse)(nil), "poktroll.migration.MsgUploadMorseStateResponse") + proto.RegisterType((*MsgClaimMorsePokt)(nil), "poktroll.migration.MsgClaimMorsePokt") + proto.RegisterType((*MsgClaimMorsePoktResponse)(nil), "poktroll.migration.MsgClaimMorsePoktResponse") } func init() { proto.RegisterFile("poktroll/migration/tx.proto", fileDescriptor_21658240592266b6) } var fileDescriptor_21658240592266b6 = []byte{ - // 416 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2e, 0xc8, 0xcf, 0x2e, - 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0xcf, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x2f, - 0xa9, 0xd0, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0x49, 0xea, 0xc1, 0x25, 0xa5, 0x04, - 0x13, 0x73, 0x33, 0xf3, 0xf2, 0xf5, 0xc1, 0x24, 0x44, 0x99, 0x94, 0x78, 0x72, 0x7e, 0x71, 0x6e, - 0x7e, 0xb1, 0x7e, 0x6e, 0x71, 0xba, 0x7e, 0x99, 0x21, 0x88, 0x82, 0x4a, 0x48, 0x42, 0x24, 0xe2, - 0xc1, 0x3c, 0x7d, 0x08, 0x07, 0x2a, 0x25, 0x92, 0x9e, 0x9f, 0x9e, 0x0f, 0x11, 0x07, 0xb1, 0xa0, - 0xa2, 0xf2, 0x58, 0x5c, 0x53, 0x90, 0x58, 0x94, 0x98, 0x0b, 0xd5, 0xa6, 0x74, 0x90, 0x91, 0x8b, - 0xdf, 0xb7, 0x38, 0x3d, 0xb4, 0x20, 0x25, 0xb1, 0x24, 0x35, 0x00, 0x2c, 0x23, 0x64, 0xc6, 0xc5, - 0x99, 0x58, 0x5a, 0x92, 0x91, 0x5f, 0x94, 0x59, 0x52, 0x29, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0xe9, - 0x24, 0x71, 0x69, 0x8b, 0xae, 0x08, 0xd4, 0x3e, 0xc7, 0x94, 0x94, 0xa2, 0xd4, 0xe2, 0xe2, 0xe0, - 0x92, 0xa2, 0xcc, 0xbc, 0xf4, 0x20, 0x84, 0x52, 0x21, 0x5b, 0x2e, 0x36, 0x88, 0xd9, 0x12, 0x4c, - 0x0a, 0x8c, 0x1a, 0xdc, 0x46, 0x52, 0x7a, 0x98, 0xde, 0xd5, 0x83, 0xd8, 0xe1, 0xc4, 0x79, 0xe2, - 0x9e, 0x3c, 0xc3, 0x8a, 0xe7, 0x1b, 0xb4, 0x18, 0x83, 0xa0, 0x9a, 0xac, 0xcc, 0x9b, 0x9e, 0x6f, - 0xd0, 0x42, 0x18, 0xd7, 0xf5, 0x7c, 0x83, 0x96, 0x0a, 0xdc, 0xf9, 0x15, 0x48, 0x1e, 0x40, 0x73, - 0xaf, 0x92, 0x24, 0x97, 0x38, 0x9a, 0x50, 0x50, 0x6a, 0x71, 0x41, 0x7e, 0x5e, 0x71, 0xaa, 0x52, - 0x31, 0x97, 0x30, 0x58, 0x2a, 0x27, 0x3f, 0x31, 0xc5, 0x37, 0xbf, 0xa8, 0x38, 0x35, 0xb8, 0x24, - 0xb1, 0x24, 0x95, 0x6c, 0x1f, 0x8a, 0x70, 0xb1, 0x16, 0x83, 0x0c, 0x00, 0x7b, 0x90, 0x27, 0x08, - 0xc2, 0xb1, 0xe2, 0x43, 0x75, 0xb8, 0x92, 0x2c, 0x97, 0x34, 0x16, 0x4b, 0x61, 0x6e, 0x32, 0xba, - 0xc3, 0xc8, 0xc5, 0xec, 0x5b, 0x9c, 0x2e, 0x94, 0xc0, 0xc5, 0x83, 0x12, 0xec, 0xca, 0xd8, 0x82, - 0x0b, 0xcd, 0x63, 0x52, 0xda, 0x44, 0x28, 0x82, 0xd9, 0x24, 0x94, 0xc3, 0x25, 0x80, 0xe1, 0x75, - 0x75, 0x9c, 0x06, 0xa0, 0x2a, 0x94, 0xd2, 0x27, 0x52, 0x21, 0xcc, 0x36, 0x29, 0xd6, 0x06, 0x50, - 0x74, 0x3a, 0xf9, 0x9c, 0x78, 0x24, 0xc7, 0x78, 0xe1, 0x91, 0x1c, 0xe3, 0x83, 0x47, 0x72, 0x8c, - 0x13, 0x1e, 0xcb, 0x31, 0x5c, 0x78, 0x2c, 0xc7, 0x70, 0xe3, 0xb1, 0x1c, 0x43, 0x94, 0x51, 0x7a, - 0x66, 0x49, 0x46, 0x69, 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xc8, 0x6c, 0xdd, 0xbc, 0xd4, 0x92, - 0xf2, 0xfc, 0xa2, 0x6c, 0x7d, 0xac, 0xb1, 0x5c, 0x52, 0x59, 0x90, 0x5a, 0x9c, 0xc4, 0x06, 0x4e, - 0xa6, 0xc6, 0x80, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xfb, 0x99, 0x77, 0x57, 0x03, 0x00, 0x00, + // 579 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x31, 0x6f, 0xd3, 0x40, + 0x18, 0x8d, 0x5b, 0xb5, 0x28, 0xd7, 0x2a, 0x21, 0x26, 0x52, 0x13, 0x57, 0xb8, 0x55, 0x00, 0xb5, + 0x0a, 0x8a, 0x4f, 0x49, 0x25, 0x90, 0x22, 0x31, 0x90, 0x32, 0x21, 0x22, 0x45, 0x8e, 0x58, 0x58, + 0xc2, 0xc5, 0x39, 0x1c, 0x2b, 0xf6, 0x9d, 0x75, 0x77, 0x29, 0xed, 0x86, 0x18, 0x99, 0xf8, 0x19, + 0x8c, 0x19, 0xf8, 0x03, 0x48, 0x0c, 0xdd, 0xa8, 0x98, 0x98, 0x10, 0x4a, 0x86, 0xfc, 0x0d, 0x64, + 0xfb, 0xec, 0x92, 0xc4, 0x15, 0x51, 0x97, 0xc4, 0x77, 0xef, 0x7d, 0xef, 0x7b, 0xcf, 0xf7, 0x9d, + 0xc1, 0xbe, 0x4f, 0x47, 0x82, 0x51, 0xd7, 0x85, 0x9e, 0x63, 0x33, 0x24, 0x1c, 0x4a, 0xa0, 0x38, + 0x37, 0x7c, 0x46, 0x05, 0x55, 0xd5, 0x18, 0x34, 0x12, 0x50, 0x2b, 0x20, 0xcf, 0x21, 0x14, 0x86, + 0xbf, 0x11, 0x4d, 0xdb, 0xb3, 0x28, 0xf7, 0x28, 0x87, 0x1e, 0xb7, 0xe1, 0x59, 0x3d, 0xf8, 0x93, + 0x40, 0x39, 0x02, 0x7a, 0xe1, 0x0a, 0x46, 0x0b, 0x09, 0xe9, 0xb2, 0xa6, 0x8f, 0x38, 0x86, 0x67, + 0xf5, 0x3e, 0x16, 0xa8, 0x0e, 0x2d, 0xea, 0x10, 0x89, 0x17, 0x6d, 0x6a, 0xd3, 0xa8, 0x2e, 0x78, + 0x92, 0xbb, 0x07, 0x29, 0x6e, 0x7d, 0xc4, 0x90, 0x27, 0x65, 0x2b, 0xdf, 0x14, 0x90, 0x6f, 0x73, + 0xfb, 0xb5, 0x3f, 0x40, 0x02, 0x77, 0x42, 0x44, 0x7d, 0x02, 0xb2, 0x68, 0x2c, 0x86, 0x94, 0x39, + 0xe2, 0xa2, 0xa4, 0x1c, 0x2a, 0xc7, 0xd9, 0x56, 0xe9, 0xe7, 0xd7, 0x5a, 0x51, 0xfa, 0x79, 0x3e, + 0x18, 0x30, 0xcc, 0x79, 0x57, 0x30, 0x87, 0xd8, 0xe6, 0x35, 0x55, 0x7d, 0x06, 0xb6, 0x23, 0xed, + 0xd2, 0xc6, 0xa1, 0x72, 0xbc, 0xd3, 0xd0, 0x8c, 0xd5, 0xd7, 0x61, 0x44, 0x3d, 0x5a, 0xd9, 0xcb, + 0xdf, 0x07, 0x99, 0x2f, 0xf3, 0x49, 0x55, 0x31, 0x65, 0x51, 0xf3, 0xe9, 0xc7, 0xf9, 0xa4, 0x7a, + 0x2d, 0xf7, 0x69, 0x3e, 0xa9, 0x3e, 0x4c, 0xec, 0x9f, 0xff, 0x13, 0x60, 0xc9, 0x6f, 0xa5, 0x0c, + 0xf6, 0x96, 0xb6, 0x4c, 0xcc, 0x7d, 0x4a, 0x38, 0xae, 0x70, 0x70, 0x2f, 0x84, 0x5c, 0x8a, 0x06, + 0x6d, 0xca, 0x38, 0xee, 0x0a, 0x24, 0xf0, 0xad, 0x13, 0x16, 0xc1, 0x16, 0x0f, 0x04, 0xc2, 0x80, + 0xbb, 0x66, 0xb4, 0x68, 0xe6, 0x16, 0x8d, 0x57, 0xee, 0x83, 0xfd, 0x94, 0xa6, 0x89, 0xa7, 0x1f, + 0x0a, 0x28, 0xb4, 0xb9, 0x7d, 0xea, 0x22, 0xc7, 0x0b, 0xe1, 0x0e, 0x1d, 0x09, 0xf5, 0x25, 0x28, + 0xf2, 0x21, 0x22, 0x84, 0x92, 0xde, 0x00, 0x73, 0xd1, 0x43, 0x91, 0x87, 0xff, 0xba, 0x53, 0x65, + 0xd5, 0x0b, 0xcc, 0x85, 0x44, 0xd4, 0x2a, 0x28, 0x78, 0x81, 0x70, 0x8f, 0x33, 0x2b, 0x11, 0x0a, + 0x2c, 0x67, 0xcd, 0x7c, 0x08, 0x74, 0x99, 0x15, 0x73, 0x8f, 0x40, 0x5e, 0x72, 0x1d, 0x9b, 0x20, + 0x31, 0x66, 0xb8, 0xb4, 0x19, 0x86, 0xcb, 0x45, 0xcc, 0x78, 0xb7, 0x59, 0x0e, 0x52, 0xa6, 0x7a, + 0xac, 0x74, 0x40, 0x79, 0x25, 0x50, 0x1c, 0x57, 0x3d, 0x01, 0x77, 0xfa, 0xc8, 0x45, 0xc4, 0xc2, + 0x61, 0x96, 0x9d, 0x46, 0xd9, 0x90, 0x41, 0x82, 0x51, 0x36, 0xe4, 0x28, 0x1b, 0xa7, 0xd4, 0x21, + 0x66, 0xcc, 0x6c, 0x7c, 0xdf, 0x00, 0x9b, 0x6d, 0x6e, 0xab, 0x6f, 0xc1, 0xee, 0xc2, 0x68, 0x3e, + 0x48, 0x1b, 0xa9, 0xa5, 0xc3, 0xd7, 0x1e, 0xaf, 0x41, 0x4a, 0xec, 0xb9, 0xe0, 0xee, 0xca, 0x78, + 0x1c, 0xdd, 0x28, 0xb0, 0x48, 0xd4, 0xe0, 0x9a, 0xc4, 0xa4, 0xdb, 0x3b, 0x90, 0x5b, 0x3a, 0xf7, + 0x47, 0x37, 0x48, 0x2c, 0xd2, 0xb4, 0xda, 0x5a, 0xb4, 0xb8, 0x8f, 0xb6, 0xf5, 0x21, 0xb8, 0x5a, + 0xad, 0x57, 0x97, 0x53, 0x5d, 0xb9, 0x9a, 0xea, 0xca, 0x9f, 0xa9, 0xae, 0x7c, 0x9e, 0xe9, 0x99, + 0xab, 0x99, 0x9e, 0xf9, 0x35, 0xd3, 0x33, 0x6f, 0x1a, 0xb6, 0x23, 0x86, 0xe3, 0xbe, 0x61, 0x51, + 0x0f, 0x06, 0xca, 0x35, 0x82, 0xc5, 0x7b, 0xca, 0x46, 0x30, 0xf5, 0xc6, 0x89, 0x0b, 0x1f, 0xf3, + 0xfe, 0x76, 0xf8, 0xc9, 0x38, 0xf9, 0x1b, 0x00, 0x00, 0xff, 0xff, 0x21, 0x85, 0xfa, 0x5c, 0x03, + 0x05, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -269,6 +388,7 @@ type MsgClient interface { // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) UploadMorseState(ctx context.Context, in *MsgUploadMorseState, opts ...grpc.CallOption) (*MsgUploadMorseStateResponse, error) + ClaimMorsePokt(ctx context.Context, in *MsgClaimMorsePokt, opts ...grpc.CallOption) (*MsgClaimMorsePoktResponse, error) } type msgClient struct { @@ -297,12 +417,22 @@ func (c *msgClient) UploadMorseState(ctx context.Context, in *MsgUploadMorseStat return out, nil } +func (c *msgClient) ClaimMorsePokt(ctx context.Context, in *MsgClaimMorsePokt, opts ...grpc.CallOption) (*MsgClaimMorsePoktResponse, error) { + out := new(MsgClaimMorsePoktResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Msg/ClaimMorsePokt", 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 // parameters. The authority defaults to the x/gov module account. UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) UploadMorseState(context.Context, *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) + ClaimMorsePokt(context.Context, *MsgClaimMorsePokt) (*MsgClaimMorsePoktResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -315,6 +445,9 @@ func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateP func (*UnimplementedMsgServer) UploadMorseState(ctx context.Context, req *MsgUploadMorseState) (*MsgUploadMorseStateResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UploadMorseState not implemented") } +func (*UnimplementedMsgServer) ClaimMorsePokt(ctx context.Context, req *MsgClaimMorsePokt) (*MsgClaimMorsePoktResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method ClaimMorsePokt not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -356,6 +489,24 @@ func _Msg_UploadMorseState_Handler(srv interface{}, ctx context.Context, dec fun return interceptor(ctx, in, info, handler) } +func _Msg_ClaimMorsePokt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgClaimMorsePokt) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).ClaimMorsePokt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Msg/ClaimMorsePokt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).ClaimMorsePokt(ctx, req.(*MsgClaimMorsePokt)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "poktroll.migration.Msg", HandlerType: (*MsgServer)(nil), @@ -368,6 +519,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UploadMorseState", Handler: _Msg_UploadMorseState_Handler, }, + { + MethodName: "ClaimMorsePokt", + Handler: _Msg_ClaimMorsePokt_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/tx.proto", @@ -496,6 +651,85 @@ func (m *MsgUploadMorseStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, er return len(dAtA) - i, nil } +func (m *MsgClaimMorsePokt) 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 *MsgClaimMorsePokt) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimMorsePokt) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if len(m.MorseSignature) > 0 { + i -= len(m.MorseSignature) + copy(dAtA[i:], m.MorseSignature) + i = encodeVarintTx(dAtA, i, uint64(len(m.MorseSignature))) + i-- + dAtA[i] = 0x1a + } + if len(m.MorseSrcAddress) > 0 { + i -= len(m.MorseSrcAddress) + copy(dAtA[i:], m.MorseSrcAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.MorseSrcAddress))) + i-- + dAtA[i] = 0x12 + } + if len(m.ShannonDestAddress) > 0 { + i -= len(m.ShannonDestAddress) + copy(dAtA[i:], m.ShannonDestAddress) + i = encodeVarintTx(dAtA, i, uint64(len(m.ShannonDestAddress))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgClaimMorsePoktResponse) 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 *MsgClaimMorsePoktResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgClaimMorsePoktResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.Balance != nil { + { + size, err := m.Balance.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 @@ -557,6 +791,40 @@ func (m *MsgUploadMorseStateResponse) Size() (n int) { return n } +func (m *MsgClaimMorsePokt) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.ShannonDestAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MorseSrcAddress) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = len(m.MorseSignature) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + return n +} + +func (m *MsgClaimMorsePoktResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Balance != nil { + l = m.Balance.Size() + n += 1 + l + sovTx(uint64(l)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -894,6 +1162,240 @@ func (m *MsgUploadMorseStateResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgClaimMorsePokt) 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: MsgClaimMorsePokt: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimMorsePokt: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ShannonDestAddress", 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.ShannonDestAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MorseSrcAddress", 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.MorseSrcAddress = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MorseSignature", wireType) + } + var byteLen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + byteLen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if byteLen < 0 { + return ErrInvalidLengthTx + } + postIndex := iNdEx + byteLen + if postIndex < 0 { + return ErrInvalidLengthTx + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + m.MorseSignature = append(m.MorseSignature[:0], dAtA[iNdEx:postIndex]...) + if m.MorseSignature == nil { + m.MorseSignature = []byte{} + } + 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 *MsgClaimMorsePoktResponse) 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: MsgClaimMorsePoktResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgClaimMorsePoktResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Balance", 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.Balance == nil { + m.Balance = &types.Coin{} + } + if err := m.Balance.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