diff --git a/api/poktroll/migration/genesis.pulsar.go b/api/poktroll/migration/genesis.pulsar.go index 7a7ad4714..b1a65c582 100644 --- a/api/poktroll/migration/genesis.pulsar.go +++ b/api/poktroll/migration/genesis.pulsar.go @@ -15,14 +15,16 @@ import ( ) var ( - md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor + md_GenesisState protoreflect.MessageDescriptor + fd_GenesisState_params protoreflect.FieldDescriptor + fd_GenesisState_morseAccountState protoreflect.FieldDescriptor ) func init() { file_poktroll_migration_genesis_proto_init() md_GenesisState = File_poktroll_migration_genesis_proto.Messages().ByName("GenesisState") fd_GenesisState_params = md_GenesisState.Fields().ByName("params") + fd_GenesisState_morseAccountState = md_GenesisState.Fields().ByName("morseAccountState") } var _ protoreflect.Message = (*fastReflection_GenesisState)(nil) @@ -96,6 +98,12 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, return } } + if x.MorseAccountState != nil { + value := protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) + if !f(fd_GenesisState_morseAccountState, value) { + return + } + } } // Has reports whether a field is populated. @@ -113,6 +121,8 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool switch fd.FullName() { case "poktroll.migration.GenesisState.params": return x.Params != nil + case "poktroll.migration.GenesisState.morseAccountState": + return x.MorseAccountState != nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -131,6 +141,8 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { case "poktroll.migration.GenesisState.params": x.Params = nil + case "poktroll.migration.GenesisState.morseAccountState": + x.MorseAccountState = nil default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -150,6 +162,9 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto case "poktroll.migration.GenesisState.params": value := x.Params return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "poktroll.migration.GenesisState.morseAccountState": + value := x.MorseAccountState + return protoreflect.ValueOfMessage(value.ProtoReflect()) default: if descriptor.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -172,6 +187,8 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value switch fd.FullName() { case "poktroll.migration.GenesisState.params": x.Params = value.Message().Interface().(*Params) + case "poktroll.migration.GenesisState.morseAccountState": + x.MorseAccountState = value.Message().Interface().(*MorseAccountState) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -197,6 +214,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p x.Params = new(Params) } return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) + case "poktroll.migration.GenesisState.morseAccountState": + if x.MorseAccountState == nil { + x.MorseAccountState = new(MorseAccountState) + } + return protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -213,6 +235,9 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) case "poktroll.migration.GenesisState.params": m := new(Params) return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "poktroll.migration.GenesisState.morseAccountState": + m := new(MorseAccountState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.GenesisState")) @@ -286,6 +311,10 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { l = options.Size(x.Params) n += 1 + l + runtime.Sov(uint64(l)) } + if x.MorseAccountState != nil { + l = options.Size(x.MorseAccountState) + n += 1 + l + runtime.Sov(uint64(l)) + } if x.unknownFields != nil { n += len(x.unknownFields) } @@ -315,6 +344,20 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } + if x.MorseAccountState != nil { + encoded, err := options.Marshal(x.MorseAccountState) + 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] = 0x12 + } if x.Params != nil { encoded, err := options.Marshal(x.Params) if err != nil { @@ -414,6 +457,42 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex + case 2: + if wireType != 2 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field MorseAccountState", 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.MorseAccountState == nil { + x.MorseAccountState = &MorseAccountState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MorseAccountState); err != nil { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := runtime.Skip(dAtA[iNdEx:]) @@ -469,7 +548,8 @@ type GenesisState struct { unknownFields protoimpl.UnknownFields // params defines all the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` + MorseAccountState *MorseAccountState `protobuf:"bytes,2,opt,name=morseAccountState,proto3" json:"morseAccountState,omitempty"` } func (x *GenesisState) Reset() { @@ -499,6 +579,13 @@ func (x *GenesisState) GetParams() *Params { return nil } +func (x *GenesisState) GetMorseAccountState() *MorseAccountState { + if x != nil { + return x.MorseAccountState + } + return nil +} + var File_poktroll_migration_genesis_proto protoreflect.FileDescriptor var file_poktroll_migration_genesis_proto_rawDesc = []byte{ @@ -510,24 +597,31 @@ var file_poktroll_migration_genesis_proto_rawDesc = []byte{ 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, 0x4d, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, - 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, - 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, 0x42, - 0xb8, 0x01, 0xd8, 0xe2, 0x1e, 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, 0x0c, - 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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, + 0x1a, 0x1e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, + 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x22, 0xa2, 0x01, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, + 0x72, 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, + 0x12, 0x53, 0x0a, 0x11, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x52, 0x11, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0xb8, 0x01, 0xd8, 0xe2, 0x1e, 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, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 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 ( @@ -544,16 +638,18 @@ func file_poktroll_migration_genesis_proto_rawDescGZIP() []byte { var file_poktroll_migration_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_poktroll_migration_genesis_proto_goTypes = []interface{}{ - (*GenesisState)(nil), // 0: poktroll.migration.GenesisState - (*Params)(nil), // 1: poktroll.migration.Params + (*GenesisState)(nil), // 0: poktroll.migration.GenesisState + (*Params)(nil), // 1: poktroll.migration.Params + (*MorseAccountState)(nil), // 2: poktroll.migration.MorseAccountState } var file_poktroll_migration_genesis_proto_depIdxs = []int32{ 1, // 0: poktroll.migration.GenesisState.params:type_name -> poktroll.migration.Params - 1, // [1:1] is the sub-list for method output_type - 1, // [1:1] 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 + 2, // 1: poktroll.migration.GenesisState.morseAccountState:type_name -> poktroll.migration.MorseAccountState + 2, // [2:2] is the sub-list for method output_type + 2, // [2:2] 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_genesis_proto_init() } @@ -562,6 +658,7 @@ func file_poktroll_migration_genesis_proto_init() { return } file_poktroll_migration_params_proto_init() + file_poktroll_migration_types_proto_init() if !protoimpl.UnsafeEnabled { file_poktroll_migration_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { diff --git a/api/poktroll/migration/query.pulsar.go b/api/poktroll/migration/query.pulsar.go index cb890aa65..a55078adb 100644 --- a/api/poktroll/migration/query.pulsar.go +++ b/api/poktroll/migration/query.pulsar.go @@ -807,6 +807,797 @@ func (x *fastReflection_QueryParamsResponse) ProtoMethods() *protoiface.Methods } } +var ( + md_QueryGetMorseAccountStateRequest protoreflect.MessageDescriptor +) + +func init() { + file_poktroll_migration_query_proto_init() + md_QueryGetMorseAccountStateRequest = File_poktroll_migration_query_proto.Messages().ByName("QueryGetMorseAccountStateRequest") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetMorseAccountStateRequest)(nil) + +type fastReflection_QueryGetMorseAccountStateRequest QueryGetMorseAccountStateRequest + +func (x *QueryGetMorseAccountStateRequest) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetMorseAccountStateRequest)(x) +} + +func (x *QueryGetMorseAccountStateRequest) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_query_proto_msgTypes[2] + 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_QueryGetMorseAccountStateRequest_messageType fastReflection_QueryGetMorseAccountStateRequest_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetMorseAccountStateRequest_messageType{} + +type fastReflection_QueryGetMorseAccountStateRequest_messageType struct{} + +func (x fastReflection_QueryGetMorseAccountStateRequest_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetMorseAccountStateRequest)(nil) +} +func (x fastReflection_QueryGetMorseAccountStateRequest_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetMorseAccountStateRequest) +} +func (x fastReflection_QueryGetMorseAccountStateRequest_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetMorseAccountStateRequest +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetMorseAccountStateRequest) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetMorseAccountStateRequest +} + +// 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_QueryGetMorseAccountStateRequest) Type() protoreflect.MessageType { + return _fastReflection_QueryGetMorseAccountStateRequest_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetMorseAccountStateRequest) New() protoreflect.Message { + return new(fastReflection_QueryGetMorseAccountStateRequest) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetMorseAccountStateRequest) Interface() protoreflect.ProtoMessage { + return (*QueryGetMorseAccountStateRequest)(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_QueryGetMorseAccountStateRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +} + +// 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_QueryGetMorseAccountStateRequest) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateRequest")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateRequest 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_QueryGetMorseAccountStateRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.QueryGetMorseAccountStateRequest", 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_QueryGetMorseAccountStateRequest) 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_QueryGetMorseAccountStateRequest) 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_QueryGetMorseAccountStateRequest) 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_QueryGetMorseAccountStateRequest) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetMorseAccountStateRequest) + 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.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().(*QueryGetMorseAccountStateRequest) + 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 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().(*QueryGetMorseAccountStateRequest) + 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: QueryGetMorseAccountStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetMorseAccountStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + 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_QueryGetMorseAccountStateResponse protoreflect.MessageDescriptor + fd_QueryGetMorseAccountStateResponse_MorseAccountState protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_query_proto_init() + md_QueryGetMorseAccountStateResponse = File_poktroll_migration_query_proto.Messages().ByName("QueryGetMorseAccountStateResponse") + fd_QueryGetMorseAccountStateResponse_MorseAccountState = md_QueryGetMorseAccountStateResponse.Fields().ByName("MorseAccountState") +} + +var _ protoreflect.Message = (*fastReflection_QueryGetMorseAccountStateResponse)(nil) + +type fastReflection_QueryGetMorseAccountStateResponse QueryGetMorseAccountStateResponse + +func (x *QueryGetMorseAccountStateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_QueryGetMorseAccountStateResponse)(x) +} + +func (x *QueryGetMorseAccountStateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_query_proto_msgTypes[3] + 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_QueryGetMorseAccountStateResponse_messageType fastReflection_QueryGetMorseAccountStateResponse_messageType +var _ protoreflect.MessageType = fastReflection_QueryGetMorseAccountStateResponse_messageType{} + +type fastReflection_QueryGetMorseAccountStateResponse_messageType struct{} + +func (x fastReflection_QueryGetMorseAccountStateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_QueryGetMorseAccountStateResponse)(nil) +} +func (x fastReflection_QueryGetMorseAccountStateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_QueryGetMorseAccountStateResponse) +} +func (x fastReflection_QueryGetMorseAccountStateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetMorseAccountStateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_QueryGetMorseAccountStateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_QueryGetMorseAccountStateResponse +} + +// 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_QueryGetMorseAccountStateResponse) Type() protoreflect.MessageType { + return _fastReflection_QueryGetMorseAccountStateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_QueryGetMorseAccountStateResponse) New() protoreflect.Message { + return new(fastReflection_QueryGetMorseAccountStateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_QueryGetMorseAccountStateResponse) Interface() protoreflect.ProtoMessage { + return (*QueryGetMorseAccountStateResponse)(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_QueryGetMorseAccountStateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.MorseAccountState != nil { + value := protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) + if !f(fd_QueryGetMorseAccountStateResponse_MorseAccountState, 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_QueryGetMorseAccountStateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + return x.MorseAccountState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + x.MorseAccountState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + value := x.MorseAccountState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + x.MorseAccountState = value.Message().Interface().(*MorseAccountState) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + if x.MorseAccountState == nil { + x.MorseAccountState = new(MorseAccountState) + } + return protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState": + m := new(MorseAccountState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.QueryGetMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.QueryGetMorseAccountStateResponse 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_QueryGetMorseAccountStateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.QueryGetMorseAccountStateResponse", 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_QueryGetMorseAccountStateResponse) 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_QueryGetMorseAccountStateResponse) 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_QueryGetMorseAccountStateResponse) 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_QueryGetMorseAccountStateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*QueryGetMorseAccountStateResponse) + 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.MorseAccountState != nil { + l = options.Size(x.MorseAccountState) + 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().(*QueryGetMorseAccountStateResponse) + 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.MorseAccountState != nil { + encoded, err := options.Marshal(x.MorseAccountState) + 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().(*QueryGetMorseAccountStateResponse) + 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: QueryGetMorseAccountStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryGetMorseAccountStateResponse: 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 MorseAccountState", 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.MorseAccountState == nil { + x.MorseAccountState = &MorseAccountState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MorseAccountState); 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 @@ -884,6 +1675,67 @@ func (x *QueryParamsResponse) GetParams() *Params { return nil } +type QueryGetMorseAccountStateRequest struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields +} + +func (x *QueryGetMorseAccountStateRequest) Reset() { + *x = QueryGetMorseAccountStateRequest{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_query_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetMorseAccountStateRequest) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetMorseAccountStateRequest) ProtoMessage() {} + +// Deprecated: Use QueryGetMorseAccountStateRequest.ProtoReflect.Descriptor instead. +func (*QueryGetMorseAccountStateRequest) Descriptor() ([]byte, []int) { + return file_poktroll_migration_query_proto_rawDescGZIP(), []int{2} +} + +type QueryGetMorseAccountStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + MorseAccountState *MorseAccountState `protobuf:"bytes,1,opt,name=MorseAccountState,proto3" json:"MorseAccountState,omitempty"` +} + +func (x *QueryGetMorseAccountStateResponse) Reset() { + *x = QueryGetMorseAccountStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_query_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *QueryGetMorseAccountStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*QueryGetMorseAccountStateResponse) ProtoMessage() {} + +// Deprecated: Use QueryGetMorseAccountStateResponse.ProtoReflect.Descriptor instead. +func (*QueryGetMorseAccountStateResponse) Descriptor() ([]byte, []int) { + return file_poktroll_migration_query_proto_rawDescGZIP(), []int{3} +} + +func (x *QueryGetMorseAccountStateResponse) GetMorseAccountState() *MorseAccountState { + if x != nil { + return x.MorseAccountState + } + return nil +} + var File_poktroll_migration_query_proto protoreflect.FileDescriptor var file_poktroll_migration_query_proto_rawDesc = []byte{ @@ -899,35 +1751,60 @@ var file_poktroll_migration_query_proto_rawDesc = []byte{ 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x70, 0x61, 0x67, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, + 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x14, 0x0a, 0x12, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x54, 0x0a, 0x13, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 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, 0x32, 0x94, 0x01, 0x0a, 0x05, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x8a, - 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, 0x70, 0x6f, 0x6b, 0x74, - 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, - 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, - 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, 0x82, 0xd3, 0xe4, 0x93, - 0x02, 0x29, 0x12, 0x27, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, - 0x6b, 0x2f, 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, 0x42, 0xb6, 0x01, 0xd8, 0xe2, - 0x1e, 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, 0x0a, 0x51, 0x75, 0x65, 0x72, - 0x79, 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, + 0x72, 0x61, 0x6d, 0x73, 0x22, 0x22, 0x0a, 0x20, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, + 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, + 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x7e, 0x0a, 0x21, 0x51, 0x75, 0x65, 0x72, + 0x79, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, + 0x11, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, + 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, + 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, + 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, + 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x11, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x32, 0xd5, 0x02, 0x0a, 0x05, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x12, 0x8a, 0x01, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x26, 0x2e, + 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, + 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x27, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2f, + 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x29, 0x12, 0x27, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x2d, 0x6e, 0x65, + 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 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, 0x12, + 0xbe, 0x01, 0x0a, 0x11, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, + 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, + 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, + 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x70, 0x6f, + 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, + 0x2e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x3c, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x36, 0x12, 0x34, 0x2f, 0x70, 0x6f, 0x6b, + 0x74, 0x2d, 0x6e, 0x65, 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x2f, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, + 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2f, 0x6d, 0x6f, 0x72, + 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, + 0x42, 0xb6, 0x01, 0xd8, 0xe2, 0x1e, 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, + 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 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, + 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 ( @@ -942,21 +1819,27 @@ func file_poktroll_migration_query_proto_rawDescGZIP() []byte { return file_poktroll_migration_query_proto_rawDescData } -var file_poktroll_migration_query_proto_msgTypes = make([]protoimpl.MessageInfo, 2) +var file_poktroll_migration_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_poktroll_migration_query_proto_goTypes = []interface{}{ - (*QueryParamsRequest)(nil), // 0: poktroll.migration.QueryParamsRequest - (*QueryParamsResponse)(nil), // 1: poktroll.migration.QueryParamsResponse - (*Params)(nil), // 2: poktroll.migration.Params + (*QueryParamsRequest)(nil), // 0: poktroll.migration.QueryParamsRequest + (*QueryParamsResponse)(nil), // 1: poktroll.migration.QueryParamsResponse + (*QueryGetMorseAccountStateRequest)(nil), // 2: poktroll.migration.QueryGetMorseAccountStateRequest + (*QueryGetMorseAccountStateResponse)(nil), // 3: poktroll.migration.QueryGetMorseAccountStateResponse + (*Params)(nil), // 4: poktroll.migration.Params + (*MorseAccountState)(nil), // 5: poktroll.migration.MorseAccountState } var file_poktroll_migration_query_proto_depIdxs = []int32{ - 2, // 0: poktroll.migration.QueryParamsResponse.params:type_name -> poktroll.migration.Params - 0, // 1: poktroll.migration.Query.Params:input_type -> poktroll.migration.QueryParamsRequest - 1, // 2: poktroll.migration.Query.Params:output_type -> poktroll.migration.QueryParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] 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 + 4, // 0: poktroll.migration.QueryParamsResponse.params:type_name -> poktroll.migration.Params + 5, // 1: poktroll.migration.QueryGetMorseAccountStateResponse.MorseAccountState:type_name -> poktroll.migration.MorseAccountState + 0, // 2: poktroll.migration.Query.Params:input_type -> poktroll.migration.QueryParamsRequest + 2, // 3: poktroll.migration.Query.MorseAccountState:input_type -> poktroll.migration.QueryGetMorseAccountStateRequest + 1, // 4: poktroll.migration.Query.Params:output_type -> poktroll.migration.QueryParamsResponse + 3, // 5: poktroll.migration.Query.MorseAccountState:output_type -> poktroll.migration.QueryGetMorseAccountStateResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] 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_query_proto_init() } @@ -965,6 +1848,7 @@ func file_poktroll_migration_query_proto_init() { return } file_poktroll_migration_params_proto_init() + file_poktroll_migration_types_proto_init() if !protoimpl.UnsafeEnabled { file_poktroll_migration_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*QueryParamsRequest); i { @@ -990,6 +1874,30 @@ func file_poktroll_migration_query_proto_init() { return nil } } + file_poktroll_migration_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetMorseAccountStateRequest); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_poktroll_migration_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*QueryGetMorseAccountStateResponse); 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{ @@ -997,7 +1905,7 @@ func file_poktroll_migration_query_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_poktroll_migration_query_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/poktroll/migration/query_grpc.pb.go b/api/poktroll/migration/query_grpc.pb.go index 1fc079a50..844fc9b41 100644 --- a/api/poktroll/migration/query_grpc.pb.go +++ b/api/poktroll/migration/query_grpc.pb.go @@ -19,7 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - Query_Params_FullMethodName = "/poktroll.migration.Query/Params" + Query_Params_FullMethodName = "/poktroll.migration.Query/Params" + Query_MorseAccountState_FullMethodName = "/poktroll.migration.Query/MorseAccountState" ) // QueryClient is the client API for Query service. @@ -30,6 +31,8 @@ const ( type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a MorseAccountState by index. + MorseAccountState(ctx context.Context, in *QueryGetMorseAccountStateRequest, opts ...grpc.CallOption) (*QueryGetMorseAccountStateResponse, error) } type queryClient struct { @@ -50,6 +53,16 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) MorseAccountState(ctx context.Context, in *QueryGetMorseAccountStateRequest, opts ...grpc.CallOption) (*QueryGetMorseAccountStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(QueryGetMorseAccountStateResponse) + err := c.cc.Invoke(ctx, Query_MorseAccountState_FullMethodName, in, out, cOpts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. // All implementations must embed UnimplementedQueryServer // for forward compatibility @@ -58,6 +71,8 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a MorseAccountState by index. + MorseAccountState(context.Context, *QueryGetMorseAccountStateRequest) (*QueryGetMorseAccountStateResponse, error) mustEmbedUnimplementedQueryServer() } @@ -68,6 +83,9 @@ type UnimplementedQueryServer struct { func (UnimplementedQueryServer) Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (UnimplementedQueryServer) MorseAccountState(context.Context, *QueryGetMorseAccountStateRequest) (*QueryGetMorseAccountStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MorseAccountState not implemented") +} func (UnimplementedQueryServer) mustEmbedUnimplementedQueryServer() {} // UnsafeQueryServer may be embedded to opt out of forward compatibility for this service. @@ -99,6 +117,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_MorseAccountState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetMorseAccountStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MorseAccountState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Query_MorseAccountState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MorseAccountState(ctx, req.(*QueryGetMorseAccountStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + // Query_ServiceDesc is the grpc.ServiceDesc for Query service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) @@ -110,6 +146,10 @@ var Query_ServiceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "MorseAccountState", + Handler: _Query_MorseAccountState_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/query.proto", diff --git a/api/poktroll/migration/tx.pulsar.go b/api/poktroll/migration/tx.pulsar.go index f7af6fa34..2ef7ccf2e 100644 --- a/api/poktroll/migration/tx.pulsar.go +++ b/api/poktroll/migration/tx.pulsar.go @@ -871,6 +871,975 @@ func (x *fastReflection_MsgUpdateParamsResponse) ProtoMethods() *protoiface.Meth } } +var ( + md_MsgCreateMorseAccountState protoreflect.MessageDescriptor + fd_MsgCreateMorseAccountState_authority protoreflect.FieldDescriptor + fd_MsgCreateMorseAccountState_morse_account_state protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_tx_proto_init() + md_MsgCreateMorseAccountState = File_poktroll_migration_tx_proto.Messages().ByName("MsgCreateMorseAccountState") + fd_MsgCreateMorseAccountState_authority = md_MsgCreateMorseAccountState.Fields().ByName("authority") + fd_MsgCreateMorseAccountState_morse_account_state = md_MsgCreateMorseAccountState.Fields().ByName("morse_account_state") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateMorseAccountState)(nil) + +type fastReflection_MsgCreateMorseAccountState MsgCreateMorseAccountState + +func (x *MsgCreateMorseAccountState) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateMorseAccountState)(x) +} + +func (x *MsgCreateMorseAccountState) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_tx_proto_msgTypes[2] + 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_MsgCreateMorseAccountState_messageType fastReflection_MsgCreateMorseAccountState_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateMorseAccountState_messageType{} + +type fastReflection_MsgCreateMorseAccountState_messageType struct{} + +func (x fastReflection_MsgCreateMorseAccountState_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateMorseAccountState)(nil) +} +func (x fastReflection_MsgCreateMorseAccountState_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateMorseAccountState) +} +func (x fastReflection_MsgCreateMorseAccountState_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMorseAccountState +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateMorseAccountState) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMorseAccountState +} + +// 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_MsgCreateMorseAccountState) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateMorseAccountState_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateMorseAccountState) New() protoreflect.Message { + return new(fastReflection_MsgCreateMorseAccountState) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateMorseAccountState) Interface() protoreflect.ProtoMessage { + return (*MsgCreateMorseAccountState)(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_MsgCreateMorseAccountState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if x.Authority != "" { + value := protoreflect.ValueOfString(x.Authority) + if !f(fd_MsgCreateMorseAccountState_authority, value) { + return + } + } + if x.MorseAccountState != nil { + value := protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) + if !f(fd_MsgCreateMorseAccountState_morse_account_state, 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_MsgCreateMorseAccountState) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.authority": + return x.Authority != "" + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + return x.MorseAccountState != nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.authority": + x.Authority = "" + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + x.MorseAccountState = nil + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.authority": + value := x.Authority + return protoreflect.ValueOfString(value) + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + value := x.MorseAccountState + return protoreflect.ValueOfMessage(value.ProtoReflect()) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.authority": + x.Authority = value.Interface().(string) + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + x.MorseAccountState = value.Message().Interface().(*MorseAccountState) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + if x.MorseAccountState == nil { + x.MorseAccountState = new(MorseAccountState) + } + return protoreflect.ValueOfMessage(x.MorseAccountState.ProtoReflect()) + case "poktroll.migration.MsgCreateMorseAccountState.authority": + panic(fmt.Errorf("field authority of message poktroll.migration.MsgCreateMorseAccountState is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountState.authority": + return protoreflect.ValueOfString("") + case "poktroll.migration.MsgCreateMorseAccountState.morse_account_state": + m := new(MorseAccountState) + return protoreflect.ValueOfMessage(m.ProtoReflect()) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountState")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountState 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_MsgCreateMorseAccountState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MsgCreateMorseAccountState", 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_MsgCreateMorseAccountState) 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_MsgCreateMorseAccountState) 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_MsgCreateMorseAccountState) 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_MsgCreateMorseAccountState) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateMorseAccountState) + 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.Authority) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.MorseAccountState != nil { + l = options.Size(x.MorseAccountState) + 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().(*MsgCreateMorseAccountState) + 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.MorseAccountState != nil { + encoded, err := options.Marshal(x.MorseAccountState) + 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] = 0x12 + } + if len(x.Authority) > 0 { + i -= len(x.Authority) + copy(dAtA[i:], x.Authority) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Authority))) + 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().(*MsgCreateMorseAccountState) + 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: MsgCreateMorseAccountState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMorseAccountState: 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 Authority", 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.Authority = 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 MorseAccountState", 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.MorseAccountState == nil { + x.MorseAccountState = &MorseAccountState{} + } + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.MorseAccountState); 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, + } +} + +var ( + md_MsgCreateMorseAccountStateResponse protoreflect.MessageDescriptor + fd_MsgCreateMorseAccountStateResponse_state_hash protoreflect.FieldDescriptor + fd_MsgCreateMorseAccountStateResponse_num_accounts protoreflect.FieldDescriptor +) + +func init() { + file_poktroll_migration_tx_proto_init() + md_MsgCreateMorseAccountStateResponse = File_poktroll_migration_tx_proto.Messages().ByName("MsgCreateMorseAccountStateResponse") + fd_MsgCreateMorseAccountStateResponse_state_hash = md_MsgCreateMorseAccountStateResponse.Fields().ByName("state_hash") + fd_MsgCreateMorseAccountStateResponse_num_accounts = md_MsgCreateMorseAccountStateResponse.Fields().ByName("num_accounts") +} + +var _ protoreflect.Message = (*fastReflection_MsgCreateMorseAccountStateResponse)(nil) + +type fastReflection_MsgCreateMorseAccountStateResponse MsgCreateMorseAccountStateResponse + +func (x *MsgCreateMorseAccountStateResponse) ProtoReflect() protoreflect.Message { + return (*fastReflection_MsgCreateMorseAccountStateResponse)(x) +} + +func (x *MsgCreateMorseAccountStateResponse) slowProtoReflect() protoreflect.Message { + mi := &file_poktroll_migration_tx_proto_msgTypes[3] + 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_MsgCreateMorseAccountStateResponse_messageType fastReflection_MsgCreateMorseAccountStateResponse_messageType +var _ protoreflect.MessageType = fastReflection_MsgCreateMorseAccountStateResponse_messageType{} + +type fastReflection_MsgCreateMorseAccountStateResponse_messageType struct{} + +func (x fastReflection_MsgCreateMorseAccountStateResponse_messageType) Zero() protoreflect.Message { + return (*fastReflection_MsgCreateMorseAccountStateResponse)(nil) +} +func (x fastReflection_MsgCreateMorseAccountStateResponse_messageType) New() protoreflect.Message { + return new(fastReflection_MsgCreateMorseAccountStateResponse) +} +func (x fastReflection_MsgCreateMorseAccountStateResponse_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMorseAccountStateResponse +} + +// Descriptor returns message descriptor, which contains only the protobuf +// type information for the message. +func (x *fastReflection_MsgCreateMorseAccountStateResponse) Descriptor() protoreflect.MessageDescriptor { + return md_MsgCreateMorseAccountStateResponse +} + +// 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_MsgCreateMorseAccountStateResponse) Type() protoreflect.MessageType { + return _fastReflection_MsgCreateMorseAccountStateResponse_messageType +} + +// New returns a newly allocated and mutable empty message. +func (x *fastReflection_MsgCreateMorseAccountStateResponse) New() protoreflect.Message { + return new(fastReflection_MsgCreateMorseAccountStateResponse) +} + +// Interface unwraps the message reflection interface and +// returns the underlying ProtoMessage interface. +func (x *fastReflection_MsgCreateMorseAccountStateResponse) Interface() protoreflect.ProtoMessage { + return (*MsgCreateMorseAccountStateResponse)(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_MsgCreateMorseAccountStateResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { + if len(x.StateHash) != 0 { + value := protoreflect.ValueOfBytes(x.StateHash) + if !f(fd_MsgCreateMorseAccountStateResponse_state_hash, value) { + return + } + } + if x.NumAccounts != uint64(0) { + value := protoreflect.ValueOfUint64(x.NumAccounts) + if !f(fd_MsgCreateMorseAccountStateResponse_num_accounts, 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_MsgCreateMorseAccountStateResponse) Has(fd protoreflect.FieldDescriptor) bool { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + return len(x.StateHash) != 0 + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + return x.NumAccounts != uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) Clear(fd protoreflect.FieldDescriptor) { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + x.StateHash = nil + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + x.NumAccounts = uint64(0) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { + switch descriptor.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + value := x.StateHash + return protoreflect.ValueOfBytes(value) + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + value := x.NumAccounts + return protoreflect.ValueOfUint64(value) + default: + if descriptor.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + x.StateHash = value.Bytes() + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + x.NumAccounts = value.Uint() + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + panic(fmt.Errorf("field state_hash of message poktroll.migration.MsgCreateMorseAccountStateResponse is not mutable")) + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + panic(fmt.Errorf("field num_accounts of message poktroll.migration.MsgCreateMorseAccountStateResponse is not mutable")) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { + switch fd.FullName() { + case "poktroll.migration.MsgCreateMorseAccountStateResponse.state_hash": + return protoreflect.ValueOfBytes(nil) + case "poktroll.migration.MsgCreateMorseAccountStateResponse.num_accounts": + return protoreflect.ValueOfUint64(uint64(0)) + default: + if fd.IsExtension() { + panic(fmt.Errorf("proto3 declared messages do not support extensions: poktroll.migration.MsgCreateMorseAccountStateResponse")) + } + panic(fmt.Errorf("message poktroll.migration.MsgCreateMorseAccountStateResponse 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_MsgCreateMorseAccountStateResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { + switch d.FullName() { + default: + panic(fmt.Errorf("%s is not a oneof field in poktroll.migration.MsgCreateMorseAccountStateResponse", 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_MsgCreateMorseAccountStateResponse) 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_MsgCreateMorseAccountStateResponse) 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_MsgCreateMorseAccountStateResponse) 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_MsgCreateMorseAccountStateResponse) ProtoMethods() *protoiface.Methods { + size := func(input protoiface.SizeInput) protoiface.SizeOutput { + x := input.Message.Interface().(*MsgCreateMorseAccountStateResponse) + 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.StateHash) + if l > 0 { + n += 1 + l + runtime.Sov(uint64(l)) + } + if x.NumAccounts != 0 { + n += 1 + runtime.Sov(uint64(x.NumAccounts)) + } + 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().(*MsgCreateMorseAccountStateResponse) + 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.NumAccounts != 0 { + i = runtime.EncodeVarint(dAtA, i, uint64(x.NumAccounts)) + i-- + dAtA[i] = 0x10 + } + if len(x.StateHash) > 0 { + i -= len(x.StateHash) + copy(dAtA[i:], x.StateHash) + i = runtime.EncodeVarint(dAtA, i, uint64(len(x.StateHash))) + 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().(*MsgCreateMorseAccountStateResponse) + 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: MsgCreateMorseAccountStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgCreateMorseAccountStateResponse: 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 StateHash", 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.StateHash = append(x.StateHash[:0], dAtA[iNdEx:postIndex]...) + if x.StateHash == nil { + x.StateHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NumAccounts", wireType) + } + x.NumAccounts = 0 + 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++ + x.NumAccounts |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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 @@ -892,8 +1861,6 @@ type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the module parameters to update. - // // NOTE: All parameters must be supplied. Params *Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params,omitempty"` } @@ -960,6 +1927,93 @@ func (*MsgUpdateParamsResponse) Descriptor() ([]byte, []int) { return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{1} } +type MsgCreateMorseAccountState struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + MorseAccountState *MorseAccountState `protobuf:"bytes,2,opt,name=morse_account_state,json=morseAccountState,proto3" json:"morse_account_state,omitempty"` +} + +func (x *MsgCreateMorseAccountState) Reset() { + *x = MsgCreateMorseAccountState{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_tx_proto_msgTypes[2] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateMorseAccountState) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateMorseAccountState) ProtoMessage() {} + +// Deprecated: Use MsgCreateMorseAccountState.ProtoReflect.Descriptor instead. +func (*MsgCreateMorseAccountState) Descriptor() ([]byte, []int) { + return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{2} +} + +func (x *MsgCreateMorseAccountState) GetAuthority() string { + if x != nil { + return x.Authority + } + return "" +} + +func (x *MsgCreateMorseAccountState) GetMorseAccountState() *MorseAccountState { + if x != nil { + return x.MorseAccountState + } + return nil +} + +type MsgCreateMorseAccountStateResponse struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + StateHash []byte `protobuf:"bytes,1,opt,name=state_hash,json=stateHash,proto3" json:"state_hash,omitempty"` + NumAccounts uint64 `protobuf:"varint,2,opt,name=num_accounts,json=numAccounts,proto3" json:"num_accounts,omitempty"` +} + +func (x *MsgCreateMorseAccountStateResponse) Reset() { + *x = MsgCreateMorseAccountStateResponse{} + if protoimpl.UnsafeEnabled { + mi := &file_poktroll_migration_tx_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *MsgCreateMorseAccountStateResponse) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*MsgCreateMorseAccountStateResponse) ProtoMessage() {} + +// Deprecated: Use MsgCreateMorseAccountStateResponse.ProtoReflect.Descriptor instead. +func (*MsgCreateMorseAccountStateResponse) Descriptor() ([]byte, []int) { + return file_poktroll_migration_tx_proto_rawDescGZIP(), []int{3} +} + +func (x *MsgCreateMorseAccountStateResponse) GetStateHash() []byte { + if x != nil { + return x.StateHash + } + return nil +} + +func (x *MsgCreateMorseAccountStateResponse) GetNumAccounts() uint64 { + if x != nil { + return x.NumAccounts + } + return 0 +} + var File_poktroll_migration_tx_proto protoreflect.FileDescriptor var file_poktroll_migration_tx_proto_rawDesc = []byte{ @@ -973,7 +2027,9 @@ var file_poktroll_migration_tx_proto_rawDesc = []byte{ 0x6f, 0x73, 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, + 0x6f, 0x6e, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, + 0x1e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, + 0x69, 0x6f, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc1, 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, @@ -987,26 +2043,57 @@ var file_poktroll_migration_tx_proto_rawDesc = []byte{ 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2f, 0x78, 0x2f, 0x6d, 0x69, 0x67, 0x72, 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, 0x32, 0x6e, - 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, + 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xd8, + 0x01, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x72, 0x73, + 0x65, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 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, 0x72, 0x0a, 0x13, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x70, 0x6f, 0x6b, 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, + 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x1b, 0xc8, 0xde, 0x1f, 0x00, 0xea, + 0xde, 0x1f, 0x13, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65, 0x52, 0x11, 0x6d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, + 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x3a, 0x0e, 0x82, 0xe7, 0xb0, 0x2a, 0x09, + 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x22, 0x88, 0x01, 0x0a, 0x22, 0x4d, 0x73, + 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, + 0x12, 0x2d, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0c, 0x42, 0x0e, 0xea, 0xde, 0x1f, 0x0a, 0x73, 0x74, 0x61, 0x74, 0x65, 0x5f, + 0x68, 0x61, 0x73, 0x68, 0x52, 0x09, 0x73, 0x74, 0x61, 0x74, 0x65, 0x48, 0x61, 0x73, 0x68, 0x12, + 0x33, 0x0a, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x04, 0x42, 0x10, 0xea, 0xde, 0x1f, 0x0c, 0x6e, 0x75, 0x6d, 0x5f, 0x61, + 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x6e, 0x75, 0x6d, 0x41, 0x63, 0x63, 0x6f, + 0x75, 0x6e, 0x74, 0x73, 0x32, 0xf2, 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, 0x81, + 0x01, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x2e, 0x2e, 0x70, 0x6f, 0x6b, + 0x74, 0x72, 0x6f, 0x6c, 0x6c, 0x2e, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x1a, 0x36, 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, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb3, - 0x01, 0xd8, 0xe2, 0x1e, 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, + 0x4d, 0x73, 0x67, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x6f, 0x72, 0x73, 0x65, 0x41, 0x63, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x1a, 0x05, 0x80, 0xe7, 0xb0, 0x2a, 0x01, 0x42, 0xb3, 0x01, 0xd8, 0xe2, 0x1e, 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 ( @@ -1021,21 +2108,27 @@ 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, 2) +var file_poktroll_migration_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 4) var file_poktroll_migration_tx_proto_goTypes = []interface{}{ - (*MsgUpdateParams)(nil), // 0: poktroll.migration.MsgUpdateParams - (*MsgUpdateParamsResponse)(nil), // 1: poktroll.migration.MsgUpdateParamsResponse - (*Params)(nil), // 2: poktroll.migration.Params + (*MsgUpdateParams)(nil), // 0: poktroll.migration.MsgUpdateParams + (*MsgUpdateParamsResponse)(nil), // 1: poktroll.migration.MsgUpdateParamsResponse + (*MsgCreateMorseAccountState)(nil), // 2: poktroll.migration.MsgCreateMorseAccountState + (*MsgCreateMorseAccountStateResponse)(nil), // 3: poktroll.migration.MsgCreateMorseAccountStateResponse + (*Params)(nil), // 4: poktroll.migration.Params + (*MorseAccountState)(nil), // 5: poktroll.migration.MorseAccountState } var file_poktroll_migration_tx_proto_depIdxs = []int32{ - 2, // 0: poktroll.migration.MsgUpdateParams.params:type_name -> poktroll.migration.Params - 0, // 1: poktroll.migration.Msg.UpdateParams:input_type -> poktroll.migration.MsgUpdateParams - 1, // 2: poktroll.migration.Msg.UpdateParams:output_type -> poktroll.migration.MsgUpdateParamsResponse - 2, // [2:3] is the sub-list for method output_type - 1, // [1:2] 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 + 4, // 0: poktroll.migration.MsgUpdateParams.params:type_name -> poktroll.migration.Params + 5, // 1: poktroll.migration.MsgCreateMorseAccountState.morse_account_state:type_name -> poktroll.migration.MorseAccountState + 0, // 2: poktroll.migration.Msg.UpdateParams:input_type -> poktroll.migration.MsgUpdateParams + 2, // 3: poktroll.migration.Msg.CreateMorseAccountState:input_type -> poktroll.migration.MsgCreateMorseAccountState + 1, // 4: poktroll.migration.Msg.UpdateParams:output_type -> poktroll.migration.MsgUpdateParamsResponse + 3, // 5: poktroll.migration.Msg.CreateMorseAccountState:output_type -> poktroll.migration.MsgCreateMorseAccountStateResponse + 4, // [4:6] is the sub-list for method output_type + 2, // [2:4] 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() } @@ -1044,6 +2137,7 @@ func file_poktroll_migration_tx_proto_init() { return } file_poktroll_migration_params_proto_init() + file_poktroll_migration_types_proto_init() if !protoimpl.UnsafeEnabled { file_poktroll_migration_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*MsgUpdateParams); i { @@ -1069,6 +2163,30 @@ func file_poktroll_migration_tx_proto_init() { return nil } } + file_poktroll_migration_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateMorseAccountState); 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[3].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*MsgCreateMorseAccountStateResponse); 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{ @@ -1076,7 +2194,7 @@ func file_poktroll_migration_tx_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_poktroll_migration_tx_proto_rawDesc, NumEnums: 0, - NumMessages: 2, + NumMessages: 4, NumExtensions: 0, NumServices: 1, }, diff --git a/api/poktroll/migration/tx_grpc.pb.go b/api/poktroll/migration/tx_grpc.pb.go index 79681fb48..3e233a277 100644 --- a/api/poktroll/migration/tx_grpc.pb.go +++ b/api/poktroll/migration/tx_grpc.pb.go @@ -19,7 +19,8 @@ import ( const _ = grpc.SupportPackageIsVersion8 const ( - Msg_UpdateParams_FullMethodName = "/poktroll.migration.Msg/UpdateParams" + Msg_UpdateParams_FullMethodName = "/poktroll.migration.Msg/UpdateParams" + Msg_CreateMorseAccountState_FullMethodName = "/poktroll.migration.Msg/CreateMorseAccountState" ) // MsgClient is the client API for Msg service. @@ -31,6 +32,7 @@ type MsgClient interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateMorseAccountState(ctx context.Context, in *MsgCreateMorseAccountState, opts ...grpc.CallOption) (*MsgCreateMorseAccountStateResponse, error) } type msgClient struct { @@ -51,6 +53,16 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) CreateMorseAccountState(ctx context.Context, in *MsgCreateMorseAccountState, opts ...grpc.CallOption) (*MsgCreateMorseAccountStateResponse, error) { + cOpts := append([]grpc.CallOption{grpc.StaticMethod()}, opts...) + out := new(MsgCreateMorseAccountStateResponse) + err := c.cc.Invoke(ctx, Msg_CreateMorseAccountState_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 @@ -60,6 +72,7 @@ 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) + CreateMorseAccountState(context.Context, *MsgCreateMorseAccountState) (*MsgCreateMorseAccountStateResponse, error) mustEmbedUnimplementedMsgServer() } @@ -70,6 +83,9 @@ type UnimplementedMsgServer struct { func (UnimplementedMsgServer) UpdateParams(context.Context, *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (UnimplementedMsgServer) CreateMorseAccountState(context.Context, *MsgCreateMorseAccountState) (*MsgCreateMorseAccountStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMorseAccountState not implemented") +} func (UnimplementedMsgServer) mustEmbedUnimplementedMsgServer() {} // UnsafeMsgServer may be embedded to opt out of forward compatibility for this service. @@ -101,6 +117,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_CreateMorseAccountState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateMorseAccountState) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateMorseAccountState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: Msg_CreateMorseAccountState_FullMethodName, + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateMorseAccountState(ctx, req.(*MsgCreateMorseAccountState)) + } + 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) @@ -112,6 +146,10 @@ var Msg_ServiceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "CreateMorseAccountState", + Handler: _Msg_CreateMorseAccountState_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/tx.proto", diff --git a/go.mod b/go.mod index 162807307..6deefaa2e 100644 --- a/go.mod +++ b/go.mod @@ -71,7 +71,7 @@ require ( golang.org/x/sync v0.10.0 golang.org/x/text v0.21.0 golang.org/x/tools v0.23.0 - google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 + google.golang.org/genproto/googleapis/api v0.0.0-20240709173604-40e1e62336c5 // indirect google.golang.org/grpc v1.65.0 google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.4.0 google.golang.org/protobuf v1.34.2 diff --git a/proto/poktroll/migration/genesis.proto b/proto/poktroll/migration/genesis.proto index f176aaacc..4c4d1bcb0 100644 --- a/proto/poktroll/migration/genesis.proto +++ b/proto/poktroll/migration/genesis.proto @@ -1,18 +1,20 @@ syntax = "proto3"; + package poktroll.migration; import "amino/amino.proto"; import "gogoproto/gogo.proto"; import "poktroll/migration/params.proto"; +import "poktroll/migration/types.proto"; option go_package = "github.com/pokt-network/poktroll/x/migration/types"; option (gogoproto.stable_marshaler_all) = true; // GenesisState defines the migration module's genesis state. message GenesisState { + // params defines all the parameters of the module. - Params params = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; + MorseAccountState morseAccountState = 2; } + diff --git a/proto/poktroll/migration/query.proto b/proto/poktroll/migration/query.proto index c3c04bc0c..adadca6e9 100644 --- a/proto/poktroll/migration/query.proto +++ b/proto/poktroll/migration/query.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package poktroll.migration; import "amino/amino.proto"; @@ -6,26 +7,39 @@ import "gogoproto/gogo.proto"; import "google/api/annotations.proto"; import "cosmos/base/query/v1beta1/pagination.proto"; import "poktroll/migration/params.proto"; +import "poktroll/migration/types.proto"; option go_package = "github.com/pokt-network/poktroll/x/migration/types"; option (gogoproto.stable_marshaler_all) = true; // Query defines the gRPC querier service. service Query { + // Parameters queries the parameters of the module. - rpc Params(QueryParamsRequest) returns (QueryParamsResponse) { + rpc Params (QueryParamsRequest) returns (QueryParamsResponse) { option (google.api.http).get = "/pokt-network/poktroll/migration/params"; + + } + + // Queries a MorseAccountState by index. + rpc MorseAccountState (QueryGetMorseAccountStateRequest) returns (QueryGetMorseAccountStateResponse) { + option (google.api.http).get = "/pokt-network/poktroll/migration/morse_account_state"; + } } - // QueryParamsRequest is request type for the Query/Params RPC method. message QueryParamsRequest {} // QueryParamsResponse is response type for the Query/Params RPC method. message QueryParamsResponse { + // params holds all the parameters of this module. - Params params = 1 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; -} \ No newline at end of file + Params params = 1 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; +} + +message QueryGetMorseAccountStateRequest {} + +message QueryGetMorseAccountStateResponse { + MorseAccountState MorseAccountState = 1 [(gogoproto.nullable) = false]; +} + diff --git a/proto/poktroll/migration/tx.proto b/proto/poktroll/migration/tx.proto index 9e9957de3..2c83f02f2 100644 --- a/proto/poktroll/migration/tx.proto +++ b/proto/poktroll/migration/tx.proto @@ -1,4 +1,5 @@ syntax = "proto3"; + package poktroll.migration; import "amino/amino.proto"; @@ -6,6 +7,7 @@ import "cosmos/msg/v1/msg.proto"; import "cosmos_proto/cosmos.proto"; import "gogoproto/gogo.proto"; import "poktroll/migration/params.proto"; +import "poktroll/migration/types.proto"; option go_package = "github.com/pokt-network/poktroll/x/migration/types"; option (gogoproto.stable_marshaler_all) = true; @@ -13,29 +15,39 @@ option (gogoproto.stable_marshaler_all) = true; // 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 UpdateParams (MsgUpdateParams ) returns (MsgUpdateParamsResponse ); + rpc CreateMorseAccountState (MsgCreateMorseAccountState) returns (MsgCreateMorseAccountStateResponse); } - // MsgUpdateParams is the Msg/UpdateParams request type. message MsgUpdateParams { - option (cosmos.msg.v1.signer) = "authority"; - option (amino.name) = "poktroll/x/migration/MsgUpdateParams"; - + option (cosmos.msg.v1.signer) = "authority"; + option (amino.name) = "poktroll/x/migration/MsgUpdateParams"; + // authority is the address that controls the module (defaults to x/gov unless overwritten). string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; - + // params defines the module parameters to update. - // + // NOTE: All parameters must be supplied. - Params params = 2 [ - (gogoproto.nullable) = false, - (amino.dont_omitempty) = true - ]; + Params params = 2 [(gogoproto.nullable) = false, (amino.dont_omitempty) = true]; } // MsgUpdateParamsResponse defines the response structure for executing a // MsgUpdateParams message. -message MsgUpdateParamsResponse {} \ No newline at end of file +message MsgUpdateParamsResponse {} + +message MsgCreateMorseAccountState { + option (cosmos.msg.v1.signer) = "authority"; + + // authority is the address that controls the module (defaults to x/gov unless overwritten). + string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"]; + MorseAccountState morse_account_state = 2 [(gogoproto.jsontag) = "morse_account_state", (gogoproto.nullable) = false]; +} + +message MsgCreateMorseAccountStateResponse { + bytes state_hash = 1 [(gogoproto.jsontag) = "state_hash"]; + uint64 num_accounts = 2 [(gogoproto.jsontag) = "num_accounts"]; +} diff --git a/x/migration/keeper/morse_account_state.go b/x/migration/keeper/morse_account_state.go new file mode 100644 index 000000000..536f1abaf --- /dev/null +++ b/x/migration/keeper/morse_account_state.go @@ -0,0 +1,38 @@ +package keeper + +import ( + "context" + + "github.com/cosmos/cosmos-sdk/runtime" + "github.com/pokt-network/poktroll/x/migration/types" + "cosmossdk.io/store/prefix" +) + +// SetMorseAccountState set morseAccountState in the store +func (k Keeper) SetMorseAccountState(ctx context.Context, morseAccountState types.MorseAccountState) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.MorseAccountStateKey)) + b := k.cdc.MustMarshal(&morseAccountState) + store.Set([]byte{0}, b) +} + +// GetMorseAccountState returns morseAccountState +func (k Keeper) GetMorseAccountState(ctx context.Context) (val types.MorseAccountState, found bool) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.MorseAccountStateKey)) + + b := store.Get([]byte{0}) + if b == nil { + return val, false + } + + k.cdc.MustUnmarshal(b, &val) + return val, true +} + +// RemoveMorseAccountState removes morseAccountState from the store +func (k Keeper) RemoveMorseAccountState(ctx context.Context) { + storeAdapter := runtime.KVStoreAdapter(k.storeService.OpenKVStore(ctx)) + store := prefix.NewStore(storeAdapter, types.KeyPrefix(types.MorseAccountStateKey)) + store.Delete([]byte{0}) +} diff --git a/x/migration/keeper/morse_account_state_test.go b/x/migration/keeper/morse_account_state_test.go new file mode 100644 index 000000000..58ea832e0 --- /dev/null +++ b/x/migration/keeper/morse_account_state_test.go @@ -0,0 +1,38 @@ +package keeper_test + +import ( + "context" + "testing" + + "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/x/migration/keeper" + "github.com/pokt-network/poktroll/x/migration/types" + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/testutil/nullify" +) + +func createTestMorseAccountState(keeper keeper.Keeper, ctx context.Context) types.MorseAccountState { + item := types.MorseAccountState{} + keeper.SetMorseAccountState(ctx, item) + return item +} + +func TestMorseAccountStateGet(t *testing.T) { + keeper, ctx := keepertest.MigrationKeeper(t) + item := createTestMorseAccountState(keeper, ctx) + rst, found := keeper.GetMorseAccountState(ctx) + require.True(t, found) + require.Equal(t, + nullify.Fill(&item), + nullify.Fill(&rst), + ) +} + +func TestMorseAccountStateRemove(t *testing.T) { + keeper, ctx := keepertest.MigrationKeeper(t) + createTestMorseAccountState(keeper, ctx) + keeper.RemoveMorseAccountState(ctx) + _, found := keeper.GetMorseAccountState(ctx) + require.False(t, found) +} diff --git a/x/migration/keeper/msg_server_morse_account_state.go b/x/migration/keeper/msg_server_morse_account_state.go new file mode 100644 index 000000000..9ae9b6139 --- /dev/null +++ b/x/migration/keeper/msg_server_morse_account_state.go @@ -0,0 +1,27 @@ +package keeper + +import ( + "context" + + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + + "github.com/pokt-network/poktroll/x/migration/types" +) + +func (k msgServer) CreateMorseAccountState(goCtx context.Context, msg *types.MsgCreateMorseAccountState) (*types.MsgCreateMorseAccountStateResponse, error) { + ctx := sdk.UnwrapSDKContext(goCtx) + + // Check if the value already exists + _, isFound := k.GetMorseAccountState(ctx) + if isFound { + return nil, errorsmod.Wrap(sdkerrors.ErrInvalidRequest, "already set") + } + + k.SetMorseAccountState( + ctx, + msg.MorseAccountState, + ) + return &types.MsgCreateMorseAccountStateResponse{}, nil +} diff --git a/x/migration/keeper/msg_server_morse_account_state_test.go b/x/migration/keeper/msg_server_morse_account_state_test.go new file mode 100644 index 000000000..c12fd49bc --- /dev/null +++ b/x/migration/keeper/msg_server_morse_account_state_test.go @@ -0,0 +1,22 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/x/migration/keeper" + "github.com/pokt-network/poktroll/x/migration/types" +) + +func TestMorseAccountStateMsgServerCreate(t *testing.T) { + k, ctx := keepertest.MigrationKeeper(t) + srv := keeper.NewMsgServerImpl(k) + authority := "A" + expected := &types.MsgCreateMorseAccountState{Authority: authority} + _, err := srv.CreateMorseAccountState(ctx, expected) + require.NoError(t, err) + _, found := k.GetMorseAccountState(ctx) + require.True(t, found) +} diff --git a/x/migration/keeper/query_morse_account_state.go b/x/migration/keeper/query_morse_account_state.go new file mode 100644 index 000000000..32fe600d4 --- /dev/null +++ b/x/migration/keeper/query_morse_account_state.go @@ -0,0 +1,24 @@ +package keeper + +import ( + "context" + + sdk "github.com/cosmos/cosmos-sdk/types" + "github.com/pokt-network/poktroll/x/migration/types" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" +) + +func (k Keeper) MorseAccountState(goCtx context.Context, req *types.QueryGetMorseAccountStateRequest) (*types.QueryGetMorseAccountStateResponse, error) { + if req == nil { + return nil, status.Error(codes.InvalidArgument, "invalid request") + } + ctx := sdk.UnwrapSDKContext(goCtx) + + val, found := k.GetMorseAccountState(ctx) + if !found { + return nil, status.Error(codes.NotFound, "not found") + } + + return &types.QueryGetMorseAccountStateResponse{MorseAccountState: val}, nil +} \ No newline at end of file diff --git a/x/migration/keeper/query_morse_account_state_test.go b/x/migration/keeper/query_morse_account_state_test.go new file mode 100644 index 000000000..309e2bedf --- /dev/null +++ b/x/migration/keeper/query_morse_account_state_test.go @@ -0,0 +1,49 @@ +package keeper_test + +import ( + "testing" + + "github.com/stretchr/testify/require" + "google.golang.org/grpc/codes" + "google.golang.org/grpc/status" + + keepertest "github.com/pokt-network/poktroll/testutil/keeper" + "github.com/pokt-network/poktroll/testutil/nullify" + "github.com/pokt-network/poktroll/x/migration/types" +) + +func TestMorseAccountStateQuery(t *testing.T) { + keeper, ctx := keepertest.MigrationKeeper(t) + item := createTestMorseAccountState(keeper, ctx) + tests := []struct { + desc string + request *types.QueryGetMorseAccountStateRequest + response *types.QueryGetMorseAccountStateResponse + err error + }{ + { + desc: "First", + request: &types.QueryGetMorseAccountStateRequest{}, + response: &types.QueryGetMorseAccountStateResponse{MorseAccountState: item}, + }, + { + desc: "InvalidRequest", + err: status.Error(codes.InvalidArgument, "invalid request"), + }, + } + for _, tc := range tests { + t.Run(tc.desc, func(t *testing.T) { + response, err := keeper.MorseAccountState(ctx, tc.request) + if tc.err != nil { + require.ErrorIs(t, err, tc.err) + } else { + require.NoError(t, err) + require.Equal(t, + nullify.Fill(tc.response), + nullify.Fill(response), + ) + } + }) + } +} + diff --git a/x/migration/module/autocli.go b/x/migration/module/autocli.go index 96169a21d..9778d0bff 100644 --- a/x/migration/module/autocli.go +++ b/x/migration/module/autocli.go @@ -17,6 +17,12 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { Use: "params", Short: "Shows the parameters of the module", }, + { + RpcMethod: "MorseAccountState", + Use: "show-morse-account-state", + Short: "show morse_account_state", + Skip: true, + }, // this line is used by ignite scaffolding # autocli/query }, }, @@ -28,6 +34,13 @@ func (am AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { RpcMethod: "UpdateParams", Skip: true, // skipped because authority gated }, + { + RpcMethod: "CreateMorseAccountState", + Use: "create-morse-account-state [accounts]", + Short: "Create morse_account_state", + PositionalArgs: []*autocliv1.PositionalArgDescriptor{{ProtoField: "accounts"}}, + Skip: true, + }, // this line is used by ignite scaffolding # autocli/tx }, }, diff --git a/x/migration/module/genesis.go b/x/migration/module/genesis.go index 88000e771..4f04dec9b 100644 --- a/x/migration/module/genesis.go +++ b/x/migration/module/genesis.go @@ -9,7 +9,11 @@ import ( // InitGenesis initializes the module's state from a provided genesis state. func InitGenesis(ctx sdk.Context, k keeper.Keeper, genState types.GenesisState) { - // this line is used by starport scaffolding # genesis/module/init + // Set if defined + if genState.MorseAccountState != nil { + k.SetMorseAccountState(ctx, *genState.MorseAccountState) + } + // this line is used by starport scaffolding # genesis/module/init if err := k.SetParams(ctx, genState.Params); err != nil { panic(err) } @@ -20,7 +24,12 @@ func ExportGenesis(ctx sdk.Context, k keeper.Keeper) *types.GenesisState { genesis := types.DefaultGenesis() genesis.Params = k.GetParams(ctx) - // this line is used by starport scaffolding # genesis/module/export + // Get all morseAccountState + morseAccountState, found := k.GetMorseAccountState(ctx) + if found { + genesis.MorseAccountState = &morseAccountState + } + // this line is used by starport scaffolding # genesis/module/export - return genesis + return genesis } diff --git a/x/migration/module/genesis_test.go b/x/migration/module/genesis_test.go index 3e7fb2ba9..66fd4b5e0 100644 --- a/x/migration/module/genesis_test.go +++ b/x/migration/module/genesis_test.go @@ -3,17 +3,19 @@ package migration_test import ( "testing" + "github.com/stretchr/testify/require" + keepertest "github.com/pokt-network/poktroll/testutil/keeper" "github.com/pokt-network/poktroll/testutil/nullify" migration "github.com/pokt-network/poktroll/x/migration/module" "github.com/pokt-network/poktroll/x/migration/types" - "github.com/stretchr/testify/require" ) func TestGenesis(t *testing.T) { genesisState := types.GenesisState{ Params: types.DefaultParams(), + MorseAccountState: &types.MorseAccountState{}, // this line is used by starport scaffolding # genesis/test/state } @@ -25,5 +27,6 @@ func TestGenesis(t *testing.T) { nullify.Fill(&genesisState) nullify.Fill(got) + require.Equal(t, genesisState.MorseAccountState, got.MorseAccountState) // this line is used by starport scaffolding # genesis/test/assert } diff --git a/x/migration/module/simulation.go b/x/migration/module/simulation.go index 2c4ef40a8..249d8cd27 100644 --- a/x/migration/module/simulation.go +++ b/x/migration/module/simulation.go @@ -23,7 +23,11 @@ var ( ) const ( -// this line is used by starport scaffolding # simapp/module/const + opWeightMsgCreateMorseAccountState = "op_weight_msg_morse_account_state" + // TODO: Determine the simulation weight value + defaultWeightMsgCreateMorseAccountState int = 100 + + // this line is used by starport scaffolding # simapp/module/const ) // GenerateGenesisState creates a randomized GenState of the module. @@ -46,6 +50,17 @@ func (am AppModule) RegisterStoreDecoder(_ simtypes.StoreDecoderRegistry) {} func (am AppModule) WeightedOperations(simState module.SimulationState) []simtypes.WeightedOperation { operations := make([]simtypes.WeightedOperation, 0) + var weightMsgCreateMorseAccountState int + simState.AppParams.GetOrGenerate(opWeightMsgCreateMorseAccountState, &weightMsgCreateMorseAccountState, nil, + func(_ *rand.Rand) { + weightMsgCreateMorseAccountState = defaultWeightMsgCreateMorseAccountState + }, + ) + operations = append(operations, simulation.NewWeightedOperation( + weightMsgCreateMorseAccountState, + migrationsimulation.SimulateMsgCreateMorseAccountState(am.accountKeeper, am.bankKeeper, am.keeper), + )) + // this line is used by starport scaffolding # simapp/module/operation return operations @@ -54,6 +69,14 @@ func (am AppModule) WeightedOperations(simState module.SimulationState) []simtyp // ProposalMsgs returns msgs used for governance proposals for simulations. func (am AppModule) ProposalMsgs(simState module.SimulationState) []simtypes.WeightedProposalMsg { return []simtypes.WeightedProposalMsg{ + simulation.NewWeightedProposalMsg( + opWeightMsgCreateMorseAccountState, + defaultWeightMsgCreateMorseAccountState, + func(r *rand.Rand, ctx sdk.Context, accs []simtypes.Account) sdk.Msg { + migrationsimulation.SimulateMsgCreateMorseAccountState(am.accountKeeper, am.bankKeeper, am.keeper) + return nil + }, + ), // this line is used by starport scaffolding # simapp/module/OpMsg } } diff --git a/x/migration/simulation/morse_account_state.go b/x/migration/simulation/morse_account_state.go new file mode 100644 index 000000000..11f45b66c --- /dev/null +++ b/x/migration/simulation/morse_account_state.go @@ -0,0 +1,49 @@ +package simulation + +import ( + "math/rand" + + "github.com/cosmos/cosmos-sdk/baseapp" + sdk "github.com/cosmos/cosmos-sdk/types" + moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil" + simtypes "github.com/cosmos/cosmos-sdk/types/simulation" + "github.com/cosmos/cosmos-sdk/x/simulation" + + "github.com/pokt-network/poktroll/x/migration/keeper" + "github.com/pokt-network/poktroll/x/migration/types" +) + +func SimulateMsgCreateMorseAccountState( + 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) { + simAccount, _ := simtypes.RandomAcc(r, accs) + + msg := &types.MsgCreateMorseAccountState{ + Authority: simAccount.Address.String(), + } + + _, found := k.GetMorseAccountState(ctx) + if found { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(msg), "MorseAccountState already exist"), nil, nil + } + + txCtx := simulation.OperationInput{ + R: r, + App: app, + TxGen: moduletestutil.MakeTestEncodingConfig().TxConfig, + Cdc: nil, + Msg: msg, + Context: ctx, + SimAccount: simAccount, + ModuleName: types.ModuleName, + CoinsSpentInMsg: sdk.NewCoins(), + AccountKeeper: ak, + Bankkeeper: bk, + } + return simulation.GenAndDeliverTxWithRandFees(txCtx) + } +} diff --git a/x/migration/types/codec.go b/x/migration/types/codec.go index ac5526374..76e1a13d5 100644 --- a/x/migration/types/codec.go +++ b/x/migration/types/codec.go @@ -8,6 +8,9 @@ import ( ) func RegisterInterfaces(registry cdctypes.InterfaceRegistry) { + registry.RegisterImplementations((*sdk.Msg)(nil), + &MsgCreateMorseAccountState{}, + ) // this line is used by starport scaffolding # 3 registry.RegisterImplementations((*sdk.Msg)(nil), diff --git a/x/migration/types/genesis.go b/x/migration/types/genesis.go index c41be0742..8bd17f13f 100644 --- a/x/migration/types/genesis.go +++ b/x/migration/types/genesis.go @@ -10,15 +10,16 @@ const DefaultIndex uint64 = 1 // DefaultGenesis returns the default genesis state func DefaultGenesis() *GenesisState { return &GenesisState{ - // this line is used by starport scaffolding # genesis/types/default - Params: DefaultParams(), + MorseAccountState: nil, + // this line is used by starport scaffolding # genesis/types/default + Params: DefaultParams(), } } // Validate performs basic genesis state validation returning an error upon any // failure. func (gs GenesisState) Validate() error { - // this line is used by starport scaffolding # genesis/types/validate + // this line is used by starport scaffolding # genesis/types/validate return gs.Params.Validate() } diff --git a/x/migration/types/genesis.pb.go b/x/migration/types/genesis.pb.go index 334ae0fd2..39d1a25f9 100644 --- a/x/migration/types/genesis.pb.go +++ b/x/migration/types/genesis.pb.go @@ -27,7 +27,8 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // GenesisState defines the migration module's genesis state. type GenesisState struct { // params defines all the parameters of the module. - Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + Params Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params"` + MorseAccountState *MorseAccountState `protobuf:"bytes,2,opt,name=morseAccountState,proto3" json:"morseAccountState,omitempty"` } func (m *GenesisState) Reset() { *m = GenesisState{} } @@ -66,6 +67,13 @@ func (m *GenesisState) GetParams() Params { return Params{} } +func (m *GenesisState) GetMorseAccountState() *MorseAccountState { + if m != nil { + return m.MorseAccountState + } + return nil +} + func init() { proto.RegisterType((*GenesisState)(nil), "poktroll.migration.GenesisState") } @@ -73,21 +81,24 @@ func init() { func init() { proto.RegisterFile("poktroll/migration/genesis.proto", fileDescriptor_c544bf46e8dacb64) } var fileDescriptor_c544bf46e8dacb64 = []byte{ - // 219 bytes of a gzipped FileDescriptorProto + // 258 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x28, 0xc8, 0xcf, 0x2e, 0x29, 0xca, 0xcf, 0xc9, 0xd1, 0xcf, 0xcd, 0x4c, 0x2f, 0x4a, 0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x4f, 0x4f, 0xcd, 0x4b, 0x2d, 0xce, 0x2c, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x82, 0xa9, 0xd0, 0x83, 0xab, 0x90, 0x12, 0x4c, 0xcc, 0xcd, 0xcc, 0xcb, 0xd7, 0x07, 0x93, 0x10, 0x65, 0x52, 0x22, 0xe9, 0xf9, 0xe9, 0xf9, 0x60, 0xa6, 0x3e, 0x88, 0x05, 0x15, 0x95, 0xc7, 0x62, 0x7c, 0x41, - 0x62, 0x51, 0x62, 0x2e, 0xd4, 0x74, 0x25, 0x5f, 0x2e, 0x1e, 0x77, 0x88, 0x75, 0xc1, 0x25, 0x89, - 0x25, 0xa9, 0x42, 0xb6, 0x5c, 0x6c, 0x10, 0x79, 0x09, 0x46, 0x05, 0x46, 0x0d, 0x6e, 0x23, 0x29, - 0x3d, 0x4c, 0xeb, 0xf5, 0x02, 0xc0, 0x2a, 0x9c, 0x38, 0x4f, 0xdc, 0x93, 0x67, 0x58, 0xf1, 0x7c, - 0x83, 0x16, 0x63, 0x10, 0x54, 0x93, 0x53, 0xc0, 0x89, 0x47, 0x72, 0x8c, 0x17, 0x1e, 0xc9, 0x31, - 0xde, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0xe3, 0x84, 0xc7, 0x72, 0x0c, 0x17, 0x1e, 0xcb, - 0x31, 0xdc, 0x78, 0x2c, 0xc7, 0x10, 0x65, 0x94, 0x9e, 0x59, 0x92, 0x51, 0x9a, 0xa4, 0x97, 0x9c, - 0x9f, 0xab, 0x0f, 0x32, 0x56, 0x37, 0x2f, 0xb5, 0xa4, 0x3c, 0xbf, 0x28, 0x5b, 0x1f, 0xee, 0xca, - 0x0a, 0x24, 0x77, 0x96, 0x54, 0x16, 0xa4, 0x16, 0x27, 0xb1, 0x81, 0xdd, 0x69, 0x0c, 0x08, 0x00, - 0x00, 0xff, 0xff, 0xd2, 0xec, 0xd5, 0xe0, 0x29, 0x01, 0x00, 0x00, + 0x62, 0x51, 0x62, 0x2e, 0xd4, 0x74, 0x29, 0x39, 0x2c, 0x0a, 0x4a, 0x2a, 0x0b, 0x52, 0xa1, 0xf2, + 0x4a, 0x8b, 0x18, 0xb9, 0x78, 0xdc, 0x21, 0xee, 0x09, 0x2e, 0x49, 0x2c, 0x49, 0x15, 0xb2, 0xe5, + 0x62, 0x83, 0x18, 0x20, 0xc1, 0xa8, 0xc0, 0xa8, 0xc1, 0x6d, 0x24, 0xa5, 0x87, 0xe9, 0x3e, 0xbd, + 0x00, 0xb0, 0x0a, 0x27, 0xce, 0x13, 0xf7, 0xe4, 0x19, 0x56, 0x3c, 0xdf, 0xa0, 0xc5, 0x18, 0x04, + 0xd5, 0x24, 0x14, 0xcc, 0x25, 0x98, 0x9b, 0x5f, 0x54, 0x9c, 0xea, 0x98, 0x9c, 0x9c, 0x5f, 0x9a, + 0x57, 0x02, 0x36, 0x53, 0x82, 0x09, 0x6c, 0x92, 0x2a, 0x36, 0x93, 0x7c, 0xd1, 0x15, 0x07, 0x61, + 0xea, 0x77, 0x0a, 0x38, 0xf1, 0x48, 0x8e, 0xf1, 0xc2, 0x23, 0x39, 0xc6, 0x1b, 0x8f, 0xe4, 0x18, + 0x1f, 0x3c, 0x92, 0x63, 0x9c, 0xf0, 0x58, 0x8e, 0xe1, 0xc2, 0x63, 0x39, 0x86, 0x1b, 0x8f, 0xe5, + 0x18, 0xa2, 0x8c, 0xd2, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, 0x92, 0xf3, 0x73, 0xf5, 0x41, 0x36, + 0xe8, 0xe6, 0xa5, 0x96, 0x94, 0xe7, 0x17, 0x65, 0xeb, 0xc3, 0xbd, 0x5e, 0x81, 0xee, 0xf9, 0x24, + 0x36, 0xb0, 0xef, 0x8d, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0xcf, 0x45, 0xc1, 0x42, 0x9f, 0x01, + 0x00, 0x00, } func (m *GenesisState) Marshal() (dAtA []byte, err error) { @@ -110,6 +121,18 @@ func (m *GenesisState) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.MorseAccountState != nil { + { + size, err := m.MorseAccountState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintGenesis(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + } { size, err := m.Params.MarshalToSizedBuffer(dAtA[:i]) if err != nil { @@ -142,6 +165,10 @@ func (m *GenesisState) Size() (n int) { _ = l l = m.Params.Size() n += 1 + l + sovGenesis(uint64(l)) + if m.MorseAccountState != nil { + l = m.MorseAccountState.Size() + n += 1 + l + sovGenesis(uint64(l)) + } return n } @@ -213,6 +240,42 @@ func (m *GenesisState) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MorseAccountState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowGenesis + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthGenesis + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthGenesis + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.MorseAccountState == nil { + m.MorseAccountState = &MorseAccountState{} + } + if err := m.MorseAccountState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipGenesis(dAtA[iNdEx:]) diff --git a/x/migration/types/genesis_test.go b/x/migration/types/genesis_test.go index 61cd184b4..80c8c4215 100644 --- a/x/migration/types/genesis_test.go +++ b/x/migration/types/genesis_test.go @@ -3,8 +3,9 @@ package types_test import ( "testing" - "github.com/pokt-network/poktroll/x/migration/types" "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/x/migration/types" ) func TestGenesisState_Validate(t *testing.T) { @@ -19,9 +20,10 @@ func TestGenesisState_Validate(t *testing.T) { valid: true, }, { - desc: "valid genesis state", + desc: "valid genesis state", genState: &types.GenesisState{ + MorseAccountState: &types.MorseAccountState{}, // this line is used by starport scaffolding # types/genesis/validField }, valid: true, diff --git a/x/migration/types/keys.go b/x/migration/types/keys.go index be31adac9..bed0e5efa 100644 --- a/x/migration/types/keys.go +++ b/x/migration/types/keys.go @@ -18,3 +18,7 @@ var ( func KeyPrefix(p string) []byte { return []byte(p) } + +const ( + MorseAccountStateKey = "MorseAccountState/value/" +) diff --git a/x/migration/types/messages_morse_account_state.go b/x/migration/types/messages_morse_account_state.go new file mode 100644 index 000000000..28081eab6 --- /dev/null +++ b/x/migration/types/messages_morse_account_state.go @@ -0,0 +1,24 @@ +package types + +import ( + errorsmod "cosmossdk.io/errors" + sdk "github.com/cosmos/cosmos-sdk/types" + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" +) + +var _ sdk.Msg = &MsgCreateMorseAccountState{} + +func NewMsgCreateMorseAccountState(authority string, morseAccountState MorseAccountState) *MsgCreateMorseAccountState { + return &MsgCreateMorseAccountState{ + Authority: authority, + MorseAccountState: morseAccountState, + } +} + +func (msg *MsgCreateMorseAccountState) ValidateBasic() error { + _, err := sdk.AccAddressFromBech32(msg.Authority) + if err != nil { + return errorsmod.Wrapf(sdkerrors.ErrInvalidAddress, "invalid creator address (%s)", err) + } + return nil +} diff --git a/x/migration/types/messages_morse_account_state_test.go b/x/migration/types/messages_morse_account_state_test.go new file mode 100644 index 000000000..f877b22a5 --- /dev/null +++ b/x/migration/types/messages_morse_account_state_test.go @@ -0,0 +1,41 @@ +package types + +import ( + "testing" + + sdkerrors "github.com/cosmos/cosmos-sdk/types/errors" + "github.com/stretchr/testify/require" + + "github.com/pokt-network/poktroll/testutil/sample" +) + +func TestMsgCreateMorseAccountState_ValidateBasic(t *testing.T) { + tests := []struct { + name string + msg MsgCreateMorseAccountState + err error + }{ + { + name: "invalid address", + msg: MsgCreateMorseAccountState{ + Authority: "invalid_address", + }, + err: sdkerrors.ErrInvalidAddress, + }, { + name: "valid address", + msg: MsgCreateMorseAccountState{ + Authority: 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) + return + } + require.NoError(t, err) + }) + } +} diff --git a/x/migration/types/query.pb.go b/x/migration/types/query.pb.go index d82a26af1..a9f299c3d 100644 --- a/x/migration/types/query.pb.go +++ b/x/migration/types/query.pb.go @@ -106,36 +106,116 @@ func (m *QueryParamsResponse) GetParams() Params { return Params{} } +type QueryGetMorseAccountStateRequest struct { +} + +func (m *QueryGetMorseAccountStateRequest) Reset() { *m = QueryGetMorseAccountStateRequest{} } +func (m *QueryGetMorseAccountStateRequest) String() string { return proto.CompactTextString(m) } +func (*QueryGetMorseAccountStateRequest) ProtoMessage() {} +func (*QueryGetMorseAccountStateRequest) Descriptor() ([]byte, []int) { + return fileDescriptor_524460f9291c42e8, []int{2} +} +func (m *QueryGetMorseAccountStateRequest) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetMorseAccountStateRequest) 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 *QueryGetMorseAccountStateRequest) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetMorseAccountStateRequest.Merge(m, src) +} +func (m *QueryGetMorseAccountStateRequest) XXX_Size() int { + return m.Size() +} +func (m *QueryGetMorseAccountStateRequest) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetMorseAccountStateRequest.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetMorseAccountStateRequest proto.InternalMessageInfo + +type QueryGetMorseAccountStateResponse struct { + MorseAccountState MorseAccountState `protobuf:"bytes,1,opt,name=MorseAccountState,proto3" json:"MorseAccountState"` +} + +func (m *QueryGetMorseAccountStateResponse) Reset() { *m = QueryGetMorseAccountStateResponse{} } +func (m *QueryGetMorseAccountStateResponse) String() string { return proto.CompactTextString(m) } +func (*QueryGetMorseAccountStateResponse) ProtoMessage() {} +func (*QueryGetMorseAccountStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_524460f9291c42e8, []int{3} +} +func (m *QueryGetMorseAccountStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *QueryGetMorseAccountStateResponse) 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 *QueryGetMorseAccountStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_QueryGetMorseAccountStateResponse.Merge(m, src) +} +func (m *QueryGetMorseAccountStateResponse) XXX_Size() int { + return m.Size() +} +func (m *QueryGetMorseAccountStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_QueryGetMorseAccountStateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_QueryGetMorseAccountStateResponse proto.InternalMessageInfo + +func (m *QueryGetMorseAccountStateResponse) GetMorseAccountState() MorseAccountState { + if m != nil { + return m.MorseAccountState + } + return MorseAccountState{} +} + func init() { proto.RegisterType((*QueryParamsRequest)(nil), "poktroll.migration.QueryParamsRequest") proto.RegisterType((*QueryParamsResponse)(nil), "poktroll.migration.QueryParamsResponse") + proto.RegisterType((*QueryGetMorseAccountStateRequest)(nil), "poktroll.migration.QueryGetMorseAccountStateRequest") + proto.RegisterType((*QueryGetMorseAccountStateResponse)(nil), "poktroll.migration.QueryGetMorseAccountStateResponse") } func init() { proto.RegisterFile("poktroll/migration/query.proto", fileDescriptor_524460f9291c42e8) } var fileDescriptor_524460f9291c42e8 = []byte{ - // 325 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x90, 0x31, 0x4b, 0xc3, 0x40, - 0x14, 0xc7, 0x73, 0x82, 0x05, 0xe3, 0xe4, 0xd9, 0x41, 0x82, 0x5c, 0xa5, 0x83, 0xd5, 0x82, 0x79, - 0xb4, 0xce, 0x2e, 0xfd, 0x04, 0xb5, 0x38, 0xb9, 0x5d, 0xca, 0x71, 0x86, 0x36, 0xf7, 0xae, 0xb9, - 0xab, 0xda, 0xd5, 0xd1, 0x49, 0xd0, 0x0f, 0xe1, 0xe8, 0xc7, 0xe8, 0x58, 0x70, 0xe9, 0x24, 0x92, - 0x0a, 0x7e, 0x0d, 0xc9, 0x25, 0x8a, 0xd2, 0x16, 0x97, 0xf0, 0x78, 0xff, 0xff, 0xff, 0x97, 0xff, - 0x3d, 0x9f, 0x69, 0x1c, 0xd8, 0x14, 0x87, 0x43, 0x48, 0x62, 0x99, 0x72, 0x1b, 0xa3, 0x82, 0xd1, - 0x58, 0xa4, 0x93, 0x50, 0xa7, 0x68, 0x91, 0xd2, 0x6f, 0x3d, 0xfc, 0xd1, 0x83, 0x1d, 0x9e, 0xc4, - 0x0a, 0xc1, 0x7d, 0x0b, 0x5b, 0x50, 0x95, 0x28, 0xd1, 0x8d, 0x90, 0x4f, 0xe5, 0x76, 0x5f, 0x22, - 0xca, 0xa1, 0x00, 0xae, 0x63, 0xe0, 0x4a, 0xa1, 0x75, 0x79, 0x53, 0xaa, 0xcd, 0x3e, 0x9a, 0x04, - 0x0d, 0x44, 0xdc, 0x88, 0xe2, 0x9f, 0x70, 0xdd, 0x8a, 0x84, 0xe5, 0x2d, 0xd0, 0x5c, 0xc6, 0xca, - 0x99, 0x4b, 0x6f, 0x6d, 0x45, 0x4d, 0xcd, 0x53, 0x9e, 0x94, 0xb0, 0x7a, 0xd5, 0xa7, 0xe7, 0x39, - 0xa2, 0xeb, 0x96, 0x3d, 0x31, 0x1a, 0x0b, 0x63, 0xeb, 0x17, 0xfe, 0xee, 0x9f, 0xad, 0xd1, 0xa8, - 0x8c, 0xa0, 0x67, 0x7e, 0xa5, 0x08, 0xef, 0x91, 0x03, 0x72, 0xb4, 0xdd, 0x0e, 0xc2, 0xe5, 0x57, - 0x86, 0x45, 0xa6, 0xb3, 0x35, 0x7d, 0xab, 0x79, 0xcf, 0x9f, 0x2f, 0x4d, 0xd2, 0x2b, 0x43, 0xed, - 0x27, 0xe2, 0x6f, 0x3a, 0x2c, 0xbd, 0x27, 0x7e, 0xa5, 0xf0, 0xd1, 0xc3, 0x55, 0x8c, 0xe5, 0x4a, - 0x41, 0xe3, 0x5f, 0x5f, 0x51, 0xb2, 0x0e, 0x77, 0xaf, 0x1f, 0x8f, 0x1b, 0xc7, 0xb4, 0x01, 0x79, - 0xe0, 0x44, 0x09, 0x7b, 0x83, 0xe9, 0x00, 0xd6, 0x1e, 0xa2, 0xd3, 0x9d, 0x66, 0x8c, 0xcc, 0x32, - 0x46, 0xe6, 0x19, 0x23, 0xef, 0x19, 0x23, 0x0f, 0x0b, 0xe6, 0xcd, 0x16, 0xcc, 0x9b, 0x2f, 0x98, - 0x77, 0xd9, 0x96, 0xb1, 0xbd, 0x1a, 0x47, 0x61, 0x1f, 0x93, 0x35, 0xc0, 0xdb, 0x5f, 0x48, 0x3b, - 0xd1, 0xc2, 0x44, 0x15, 0x77, 0xdb, 0xd3, 0xaf, 0x00, 0x00, 0x00, 0xff, 0xff, 0x97, 0x9a, 0x4e, - 0xc3, 0x25, 0x02, 0x00, 0x00, + // 424 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x31, 0xcb, 0xd3, 0x40, + 0x18, 0xc7, 0x73, 0x2f, 0x5a, 0xf0, 0x9c, 0xde, 0xf3, 0x1d, 0x24, 0xc8, 0xb5, 0x06, 0xb4, 0x5a, + 0x30, 0x47, 0x6b, 0x75, 0xd2, 0xc1, 0x2e, 0x4e, 0x42, 0xad, 0x2e, 0xba, 0x94, 0x4b, 0x38, 0x62, + 0x68, 0x73, 0x4f, 0x9a, 0xbb, 0xa8, 0x5d, 0x1c, 0x1c, 0x9d, 0x04, 0xbf, 0x84, 0xa3, 0x9f, 0xc0, + 0xb9, 0x63, 0x41, 0x84, 0x4e, 0x22, 0xa9, 0xe0, 0xd7, 0x90, 0x5c, 0xae, 0x82, 0x26, 0x6d, 0x79, + 0x97, 0x70, 0xdc, 0xf3, 0xff, 0xff, 0x9f, 0xdf, 0xf3, 0xe4, 0x30, 0x4d, 0x61, 0xa6, 0x33, 0x98, + 0xcf, 0x59, 0x12, 0x47, 0x19, 0xd7, 0x31, 0x48, 0xb6, 0xc8, 0x45, 0xb6, 0xf4, 0xd3, 0x0c, 0x34, + 0x10, 0xb2, 0xab, 0xfb, 0x7f, 0xeb, 0xee, 0x29, 0x4f, 0x62, 0x09, 0xcc, 0x7c, 0x2b, 0x99, 0x7b, + 0x16, 0x41, 0x04, 0xe6, 0xc8, 0xca, 0x93, 0xbd, 0xbd, 0x16, 0x01, 0x44, 0x73, 0xc1, 0x78, 0x1a, + 0x33, 0x2e, 0x25, 0x68, 0xe3, 0x57, 0xb6, 0xda, 0x0b, 0x41, 0x25, 0xa0, 0x58, 0xc0, 0x95, 0xa8, + 0x7a, 0xb2, 0xd7, 0xfd, 0x40, 0x68, 0xde, 0x67, 0x29, 0x8f, 0x62, 0x69, 0xc4, 0x56, 0xdb, 0x6e, + 0xc0, 0x4c, 0x79, 0xc6, 0x93, 0x5d, 0x58, 0xd3, 0x1c, 0x7a, 0x99, 0x0a, 0x5b, 0xf7, 0xce, 0x30, + 0x79, 0x5a, 0xb6, 0x18, 0x1b, 0xd3, 0x44, 0x2c, 0x72, 0xa1, 0xb4, 0xf7, 0x1c, 0x5f, 0xf9, 0xe7, + 0x56, 0xa5, 0x20, 0x95, 0x20, 0x0f, 0x71, 0xab, 0x0a, 0xbf, 0x8a, 0x3a, 0xe8, 0xd6, 0xe5, 0x81, + 0xeb, 0xd7, 0xb7, 0xe0, 0x57, 0x9e, 0xd1, 0xa5, 0xd5, 0x8f, 0xb6, 0xf3, 0xf9, 0xf7, 0x97, 0x1e, + 0x9a, 0x58, 0x93, 0xe7, 0xe1, 0x8e, 0x49, 0x7d, 0x2c, 0xf4, 0x13, 0xc8, 0x94, 0x78, 0x14, 0x86, + 0x90, 0x4b, 0xfd, 0x4c, 0x73, 0x2d, 0x76, 0x9d, 0xdf, 0xe1, 0xeb, 0x07, 0x34, 0x96, 0xe3, 0x05, + 0x3e, 0xad, 0x15, 0x2d, 0xd2, 0x8d, 0x26, 0xa4, 0x9a, 0x78, 0x74, 0xa1, 0xa4, 0x9b, 0xd4, 0x53, + 0x06, 0xdf, 0x4f, 0xf0, 0x45, 0x03, 0x40, 0x3e, 0x20, 0xdc, 0xaa, 0x66, 0x21, 0x37, 0x9b, 0x42, + 0xeb, 0x6b, 0x73, 0xbb, 0x47, 0x75, 0xd5, 0x00, 0x1e, 0x7b, 0xff, 0xed, 0xd7, 0xa7, 0x93, 0xdb, + 0xa4, 0xcb, 0x4a, 0xc3, 0x1d, 0x29, 0xf4, 0x1b, 0xc8, 0x66, 0x6c, 0xef, 0xcf, 0x24, 0x5f, 0x51, + 0xc3, 0xc8, 0x64, 0xb8, 0xb7, 0xdf, 0x81, 0x15, 0xbb, 0xf7, 0xce, 0xe9, 0xb2, 0xcc, 0x0f, 0x0c, + 0xf3, 0x7d, 0x32, 0x3c, 0xca, 0x9c, 0x94, 0x19, 0x53, 0x5e, 0x85, 0x4c, 0x95, 0x59, 0xf8, 0x78, + 0x55, 0x50, 0xb4, 0x2e, 0x28, 0xda, 0x14, 0x14, 0xfd, 0x2c, 0x28, 0xfa, 0xb8, 0xa5, 0xce, 0x7a, + 0x4b, 0x9d, 0xcd, 0x96, 0x3a, 0x2f, 0x07, 0x51, 0xac, 0x5f, 0xe5, 0x81, 0x1f, 0x42, 0xb2, 0x27, + 0xfd, 0xed, 0xff, 0xef, 0x37, 0x68, 0x99, 0x07, 0x7c, 0xf7, 0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xfb, 0xe2, 0x2c, 0xc8, 0xaa, 0x03, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -152,6 +232,8 @@ const _ = grpc.SupportPackageIsVersion4 type QueryClient interface { // Parameters queries the parameters of the module. Params(ctx context.Context, in *QueryParamsRequest, opts ...grpc.CallOption) (*QueryParamsResponse, error) + // Queries a MorseAccountState by index. + MorseAccountState(ctx context.Context, in *QueryGetMorseAccountStateRequest, opts ...grpc.CallOption) (*QueryGetMorseAccountStateResponse, error) } type queryClient struct { @@ -171,10 +253,21 @@ func (c *queryClient) Params(ctx context.Context, in *QueryParamsRequest, opts . return out, nil } +func (c *queryClient) MorseAccountState(ctx context.Context, in *QueryGetMorseAccountStateRequest, opts ...grpc.CallOption) (*QueryGetMorseAccountStateResponse, error) { + out := new(QueryGetMorseAccountStateResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Query/MorseAccountState", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // QueryServer is the server API for Query service. type QueryServer interface { // Parameters queries the parameters of the module. Params(context.Context, *QueryParamsRequest) (*QueryParamsResponse, error) + // Queries a MorseAccountState by index. + MorseAccountState(context.Context, *QueryGetMorseAccountStateRequest) (*QueryGetMorseAccountStateResponse, error) } // UnimplementedQueryServer can be embedded to have forward compatible implementations. @@ -184,6 +277,9 @@ type UnimplementedQueryServer struct { func (*UnimplementedQueryServer) Params(ctx context.Context, req *QueryParamsRequest) (*QueryParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method Params not implemented") } +func (*UnimplementedQueryServer) MorseAccountState(ctx context.Context, req *QueryGetMorseAccountStateRequest) (*QueryGetMorseAccountStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method MorseAccountState not implemented") +} func RegisterQueryServer(s grpc1.Server, srv QueryServer) { s.RegisterService(&_Query_serviceDesc, srv) @@ -207,6 +303,24 @@ func _Query_Params_Handler(srv interface{}, ctx context.Context, dec func(interf return interceptor(ctx, in, info, handler) } +func _Query_MorseAccountState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(QueryGetMorseAccountStateRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(QueryServer).MorseAccountState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Query/MorseAccountState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(QueryServer).MorseAccountState(ctx, req.(*QueryGetMorseAccountStateRequest)) + } + return interceptor(ctx, in, info, handler) +} + var _Query_serviceDesc = grpc.ServiceDesc{ ServiceName: "poktroll.migration.Query", HandlerType: (*QueryServer)(nil), @@ -215,6 +329,10 @@ var _Query_serviceDesc = grpc.ServiceDesc{ MethodName: "Params", Handler: _Query_Params_Handler, }, + { + MethodName: "MorseAccountState", + Handler: _Query_MorseAccountState_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/query.proto", @@ -276,6 +394,62 @@ func (m *QueryParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } +func (m *QueryGetMorseAccountStateRequest) 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 *QueryGetMorseAccountStateRequest) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetMorseAccountStateRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + return len(dAtA) - i, nil +} + +func (m *QueryGetMorseAccountStateResponse) 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 *QueryGetMorseAccountStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *QueryGetMorseAccountStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.MorseAccountState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintQuery(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0xa + return len(dAtA) - i, nil +} + func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { offset -= sovQuery(v) base := offset @@ -307,6 +481,26 @@ func (m *QueryParamsResponse) Size() (n int) { return n } +func (m *QueryGetMorseAccountStateRequest) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + return n +} + +func (m *QueryGetMorseAccountStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = m.MorseAccountState.Size() + n += 1 + l + sovQuery(uint64(l)) + return n +} + func sovQuery(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -446,6 +640,139 @@ func (m *QueryParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *QueryGetMorseAccountStateRequest) 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 ErrIntOverflowQuery + } + 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: QueryGetMorseAccountStateRequest: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetMorseAccountStateRequest: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} +func (m *QueryGetMorseAccountStateResponse) 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 ErrIntOverflowQuery + } + 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: QueryGetMorseAccountStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: QueryGetMorseAccountStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MorseAccountState", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowQuery + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthQuery + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthQuery + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if err := m.MorseAccountState.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + default: + iNdEx = preIndex + skippy, err := skipQuery(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthQuery + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipQuery(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/x/migration/types/query.pb.gw.go b/x/migration/types/query.pb.gw.go index 5ab60bb65..c86e9cb78 100644 --- a/x/migration/types/query.pb.gw.go +++ b/x/migration/types/query.pb.gw.go @@ -51,6 +51,24 @@ func local_request_Query_Params_0(ctx context.Context, marshaler runtime.Marshal } +func request_Query_MorseAccountState_0(ctx context.Context, marshaler runtime.Marshaler, client QueryClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetMorseAccountStateRequest + var metadata runtime.ServerMetadata + + msg, err := client.MorseAccountState(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) + return msg, metadata, err + +} + +func local_request_Query_MorseAccountState_0(ctx context.Context, marshaler runtime.Marshaler, server QueryServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { + var protoReq QueryGetMorseAccountStateRequest + var metadata runtime.ServerMetadata + + msg, err := server.MorseAccountState(ctx, &protoReq) + return msg, metadata, err + +} + // RegisterQueryHandlerServer registers the http handlers for service Query to "mux". // UnaryRPC :call QueryServer directly. // StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. @@ -80,6 +98,29 @@ func RegisterQueryHandlerServer(ctx context.Context, mux *runtime.ServeMux, serv }) + mux.Handle("GET", pattern_Query_MorseAccountState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + var stream runtime.ServerTransportStream + ctx = grpc.NewContextWithServerTransportStream(ctx, &stream) + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := local_request_Query_MorseAccountState_0(rctx, inboundMarshaler, server, req, pathParams) + md.HeaderMD, md.TrailerMD = metadata.Join(md.HeaderMD, stream.Header()), metadata.Join(md.TrailerMD, stream.Trailer()) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MorseAccountState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } @@ -141,13 +182,37 @@ func RegisterQueryHandlerClient(ctx context.Context, mux *runtime.ServeMux, clie }) + mux.Handle("GET", pattern_Query_MorseAccountState_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { + ctx, cancel := context.WithCancel(req.Context()) + defer cancel() + inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) + rctx, err := runtime.AnnotateContext(ctx, mux, req) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + resp, md, err := request_Query_MorseAccountState_0(rctx, inboundMarshaler, client, req, pathParams) + ctx = runtime.NewServerMetadataContext(ctx, md) + if err != nil { + runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) + return + } + + forward_Query_MorseAccountState_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) + + }) + return nil } var ( pattern_Query_Params_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "migration", "params"}, "", runtime.AssumeColonVerbOpt(false))) + + pattern_Query_MorseAccountState_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3}, []string{"pokt-network", "poktroll", "migration", "morse_account_state"}, "", runtime.AssumeColonVerbOpt(false))) ) var ( forward_Query_Params_0 = runtime.ForwardResponseMessage + + forward_Query_MorseAccountState_0 = runtime.ForwardResponseMessage ) diff --git a/x/migration/types/tx.pb.go b/x/migration/types/tx.pb.go index 6299c5f97..dfa97537b 100644 --- a/x/migration/types/tx.pb.go +++ b/x/migration/types/tx.pb.go @@ -35,8 +35,6 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package type MsgUpdateParams struct { // authority is the address that controls the module (defaults to x/gov unless overwritten). Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` - // params defines the module parameters to update. - // // NOTE: All parameters must be supplied. Params Params `protobuf:"bytes,2,opt,name=params,proto3" json:"params"` } @@ -118,37 +116,147 @@ func (m *MsgUpdateParamsResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgUpdateParamsResponse proto.InternalMessageInfo +type MsgCreateMorseAccountState struct { + // authority is the address that controls the module (defaults to x/gov unless overwritten). + Authority string `protobuf:"bytes,1,opt,name=authority,proto3" json:"authority,omitempty"` + MorseAccountState MorseAccountState `protobuf:"bytes,2,opt,name=morse_account_state,json=morseAccountState,proto3" json:"morse_account_state"` +} + +func (m *MsgCreateMorseAccountState) Reset() { *m = MsgCreateMorseAccountState{} } +func (m *MsgCreateMorseAccountState) String() string { return proto.CompactTextString(m) } +func (*MsgCreateMorseAccountState) ProtoMessage() {} +func (*MsgCreateMorseAccountState) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{2} +} +func (m *MsgCreateMorseAccountState) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateMorseAccountState) 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 *MsgCreateMorseAccountState) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateMorseAccountState.Merge(m, src) +} +func (m *MsgCreateMorseAccountState) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateMorseAccountState) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateMorseAccountState.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateMorseAccountState proto.InternalMessageInfo + +func (m *MsgCreateMorseAccountState) GetAuthority() string { + if m != nil { + return m.Authority + } + return "" +} + +func (m *MsgCreateMorseAccountState) GetMorseAccountState() MorseAccountState { + if m != nil { + return m.MorseAccountState + } + return MorseAccountState{} +} + +type MsgCreateMorseAccountStateResponse struct { + StateHash []byte `protobuf:"bytes,1,opt,name=state_hash,json=stateHash,proto3" json:"state_hash"` + NumAccounts uint64 `protobuf:"varint,2,opt,name=num_accounts,json=numAccounts,proto3" json:"num_accounts"` +} + +func (m *MsgCreateMorseAccountStateResponse) Reset() { *m = MsgCreateMorseAccountStateResponse{} } +func (m *MsgCreateMorseAccountStateResponse) String() string { return proto.CompactTextString(m) } +func (*MsgCreateMorseAccountStateResponse) ProtoMessage() {} +func (*MsgCreateMorseAccountStateResponse) Descriptor() ([]byte, []int) { + return fileDescriptor_21658240592266b6, []int{3} +} +func (m *MsgCreateMorseAccountStateResponse) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *MsgCreateMorseAccountStateResponse) 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 *MsgCreateMorseAccountStateResponse) XXX_Merge(src proto.Message) { + xxx_messageInfo_MsgCreateMorseAccountStateResponse.Merge(m, src) +} +func (m *MsgCreateMorseAccountStateResponse) XXX_Size() int { + return m.Size() +} +func (m *MsgCreateMorseAccountStateResponse) XXX_DiscardUnknown() { + xxx_messageInfo_MsgCreateMorseAccountStateResponse.DiscardUnknown(m) +} + +var xxx_messageInfo_MsgCreateMorseAccountStateResponse proto.InternalMessageInfo + +func (m *MsgCreateMorseAccountStateResponse) GetStateHash() []byte { + if m != nil { + return m.StateHash + } + return nil +} + +func (m *MsgCreateMorseAccountStateResponse) GetNumAccounts() uint64 { + if m != nil { + return m.NumAccounts + } + return 0 +} + func init() { proto.RegisterType((*MsgUpdateParams)(nil), "poktroll.migration.MsgUpdateParams") proto.RegisterType((*MsgUpdateParamsResponse)(nil), "poktroll.migration.MsgUpdateParamsResponse") + proto.RegisterType((*MsgCreateMorseAccountState)(nil), "poktroll.migration.MsgCreateMorseAccountState") + proto.RegisterType((*MsgCreateMorseAccountStateResponse)(nil), "poktroll.migration.MsgCreateMorseAccountStateResponse") } func init() { proto.RegisterFile("poktroll/migration/tx.proto", fileDescriptor_21658240592266b6) } var fileDescriptor_21658240592266b6 = []byte{ - // 352 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, 0x51, - 0x1e, 0x17, 0xb3, 0x6f, 0x71, 0xba, 0x50, 0x02, 0x17, 0x0f, 0x8a, 0x0f, 0x95, 0xb1, 0xb9, 0x0c, - 0xcd, 0x0c, 0x29, 0x6d, 0x22, 0x14, 0xc1, 0x2c, 0x92, 0x62, 0x6d, 0x00, 0xf9, 0xc5, 0x29, 0xe0, - 0xc4, 0x23, 0x39, 0xc6, 0x0b, 0x8f, 0xe4, 0x18, 0x6f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, - 0x71, 0xc2, 0x63, 0x39, 0x86, 0x0b, 0x8f, 0xe5, 0x18, 0x6e, 0x3c, 0x96, 0x63, 0x88, 0x32, 0x4a, - 0xcf, 0x2c, 0xc9, 0x28, 0x4d, 0xd2, 0x4b, 0xce, 0xcf, 0xd5, 0x07, 0x99, 0xad, 0x9b, 0x97, 0x5a, - 0x52, 0x9e, 0x5f, 0x94, 0xad, 0x8f, 0xd5, 0x9b, 0x25, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c, 0xe0, - 0x78, 0x32, 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0x58, 0x1b, 0x5f, 0x75, 0x58, 0x02, 0x00, 0x00, + // 519 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x53, 0xbf, 0x6b, 0xdb, 0x40, + 0x14, 0xf6, 0xf5, 0x47, 0xc0, 0x17, 0x93, 0x36, 0x6a, 0xc0, 0x8e, 0x02, 0x52, 0x50, 0x5b, 0x08, + 0x2e, 0x96, 0xa8, 0x03, 0x29, 0x04, 0x3a, 0x44, 0x5d, 0xba, 0x18, 0x82, 0x42, 0x97, 0x2e, 0xee, + 0xc5, 0x3e, 0x4e, 0x22, 0x39, 0x9d, 0xb8, 0x3b, 0xb5, 0xc9, 0xd6, 0x76, 0x2a, 0x9d, 0xfa, 0x67, + 0x74, 0xf4, 0xd0, 0x7f, 0xa0, 0x5b, 0xc6, 0xd0, 0xc9, 0x93, 0x29, 0xf6, 0x60, 0xf0, 0xd8, 0xbf, + 0xa0, 0x48, 0x3a, 0x39, 0xb1, 0x23, 0x41, 0x9b, 0x45, 0xba, 0x7b, 0xef, 0xbb, 0xef, 0x7d, 0xdf, + 0xbb, 0x77, 0x70, 0x2b, 0x62, 0x27, 0x92, 0xb3, 0xd3, 0x53, 0x87, 0x06, 0x84, 0x23, 0x19, 0xb0, + 0xd0, 0x91, 0x67, 0x76, 0xc4, 0x99, 0x64, 0x9a, 0x96, 0x27, 0xed, 0x79, 0x52, 0x5f, 0x47, 0x34, + 0x08, 0x99, 0x93, 0x7e, 0x33, 0x98, 0x5e, 0xef, 0x31, 0x41, 0x99, 0x70, 0xa8, 0x20, 0xce, 0xfb, + 0xe7, 0xc9, 0x4f, 0x25, 0x36, 0xb3, 0x44, 0x37, 0xdd, 0x39, 0xd9, 0x46, 0xa5, 0x36, 0x08, 0x23, + 0x2c, 0x8b, 0x27, 0x2b, 0x15, 0x35, 0x0b, 0xd4, 0x44, 0x88, 0x23, 0x9a, 0x1f, 0x33, 0x8a, 0xe4, + 0x9e, 0x47, 0x58, 0xe5, 0xad, 0x9f, 0x00, 0x3e, 0xe8, 0x08, 0xf2, 0x26, 0xea, 0x23, 0x89, 0x0f, + 0xd3, 0x93, 0xda, 0x1e, 0xac, 0xa2, 0x58, 0xfa, 0x8c, 0x07, 0xf2, 0xbc, 0x01, 0xb6, 0xc1, 0x4e, + 0xd5, 0x6d, 0xfc, 0xfa, 0xd1, 0xda, 0x50, 0x7a, 0x0e, 0xfa, 0x7d, 0x8e, 0x85, 0x38, 0x92, 0x3c, + 0x08, 0x89, 0x77, 0x05, 0xd5, 0x5e, 0xc2, 0x95, 0xac, 0x76, 0xe3, 0xce, 0x36, 0xd8, 0x59, 0x6d, + 0xeb, 0xf6, 0xcd, 0x76, 0xd8, 0x59, 0x0d, 0xb7, 0x7a, 0x31, 0x32, 0x2b, 0xdf, 0xa7, 0x83, 0x26, + 0xf0, 0xd4, 0xa1, 0xfd, 0x17, 0x9f, 0xa7, 0x83, 0xe6, 0x15, 0xdd, 0xd7, 0xe9, 0xa0, 0xf9, 0x64, + 0xae, 0xfe, 0xec, 0x9a, 0xfe, 0x25, 0xbd, 0xd6, 0x26, 0xac, 0x2f, 0x85, 0x3c, 0x2c, 0x22, 0x16, + 0x0a, 0x6c, 0x0d, 0x01, 0xd4, 0x3b, 0x82, 0xbc, 0xe2, 0x18, 0x49, 0xdc, 0x61, 0x5c, 0xe0, 0x83, + 0x5e, 0x8f, 0xc5, 0xa1, 0x3c, 0x92, 0x48, 0xe2, 0x5b, 0x3b, 0xe5, 0xf0, 0x11, 0x4d, 0xc8, 0xba, + 0x28, 0x63, 0xeb, 0x8a, 0x84, 0x4e, 0xd9, 0x7e, 0x5a, 0x64, 0xfb, 0x46, 0x6d, 0x77, 0x2b, 0xe9, + 0xc0, 0x6c, 0x64, 0x16, 0x31, 0x79, 0xeb, 0x74, 0x19, 0xbf, 0xbf, 0xb6, 0xd8, 0x1e, 0xeb, 0x0b, + 0x80, 0x56, 0xb9, 0xb5, 0xbc, 0x03, 0x5a, 0x0b, 0xc2, 0x94, 0xb2, 0xeb, 0x23, 0xe1, 0xa7, 0x1e, + 0x6b, 0xee, 0xda, 0x6c, 0x64, 0x5e, 0x8b, 0x7a, 0xd5, 0x74, 0xfd, 0x1a, 0x09, 0x5f, 0xdb, 0x85, + 0xb5, 0x30, 0xa6, 0xb9, 0x9a, 0xec, 0x26, 0xef, 0xb9, 0x0f, 0x67, 0x23, 0x73, 0x21, 0xee, 0xad, + 0x86, 0x31, 0x55, 0xf5, 0x44, 0xfb, 0x0f, 0x80, 0x77, 0x3b, 0x82, 0x68, 0xef, 0x60, 0x6d, 0x61, + 0x90, 0x1e, 0x17, 0x76, 0x62, 0xf1, 0xaa, 0xf4, 0x67, 0xff, 0x00, 0x9a, 0xbb, 0xf9, 0x04, 0x60, + 0xbd, 0xec, 0x32, 0xed, 0x12, 0xa2, 0x12, 0xbc, 0xbe, 0xf7, 0x7f, 0xf8, 0x5c, 0x83, 0x7e, 0xff, + 0x63, 0x32, 0xb6, 0xee, 0xe1, 0xc5, 0xd8, 0x00, 0x97, 0x63, 0x03, 0x0c, 0xc7, 0x06, 0xf8, 0x3d, + 0x36, 0xc0, 0xb7, 0x89, 0x51, 0xb9, 0x9c, 0x18, 0x95, 0xe1, 0xc4, 0xa8, 0xbc, 0x6d, 0x93, 0x40, + 0xfa, 0xf1, 0xb1, 0xdd, 0x63, 0xd4, 0x49, 0xca, 0xb4, 0x42, 0x2c, 0x3f, 0x30, 0x7e, 0xe2, 0x14, + 0x4e, 0x74, 0xfa, 0x22, 0x8f, 0x57, 0xd2, 0x27, 0xb9, 0xfb, 0x37, 0x00, 0x00, 0xff, 0xff, 0xeb, + 0x8c, 0x0f, 0x52, 0x63, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -166,6 +274,7 @@ type MsgClient interface { // UpdateParams defines a (governance) operation for updating the module // parameters. The authority defaults to the x/gov module account. UpdateParams(ctx context.Context, in *MsgUpdateParams, opts ...grpc.CallOption) (*MsgUpdateParamsResponse, error) + CreateMorseAccountState(ctx context.Context, in *MsgCreateMorseAccountState, opts ...grpc.CallOption) (*MsgCreateMorseAccountStateResponse, error) } type msgClient struct { @@ -185,11 +294,21 @@ func (c *msgClient) UpdateParams(ctx context.Context, in *MsgUpdateParams, opts return out, nil } +func (c *msgClient) CreateMorseAccountState(ctx context.Context, in *MsgCreateMorseAccountState, opts ...grpc.CallOption) (*MsgCreateMorseAccountStateResponse, error) { + out := new(MsgCreateMorseAccountStateResponse) + err := c.cc.Invoke(ctx, "/poktroll.migration.Msg/CreateMorseAccountState", 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) + CreateMorseAccountState(context.Context, *MsgCreateMorseAccountState) (*MsgCreateMorseAccountStateResponse, error) } // UnimplementedMsgServer can be embedded to have forward compatible implementations. @@ -199,6 +318,9 @@ type UnimplementedMsgServer struct { func (*UnimplementedMsgServer) UpdateParams(ctx context.Context, req *MsgUpdateParams) (*MsgUpdateParamsResponse, error) { return nil, status.Errorf(codes.Unimplemented, "method UpdateParams not implemented") } +func (*UnimplementedMsgServer) CreateMorseAccountState(ctx context.Context, req *MsgCreateMorseAccountState) (*MsgCreateMorseAccountStateResponse, error) { + return nil, status.Errorf(codes.Unimplemented, "method CreateMorseAccountState not implemented") +} func RegisterMsgServer(s grpc1.Server, srv MsgServer) { s.RegisterService(&_Msg_serviceDesc, srv) @@ -222,6 +344,24 @@ func _Msg_UpdateParams_Handler(srv interface{}, ctx context.Context, dec func(in return interceptor(ctx, in, info, handler) } +func _Msg_CreateMorseAccountState_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(MsgCreateMorseAccountState) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(MsgServer).CreateMorseAccountState(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/poktroll.migration.Msg/CreateMorseAccountState", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(MsgServer).CreateMorseAccountState(ctx, req.(*MsgCreateMorseAccountState)) + } + return interceptor(ctx, in, info, handler) +} + var _Msg_serviceDesc = grpc.ServiceDesc{ ServiceName: "poktroll.migration.Msg", HandlerType: (*MsgServer)(nil), @@ -230,6 +370,10 @@ var _Msg_serviceDesc = grpc.ServiceDesc{ MethodName: "UpdateParams", Handler: _Msg_UpdateParams_Handler, }, + { + MethodName: "CreateMorseAccountState", + Handler: _Msg_CreateMorseAccountState_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "poktroll/migration/tx.proto", @@ -298,6 +442,81 @@ func (m *MsgUpdateParamsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } +func (m *MsgCreateMorseAccountState) 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 *MsgCreateMorseAccountState) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateMorseAccountState) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + { + size, err := m.MorseAccountState.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintTx(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x12 + if len(m.Authority) > 0 { + i -= len(m.Authority) + copy(dAtA[i:], m.Authority) + i = encodeVarintTx(dAtA, i, uint64(len(m.Authority))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *MsgCreateMorseAccountStateResponse) 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 *MsgCreateMorseAccountStateResponse) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *MsgCreateMorseAccountStateResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.NumAccounts != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.NumAccounts)) + i-- + dAtA[i] = 0x10 + } + if len(m.StateHash) > 0 { + i -= len(m.StateHash) + copy(dAtA[i:], m.StateHash) + i = encodeVarintTx(dAtA, i, uint64(len(m.StateHash))) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + func encodeVarintTx(dAtA []byte, offset int, v uint64) int { offset -= sovTx(v) base := offset @@ -333,6 +552,37 @@ func (m *MsgUpdateParamsResponse) Size() (n int) { return n } +func (m *MsgCreateMorseAccountState) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.Authority) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + l = m.MorseAccountState.Size() + n += 1 + l + sovTx(uint64(l)) + return n +} + +func (m *MsgCreateMorseAccountStateResponse) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + l = len(m.StateHash) + if l > 0 { + n += 1 + l + sovTx(uint64(l)) + } + if m.NumAccounts != 0 { + n += 1 + sovTx(uint64(m.NumAccounts)) + } + return n +} + func sovTx(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -504,6 +754,224 @@ func (m *MsgUpdateParamsResponse) Unmarshal(dAtA []byte) error { } return nil } +func (m *MsgCreateMorseAccountState) 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: MsgCreateMorseAccountState: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateMorseAccountState: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Authority", 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.Authority = string(dAtA[iNdEx:postIndex]) + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field MorseAccountState", 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 err := m.MorseAccountState.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 (m *MsgCreateMorseAccountStateResponse) 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: MsgCreateMorseAccountStateResponse: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: MsgCreateMorseAccountStateResponse: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field StateHash", 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.StateHash = append(m.StateHash[:0], dAtA[iNdEx:postIndex]...) + if m.StateHash == nil { + m.StateHash = []byte{} + } + iNdEx = postIndex + case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field NumAccounts", wireType) + } + m.NumAccounts = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.NumAccounts |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + 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