diff --git a/Makefile b/Makefile index 334c4097d..e59d8b95a 100644 --- a/Makefile +++ b/Makefile @@ -318,6 +318,7 @@ format: find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name "*_mocks.go" -not -name '*.pb.go' -not -name '*.pulsar.go' | xargs gofmt -w -s find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name "*_mocks.go" -not -name '*.pb.go' -not -name '*.pulsar.go' | xargs misspell -w find . -name '*.go' -type f -not -path "*.git*" -not -path "./client/docs/statik/statik.go" -not -name "*_mocks.go" -not -name '*.pb.go' -not -name '*.pulsar.go' | xargs goimports -w -local github.com/milkyway-labs/milkyway + find . -name '*.proto' -type f -not -path "*.git*" | xargs misspell -w .PHONY: format ############################################################################### diff --git a/api/milkyway/assets/v1/messages_grpc.pb.go b/api/milkyway/assets/v1/messages_grpc.pb.go index b8b032b55..7d7a6605e 100644 --- a/api/milkyway/assets/v1/messages_grpc.pb.go +++ b/api/milkyway/assets/v1/messages_grpc.pb.go @@ -27,7 +27,7 @@ const ( // // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. // -// Msg defines the services module's gRPC message service. +// Msg defines the assets module's gRPC message service. type MsgClient interface { // RegisterAsset defines the operation for registering an asset. RegisterAsset(ctx context.Context, in *MsgRegisterAsset, opts ...grpc.CallOption) (*MsgRegisterAssetResponse, error) @@ -68,7 +68,7 @@ func (c *msgClient) DeregisterAsset(ctx context.Context, in *MsgDeregisterAsset, // All implementations must embed UnimplementedMsgServer // for forward compatibility. // -// Msg defines the services module's gRPC message service. +// Msg defines the assets module's gRPC message service. type MsgServer interface { // RegisterAsset defines the operation for registering an asset. RegisterAsset(context.Context, *MsgRegisterAsset) (*MsgRegisterAssetResponse, error) diff --git a/api/milkyway/liquidvesting/v1/genesis.pulsar.go b/api/milkyway/liquidvesting/v1/genesis.pulsar.go index 84a3bd633..4b53dea2a 100644 --- a/api/milkyway/liquidvesting/v1/genesis.pulsar.go +++ b/api/milkyway/liquidvesting/v1/genesis.pulsar.go @@ -68,7 +68,7 @@ func (x *_GenesisState_2_list) IsValid() bool { var _ protoreflect.List = (*_GenesisState_3_list)(nil) type _GenesisState_3_list struct { - list *[]*UserInsuranceFundState + list *[]*UserInsuranceFundEntry } func (x *_GenesisState_3_list) Len() int { @@ -84,18 +84,18 @@ func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserInsuranceFundState) + concreteValue := valueUnwrapped.Interface().(*UserInsuranceFundEntry) (*x.list)[i] = concreteValue } func (x *_GenesisState_3_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*UserInsuranceFundState) + concreteValue := valueUnwrapped.Interface().(*UserInsuranceFundEntry) *x.list = append(*x.list, concreteValue) } func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { - v := new(UserInsuranceFundState) + v := new(UserInsuranceFundEntry) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -108,7 +108,7 @@ func (x *_GenesisState_3_list) Truncate(n int) { } func (x *_GenesisState_3_list) NewElement() protoreflect.Value { - v := new(UserInsuranceFundState) + v := new(UserInsuranceFundEntry) return protoreflect.ValueOfMessage(v.ProtoReflect()) } @@ -351,7 +351,7 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p return protoreflect.ValueOfList(value) case "milkyway.liquidvesting.v1.GenesisState.user_insurance_funds": if x.UserInsuranceFunds == nil { - x.UserInsuranceFunds = []*UserInsuranceFundState{} + x.UserInsuranceFunds = []*UserInsuranceFundEntry{} } value := &_GenesisState_3_list{list: &x.UserInsuranceFunds} return protoreflect.ValueOfList(value) @@ -375,7 +375,7 @@ func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) list := []*BurnCoins{} return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) case "milkyway.liquidvesting.v1.GenesisState.user_insurance_funds": - list := []*UserInsuranceFundState{} + list := []*UserInsuranceFundEntry{} return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) default: if fd.IsExtension() { @@ -685,7 +685,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - x.UserInsuranceFunds = append(x.UserInsuranceFunds, &UserInsuranceFundState{}) + x.UserInsuranceFunds = append(x.UserInsuranceFunds, &UserInsuranceFundEntry{}) if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UserInsuranceFunds[len(x.UserInsuranceFunds)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } @@ -750,7 +750,7 @@ type GenesisState struct { // users' balances BurnCoins []*BurnCoins `protobuf:"bytes,2,rep,name=burn_coins,json=burnCoins,proto3" json:"burn_coins,omitempty"` // UserInsuranceFunds represents the users' insurance fund. - UserInsuranceFunds []*UserInsuranceFundState `protobuf:"bytes,3,rep,name=user_insurance_funds,json=userInsuranceFunds,proto3" json:"user_insurance_funds,omitempty"` + UserInsuranceFunds []*UserInsuranceFundEntry `protobuf:"bytes,3,rep,name=user_insurance_funds,json=userInsuranceFunds,proto3" json:"user_insurance_funds,omitempty"` } func (x *GenesisState) Reset() { @@ -787,7 +787,7 @@ func (x *GenesisState) GetBurnCoins() []*BurnCoins { return nil } -func (x *GenesisState) GetUserInsuranceFunds() []*UserInsuranceFundState { +func (x *GenesisState) GetUserInsuranceFunds() []*UserInsuranceFundEntry { if x != nil { return x.UserInsuranceFunds } @@ -824,7 +824,7 @@ var file_milkyway_liquidvesting_v1_genesis_proto_rawDesc = []byte{ 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, - 0x46, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, + 0x46, 0x75, 0x6e, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x12, 0x75, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x73, 0x42, 0x84, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, @@ -863,12 +863,12 @@ var file_milkyway_liquidvesting_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: milkyway.liquidvesting.v1.GenesisState (*Params)(nil), // 1: milkyway.liquidvesting.v1.Params (*BurnCoins)(nil), // 2: milkyway.liquidvesting.v1.BurnCoins - (*UserInsuranceFundState)(nil), // 3: milkyway.liquidvesting.v1.UserInsuranceFundState + (*UserInsuranceFundEntry)(nil), // 3: milkyway.liquidvesting.v1.UserInsuranceFundEntry } var file_milkyway_liquidvesting_v1_genesis_proto_depIdxs = []int32{ 1, // 0: milkyway.liquidvesting.v1.GenesisState.params:type_name -> milkyway.liquidvesting.v1.Params 2, // 1: milkyway.liquidvesting.v1.GenesisState.burn_coins:type_name -> milkyway.liquidvesting.v1.BurnCoins - 3, // 2: milkyway.liquidvesting.v1.GenesisState.user_insurance_funds:type_name -> milkyway.liquidvesting.v1.UserInsuranceFundState + 3, // 2: milkyway.liquidvesting.v1.GenesisState.user_insurance_funds:type_name -> milkyway.liquidvesting.v1.UserInsuranceFundEntry 3, // [3:3] is the sub-list for method output_type 3, // [3:3] is the sub-list for method input_type 3, // [3:3] is the sub-list for extension type_name diff --git a/api/milkyway/liquidvesting/v1/messages.pulsar.go b/api/milkyway/liquidvesting/v1/messages.pulsar.go index dec6fca22..38c60c929 100644 --- a/api/milkyway/liquidvesting/v1/messages.pulsar.go +++ b/api/milkyway/liquidvesting/v1/messages.pulsar.go @@ -3764,7 +3764,7 @@ type MsgMintVestedRepresentation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // User that want to triger the tokens mint. + // User that want to trigger the tokens mint. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // User that will receive the minted tokens. Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` @@ -3849,7 +3849,7 @@ type MsgBurnVestedRepresentation struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // User that want to triger the tokens burn. + // User that want to trigger the tokens burn. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // User from which we want to burn the tokens. User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` diff --git a/api/milkyway/liquidvesting/v1/models.pulsar.go b/api/milkyway/liquidvesting/v1/models.pulsar.go index 0eeafeee9..c4a41659b 100644 --- a/api/milkyway/liquidvesting/v1/models.pulsar.go +++ b/api/milkyway/liquidvesting/v1/models.pulsar.go @@ -1642,28 +1642,79 @@ func (x *fastReflection_BurnCoinsList) ProtoMethods() *protoiface.Methods { } } +var _ protoreflect.List = (*_UserInsuranceFundEntry_2_list)(nil) + +type _UserInsuranceFundEntry_2_list struct { + list *[]*v1beta1.Coin +} + +func (x *_UserInsuranceFundEntry_2_list) Len() int { + if x.list == nil { + return 0 + } + return len(*x.list) +} + +func (x *_UserInsuranceFundEntry_2_list) Get(i int) protoreflect.Value { + return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) +} + +func (x *_UserInsuranceFundEntry_2_list) Set(i int, value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + (*x.list)[i] = concreteValue +} + +func (x *_UserInsuranceFundEntry_2_list) Append(value protoreflect.Value) { + valueUnwrapped := value.Message() + concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) + *x.list = append(*x.list, concreteValue) +} + +func (x *_UserInsuranceFundEntry_2_list) AppendMutable() protoreflect.Value { + v := new(v1beta1.Coin) + *x.list = append(*x.list, v) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UserInsuranceFundEntry_2_list) Truncate(n int) { + for i := n; i < len(*x.list); i++ { + (*x.list)[i] = nil + } + *x.list = (*x.list)[:n] +} + +func (x *_UserInsuranceFundEntry_2_list) NewElement() protoreflect.Value { + v := new(v1beta1.Coin) + return protoreflect.ValueOfMessage(v.ProtoReflect()) +} + +func (x *_UserInsuranceFundEntry_2_list) IsValid() bool { + return x.list != nil +} + var ( - md_UserInsuranceFundState protoreflect.MessageDescriptor - fd_UserInsuranceFundState_user_address protoreflect.FieldDescriptor - fd_UserInsuranceFundState_insurance_fund protoreflect.FieldDescriptor + md_UserInsuranceFundEntry protoreflect.MessageDescriptor + fd_UserInsuranceFundEntry_user_address protoreflect.FieldDescriptor + fd_UserInsuranceFundEntry_balance protoreflect.FieldDescriptor ) func init() { file_milkyway_liquidvesting_v1_models_proto_init() - md_UserInsuranceFundState = File_milkyway_liquidvesting_v1_models_proto.Messages().ByName("UserInsuranceFundState") - fd_UserInsuranceFundState_user_address = md_UserInsuranceFundState.Fields().ByName("user_address") - fd_UserInsuranceFundState_insurance_fund = md_UserInsuranceFundState.Fields().ByName("insurance_fund") + md_UserInsuranceFundEntry = File_milkyway_liquidvesting_v1_models_proto.Messages().ByName("UserInsuranceFundEntry") + fd_UserInsuranceFundEntry_user_address = md_UserInsuranceFundEntry.Fields().ByName("user_address") + fd_UserInsuranceFundEntry_balance = md_UserInsuranceFundEntry.Fields().ByName("balance") } -var _ protoreflect.Message = (*fastReflection_UserInsuranceFundState)(nil) +var _ protoreflect.Message = (*fastReflection_UserInsuranceFundEntry)(nil) -type fastReflection_UserInsuranceFundState UserInsuranceFundState +type fastReflection_UserInsuranceFundEntry UserInsuranceFundEntry -func (x *UserInsuranceFundState) ProtoReflect() protoreflect.Message { - return (*fastReflection_UserInsuranceFundState)(x) +func (x *UserInsuranceFundEntry) ProtoReflect() protoreflect.Message { + return (*fastReflection_UserInsuranceFundEntry)(x) } -func (x *UserInsuranceFundState) slowProtoReflect() protoreflect.Message { +func (x *UserInsuranceFundEntry) slowProtoReflect() protoreflect.Message { mi := &file_milkyway_liquidvesting_v1_models_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -1675,43 +1726,43 @@ func (x *UserInsuranceFundState) slowProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -var _fastReflection_UserInsuranceFundState_messageType fastReflection_UserInsuranceFundState_messageType -var _ protoreflect.MessageType = fastReflection_UserInsuranceFundState_messageType{} +var _fastReflection_UserInsuranceFundEntry_messageType fastReflection_UserInsuranceFundEntry_messageType +var _ protoreflect.MessageType = fastReflection_UserInsuranceFundEntry_messageType{} -type fastReflection_UserInsuranceFundState_messageType struct{} +type fastReflection_UserInsuranceFundEntry_messageType struct{} -func (x fastReflection_UserInsuranceFundState_messageType) Zero() protoreflect.Message { - return (*fastReflection_UserInsuranceFundState)(nil) +func (x fastReflection_UserInsuranceFundEntry_messageType) Zero() protoreflect.Message { + return (*fastReflection_UserInsuranceFundEntry)(nil) } -func (x fastReflection_UserInsuranceFundState_messageType) New() protoreflect.Message { - return new(fastReflection_UserInsuranceFundState) +func (x fastReflection_UserInsuranceFundEntry_messageType) New() protoreflect.Message { + return new(fastReflection_UserInsuranceFundEntry) } -func (x fastReflection_UserInsuranceFundState_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_UserInsuranceFundState +func (x fastReflection_UserInsuranceFundEntry_messageType) Descriptor() protoreflect.MessageDescriptor { + return md_UserInsuranceFundEntry } // Descriptor returns message descriptor, which contains only the protobuf // type information for the message. -func (x *fastReflection_UserInsuranceFundState) Descriptor() protoreflect.MessageDescriptor { - return md_UserInsuranceFundState +func (x *fastReflection_UserInsuranceFundEntry) Descriptor() protoreflect.MessageDescriptor { + return md_UserInsuranceFundEntry } // 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_UserInsuranceFundState) Type() protoreflect.MessageType { - return _fastReflection_UserInsuranceFundState_messageType +func (x *fastReflection_UserInsuranceFundEntry) Type() protoreflect.MessageType { + return _fastReflection_UserInsuranceFundEntry_messageType } // New returns a newly allocated and mutable empty message. -func (x *fastReflection_UserInsuranceFundState) New() protoreflect.Message { - return new(fastReflection_UserInsuranceFundState) +func (x *fastReflection_UserInsuranceFundEntry) New() protoreflect.Message { + return new(fastReflection_UserInsuranceFundEntry) } // Interface unwraps the message reflection interface and // returns the underlying ProtoMessage interface. -func (x *fastReflection_UserInsuranceFundState) Interface() protoreflect.ProtoMessage { - return (*UserInsuranceFundState)(x) +func (x *fastReflection_UserInsuranceFundEntry) Interface() protoreflect.ProtoMessage { + return (*UserInsuranceFundEntry)(x) } // Range iterates over every populated field in an undefined order, @@ -1719,16 +1770,16 @@ func (x *fastReflection_UserInsuranceFundState) Interface() protoreflect.ProtoMe // Range returns immediately if f returns false. // While iterating, mutating operations may only be performed // on the current field descriptor. -func (x *fastReflection_UserInsuranceFundState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { +func (x *fastReflection_UserInsuranceFundEntry) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { if x.UserAddress != "" { value := protoreflect.ValueOfString(x.UserAddress) - if !f(fd_UserInsuranceFundState_user_address, value) { + if !f(fd_UserInsuranceFundEntry_user_address, value) { return } } - if x.InsuranceFund != nil { - value := protoreflect.ValueOfMessage(x.InsuranceFund.ProtoReflect()) - if !f(fd_UserInsuranceFundState_insurance_fund, value) { + if len(x.Balance) != 0 { + value := protoreflect.ValueOfList(&_UserInsuranceFundEntry_2_list{list: &x.Balance}) + if !f(fd_UserInsuranceFundEntry_balance, value) { return } } @@ -1745,17 +1796,17 @@ func (x *fastReflection_UserInsuranceFundState) Range(f func(protoreflect.FieldD // 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_UserInsuranceFundState) Has(fd protoreflect.FieldDescriptor) bool { +func (x *fastReflection_UserInsuranceFundEntry) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": return x.UserAddress != "" - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - return x.InsuranceFund != nil + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + return len(x.Balance) != 0 default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry does not contain field %s", fd.FullName())) } } @@ -1765,17 +1816,17 @@ func (x *fastReflection_UserInsuranceFundState) Has(fd protoreflect.FieldDescrip // associated with the given field number. // // Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserInsuranceFundState) Clear(fd protoreflect.FieldDescriptor) { +func (x *fastReflection_UserInsuranceFundEntry) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": x.UserAddress = "" - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - x.InsuranceFund = nil + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + x.Balance = nil default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry does not contain field %s", fd.FullName())) } } @@ -1785,19 +1836,22 @@ func (x *fastReflection_UserInsuranceFundState) Clear(fd protoreflect.FieldDescr // 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_UserInsuranceFundState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_UserInsuranceFundEntry) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": value := x.UserAddress return protoreflect.ValueOfString(value) - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - value := x.InsuranceFund - return protoreflect.ValueOfMessage(value.ProtoReflect()) + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + if len(x.Balance) == 0 { + return protoreflect.ValueOfList(&_UserInsuranceFundEntry_2_list{}) + } + listValue := &_UserInsuranceFundEntry_2_list{list: &x.Balance} + return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", descriptor.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry does not contain field %s", descriptor.FullName())) } } @@ -1811,17 +1865,19 @@ func (x *fastReflection_UserInsuranceFundState) Get(descriptor protoreflect.Fiel // empty, read-only value, then it panics. // // Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserInsuranceFundState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { +func (x *fastReflection_UserInsuranceFundEntry) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": x.UserAddress = value.Interface().(string) - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - x.InsuranceFund = value.Message().Interface().(*UserInsuranceFund) + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + lv := value.List() + clv := lv.(*_UserInsuranceFundEntry_2_list) + x.Balance = *clv.list default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry does not contain field %s", fd.FullName())) } } @@ -1835,48 +1891,49 @@ func (x *fastReflection_UserInsuranceFundState) Set(fd protoreflect.FieldDescrip // It panics if the field does not contain a composite type. // // Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserInsuranceFundState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_UserInsuranceFundEntry) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - if x.InsuranceFund == nil { - x.InsuranceFund = new(UserInsuranceFund) + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + if x.Balance == nil { + x.Balance = []*v1beta1.Coin{} } - return protoreflect.ValueOfMessage(x.InsuranceFund.ProtoReflect()) - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": - panic(fmt.Errorf("field user_address of message milkyway.liquidvesting.v1.UserInsuranceFundState is not mutable")) + value := &_UserInsuranceFundEntry_2_list{list: &x.Balance} + return protoreflect.ValueOfList(value) + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": + panic(fmt.Errorf("field user_address of message milkyway.liquidvesting.v1.UserInsuranceFundEntry is not mutable")) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry 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_UserInsuranceFundState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { +func (x *fastReflection_UserInsuranceFundEntry) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "milkyway.liquidvesting.v1.UserInsuranceFundState.user_address": + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.user_address": return protoreflect.ValueOfString("") - case "milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund": - m := new(UserInsuranceFund) - return protoreflect.ValueOfMessage(m.ProtoReflect()) + case "milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance": + list := []*v1beta1.Coin{} + return protoreflect.ValueOfList(&_UserInsuranceFundEntry_2_list{list: &list}) default: if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundState")) + panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.liquidvesting.v1.UserInsuranceFundEntry")) } - panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundState does not contain field %s", fd.FullName())) + panic(fmt.Errorf("message milkyway.liquidvesting.v1.UserInsuranceFundEntry 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_UserInsuranceFundState) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { +func (x *fastReflection_UserInsuranceFundEntry) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { switch d.FullName() { default: - panic(fmt.Errorf("%s is not a oneof field in milkyway.liquidvesting.v1.UserInsuranceFundState", d.FullName())) + panic(fmt.Errorf("%s is not a oneof field in milkyway.liquidvesting.v1.UserInsuranceFundEntry", d.FullName())) } panic("unreachable") } @@ -1884,7 +1941,7 @@ func (x *fastReflection_UserInsuranceFundState) WhichOneof(d protoreflect.OneofD // 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_UserInsuranceFundState) GetUnknown() protoreflect.RawFields { +func (x *fastReflection_UserInsuranceFundEntry) GetUnknown() protoreflect.RawFields { return x.unknownFields } @@ -1895,7 +1952,7 @@ func (x *fastReflection_UserInsuranceFundState) GetUnknown() protoreflect.RawFie // An empty RawFields may be passed to clear the fields. // // SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_UserInsuranceFundState) SetUnknown(fields protoreflect.RawFields) { +func (x *fastReflection_UserInsuranceFundEntry) SetUnknown(fields protoreflect.RawFields) { x.unknownFields = fields } @@ -1907,7 +1964,7 @@ func (x *fastReflection_UserInsuranceFundState) SetUnknown(fields protoreflect.R // 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_UserInsuranceFundState) IsValid() bool { +func (x *fastReflection_UserInsuranceFundEntry) IsValid() bool { return x != nil } @@ -1917,9 +1974,9 @@ func (x *fastReflection_UserInsuranceFundState) IsValid() bool { // The returned methods type is identical to // "google.golang.org/protobuf/runtime/protoiface".Methods. // Consult the protoiface package documentation for details. -func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Methods { +func (x *fastReflection_UserInsuranceFundEntry) ProtoMethods() *protoiface.Methods { size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*UserInsuranceFundState) + x := input.Message.Interface().(*UserInsuranceFundEntry) if x == nil { return protoiface.SizeOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1935,9 +1992,11 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho if l > 0 { n += 1 + l + runtime.Sov(uint64(l)) } - if x.InsuranceFund != nil { - l = options.Size(x.InsuranceFund) - n += 1 + l + runtime.Sov(uint64(l)) + if len(x.Balance) > 0 { + for _, e := range x.Balance { + l = options.Size(e) + n += 1 + l + runtime.Sov(uint64(l)) + } } if x.unknownFields != nil { n += len(x.unknownFields) @@ -1949,7 +2008,7 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho } marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*UserInsuranceFundState) + x := input.Message.Interface().(*UserInsuranceFundEntry) if x == nil { return protoiface.MarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -1968,19 +2027,21 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho i -= len(x.unknownFields) copy(dAtA[i:], x.unknownFields) } - if x.InsuranceFund != nil { - encoded, err := options.Marshal(x.InsuranceFund) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err + if len(x.Balance) > 0 { + for iNdEx := len(x.Balance) - 1; iNdEx >= 0; iNdEx-- { + encoded, err := options.Marshal(x.Balance[iNdEx]) + 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 } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 } if len(x.UserAddress) > 0 { i -= len(x.UserAddress) @@ -2000,7 +2061,7 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho }, nil } unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*UserInsuranceFundState) + x := input.Message.Interface().(*UserInsuranceFundEntry) if x == nil { return protoiface.UnmarshalOutput{ NoUnkeyedLiterals: input.NoUnkeyedLiterals, @@ -2032,10 +2093,10 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho fieldNum := int32(wire >> 3) wireType := int(wire & 0x7) if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserInsuranceFundState: wiretype end group for non-group") + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserInsuranceFundEntry: wiretype end group for non-group") } if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserInsuranceFundState: illegal tag %d (wire type %d)", fieldNum, wire) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: UserInsuranceFundEntry: illegal tag %d (wire type %d)", fieldNum, wire) } switch fieldNum { case 1: @@ -2072,7 +2133,7 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho iNdEx = postIndex case 2: if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field InsuranceFund", wireType) + return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Balance", wireType) } var msglen int for shift := uint(0); ; shift += 7 { @@ -2099,10 +2160,8 @@ func (x *fastReflection_UserInsuranceFundState) ProtoMethods() *protoiface.Metho if postIndex > l { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF } - if x.InsuranceFund == nil { - x.InsuranceFund = &UserInsuranceFund{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.InsuranceFund); err != nil { + x.Balance = append(x.Balance, &v1beta1.Coin{}) + if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Balance[len(x.Balance)-1]); err != nil { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err } iNdEx = postIndex @@ -2283,20 +2342,21 @@ func (x *BurnCoinsList) GetData() []*BurnCoins { return nil } -// UserInsuranceFundState represents a user's insurance fund. -type UserInsuranceFundState struct { +// UserInsuranceFundEntry represents an entry containing the data of a user +// insurance fund. +type UserInsuranceFundEntry struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields // Address of who owns the insurance fund. UserAddress string `protobuf:"bytes,1,opt,name=user_address,json=userAddress,proto3" json:"user_address,omitempty"` - // InsuranceFund represents the user's insurance fund. - InsuranceFund *UserInsuranceFund `protobuf:"bytes,2,opt,name=insurance_fund,json=insuranceFund,proto3" json:"insurance_fund,omitempty"` + // Amount of coins deposited into the user's insurance fund. + Balance []*v1beta1.Coin `protobuf:"bytes,2,rep,name=balance,proto3" json:"balance,omitempty"` } -func (x *UserInsuranceFundState) Reset() { - *x = UserInsuranceFundState{} +func (x *UserInsuranceFundEntry) Reset() { + *x = UserInsuranceFundEntry{} if protoimpl.UnsafeEnabled { mi := &file_milkyway_liquidvesting_v1_models_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -2304,27 +2364,27 @@ func (x *UserInsuranceFundState) Reset() { } } -func (x *UserInsuranceFundState) String() string { +func (x *UserInsuranceFundEntry) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UserInsuranceFundState) ProtoMessage() {} +func (*UserInsuranceFundEntry) ProtoMessage() {} -// Deprecated: Use UserInsuranceFundState.ProtoReflect.Descriptor instead. -func (*UserInsuranceFundState) Descriptor() ([]byte, []int) { +// Deprecated: Use UserInsuranceFundEntry.ProtoReflect.Descriptor instead. +func (*UserInsuranceFundEntry) Descriptor() ([]byte, []int) { return file_milkyway_liquidvesting_v1_models_proto_rawDescGZIP(), []int{3} } -func (x *UserInsuranceFundState) GetUserAddress() string { +func (x *UserInsuranceFundEntry) GetUserAddress() string { if x != nil { return x.UserAddress } return "" } -func (x *UserInsuranceFundState) GetInsuranceFund() *UserInsuranceFund { +func (x *UserInsuranceFundEntry) GetBalance() []*v1beta1.Coin { if x != nil { - return x.InsuranceFund + return x.Balance } return nil } @@ -2375,35 +2435,35 @@ var file_milkyway_liquidvesting_v1_models_proto_rawDesc = []byte{ 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x72, 0x6e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x04, 0x64, 0x61, - 0x74, 0x61, 0x22, 0xb0, 0x01, 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x75, 0x72, - 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x3b, 0x0a, + 0x74, 0x61, 0x22, 0xbc, 0x01, 0x0a, 0x16, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x75, 0x72, + 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x3b, 0x0a, 0x0c, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x0b, 0x75, - 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x59, 0x0a, 0x0e, 0x69, 0x6e, - 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x66, 0x75, 0x6e, 0x64, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x6c, 0x69, - 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x55, - 0x73, 0x65, 0x72, 0x49, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x46, 0x75, 0x6e, 0x64, - 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x0d, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, - 0x65, 0x46, 0x75, 0x6e, 0x64, 0x42, 0x83, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, - 0x74, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, - 0x73, 0x74, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4c, 0x58, 0xaa, 0x02, 0x19, - 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, - 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x5c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, - 0x6e, 0x67, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x25, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, + 0x73, 0x65, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x65, 0x0a, 0x07, 0x62, 0x61, + 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, + 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, + 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, + 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, + 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x07, 0x62, 0x61, 0x6c, 0x61, 0x6e, 0x63, + 0x65, 0x42, 0x83, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, + 0x61, 0x79, 0x2e, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, + 0x50, 0x01, 0x5a, 0x4f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, + 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, + 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, + 0x61, 0x79, 0x2f, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, + 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, + 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x4c, 0x58, 0xaa, 0x02, 0x19, 0x4d, 0x69, 0x6c, 0x6b, + 0x79, 0x77, 0x61, 0x79, 0x2e, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, + 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x19, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, - 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, - 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, - 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, + 0x31, 0xe2, 0x02, 0x25, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x4c, 0x69, 0x71, + 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, + 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x4d, 0x69, 0x6c, 0x6b, + 0x79, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x4c, 0x69, 0x71, 0x75, 0x69, 0x64, 0x76, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2423,7 +2483,7 @@ var file_milkyway_liquidvesting_v1_models_proto_goTypes = []interface{}{ (*UserInsuranceFund)(nil), // 0: milkyway.liquidvesting.v1.UserInsuranceFund (*BurnCoins)(nil), // 1: milkyway.liquidvesting.v1.BurnCoins (*BurnCoinsList)(nil), // 2: milkyway.liquidvesting.v1.BurnCoinsList - (*UserInsuranceFundState)(nil), // 3: milkyway.liquidvesting.v1.UserInsuranceFundState + (*UserInsuranceFundEntry)(nil), // 3: milkyway.liquidvesting.v1.UserInsuranceFundEntry (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp } @@ -2432,7 +2492,7 @@ var file_milkyway_liquidvesting_v1_models_proto_depIdxs = []int32{ 5, // 1: milkyway.liquidvesting.v1.BurnCoins.completion_time:type_name -> google.protobuf.Timestamp 4, // 2: milkyway.liquidvesting.v1.BurnCoins.amount:type_name -> cosmos.base.v1beta1.Coin 1, // 3: milkyway.liquidvesting.v1.BurnCoinsList.data:type_name -> milkyway.liquidvesting.v1.BurnCoins - 0, // 4: milkyway.liquidvesting.v1.UserInsuranceFundState.insurance_fund:type_name -> milkyway.liquidvesting.v1.UserInsuranceFund + 4, // 4: milkyway.liquidvesting.v1.UserInsuranceFundEntry.balance:type_name -> cosmos.base.v1beta1.Coin 5, // [5:5] is the sub-list for method output_type 5, // [5:5] is the sub-list for method input_type 5, // [5:5] is the sub-list for extension type_name @@ -2483,7 +2543,7 @@ func file_milkyway_liquidvesting_v1_models_proto_init() { } } file_milkyway_liquidvesting_v1_models_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UserInsuranceFundState); i { + switch v := v.(*UserInsuranceFundEntry); i { case 0: return &v.state case 1: diff --git a/api/milkyway/operators/v1/models.pulsar.go b/api/milkyway/operators/v1/models.pulsar.go index 8ecc64ca9..c65911dd0 100644 --- a/api/milkyway/operators/v1/models.pulsar.go +++ b/api/milkyway/operators/v1/models.pulsar.go @@ -1502,7 +1502,7 @@ type OperatorStatus int32 const ( // OPERATOR_STATUS_UNSPECIFIED defines an unspecified status OperatorStatus_OPERATOR_STATUS_UNSPECIFIED OperatorStatus = 0 - // OPERATOR_STATUS_ACTIVE identifies an active validator which is providing + // OPERATOR_STATUS_ACTIVE identifies an active operator which is providing // services OperatorStatus_OPERATOR_STATUS_ACTIVE OperatorStatus = 1 // OPERATOR_STATUS_INACTIVATING identifies an operator that is in the process diff --git a/api/milkyway/pools/v1/genesis.pulsar.go b/api/milkyway/pools/v1/genesis.pulsar.go index 9d1b41f40..681d1eca3 100644 --- a/api/milkyway/pools/v1/genesis.pulsar.go +++ b/api/milkyway/pools/v1/genesis.pulsar.go @@ -13,60 +13,59 @@ import ( sync "sync" ) -var _ protoreflect.List = (*_GenesisState_3_list)(nil) +var _ protoreflect.List = (*_GenesisState_2_list)(nil) -type _GenesisState_3_list struct { +type _GenesisState_2_list struct { list *[]*Pool } -func (x *_GenesisState_3_list) Len() int { +func (x *_GenesisState_2_list) Len() int { if x.list == nil { return 0 } return len(*x.list) } -func (x *_GenesisState_3_list) Get(i int) protoreflect.Value { +func (x *_GenesisState_2_list) Get(i int) protoreflect.Value { return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) } -func (x *_GenesisState_3_list) Set(i int, value protoreflect.Value) { +func (x *_GenesisState_2_list) Set(i int, value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Pool) (*x.list)[i] = concreteValue } -func (x *_GenesisState_3_list) Append(value protoreflect.Value) { +func (x *_GenesisState_2_list) Append(value protoreflect.Value) { valueUnwrapped := value.Message() concreteValue := valueUnwrapped.Interface().(*Pool) *x.list = append(*x.list, concreteValue) } -func (x *_GenesisState_3_list) AppendMutable() protoreflect.Value { +func (x *_GenesisState_2_list) AppendMutable() protoreflect.Value { v := new(Pool) *x.list = append(*x.list, v) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_3_list) Truncate(n int) { +func (x *_GenesisState_2_list) Truncate(n int) { for i := n; i < len(*x.list); i++ { (*x.list)[i] = nil } *x.list = (*x.list)[:n] } -func (x *_GenesisState_3_list) NewElement() protoreflect.Value { +func (x *_GenesisState_2_list) NewElement() protoreflect.Value { v := new(Pool) return protoreflect.ValueOfMessage(v.ProtoReflect()) } -func (x *_GenesisState_3_list) IsValid() bool { +func (x *_GenesisState_2_list) IsValid() bool { return x.list != nil } var ( md_GenesisState protoreflect.MessageDescriptor - fd_GenesisState_params protoreflect.FieldDescriptor fd_GenesisState_next_pool_id protoreflect.FieldDescriptor fd_GenesisState_pools protoreflect.FieldDescriptor ) @@ -74,7 +73,6 @@ var ( func init() { file_milkyway_pools_v1_genesis_proto_init() md_GenesisState = File_milkyway_pools_v1_genesis_proto.Messages().ByName("GenesisState") - fd_GenesisState_params = md_GenesisState.Fields().ByName("params") fd_GenesisState_next_pool_id = md_GenesisState.Fields().ByName("next_pool_id") fd_GenesisState_pools = md_GenesisState.Fields().ByName("pools") } @@ -144,12 +142,6 @@ func (x *fastReflection_GenesisState) Interface() protoreflect.ProtoMessage { // While iterating, mutating operations may only be performed // on the current field descriptor. func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Params != nil { - value := protoreflect.ValueOfMessage(x.Params.ProtoReflect()) - if !f(fd_GenesisState_params, value) { - return - } - } if x.NextPoolId != uint32(0) { value := protoreflect.ValueOfUint32(x.NextPoolId) if !f(fd_GenesisState_next_pool_id, value) { @@ -157,7 +149,7 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, } } if len(x.Pools) != 0 { - value := protoreflect.ValueOfList(&_GenesisState_3_list{list: &x.Pools}) + value := protoreflect.ValueOfList(&_GenesisState_2_list{list: &x.Pools}) if !f(fd_GenesisState_pools, value) { return } @@ -177,8 +169,6 @@ func (x *fastReflection_GenesisState) Range(f func(protoreflect.FieldDescriptor, // a repeated field is populated if it is non-empty. func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool { switch fd.FullName() { - case "milkyway.pools.v1.GenesisState.params": - return x.Params != nil case "milkyway.pools.v1.GenesisState.next_pool_id": return x.NextPoolId != uint32(0) case "milkyway.pools.v1.GenesisState.pools": @@ -199,8 +189,6 @@ func (x *fastReflection_GenesisState) Has(fd protoreflect.FieldDescriptor) bool // Clear is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { switch fd.FullName() { - case "milkyway.pools.v1.GenesisState.params": - x.Params = nil case "milkyway.pools.v1.GenesisState.next_pool_id": x.NextPoolId = uint32(0) case "milkyway.pools.v1.GenesisState.pools": @@ -221,17 +209,14 @@ func (x *fastReflection_GenesisState) Clear(fd protoreflect.FieldDescriptor) { // of the value; to obtain a mutable reference, use Mutable. func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { switch descriptor.FullName() { - case "milkyway.pools.v1.GenesisState.params": - value := x.Params - return protoreflect.ValueOfMessage(value.ProtoReflect()) case "milkyway.pools.v1.GenesisState.next_pool_id": value := x.NextPoolId return protoreflect.ValueOfUint32(value) case "milkyway.pools.v1.GenesisState.pools": if len(x.Pools) == 0 { - return protoreflect.ValueOfList(&_GenesisState_3_list{}) + return protoreflect.ValueOfList(&_GenesisState_2_list{}) } - listValue := &_GenesisState_3_list{list: &x.Pools} + listValue := &_GenesisState_2_list{list: &x.Pools} return protoreflect.ValueOfList(listValue) default: if descriptor.IsExtension() { @@ -253,13 +238,11 @@ func (x *fastReflection_GenesisState) Get(descriptor protoreflect.FieldDescripto // Set is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { switch fd.FullName() { - case "milkyway.pools.v1.GenesisState.params": - x.Params = value.Message().Interface().(*Params) case "milkyway.pools.v1.GenesisState.next_pool_id": x.NextPoolId = uint32(value.Uint()) case "milkyway.pools.v1.GenesisState.pools": lv := value.List() - clv := lv.(*_GenesisState_3_list) + clv := lv.(*_GenesisState_2_list) x.Pools = *clv.list default: if fd.IsExtension() { @@ -281,16 +264,11 @@ func (x *fastReflection_GenesisState) Set(fd protoreflect.FieldDescriptor, value // Mutable is a mutating operation and unsafe for concurrent use. func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "milkyway.pools.v1.GenesisState.params": - if x.Params == nil { - x.Params = new(Params) - } - return protoreflect.ValueOfMessage(x.Params.ProtoReflect()) case "milkyway.pools.v1.GenesisState.pools": if x.Pools == nil { x.Pools = []*Pool{} } - value := &_GenesisState_3_list{list: &x.Pools} + value := &_GenesisState_2_list{list: &x.Pools} return protoreflect.ValueOfList(value) case "milkyway.pools.v1.GenesisState.next_pool_id": panic(fmt.Errorf("field next_pool_id of message milkyway.pools.v1.GenesisState is not mutable")) @@ -307,14 +285,11 @@ func (x *fastReflection_GenesisState) Mutable(fd protoreflect.FieldDescriptor) p // For lists, maps, and messages, this returns a new, empty, mutable value. func (x *fastReflection_GenesisState) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { switch fd.FullName() { - case "milkyway.pools.v1.GenesisState.params": - m := new(Params) - return protoreflect.ValueOfMessage(m.ProtoReflect()) case "milkyway.pools.v1.GenesisState.next_pool_id": return protoreflect.ValueOfUint32(uint32(0)) case "milkyway.pools.v1.GenesisState.pools": list := []*Pool{} - return protoreflect.ValueOfList(&_GenesisState_3_list{list: &list}) + return protoreflect.ValueOfList(&_GenesisState_2_list{list: &list}) default: if fd.IsExtension() { panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.GenesisState")) @@ -384,10 +359,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { var n int var l int _ = l - if x.Params != nil { - l = options.Size(x.Params) - n += 1 + l + runtime.Sov(uint64(l)) - } if x.NextPoolId != 0 { n += 1 + runtime.Sov(uint64(x.NextPoolId)) } @@ -439,27 +410,13 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { copy(dAtA[i:], encoded) i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) i-- - dAtA[i] = 0x1a + dAtA[i] = 0x12 } } if x.NextPoolId != 0 { i = runtime.EncodeVarint(dAtA, i, uint64(x.NextPoolId)) i-- - dAtA[i] = 0x10 - } - if x.Params != nil { - encoded, err := options.Marshal(x.Params) - 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 + dAtA[i] = 0x8 } if input.Buf != nil { input.Buf = append(input.Buf, dAtA...) @@ -511,42 +468,6 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { } switch fieldNum { case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Params", 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.Params == nil { - x.Params = &Params{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Params); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field NextPoolId", wireType) } @@ -565,7 +486,7 @@ func (x *fastReflection_GenesisState) ProtoMethods() *protoiface.Methods { break } } - case 3: + case 2: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Pools", wireType) } @@ -653,12 +574,10 @@ type GenesisState struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // Params defines the parameters of the module. - Params *Params `protobuf:"bytes,1,opt,name=params,proto3" json:"params,omitempty"` // NextPoolID represents the id to be used when creating the next pool. - NextPoolId uint32 `protobuf:"varint,2,opt,name=next_pool_id,json=nextPoolId,proto3" json:"next_pool_id,omitempty"` + NextPoolId uint32 `protobuf:"varint,1,opt,name=next_pool_id,json=nextPoolId,proto3" json:"next_pool_id,omitempty"` // Pools defines the list of pools. - Pools []*Pool `protobuf:"bytes,3,rep,name=pools,proto3" json:"pools,omitempty"` + Pools []*Pool `protobuf:"bytes,2,rep,name=pools,proto3" json:"pools,omitempty"` } func (x *GenesisState) Reset() { @@ -681,13 +600,6 @@ func (*GenesisState) Descriptor() ([]byte, []int) { return file_milkyway_pools_v1_genesis_proto_rawDescGZIP(), []int{0} } -func (x *GenesisState) GetParams() *Params { - if x != nil { - return x.Params - } - return nil -} - func (x *GenesisState) GetNextPoolId() uint32 { if x != nil { return x.NextPoolId @@ -711,36 +623,30 @@ var file_milkyway_pools_v1_genesis_proto_rawDesc = []byte{ 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x6f, - 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd5, 0x01, 0x0a, 0x0c, 0x47, - 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x37, 0x0a, 0x06, 0x70, - 0x61, 0x72, 0x61, 0x6d, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, - 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x42, 0x04, 0xc8, 0xde, 0x1f, 0x00, 0x52, 0x06, 0x70, 0x61, - 0x72, 0x61, 0x6d, 0x73, 0x12, 0x47, 0x0a, 0x0c, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6f, - 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x42, 0x25, 0xe2, 0xde, 0x1f, 0x0a, - 0x4e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x44, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, - 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, - 0x22, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x43, 0x0a, - 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, - 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x76, 0x31, - 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x14, 0xc8, 0xde, 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0c, 0x79, - 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x22, 0x52, 0x05, 0x70, 0x6f, 0x6f, - 0x6c, 0x73, 0x42, 0xcc, 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, - 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, - 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, - 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, - 0x4d, 0x50, 0x58, 0xaa, 0x02, 0x11, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x50, - 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x5c, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x5c, 0x56, 0x31, 0x5c, - 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x3a, 0x3a, 0x56, - 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x65, 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9c, 0x01, 0x0a, 0x0c, 0x47, + 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x47, 0x0a, 0x0c, 0x6e, + 0x65, 0x78, 0x74, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0d, 0x42, 0x25, 0xe2, 0xde, 0x1f, 0x0a, 0x4e, 0x65, 0x78, 0x74, 0x50, 0x6f, 0x6f, 0x6c, 0x49, + 0x44, 0xf2, 0xde, 0x1f, 0x13, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x6e, 0x65, 0x78, 0x74, 0x5f, + 0x70, 0x6f, 0x6f, 0x6c, 0x5f, 0x69, 0x64, 0x22, 0x52, 0x0a, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x6f, + 0x6f, 0x6c, 0x49, 0x64, 0x12, 0x43, 0x0a, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, + 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x42, 0x14, 0xc8, 0xde, + 0x1f, 0x00, 0xf2, 0xde, 0x1f, 0x0c, 0x79, 0x61, 0x6d, 0x6c, 0x3a, 0x22, 0x70, 0x6f, 0x6f, 0x6c, + 0x73, 0x22, 0x52, 0x05, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x42, 0xcc, 0x01, 0x0a, 0x15, 0x63, 0x6f, + 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6f, 0x6f, 0x6c, 0x73, + 0x2e, 0x76, 0x31, 0x42, 0x0c, 0x47, 0x65, 0x6e, 0x65, 0x73, 0x69, 0x73, 0x50, 0x72, 0x6f, 0x74, + 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, + 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, + 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x70, 0x6f, 0x6f, + 0x6c, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x50, 0x58, 0xaa, 0x02, 0x11, 0x4d, 0x69, 0x6c, + 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, + 0x11, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x5c, + 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x50, 0x6f, + 0x6f, 0x6c, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, + 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x50, + 0x6f, 0x6f, 0x6c, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -758,17 +664,15 @@ func file_milkyway_pools_v1_genesis_proto_rawDescGZIP() []byte { var file_milkyway_pools_v1_genesis_proto_msgTypes = make([]protoimpl.MessageInfo, 1) var file_milkyway_pools_v1_genesis_proto_goTypes = []interface{}{ (*GenesisState)(nil), // 0: milkyway.pools.v1.GenesisState - (*Params)(nil), // 1: milkyway.pools.v1.Params - (*Pool)(nil), // 2: milkyway.pools.v1.Pool + (*Pool)(nil), // 1: milkyway.pools.v1.Pool } var file_milkyway_pools_v1_genesis_proto_depIdxs = []int32{ - 1, // 0: milkyway.pools.v1.GenesisState.params:type_name -> milkyway.pools.v1.Params - 2, // 1: milkyway.pools.v1.GenesisState.pools:type_name -> milkyway.pools.v1.Pool - 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 + 1, // 0: milkyway.pools.v1.GenesisState.pools:type_name -> milkyway.pools.v1.Pool + 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 } func init() { file_milkyway_pools_v1_genesis_proto_init() } @@ -777,7 +681,6 @@ func file_milkyway_pools_v1_genesis_proto_init() { return } file_milkyway_pools_v1_models_proto_init() - file_milkyway_pools_v1_params_proto_init() if !protoimpl.UnsafeEnabled { file_milkyway_pools_v1_genesis_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*GenesisState); i { diff --git a/api/milkyway/pools/v1/params.pulsar.go b/api/milkyway/pools/v1/params.pulsar.go deleted file mode 100644 index a87187946..000000000 --- a/api/milkyway/pools/v1/params.pulsar.go +++ /dev/null @@ -1,693 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package poolsv1 - -import ( - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Params_1_list)(nil) - -type _Params_1_list struct { - list *[]uint32 -} - -func (x *_Params_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_Params_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_Params_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_1_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field AllowedServicesIds as it is not of Message kind")) -} - -func (x *_Params_1_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Params_1_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_Params_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Params protoreflect.MessageDescriptor - fd_Params_allowed_services_ids protoreflect.FieldDescriptor -) - -func init() { - file_milkyway_pools_v1_params_proto_init() - md_Params = File_milkyway_pools_v1_params_proto.Messages().ByName("Params") - fd_Params_allowed_services_ids = md_Params.Fields().ByName("allowed_services_ids") -} - -var _ protoreflect.Message = (*fastReflection_Params)(nil) - -type fastReflection_Params Params - -func (x *Params) ProtoReflect() protoreflect.Message { - return (*fastReflection_Params)(x) -} - -func (x *Params) slowProtoReflect() protoreflect.Message { - mi := &file_milkyway_pools_v1_params_proto_msgTypes[0] - 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_Params_messageType fastReflection_Params_messageType -var _ protoreflect.MessageType = fastReflection_Params_messageType{} - -type fastReflection_Params_messageType struct{} - -func (x fastReflection_Params_messageType) Zero() protoreflect.Message { - return (*fastReflection_Params)(nil) -} -func (x fastReflection_Params_messageType) New() protoreflect.Message { - return new(fastReflection_Params) -} -func (x fastReflection_Params_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Params) Descriptor() protoreflect.MessageDescriptor { - return md_Params -} - -// 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_Params) Type() protoreflect.MessageType { - return _fastReflection_Params_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Params) New() protoreflect.Message { - return new(fastReflection_Params) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Params) Interface() protoreflect.ProtoMessage { - return (*Params)(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_Params) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.AllowedServicesIds) != 0 { - value := protoreflect.ValueOfList(&_Params_1_list{list: &x.AllowedServicesIds}) - if !f(fd_Params_allowed_services_ids, 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_Params) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - return len(x.AllowedServicesIds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - x.AllowedServicesIds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - if len(x.AllowedServicesIds) == 0 { - return protoreflect.ValueOfList(&_Params_1_list{}) - } - listValue := &_Params_1_list{list: &x.AllowedServicesIds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - lv := value.List() - clv := lv.(*_Params_1_list) - x.AllowedServicesIds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - if x.AllowedServicesIds == nil { - x.AllowedServicesIds = []uint32{} - } - value := &_Params_1_list{list: &x.AllowedServicesIds} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.pools.v1.Params.allowed_services_ids": - list := []uint32{} - return protoreflect.ValueOfList(&_Params_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.pools.v1.Params")) - } - panic(fmt.Errorf("message milkyway.pools.v1.Params 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_Params) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in milkyway.pools.v1.Params", 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_Params) 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_Params) 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_Params) 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_Params) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Params) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.AllowedServicesIds) > 0 { - l = 0 - for _, e := range x.AllowedServicesIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + 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().(*Params) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AllowedServicesIds) > 0 { - var pksize2 int - for _, num := range x.AllowedServicesIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.AllowedServicesIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - 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().(*Params) - 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: Params: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Params: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType == 0 { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.AllowedServicesIds = append(x.AllowedServicesIds, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.AllowedServicesIds) == 0 { - x.AllowedServicesIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.AllowedServicesIds = append(x.AllowedServicesIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedServicesIds", wireType) - } - 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 -// protoc (unknown) -// source: milkyway/pools/v1/params.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Params defines the parameters for the pools module. -type Params struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // AllowedServicesIDs defines the list of service IDs that the module allows - // to join by pools. - AllowedServicesIds []uint32 `protobuf:"varint,1,rep,packed,name=allowed_services_ids,json=allowedServicesIds,proto3" json:"allowed_services_ids,omitempty"` -} - -func (x *Params) Reset() { - *x = Params{} - if protoimpl.UnsafeEnabled { - mi := &file_milkyway_pools_v1_params_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Params) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Params) ProtoMessage() {} - -// Deprecated: Use Params.ProtoReflect.Descriptor instead. -func (*Params) Descriptor() ([]byte, []int) { - return file_milkyway_pools_v1_params_proto_rawDescGZIP(), []int{0} -} - -func (x *Params) GetAllowedServicesIds() []uint32 { - if x != nil { - return x.AllowedServicesIds - } - return nil -} - -var File_milkyway_pools_v1_params_proto protoreflect.FileDescriptor - -var file_milkyway_pools_v1_params_proto_rawDesc = []byte{ - 0x0a, 0x1e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, - 0x2f, 0x76, 0x31, 0x2f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x12, 0x11, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, 0x6f, 0x6f, 0x6c, 0x73, - 0x2e, 0x76, 0x31, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x52, 0x0a, 0x06, 0x50, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x12, 0x48, 0x0a, 0x14, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x73, - 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, - 0x0d, 0x42, 0x16, 0xe2, 0xde, 0x1f, 0x12, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x53, 0x65, - 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x49, 0x44, 0x73, 0x52, 0x12, 0x61, 0x6c, 0x6c, 0x6f, 0x77, - 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x49, 0x64, 0x73, 0x42, 0xcb, 0x01, - 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x70, - 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, - 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, - 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x2f, 0x76, 0x31, 0x3b, - 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x4d, 0x50, 0x58, 0xaa, 0x02, 0x11, - 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2e, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x56, - 0x31, 0xca, 0x02, 0x11, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x50, 0x6f, 0x6f, - 0x6c, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x5c, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, - 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x13, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, - 0x3a, 0x3a, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x33, -} - -var ( - file_milkyway_pools_v1_params_proto_rawDescOnce sync.Once - file_milkyway_pools_v1_params_proto_rawDescData = file_milkyway_pools_v1_params_proto_rawDesc -) - -func file_milkyway_pools_v1_params_proto_rawDescGZIP() []byte { - file_milkyway_pools_v1_params_proto_rawDescOnce.Do(func() { - file_milkyway_pools_v1_params_proto_rawDescData = protoimpl.X.CompressGZIP(file_milkyway_pools_v1_params_proto_rawDescData) - }) - return file_milkyway_pools_v1_params_proto_rawDescData -} - -var file_milkyway_pools_v1_params_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_milkyway_pools_v1_params_proto_goTypes = []interface{}{ - (*Params)(nil), // 0: milkyway.pools.v1.Params -} -var file_milkyway_pools_v1_params_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_milkyway_pools_v1_params_proto_init() } -func file_milkyway_pools_v1_params_proto_init() { - if File_milkyway_pools_v1_params_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_milkyway_pools_v1_params_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Params); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_milkyway_pools_v1_params_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_milkyway_pools_v1_params_proto_goTypes, - DependencyIndexes: file_milkyway_pools_v1_params_proto_depIdxs, - MessageInfos: file_milkyway_pools_v1_params_proto_msgTypes, - }.Build() - File_milkyway_pools_v1_params_proto = out.File - file_milkyway_pools_v1_params_proto_rawDesc = nil - file_milkyway_pools_v1_params_proto_goTypes = nil - file_milkyway_pools_v1_params_proto_depIdxs = nil -} diff --git a/api/milkyway/restaking/legacy/models.pulsar.go b/api/milkyway/restaking/legacy/models.pulsar.go deleted file mode 100644 index 01bd1ecf0..000000000 --- a/api/milkyway/restaking/legacy/models.pulsar.go +++ /dev/null @@ -1,1656 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package legacy - -import ( - _ "cosmossdk.io/api/amino" - _ "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - _ "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_LegacyOperatorParams_2_list)(nil) - -type _LegacyOperatorParams_2_list struct { - list *[]uint32 -} - -func (x *_LegacyOperatorParams_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyOperatorParams_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_LegacyOperatorParams_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_LegacyOperatorParams_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyOperatorParams_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message LegacyOperatorParams at list field JoinedServicesIds as it is not of Message kind")) -} - -func (x *_LegacyOperatorParams_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_LegacyOperatorParams_2_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_LegacyOperatorParams_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LegacyOperatorParams protoreflect.MessageDescriptor - fd_LegacyOperatorParams_commission_rate protoreflect.FieldDescriptor - fd_LegacyOperatorParams_joined_services_ids protoreflect.FieldDescriptor -) - -func init() { - file_milkyway_restaking_legacy_models_proto_init() - md_LegacyOperatorParams = File_milkyway_restaking_legacy_models_proto.Messages().ByName("LegacyOperatorParams") - fd_LegacyOperatorParams_commission_rate = md_LegacyOperatorParams.Fields().ByName("commission_rate") - fd_LegacyOperatorParams_joined_services_ids = md_LegacyOperatorParams.Fields().ByName("joined_services_ids") -} - -var _ protoreflect.Message = (*fastReflection_LegacyOperatorParams)(nil) - -type fastReflection_LegacyOperatorParams LegacyOperatorParams - -func (x *LegacyOperatorParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_LegacyOperatorParams)(x) -} - -func (x *LegacyOperatorParams) slowProtoReflect() protoreflect.Message { - mi := &file_milkyway_restaking_legacy_models_proto_msgTypes[0] - 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_LegacyOperatorParams_messageType fastReflection_LegacyOperatorParams_messageType -var _ protoreflect.MessageType = fastReflection_LegacyOperatorParams_messageType{} - -type fastReflection_LegacyOperatorParams_messageType struct{} - -func (x fastReflection_LegacyOperatorParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_LegacyOperatorParams)(nil) -} -func (x fastReflection_LegacyOperatorParams_messageType) New() protoreflect.Message { - return new(fastReflection_LegacyOperatorParams) -} -func (x fastReflection_LegacyOperatorParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyOperatorParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LegacyOperatorParams) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyOperatorParams -} - -// 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_LegacyOperatorParams) Type() protoreflect.MessageType { - return _fastReflection_LegacyOperatorParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LegacyOperatorParams) New() protoreflect.Message { - return new(fastReflection_LegacyOperatorParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LegacyOperatorParams) Interface() protoreflect.ProtoMessage { - return (*LegacyOperatorParams)(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_LegacyOperatorParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.CommissionRate != "" { - value := protoreflect.ValueOfString(x.CommissionRate) - if !f(fd_LegacyOperatorParams_commission_rate, value) { - return - } - } - if len(x.JoinedServicesIds) != 0 { - value := protoreflect.ValueOfList(&_LegacyOperatorParams_2_list{list: &x.JoinedServicesIds}) - if !f(fd_LegacyOperatorParams_joined_services_ids, 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_LegacyOperatorParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - return x.CommissionRate != "" - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - return len(x.JoinedServicesIds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - x.CommissionRate = "" - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - x.JoinedServicesIds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - value := x.CommissionRate - return protoreflect.ValueOfString(value) - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - if len(x.JoinedServicesIds) == 0 { - return protoreflect.ValueOfList(&_LegacyOperatorParams_2_list{}) - } - listValue := &_LegacyOperatorParams_2_list{list: &x.JoinedServicesIds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - x.CommissionRate = value.Interface().(string) - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - lv := value.List() - clv := lv.(*_LegacyOperatorParams_2_list) - x.JoinedServicesIds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - if x.JoinedServicesIds == nil { - x.JoinedServicesIds = []uint32{} - } - value := &_LegacyOperatorParams_2_list{list: &x.JoinedServicesIds} - return protoreflect.ValueOfList(value) - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - panic(fmt.Errorf("field commission_rate of message milkyway.restaking.legacy.LegacyOperatorParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyOperatorParams.commission_rate": - return protoreflect.ValueOfString("") - case "milkyway.restaking.legacy.LegacyOperatorParams.joined_services_ids": - list := []uint32{} - return protoreflect.ValueOfList(&_LegacyOperatorParams_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyOperatorParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyOperatorParams 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_LegacyOperatorParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in milkyway.restaking.legacy.LegacyOperatorParams", 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_LegacyOperatorParams) 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_LegacyOperatorParams) 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_LegacyOperatorParams) 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_LegacyOperatorParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LegacyOperatorParams) - 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.CommissionRate) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.JoinedServicesIds) > 0 { - l = 0 - for _, e := range x.JoinedServicesIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + 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().(*LegacyOperatorParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.JoinedServicesIds) > 0 { - var pksize2 int - for _, num := range x.JoinedServicesIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.JoinedServicesIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x12 - } - if len(x.CommissionRate) > 0 { - i -= len(x.CommissionRate) - copy(dAtA[i:], x.CommissionRate) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.CommissionRate))) - 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().(*LegacyOperatorParams) - 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: LegacyOperatorParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyOperatorParams: 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 CommissionRate", 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.CommissionRate = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.JoinedServicesIds = append(x.JoinedServicesIds, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.JoinedServicesIds) == 0 { - x.JoinedServicesIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.JoinedServicesIds = append(x.JoinedServicesIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field JoinedServicesIds", wireType) - } - 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 _ protoreflect.List = (*_LegacyServiceParams_2_list)(nil) - -type _LegacyServiceParams_2_list struct { - list *[]uint32 -} - -func (x *_LegacyServiceParams_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyServiceParams_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_LegacyServiceParams_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_LegacyServiceParams_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyServiceParams_2_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message LegacyServiceParams at list field WhitelistedPoolsIds as it is not of Message kind")) -} - -func (x *_LegacyServiceParams_2_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_LegacyServiceParams_2_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_LegacyServiceParams_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_LegacyServiceParams_3_list)(nil) - -type _LegacyServiceParams_3_list struct { - list *[]uint32 -} - -func (x *_LegacyServiceParams_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_LegacyServiceParams_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfUint32((*x.list)[i]) -} - -func (x *_LegacyServiceParams_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - (*x.list)[i] = concreteValue -} - -func (x *_LegacyServiceParams_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Uint() - concreteValue := (uint32)(valueUnwrapped) - *x.list = append(*x.list, concreteValue) -} - -func (x *_LegacyServiceParams_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message LegacyServiceParams at list field WhitelistedOperatorsIds as it is not of Message kind")) -} - -func (x *_LegacyServiceParams_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_LegacyServiceParams_3_list) NewElement() protoreflect.Value { - v := uint32(0) - return protoreflect.ValueOfUint32(v) -} - -func (x *_LegacyServiceParams_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_LegacyServiceParams protoreflect.MessageDescriptor - fd_LegacyServiceParams_slash_fraction protoreflect.FieldDescriptor - fd_LegacyServiceParams_whitelisted_pools_ids protoreflect.FieldDescriptor - fd_LegacyServiceParams_whitelisted_operators_ids protoreflect.FieldDescriptor -) - -func init() { - file_milkyway_restaking_legacy_models_proto_init() - md_LegacyServiceParams = File_milkyway_restaking_legacy_models_proto.Messages().ByName("LegacyServiceParams") - fd_LegacyServiceParams_slash_fraction = md_LegacyServiceParams.Fields().ByName("slash_fraction") - fd_LegacyServiceParams_whitelisted_pools_ids = md_LegacyServiceParams.Fields().ByName("whitelisted_pools_ids") - fd_LegacyServiceParams_whitelisted_operators_ids = md_LegacyServiceParams.Fields().ByName("whitelisted_operators_ids") -} - -var _ protoreflect.Message = (*fastReflection_LegacyServiceParams)(nil) - -type fastReflection_LegacyServiceParams LegacyServiceParams - -func (x *LegacyServiceParams) ProtoReflect() protoreflect.Message { - return (*fastReflection_LegacyServiceParams)(x) -} - -func (x *LegacyServiceParams) slowProtoReflect() protoreflect.Message { - mi := &file_milkyway_restaking_legacy_models_proto_msgTypes[1] - 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_LegacyServiceParams_messageType fastReflection_LegacyServiceParams_messageType -var _ protoreflect.MessageType = fastReflection_LegacyServiceParams_messageType{} - -type fastReflection_LegacyServiceParams_messageType struct{} - -func (x fastReflection_LegacyServiceParams_messageType) Zero() protoreflect.Message { - return (*fastReflection_LegacyServiceParams)(nil) -} -func (x fastReflection_LegacyServiceParams_messageType) New() protoreflect.Message { - return new(fastReflection_LegacyServiceParams) -} -func (x fastReflection_LegacyServiceParams_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyServiceParams -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_LegacyServiceParams) Descriptor() protoreflect.MessageDescriptor { - return md_LegacyServiceParams -} - -// 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_LegacyServiceParams) Type() protoreflect.MessageType { - return _fastReflection_LegacyServiceParams_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_LegacyServiceParams) New() protoreflect.Message { - return new(fastReflection_LegacyServiceParams) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_LegacyServiceParams) Interface() protoreflect.ProtoMessage { - return (*LegacyServiceParams)(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_LegacyServiceParams) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.SlashFraction != "" { - value := protoreflect.ValueOfString(x.SlashFraction) - if !f(fd_LegacyServiceParams_slash_fraction, value) { - return - } - } - if len(x.WhitelistedPoolsIds) != 0 { - value := protoreflect.ValueOfList(&_LegacyServiceParams_2_list{list: &x.WhitelistedPoolsIds}) - if !f(fd_LegacyServiceParams_whitelisted_pools_ids, value) { - return - } - } - if len(x.WhitelistedOperatorsIds) != 0 { - value := protoreflect.ValueOfList(&_LegacyServiceParams_3_list{list: &x.WhitelistedOperatorsIds}) - if !f(fd_LegacyServiceParams_whitelisted_operators_ids, 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_LegacyServiceParams) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - return x.SlashFraction != "" - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - return len(x.WhitelistedPoolsIds) != 0 - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - return len(x.WhitelistedOperatorsIds) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - x.SlashFraction = "" - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - x.WhitelistedPoolsIds = nil - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - x.WhitelistedOperatorsIds = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - value := x.SlashFraction - return protoreflect.ValueOfString(value) - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - if len(x.WhitelistedPoolsIds) == 0 { - return protoreflect.ValueOfList(&_LegacyServiceParams_2_list{}) - } - listValue := &_LegacyServiceParams_2_list{list: &x.WhitelistedPoolsIds} - return protoreflect.ValueOfList(listValue) - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - if len(x.WhitelistedOperatorsIds) == 0 { - return protoreflect.ValueOfList(&_LegacyServiceParams_3_list{}) - } - listValue := &_LegacyServiceParams_3_list{list: &x.WhitelistedOperatorsIds} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - x.SlashFraction = value.Interface().(string) - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - lv := value.List() - clv := lv.(*_LegacyServiceParams_2_list) - x.WhitelistedPoolsIds = *clv.list - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - lv := value.List() - clv := lv.(*_LegacyServiceParams_3_list) - x.WhitelistedOperatorsIds = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - if x.WhitelistedPoolsIds == nil { - x.WhitelistedPoolsIds = []uint32{} - } - value := &_LegacyServiceParams_2_list{list: &x.WhitelistedPoolsIds} - return protoreflect.ValueOfList(value) - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - if x.WhitelistedOperatorsIds == nil { - x.WhitelistedOperatorsIds = []uint32{} - } - value := &_LegacyServiceParams_3_list{list: &x.WhitelistedOperatorsIds} - return protoreflect.ValueOfList(value) - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - panic(fmt.Errorf("field slash_fraction of message milkyway.restaking.legacy.LegacyServiceParams is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "milkyway.restaking.legacy.LegacyServiceParams.slash_fraction": - return protoreflect.ValueOfString("") - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_pools_ids": - list := []uint32{} - return protoreflect.ValueOfList(&_LegacyServiceParams_2_list{list: &list}) - case "milkyway.restaking.legacy.LegacyServiceParams.whitelisted_operators_ids": - list := []uint32{} - return protoreflect.ValueOfList(&_LegacyServiceParams_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: milkyway.restaking.legacy.LegacyServiceParams")) - } - panic(fmt.Errorf("message milkyway.restaking.legacy.LegacyServiceParams 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_LegacyServiceParams) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in milkyway.restaking.legacy.LegacyServiceParams", 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_LegacyServiceParams) 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_LegacyServiceParams) 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_LegacyServiceParams) 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_LegacyServiceParams) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*LegacyServiceParams) - 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.SlashFraction) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.WhitelistedPoolsIds) > 0 { - l = 0 - for _, e := range x.WhitelistedPoolsIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + l - } - if len(x.WhitelistedOperatorsIds) > 0 { - l = 0 - for _, e := range x.WhitelistedOperatorsIds { - l += runtime.Sov(uint64(e)) - } - n += 1 + runtime.Sov(uint64(l)) + 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().(*LegacyServiceParams) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.WhitelistedOperatorsIds) > 0 { - var pksize2 int - for _, num := range x.WhitelistedOperatorsIds { - pksize2 += runtime.Sov(uint64(num)) - } - i -= pksize2 - j1 := i - for _, num := range x.WhitelistedOperatorsIds { - for num >= 1<<7 { - dAtA[j1] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j1++ - } - dAtA[j1] = uint8(num) - j1++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize2)) - i-- - dAtA[i] = 0x1a - } - if len(x.WhitelistedPoolsIds) > 0 { - var pksize4 int - for _, num := range x.WhitelistedPoolsIds { - pksize4 += runtime.Sov(uint64(num)) - } - i -= pksize4 - j3 := i - for _, num := range x.WhitelistedPoolsIds { - for num >= 1<<7 { - dAtA[j3] = uint8(uint64(num)&0x7f | 0x80) - num >>= 7 - j3++ - } - dAtA[j3] = uint8(num) - j3++ - } - i = runtime.EncodeVarint(dAtA, i, uint64(pksize4)) - i-- - dAtA[i] = 0x12 - } - if len(x.SlashFraction) > 0 { - i -= len(x.SlashFraction) - copy(dAtA[i:], x.SlashFraction) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.SlashFraction))) - 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().(*LegacyServiceParams) - 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: LegacyServiceParams: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: LegacyServiceParams: 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 SlashFraction", 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.SlashFraction = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType == 0 { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistedPoolsIds = append(x.WhitelistedPoolsIds, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.WhitelistedPoolsIds) == 0 { - x.WhitelistedPoolsIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistedPoolsIds = append(x.WhitelistedPoolsIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedPoolsIds", wireType) - } - case 3: - if wireType == 0 { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistedOperatorsIds = append(x.WhitelistedOperatorsIds, v) - } else if wireType == 2 { - var packedLen 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++ - packedLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if packedLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + packedLen - 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 - } - var elementCount int - var count int - for _, integer := range dAtA[iNdEx:postIndex] { - if integer < 128 { - count++ - } - } - elementCount = count - if elementCount != 0 && len(x.WhitelistedOperatorsIds) == 0 { - x.WhitelistedOperatorsIds = make([]uint32, 0, elementCount) - } - for iNdEx < postIndex { - var v uint32 - 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++ - v |= uint32(b&0x7F) << shift - if b < 0x80 { - break - } - } - x.WhitelistedOperatorsIds = append(x.WhitelistedOperatorsIds, v) - } - } else { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field WhitelistedOperatorsIds", wireType) - } - 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 -// protoc (unknown) -// source: milkyway/restaking/legacy/models.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// LegacyOperatorParams represent previous format that we where using to store -// a operator params. -type LegacyOperatorParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // CommissionRate defines the commission rate charged to delegators, as a - // fraction. - CommissionRate string `protobuf:"bytes,1,opt,name=commission_rate,json=commissionRate,proto3" json:"commission_rate,omitempty"` - // JoinedServicesIDs defines the list of service IDs that the operator has - // joined. - JoinedServicesIds []uint32 `protobuf:"varint,2,rep,packed,name=joined_services_ids,json=joinedServicesIds,proto3" json:"joined_services_ids,omitempty"` -} - -func (x *LegacyOperatorParams) Reset() { - *x = LegacyOperatorParams{} - if protoimpl.UnsafeEnabled { - mi := &file_milkyway_restaking_legacy_models_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LegacyOperatorParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyOperatorParams) ProtoMessage() {} - -// Deprecated: Use LegacyOperatorParams.ProtoReflect.Descriptor instead. -func (*LegacyOperatorParams) Descriptor() ([]byte, []int) { - return file_milkyway_restaking_legacy_models_proto_rawDescGZIP(), []int{0} -} - -func (x *LegacyOperatorParams) GetCommissionRate() string { - if x != nil { - return x.CommissionRate - } - return "" -} - -func (x *LegacyOperatorParams) GetJoinedServicesIds() []uint32 { - if x != nil { - return x.JoinedServicesIds - } - return nil -} - -// LegacyServiceParams represent the previous format that we where using to -// store the params that have been set for an individual service. -type LegacyServiceParams struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // SlashFraction defines the fraction of the delegation that will be slashed - // in case of a misbehavior. - SlashFraction string `protobuf:"bytes,1,opt,name=slash_fraction,json=slashFraction,proto3" json:"slash_fraction,omitempty"` - // WhitelistedPoolsIDs defines the list of pool IDs that are providing - // cryptoeconomic security to the service. - WhitelistedPoolsIds []uint32 `protobuf:"varint,2,rep,packed,name=whitelisted_pools_ids,json=whitelistedPoolsIds,proto3" json:"whitelisted_pools_ids,omitempty"` - // WhitelistedOperatorsIDs defines the list of operator IDs that are allowed - // to validate this service. - WhitelistedOperatorsIds []uint32 `protobuf:"varint,3,rep,packed,name=whitelisted_operators_ids,json=whitelistedOperatorsIds,proto3" json:"whitelisted_operators_ids,omitempty"` -} - -func (x *LegacyServiceParams) Reset() { - *x = LegacyServiceParams{} - if protoimpl.UnsafeEnabled { - mi := &file_milkyway_restaking_legacy_models_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *LegacyServiceParams) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*LegacyServiceParams) ProtoMessage() {} - -// Deprecated: Use LegacyServiceParams.ProtoReflect.Descriptor instead. -func (*LegacyServiceParams) Descriptor() ([]byte, []int) { - return file_milkyway_restaking_legacy_models_proto_rawDescGZIP(), []int{1} -} - -func (x *LegacyServiceParams) GetSlashFraction() string { - if x != nil { - return x.SlashFraction - } - return "" -} - -func (x *LegacyServiceParams) GetWhitelistedPoolsIds() []uint32 { - if x != nil { - return x.WhitelistedPoolsIds - } - return nil -} - -func (x *LegacyServiceParams) GetWhitelistedOperatorsIds() []uint32 { - if x != nil { - return x.WhitelistedOperatorsIds - } - return nil -} - -var File_milkyway_restaking_legacy_models_proto protoreflect.FileDescriptor - -var file_milkyway_restaking_legacy_models_proto_rawDesc = []byte{ - 0x0a, 0x26, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, - 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x2f, 0x6d, 0x6f, 0x64, 0x65, - 0x6c, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, - 0x61, 0x79, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, - 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, - 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, - 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, - 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x19, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, - 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xab, 0x01, 0x0a, 0x14, 0x4c, 0x65, 0x67, - 0x61, 0x63, 0x79, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x50, 0x61, 0x72, 0x61, 0x6d, - 0x73, 0x12, 0x4c, 0x0a, 0x0f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, - 0x72, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, - 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, - 0x2f, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0x52, - 0x0e, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x74, 0x65, 0x12, - 0x45, 0x0a, 0x13, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, - 0x65, 0x73, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x15, 0xe2, 0xde, - 0x1f, 0x11, 0x4a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, - 0x49, 0x44, 0x73, 0x52, 0x11, 0x6a, 0x6f, 0x69, 0x6e, 0x65, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, - 0x63, 0x65, 0x73, 0x49, 0x64, 0x73, 0x22, 0x87, 0x02, 0x0a, 0x13, 0x4c, 0x65, 0x67, 0x61, 0x63, - 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x4a, - 0x0a, 0x0e, 0x73, 0x6c, 0x61, 0x73, 0x68, 0x5f, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x23, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x6d, 0x61, 0x74, - 0x68, 0x2e, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x44, 0x65, 0x63, 0x52, 0x0d, 0x73, 0x6c, 0x61, - 0x73, 0x68, 0x46, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4b, 0x0a, 0x15, 0x77, 0x68, - 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x73, 0x5f, - 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x17, 0xe2, 0xde, 0x1f, 0x13, 0x57, - 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x50, 0x6f, 0x6f, 0x6c, 0x73, 0x49, - 0x44, 0x73, 0x52, 0x13, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x50, - 0x6f, 0x6f, 0x6c, 0x73, 0x49, 0x64, 0x73, 0x12, 0x57, 0x0a, 0x19, 0x77, 0x68, 0x69, 0x74, 0x65, - 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, - 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0d, 0x42, 0x1b, 0xe2, 0xde, 0x1f, 0x17, - 0x57, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, - 0x74, 0x6f, 0x72, 0x73, 0x49, 0x44, 0x73, 0x52, 0x17, 0x77, 0x68, 0x69, 0x74, 0x65, 0x6c, 0x69, - 0x73, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x49, 0x64, 0x73, - 0x42, 0xf3, 0x01, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2e, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x6c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x3f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6d, 0x69, - 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x2d, 0x6c, 0x61, 0x62, 0x73, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, - 0x79, 0x77, 0x61, 0x79, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x6d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, - 0x79, 0x2f, 0x72, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x6c, 0x65, 0x67, 0x61, - 0x63, 0x79, 0xa2, 0x02, 0x03, 0x4d, 0x52, 0x4c, 0xaa, 0x02, 0x19, 0x4d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x4c, 0x65, - 0x67, 0x61, 0x63, 0x79, 0xca, 0x02, 0x19, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, - 0x52, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, - 0xe2, 0x02, 0x25, 0x4d, 0x69, 0x6c, 0x6b, 0x79, 0x77, 0x61, 0x79, 0x5c, 0x52, 0x65, 0x73, 0x74, - 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5c, 0x47, 0x50, 0x42, - 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1b, 0x4d, 0x69, 0x6c, 0x6b, 0x79, - 0x77, 0x61, 0x79, 0x3a, 0x3a, 0x52, 0x65, 0x73, 0x74, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, - 0x4c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_milkyway_restaking_legacy_models_proto_rawDescOnce sync.Once - file_milkyway_restaking_legacy_models_proto_rawDescData = file_milkyway_restaking_legacy_models_proto_rawDesc -) - -func file_milkyway_restaking_legacy_models_proto_rawDescGZIP() []byte { - file_milkyway_restaking_legacy_models_proto_rawDescOnce.Do(func() { - file_milkyway_restaking_legacy_models_proto_rawDescData = protoimpl.X.CompressGZIP(file_milkyway_restaking_legacy_models_proto_rawDescData) - }) - return file_milkyway_restaking_legacy_models_proto_rawDescData -} - -var file_milkyway_restaking_legacy_models_proto_msgTypes = make([]protoimpl.MessageInfo, 2) -var file_milkyway_restaking_legacy_models_proto_goTypes = []interface{}{ - (*LegacyOperatorParams)(nil), // 0: milkyway.restaking.legacy.LegacyOperatorParams - (*LegacyServiceParams)(nil), // 1: milkyway.restaking.legacy.LegacyServiceParams -} -var file_milkyway_restaking_legacy_models_proto_depIdxs = []int32{ - 0, // [0:0] is the sub-list for method output_type - 0, // [0:0] is the sub-list for method input_type - 0, // [0:0] is the sub-list for extension type_name - 0, // [0:0] is the sub-list for extension extendee - 0, // [0:0] is the sub-list for field type_name -} - -func init() { file_milkyway_restaking_legacy_models_proto_init() } -func file_milkyway_restaking_legacy_models_proto_init() { - if File_milkyway_restaking_legacy_models_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_milkyway_restaking_legacy_models_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LegacyOperatorParams); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_milkyway_restaking_legacy_models_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LegacyServiceParams); 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{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_milkyway_restaking_legacy_models_proto_rawDesc, - NumEnums: 0, - NumMessages: 2, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_milkyway_restaking_legacy_models_proto_goTypes, - DependencyIndexes: file_milkyway_restaking_legacy_models_proto_depIdxs, - MessageInfos: file_milkyway_restaking_legacy_models_proto_msgTypes, - }.Build() - File_milkyway_restaking_legacy_models_proto = out.File - file_milkyway_restaking_legacy_models_proto_rawDesc = nil - file_milkyway_restaking_legacy_models_proto_goTypes = nil - file_milkyway_restaking_legacy_models_proto_depIdxs = nil -} diff --git a/api/milkyway/restaking/v1/messages.pulsar.go b/api/milkyway/restaking/v1/messages.pulsar.go index 9554a518b..1cfa694d3 100644 --- a/api/milkyway/restaking/v1/messages.pulsar.go +++ b/api/milkyway/restaking/v1/messages.pulsar.go @@ -11899,7 +11899,7 @@ const ( ) // MsgJoinService defines the message structure for the -// JoinService gRPC service method. It allows the opeator admin to +// JoinService gRPC service method. It allows the operator admin to // start securing a AVS. type MsgJoinService struct { state protoimpl.MessageState @@ -11980,7 +11980,7 @@ func (*MsgJoinServiceResponse) Descriptor() ([]byte, []int) { } // MsgLeaveService defines the message structure for the -// LeaveService gRPC service method. It allows the opeator admin to +// LeaveService gRPC service method. It allows the operator admin to // stop securing a AVS. type MsgLeaveService struct { state protoimpl.MessageState @@ -12033,7 +12033,7 @@ func (x *MsgLeaveService) GetServiceId() uint32 { return 0 } -// MsgLeaveerviceResponse is the return value of MsgLeveService. +// MsgLeaveServiceResponse is the return value of MsgLeaveService. type MsgLeaveServiceResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache diff --git a/go.mod b/go.mod index 02513b65e..950940878 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,6 @@ require ( cosmossdk.io/x/upgrade v0.1.4 github.com/CosmWasm/wasmd v0.53.0 github.com/CosmWasm/wasmvm/v2 v2.1.3 - github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 github.com/cometbft/cometbft v0.38.12 github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.5 @@ -30,7 +29,7 @@ require ( github.com/cosmos/ibc-apps/modules/rate-limiting/v8 v8.0.0 github.com/cosmos/ibc-go/modules/capability v1.0.1 github.com/cosmos/ibc-go/v8 v8.5.2 - github.com/cosmos/ics23/go v0.11.0 + github.com/cosmos/ics23/go v0.11.0 // indirect github.com/cosmos/interchain-security/v6 v6.3.0 github.com/golang/mock v1.6.0 // indirect github.com/golang/protobuf v1.5.4 @@ -52,11 +51,11 @@ require ( github.com/spf13/viper v1.19.0 github.com/stretchr/testify v1.9.0 go.uber.org/mock v0.4.0 - golang.org/x/crypto v0.29.0 + golang.org/x/crypto v0.29.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 google.golang.org/grpc v1.67.1 google.golang.org/protobuf v1.35.1 - gopkg.in/yaml.v2 v2.4.0 + gopkg.in/yaml.v2 v2.4.0 // indirect ) require ( diff --git a/go.sum b/go.sum index 537f612b5..f3330c8d1 100644 --- a/go.sum +++ b/go.sum @@ -302,8 +302,6 @@ github.com/alingse/asasalint v0.0.11/go.mod h1:nCaoMhw7a9kSJObvQyVzNTPBDbNpdocqr github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY= github.com/apache/thrift v0.12.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb+bacwQ= -github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833 h1:/OtHsUoaVegyyGQ9/Ycm5vrC3xTTyj4+N/HsJ0wwAGA= -github.com/aptos-labs/serde-reflection/serde-generate/runtime/golang v0.0.0-20231213012317-73b6bbf74833/go.mod h1:zUz5maIUAS+tl1lC+lJR7HUf0vVnHk6W7bCvN+DzjME= github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= diff --git a/proto/milkyway/assets/v1/messages.proto b/proto/milkyway/assets/v1/messages.proto index a9c567a72..6cc3252b1 100644 --- a/proto/milkyway/assets/v1/messages.proto +++ b/proto/milkyway/assets/v1/messages.proto @@ -9,7 +9,7 @@ import "milkyway/assets/v1/models.proto"; option go_package = "github.com/milkyway-labs/milkyway/x/assets/types"; -// Msg defines the services module's gRPC message service. +// Msg defines the assets module's gRPC message service. service Msg { option (cosmos.msg.v1.service) = true; diff --git a/proto/milkyway/liquidvesting/v1/messages.proto b/proto/milkyway/liquidvesting/v1/messages.proto index b4e6c1b43..dc8a01d1a 100644 --- a/proto/milkyway/liquidvesting/v1/messages.proto +++ b/proto/milkyway/liquidvesting/v1/messages.proto @@ -47,7 +47,7 @@ message MsgMintVestedRepresentation { option (cosmos.msg.v1.signer) = "sender"; option (amino.name) = "milkyway/MsgMintVestedRepresentation"; - // User that want to triger the tokens mint. + // User that want to trigger the tokens mint. string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // User that will receive the minted tokens. @@ -72,7 +72,7 @@ message MsgBurnVestedRepresentation { option (cosmos.msg.v1.signer) = "sender"; option (amino.name) = "milkyway/MsgBurnVestedRepresentation"; - // User that want to triger the tokens burn. + // User that want to trigger the tokens burn. string sender = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; // User from which we want to burn the tokens. diff --git a/proto/milkyway/operators/v1/models.proto b/proto/milkyway/operators/v1/models.proto index 2be26e77b..3ca2ba168 100644 --- a/proto/milkyway/operators/v1/models.proto +++ b/proto/milkyway/operators/v1/models.proto @@ -15,7 +15,7 @@ enum OperatorStatus { // OPERATOR_STATUS_UNSPECIFIED defines an unspecified status OPERATOR_STATUS_UNSPECIFIED = 0; - // OPERATOR_STATUS_ACTIVE identifies an active validator which is providing + // OPERATOR_STATUS_ACTIVE identifies an active operator which is providing // services OPERATOR_STATUS_ACTIVE = 1; diff --git a/proto/milkyway/restaking/v1/messages.proto b/proto/milkyway/restaking/v1/messages.proto index f19d53105..fc1caa8f8 100644 --- a/proto/milkyway/restaking/v1/messages.proto +++ b/proto/milkyway/restaking/v1/messages.proto @@ -85,7 +85,7 @@ service Msg { } // MsgJoinService defines the message structure for the -// JoinService gRPC service method. It allows the opeator admin to +// JoinService gRPC service method. It allows the operator admin to // start securing a AVS. message MsgJoinService { option (cosmos.msg.v1.signer) = "sender"; @@ -102,7 +102,7 @@ message MsgJoinService { message MsgJoinServiceResponse {} // MsgLeaveService defines the message structure for the -// LeaveService gRPC service method. It allows the opeator admin to +// LeaveService gRPC service method. It allows the operator admin to // stop securing a AVS. message MsgLeaveService { option (cosmos.msg.v1.signer) = "sender"; @@ -115,7 +115,7 @@ message MsgLeaveService { uint32 service_id = 3 [ (gogoproto.customname) = "ServiceID" ]; } -// MsgLeaveerviceResponse is the return value of MsgLeveService. +// MsgLeaveServiceResponse is the return value of MsgLeaveService. message MsgLeaveServiceResponse {} // MsgAddOperatorToAllowList defines the message structure for the diff --git a/x/liquidvesting/autocli.go b/x/liquidvesting/autocli.go index f3b283a9a..d4f56e7f5 100644 --- a/x/liquidvesting/autocli.go +++ b/x/liquidvesting/autocli.go @@ -44,7 +44,7 @@ func (a AppModule) AutoCLIOptions() *autocliv1.ModuleOptions { { RpcMethod: "UserRestakableAssets", Use: "user-restakable-assets [user-address]", - Short: "Query the user's assets that are coverd by their insurance fund and that can be restaked", + Short: "Query the user's assets that are covered by their insurance fund and that can be restaked", Example: fmt.Sprintf(`$ %s query liquidvesting user-restakable-assets init1...`, version.AppName), PositionalArgs: []*autocliv1.PositionalArgDescriptor{ {ProtoField: "user_address"}, diff --git a/x/liquidvesting/keeper/burn.go b/x/liquidvesting/keeper/burn.go index c4b05fc79..89893e24f 100644 --- a/x/liquidvesting/keeper/burn.go +++ b/x/liquidvesting/keeper/burn.go @@ -55,7 +55,7 @@ func (k *Keeper) BurnVestedRepresentation( if userBalanceOfC.GTE(c.Amount) { liquidCoins = liquidCoins.Add(c) } else { - // The user's balance of the coin c is lower then the amount to burn, + // The user's balance of the coin c is lower than the amount to burn, // consider it as to unbond liquidCoins = liquidCoins.Add(sdk.NewCoin(c.Denom, userBalanceOfC)) toUnbondCoins = toUnbondCoins.Add(sdk.NewCoin(c.Denom, c.Amount.Sub(userBalanceOfC))) @@ -151,7 +151,7 @@ func (k *Keeper) InsertBurnCoinsToUnbondingQueue(ctx context.Context, burnCoins return k.SetBurnCoinsQueueTimeSlice(ctx, burnCoins.CompletionTime, timeSlice) } -// BurnCoinsQueueIterator returns all the BurnCoins from time 0 until endTime. +// BurnCoinsUnbondingQueueIterator returns all the BurnCoins from time 0 until endTime. func (k *Keeper) BurnCoinsUnbondingQueueIterator(ctx context.Context, endTime time.Time) (storetypes.Iterator, error) { store := k.storeService.OpenKVStore(ctx) return store.Iterator(types.BurnCoinsQueueKey, storetypes.InclusiveEndBytes(types.GetBurnCoinsQueueTimeKey(endTime))) diff --git a/x/liquidvesting/keeper/mint_test.go b/x/liquidvesting/keeper/mint_test.go index cb6af69c9..7d6c2d0d4 100644 --- a/x/liquidvesting/keeper/mint_test.go +++ b/x/liquidvesting/keeper/mint_test.go @@ -6,7 +6,7 @@ import ( "github.com/milkyway-labs/milkyway/x/liquidvesting/types" ) -func (suite *KeeperTestSuite) TestKeepr_MintVestedRepresentation() { +func (suite *KeeperTestSuite) TestKeeper_MintVestedRepresentation() { testCases := []struct { name string store func(ctx sdk.Context) diff --git a/x/liquidvesting/keeper/restake_restriction.go b/x/liquidvesting/keeper/restake_restriction.go index ae9bafbfb..8cdeb779e 100644 --- a/x/liquidvesting/keeper/restake_restriction.go +++ b/x/liquidvesting/keeper/restake_restriction.go @@ -26,7 +26,7 @@ func (k *Keeper) RestakeRestrictionFn(ctx context.Context, restakerAddress strin // We have some vested representation to restake, ensure the user // insurance fund can cover the amount - // Get the current vested representations that are being coverd + // Get the current vested representations that are being covered // by the insurance fund totalVestedRepresentations, err := k.GetAllUserActiveVestedRepresentations(ctx, restakerAddress) if err != nil { diff --git a/x/liquidvesting/keeper/send_restriction.go b/x/liquidvesting/keeper/send_restriction.go index 83f256217..172715df7 100644 --- a/x/liquidvesting/keeper/send_restriction.go +++ b/x/liquidvesting/keeper/send_restriction.go @@ -54,7 +54,7 @@ func (k *Keeper) SendRestrictionFn(ctx context.Context, from sdk.AccAddress, to // this means that the user is trying to send those tokens // somewhere else. Block it since the vested representation // can only be sent to the restaking module. - return nil, errors.Wrapf(types.ErrVestedRepresentationCannoteBeTransferred, "coin %s", coin.Denom) + return nil, errors.Wrapf(types.ErrVestedRepresentationCannotBeTransferred, "coin %s", coin.Denom) } } diff --git a/x/liquidvesting/keeper/send_restriction_test.go b/x/liquidvesting/keeper/send_restriction_test.go index 04432838e..7812d144a 100644 --- a/x/liquidvesting/keeper/send_restriction_test.go +++ b/x/liquidvesting/keeper/send_restriction_test.go @@ -104,7 +104,7 @@ func (suite *KeeperTestSuite) TestKeeper_BankSend() { // Ensure we can transfer the vested representation suite.bk.SetSendEnabled(ctx, vestedDenom, true) - // Create a operator + // Create an operator operator := operatorstypes.NewOperator( 1, operatorstypes.OPERATOR_STATUS_ACTIVE, diff --git a/x/liquidvesting/types/errors.go b/x/liquidvesting/types/errors.go index 7182b295e..8e2004068 100644 --- a/x/liquidvesting/types/errors.go +++ b/x/liquidvesting/types/errors.go @@ -5,13 +5,13 @@ import ( ) var ( - ErrInvalidInsurancePercentage = errors.Register(ModuleName, 1, "invalid insurance percentage value") - ErrNotMinter = errors.Register(ModuleName, 2, "sender don't have permission to mint tokens") - ErrNotBurner = errors.Register(ModuleName, 3, "sender don't have permission to burn tokens") - ErrInvalidAmount = errors.Register(ModuleName, 4, "invalid amount") - ErrInvalidDenom = errors.Register(ModuleName, 5, "invalid denom") - ErrVestedRepresentationCannoteBeTransferred = errors.Register(ModuleName, 6, "vested representation can't be transferred") - ErrInsufficientInsuranceFundBalance = errors.Register(ModuleName, 7, "insufficient insurance fund balance") - ErrInsufficientBalance = errors.Register(ModuleName, 8, "insufficient balance") - ErrTransferBetweenTargetsNotAllowed = errors.Register(ModuleName, 9, "transfer between restaking targets is not allowed") + ErrInvalidInsurancePercentage = errors.Register(ModuleName, 1, "invalid insurance percentage value") + ErrNotMinter = errors.Register(ModuleName, 2, "sender don't have permission to mint tokens") + ErrNotBurner = errors.Register(ModuleName, 3, "sender don't have permission to burn tokens") + ErrInvalidAmount = errors.Register(ModuleName, 4, "invalid amount") + ErrInvalidDenom = errors.Register(ModuleName, 5, "invalid denom") + ErrVestedRepresentationCannotBeTransferred = errors.Register(ModuleName, 6, "vested representation can't be transferred") + ErrInsufficientInsuranceFundBalance = errors.Register(ModuleName, 7, "insufficient insurance fund balance") + ErrInsufficientBalance = errors.Register(ModuleName, 8, "insufficient balance") + ErrTransferBetweenTargetsNotAllowed = errors.Register(ModuleName, 9, "transfer between restaking targets is not allowed") ) diff --git a/x/liquidvesting/types/ibc_hooks.go b/x/liquidvesting/types/ibc_hooks.go index 5ccaa4c10..f5ab1b55e 100644 --- a/x/liquidvesting/types/ibc_hooks.go +++ b/x/liquidvesting/types/ibc_hooks.go @@ -1,7 +1,7 @@ package types import ( - fmt "fmt" + "fmt" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" diff --git a/x/liquidvesting/types/messages.pb.go b/x/liquidvesting/types/messages.pb.go index 27a9690be..b2b8b35c4 100644 --- a/x/liquidvesting/types/messages.pb.go +++ b/x/liquidvesting/types/messages.pb.go @@ -38,7 +38,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // account to mint a user's staked vested tokens representation that can be // used in the liquid vesting module. type MsgMintVestedRepresentation struct { - // User that want to triger the tokens mint. + // User that want to trigger the tokens mint. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // User that will receive the minted tokens. Receiver string `protobuf:"bytes,2,opt,name=receiver,proto3" json:"receiver,omitempty"` @@ -142,7 +142,7 @@ var xxx_messageInfo_MsgMintVestedRepresentationResponse proto.InternalMessageInf // BurnVestedRepresentation gRPC service method. It allows an authorized // account to burn a user's staked vested tokens representation. type MsgBurnVestedRepresentation struct { - // User that want to triger the tokens burn. + // User that want to trigger the tokens burn. Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` // User from which we want to burn the tokens. User string `protobuf:"bytes,2,opt,name=user,proto3" json:"user,omitempty"` diff --git a/x/liquidvesting/types/query.go b/x/liquidvesting/types/query.go index e128e9a2f..9288e88ac 100644 --- a/x/liquidvesting/types/query.go +++ b/x/liquidvesting/types/query.go @@ -2,7 +2,7 @@ package types import ( sdk "github.com/cosmos/cosmos-sdk/types" - query "github.com/cosmos/cosmos-sdk/types/query" + "github.com/cosmos/cosmos-sdk/types/query" ) // NewQueryUserInsuranceFundRequest creates a new QueryUserInsuranceFundRequest object. diff --git a/x/operators/abci.go b/x/operators/abci.go index ed106ab4f..2fe7be0d6 100644 --- a/x/operators/abci.go +++ b/x/operators/abci.go @@ -17,7 +17,10 @@ func BeginBlocker(ctx sdk.Context, keeper *keeper.Keeper) error { // Iterate over all the operators that are set to be inactivated by the current block time return keeper.IterateInactivatingOperatorQueue(ctx, ctx.BlockTime(), func(operator types.Operator) (stop bool, err error) { // Complete the operator inactivation process - keeper.CompleteOperatorInactivation(ctx, operator) + err = keeper.CompleteOperatorInactivation(ctx, operator) + if err != nil { + return true, err + } // Emit an event ctx.EventManager().EmitEvent( diff --git a/x/operators/types/messages.go b/x/operators/types/messages.go index 3b40d5a34..22ad2487f 100644 --- a/x/operators/types/messages.go +++ b/x/operators/types/messages.go @@ -127,7 +127,7 @@ func (msg *MsgDeactivateOperator) GetSigners() []sdk.AccAddress { // -------------------------------------------------------------------------------------------------------------------- -// NewMsgReactivateOperator creates a new MsgRactivateOperator instance +// NewMsgReactivateOperator creates a new MsgReactivateOperator instance func NewMsgReactivateOperator(operatorID uint32, sender string) *MsgReactivateOperator { return &MsgReactivateOperator{ OperatorID: operatorID, diff --git a/x/operators/types/models.pb.go b/x/operators/types/models.pb.go index 4af6b14e6..21cf1c7f0 100644 --- a/x/operators/types/models.pb.go +++ b/x/operators/types/models.pb.go @@ -33,7 +33,7 @@ type OperatorStatus int32 const ( // OPERATOR_STATUS_UNSPECIFIED defines an unspecified status OPERATOR_STATUS_UNSPECIFIED OperatorStatus = 0 - // OPERATOR_STATUS_ACTIVE identifies an active validator which is providing + // OPERATOR_STATUS_ACTIVE identifies an active operator which is providing // services OPERATOR_STATUS_ACTIVE OperatorStatus = 1 // OPERATOR_STATUS_INACTIVATING identifies an operator that is in the process diff --git a/x/restaking/client/cli/tx.go b/x/restaking/client/cli/tx.go index f0734f9db..d720b1deb 100644 --- a/x/restaking/client/cli/tx.go +++ b/x/restaking/client/cli/tx.go @@ -224,7 +224,7 @@ func GetUnbondFromPoolCmd() *cobra.Command { return cmd } -// GetUnbondFromOperatorCmd returns the command allowing to unbong from an operator +// GetUnbondFromOperatorCmd returns the command allowing to unbond from an operator func GetUnbondFromOperatorCmd() *cobra.Command { cmd := &cobra.Command{ Use: "operator [operator-id] [amount]", diff --git a/x/restaking/keeper/alias_functions.go b/x/restaking/keeper/alias_functions.go index e23bec3ec..9c23590ed 100644 --- a/x/restaking/keeper/alias_functions.go +++ b/x/restaking/keeper/alias_functions.go @@ -927,8 +927,8 @@ func (k *Keeper) UnbondRestakedAssets(ctx context.Context, user sdk.AccAddress, return time.Time{}, err } - truncatedToUndalegateTokens, _ := toUndelegateTokens.TruncateDecimal() - if !truncatedToUndalegateTokens.IsZero() { + truncatedToUndelegateTokens, _ := toUndelegateTokens.TruncateDecimal() + if !truncatedToUndelegateTokens.IsZero() { return time.Time{}, fmt.Errorf("user hasn't restaked the provided amount: %s", amount.String()) } @@ -1007,7 +1007,7 @@ func (k *Keeper) GetAllOperatorUnbondingDelegations(ctx context.Context) ([]type } // GetAllUserOperatorUnbondingDelegations returns all the user's unbonding delegations -// from a operator +// from an operator func (k *Keeper) GetAllUserOperatorUnbondingDelegations(ctx context.Context, userAddress string) []types.UnbondingDelegation { store := k.storeService.OpenKVStore(ctx) diff --git a/x/restaking/keeper/msg_server.go b/x/restaking/keeper/msg_server.go index 1214af6e8..3f433dbe6 100644 --- a/x/restaking/keeper/msg_server.go +++ b/x/restaking/keeper/msg_server.go @@ -448,7 +448,7 @@ func (k msgServer) UndelegateOperator(ctx context.Context, msg *types.MsgUndeleg for _, token := range msg.Amount { if token.Amount.IsInt64() { defer func() { - telemetry.IncrCounter(1, types.ModuleName, "undelegete_operator") + telemetry.IncrCounter(1, types.ModuleName, "undelegate_operator") telemetry.SetGaugeWithLabels( []string{"tx", "msg", sdk.MsgTypeURL(msg)}, float32(token.Amount.Int64()), @@ -534,7 +534,7 @@ func (k msgServer) UndelegateService(ctx context.Context, msg *types.MsgUndelega for _, token := range msg.Amount { if token.Amount.IsInt64() { defer func() { - telemetry.IncrCounter(1, types.ModuleName, "undelegete_service") + telemetry.IncrCounter(1, types.ModuleName, "undelegate_service") telemetry.SetGaugeWithLabels( []string{"tx", "msg", sdk.MsgTypeURL(msg)}, float32(token.Amount.Int64()), diff --git a/x/restaking/keeper/msg_server_test.go b/x/restaking/keeper/msg_server_test.go index 9041698dc..25d503720 100644 --- a/x/restaking/keeper/msg_server_test.go +++ b/x/restaking/keeper/msg_server_test.go @@ -529,7 +529,7 @@ func (suite *KeeperTestSuite) TestMsgServer_AddOperatorToAllowList() { ), shouldErr: false, check: func(ctx sdk.Context) { - configured, err := suite.k.IsServiceOpertorsAllowListConfigured(ctx, 1) + configured, err := suite.k.IsServiceOperatorsAllowListConfigured(ctx, 1) suite.Require().NoError(err) suite.Require().True(configured) whitelisted, err := suite.k.CanOperatorValidateService(ctx, 1, 1) diff --git a/x/restaking/keeper/operators_hooks.go b/x/restaking/keeper/operators_hooks.go index 5f29967f7..7ee5128fe 100644 --- a/x/restaking/keeper/operators_hooks.go +++ b/x/restaking/keeper/operators_hooks.go @@ -80,7 +80,7 @@ func (o *OperatorsHooks) removeOperatorFromServicesAllowList(ctx context.Context // list lets check if is now empty and in this case we have to disable // the service to prevent unwanted operators to join. serviceID := key.K1() - isConfigured, err := o.IsServiceOpertorsAllowListConfigured(ctx, serviceID) + isConfigured, err := o.IsServiceOperatorsAllowListConfigured(ctx, serviceID) if err != nil { return err } diff --git a/x/restaking/keeper/restake_restriction.go b/x/restaking/keeper/restake_restriction.go index efb4f10ae..70174721f 100644 --- a/x/restaking/keeper/restake_restriction.go +++ b/x/restaking/keeper/restake_restriction.go @@ -18,10 +18,10 @@ func (k *Keeper) SetRestakeRestriction(restriction types.RestakeRestrictionFn) { } // ValidateRestake returns nil if the restake operation is allowed, otherwise returns an error. -func (k *Keeper) ValidateRestake(ctx context.Context, restakerAddrees string, restakedAmount sdk.Coins, target types.DelegationTarget) error { +func (k *Keeper) ValidateRestake(ctx context.Context, restakerAddress string, restakedAmount sdk.Coins, target types.DelegationTarget) error { if k.restakeRestriction == nil { return nil } - return k.restakeRestriction(ctx, restakerAddrees, restakedAmount, target) + return k.restakeRestriction(ctx, restakerAddress, restakedAmount, target) } diff --git a/x/restaking/keeper/service_restaking.go b/x/restaking/keeper/service_restaking.go index 7f93755cb..0e139b84a 100644 --- a/x/restaking/keeper/service_restaking.go +++ b/x/restaking/keeper/service_restaking.go @@ -23,15 +23,15 @@ func (k *Keeper) ServiceAllowedOperatorsIterator(ctx context.Context, serviceID // GetAllServiceAllowedOperators returns all operators that have been whitelisted // by a service func (k *Keeper) GetAllServiceAllowedOperators(ctx context.Context, serviceID uint32) ([]uint32, error) { - iteretor, err := k.ServiceAllowedOperatorsIterator(ctx, serviceID) + iterator, err := k.ServiceAllowedOperatorsIterator(ctx, serviceID) if err != nil { return nil, err } - defer iteretor.Close() + defer iterator.Close() var operators []uint32 - for ; iteretor.Valid(); iteretor.Next() { - serviceOperatorPair, err := iteretor.Key() + for ; iterator.Valid(); iterator.Next() { + serviceOperatorPair, err := iterator.Key() if err != nil { return nil, err } @@ -57,15 +57,15 @@ func (k *Keeper) RemoveOperatorFromServiceAllowList(ctx context.Context, service return k.serviceOperatorsAllowList.Remove(ctx, key) } -// IsServiceOpertorsAllowListConfigured returns true if the operators allow list -func (k *Keeper) IsServiceOpertorsAllowListConfigured(ctx context.Context, serviceID uint32) (bool, error) { - iteretor, err := k.ServiceAllowedOperatorsIterator(ctx, serviceID) +// IsServiceOperatorsAllowListConfigured returns true if the operators allow list +func (k *Keeper) IsServiceOperatorsAllowListConfigured(ctx context.Context, serviceID uint32) (bool, error) { + iterator, err := k.ServiceAllowedOperatorsIterator(ctx, serviceID) if err != nil { return false, err } - defer iteretor.Close() + defer iterator.Close() - for ; iteretor.Valid(); iteretor.Next() { + for ; iterator.Valid(); iterator.Next() { return true, nil } @@ -82,7 +82,7 @@ func (k *Keeper) IsOperatorInServiceAllowList(ctx context.Context, serviceID uin // CanOperatorValidateService returns true if the given operator can secure // the given service func (k *Keeper) CanOperatorValidateService(ctx context.Context, serviceID uint32, operatorID uint32) (bool, error) { - configured, err := k.IsServiceOpertorsAllowListConfigured(ctx, serviceID) + configured, err := k.IsServiceOperatorsAllowListConfigured(ctx, serviceID) if err != nil { return false, err } @@ -103,7 +103,7 @@ func (k *Keeper) ServiceSecuringPoolsIterator(ctx context.Context, serviceID uin } // GetAllServiceSecuringPools returns all pools that have been allowed to -// to secure the give service +// secure the give service func (k *Keeper) GetAllServiceSecuringPools(ctx context.Context, serviceID uint32) ([]uint32, error) { iterator, err := k.ServiceSecuringPoolsIterator(ctx, serviceID) if err != nil { diff --git a/x/restaking/keeper/service_restaking_test.go b/x/restaking/keeper/service_restaking_test.go index 4b0959731..d79e02880 100644 --- a/x/restaking/keeper/service_restaking_test.go +++ b/x/restaking/keeper/service_restaking_test.go @@ -174,7 +174,7 @@ func (suite *KeeperTestSuite) TestKeeper_IsServiceOperatorsAllowListConfigured() tc.store(ctx) } - isInitialized, err := suite.k.IsServiceOpertorsAllowListConfigured(ctx, tc.serviceID) + isInitialized, err := suite.k.IsServiceOperatorsAllowListConfigured(ctx, tc.serviceID) suite.Require().NoError(err) suite.Require().Equal(tc.isInitialized, isInitialized) }) diff --git a/x/restaking/keeper/services_hooks_test.go b/x/restaking/keeper/services_hooks_test.go index efa5062c8..9f243633f 100644 --- a/x/restaking/keeper/services_hooks_test.go +++ b/x/restaking/keeper/services_hooks_test.go @@ -53,7 +53,7 @@ func (suite *KeeperTestSuite) TestServicesHooks_BeforeServiceDeleted() { suite.Require().NoError(err) }, check: func(ctx sdk.Context) { - configured, err := suite.k.IsServiceOpertorsAllowListConfigured(ctx, 1) + configured, err := suite.k.IsServiceOperatorsAllowListConfigured(ctx, 1) suite.Require().NoError(err) suite.Require().False(configured) }, diff --git a/x/restaking/types/events.go b/x/restaking/types/events.go index f498e81e6..bf27b765f 100644 --- a/x/restaking/types/events.go +++ b/x/restaking/types/events.go @@ -8,7 +8,6 @@ const ( EventTypeRemoveAllowedOperator = "remove_allowed_operator" EventTypeBorrowPoolSecurity = "borrow_pool_security" EventTypeCeasePoolSecurityBorrow = "cease_pool_security_borrow" - EventTypeUpdateServiceParams = "update_service_params" EventTypeDelegatePool = "delegate_pool" EventTypeDelegateOperator = "delegate_operator" EventTypeDelegateService = "delegate_service" diff --git a/x/restaking/types/messages.pb.go b/x/restaking/types/messages.pb.go index 660272f46..be3811573 100644 --- a/x/restaking/types/messages.pb.go +++ b/x/restaking/types/messages.pb.go @@ -38,7 +38,7 @@ var _ = time.Kitchen const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // MsgJoinService defines the message structure for the -// JoinService gRPC service method. It allows the opeator admin to +// JoinService gRPC service method. It allows the operator admin to // start securing a AVS. type MsgJoinService struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` @@ -138,7 +138,7 @@ func (m *MsgJoinServiceResponse) XXX_DiscardUnknown() { var xxx_messageInfo_MsgJoinServiceResponse proto.InternalMessageInfo // MsgLeaveService defines the message structure for the -// LeaveService gRPC service method. It allows the opeator admin to +// LeaveService gRPC service method. It allows the operator admin to // stop securing a AVS. type MsgLeaveService struct { Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` @@ -200,7 +200,7 @@ func (m *MsgLeaveService) GetServiceID() uint32 { return 0 } -// MsgLeaveerviceResponse is the return value of MsgLeveService. +// MsgLeaveServiceResponse is the return value of MsgLeaveService. type MsgLeaveServiceResponse struct { } diff --git a/x/restaking/types/restake_restriction.go b/x/restaking/types/restake_restriction.go index d085f497c..5fbd5c419 100644 --- a/x/restaking/types/restake_restriction.go +++ b/x/restaking/types/restake_restriction.go @@ -7,4 +7,4 @@ import ( ) // RestakeRestrictionFn is a function that checks if a restake operation is allowed. -type RestakeRestrictionFn func(ctx context.Context, restakerAddrees string, restakedAmount sdk.Coins, target DelegationTarget) error +type RestakeRestrictionFn func(ctx context.Context, restakerAddress string, restakedAmount sdk.Coins, target DelegationTarget) error diff --git a/x/rewards/client/cli/utils_test.go b/x/rewards/client/cli/utils_test.go index 9bfa90266..1bc1e26d8 100644 --- a/x/rewards/client/cli/utils_test.go +++ b/x/rewards/client/cli/utils_test.go @@ -6,16 +6,13 @@ import ( "time" "cosmossdk.io/math" - sdk "github.com/cosmos/cosmos-sdk/types" - - "github.com/milkyway-labs/milkyway/x/rewards/types" - "github.com/cosmos/cosmos-sdk/testutil" - + sdk "github.com/cosmos/cosmos-sdk/types" "github.com/stretchr/testify/require" milkyway "github.com/milkyway-labs/milkyway/app" "github.com/milkyway-labs/milkyway/x/rewards/client/cli" + "github.com/milkyway-labs/milkyway/x/rewards/types" ) func TestCliUtils_parseRewardsPlan(t *testing.T) { diff --git a/x/rewards/keeper/common_test.go b/x/rewards/keeper/common_test.go index 9b729c7b8..2578cb20a 100644 --- a/x/rewards/keeper/common_test.go +++ b/x/rewards/keeper/common_test.go @@ -172,7 +172,7 @@ func (suite *KeeperTestSuite) CreateOperator(ctx sdk.Context, name string, admin } // UpdateOperatorParams updates the operator's params. -// TODO: split functionalites +// TODO: split functionalities func (suite *KeeperTestSuite) UpdateOperatorParams( ctx sdk.Context, operatorID uint32, diff --git a/x/rewards/keeper/delegation_target.go b/x/rewards/keeper/delegation_target.go deleted file mode 100644 index b55569d4a..000000000 --- a/x/rewards/keeper/delegation_target.go +++ /dev/null @@ -1 +0,0 @@ -package keeper diff --git a/x/rewards/types/models.go b/x/rewards/types/models.go index e69253de3..b14aee621 100644 --- a/x/rewards/types/models.go +++ b/x/rewards/types/models.go @@ -146,7 +146,7 @@ func (plan RewardsPlan) Validate(unpacker codectypes.AnyUnpacker) error { return nil } -// ParseRewardsPlanID tries parsing the given value as an rewards plan id +// ParseRewardsPlanID tries parsing the given value as a rewards plan id func ParseRewardsPlanID(value string) (uint64, error) { planID, err := strconv.ParseUint(value, 10, 64) if err != nil { diff --git a/x/services/types/models.go b/x/services/types/models.go index a0547bafd..a6500ed31 100644 --- a/x/services/types/models.go +++ b/x/services/types/models.go @@ -17,7 +17,7 @@ func GetServiceAddress(serviceID uint32) sdk.AccAddress { return authtypes.NewModuleAddress(fmt.Sprintf("service-%d", serviceID)) } -// ParseServiceID parses a string into a uint32 +// ParseServiceID parses a string into an uint32 func ParseServiceID(value string) (uint32, error) { id, err := strconv.ParseUint(value, 10, 32) if err != nil {