diff --git a/api/milkyway/liquidvesting/v1/params.pulsar.go b/api/milkyway/liquidvesting/v1/params.pulsar.go index ac0e21d1..f0ae01c3 100644 --- a/api/milkyway/liquidvesting/v1/params.pulsar.go +++ b/api/milkyway/liquidvesting/v1/params.pulsar.go @@ -106,52 +106,6 @@ func (x *_Params_3_list) IsValid() bool { return x.list != nil } -var _ protoreflect.List = (*_Params_4_list)(nil) - -type _Params_4_list struct { - list *[]string -} - -func (x *_Params_4_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Params_4_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_Params_4_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_Params_4_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_Params_4_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message Params at list field TrustedDelegates as it is not of Message kind")) -} - -func (x *_Params_4_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_Params_4_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_Params_4_list) IsValid() bool { - return x.list != nil -} - var _ protoreflect.List = (*_Params_5_list)(nil) type _Params_5_list struct { @@ -203,7 +157,6 @@ var ( fd_Params_insurance_percentage protoreflect.FieldDescriptor fd_Params_burners protoreflect.FieldDescriptor fd_Params_minters protoreflect.FieldDescriptor - fd_Params_trusted_delegates protoreflect.FieldDescriptor fd_Params_allowed_channels protoreflect.FieldDescriptor ) @@ -213,7 +166,6 @@ func init() { fd_Params_insurance_percentage = md_Params.Fields().ByName("insurance_percentage") fd_Params_burners = md_Params.Fields().ByName("burners") fd_Params_minters = md_Params.Fields().ByName("minters") - fd_Params_trusted_delegates = md_Params.Fields().ByName("trusted_delegates") fd_Params_allowed_channels = md_Params.Fields().ByName("allowed_channels") } @@ -300,12 +252,6 @@ func (x *fastReflection_Params) Range(f func(protoreflect.FieldDescriptor, proto return } } - if len(x.TrustedDelegates) != 0 { - value := protoreflect.ValueOfList(&_Params_4_list{list: &x.TrustedDelegates}) - if !f(fd_Params_trusted_delegates, value) { - return - } - } if len(x.AllowedChannels) != 0 { value := protoreflect.ValueOfList(&_Params_5_list{list: &x.AllowedChannels}) if !f(fd_Params_allowed_channels, value) { @@ -333,8 +279,6 @@ func (x *fastReflection_Params) Has(fd protoreflect.FieldDescriptor) bool { return len(x.Burners) != 0 case "milkyway.liquidvesting.v1.Params.minters": return len(x.Minters) != 0 - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - return len(x.TrustedDelegates) != 0 case "milkyway.liquidvesting.v1.Params.allowed_channels": return len(x.AllowedChannels) != 0 default: @@ -359,8 +303,6 @@ func (x *fastReflection_Params) Clear(fd protoreflect.FieldDescriptor) { x.Burners = nil case "milkyway.liquidvesting.v1.Params.minters": x.Minters = nil - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - x.TrustedDelegates = nil case "milkyway.liquidvesting.v1.Params.allowed_channels": x.AllowedChannels = nil default: @@ -394,12 +336,6 @@ func (x *fastReflection_Params) Get(descriptor protoreflect.FieldDescriptor) pro } listValue := &_Params_3_list{list: &x.Minters} return protoreflect.ValueOfList(listValue) - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - if len(x.TrustedDelegates) == 0 { - return protoreflect.ValueOfList(&_Params_4_list{}) - } - listValue := &_Params_4_list{list: &x.TrustedDelegates} - return protoreflect.ValueOfList(listValue) case "milkyway.liquidvesting.v1.Params.allowed_channels": if len(x.AllowedChannels) == 0 { return protoreflect.ValueOfList(&_Params_5_list{}) @@ -436,10 +372,6 @@ func (x *fastReflection_Params) Set(fd protoreflect.FieldDescriptor, value proto lv := value.List() clv := lv.(*_Params_3_list) x.Minters = *clv.list - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - lv := value.List() - clv := lv.(*_Params_4_list) - x.TrustedDelegates = *clv.list case "milkyway.liquidvesting.v1.Params.allowed_channels": lv := value.List() clv := lv.(*_Params_5_list) @@ -476,12 +408,6 @@ func (x *fastReflection_Params) Mutable(fd protoreflect.FieldDescriptor) protore } value := &_Params_3_list{list: &x.Minters} return protoreflect.ValueOfList(value) - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - if x.TrustedDelegates == nil { - x.TrustedDelegates = []string{} - } - value := &_Params_4_list{list: &x.TrustedDelegates} - return protoreflect.ValueOfList(value) case "milkyway.liquidvesting.v1.Params.allowed_channels": if x.AllowedChannels == nil { x.AllowedChannels = []string{} @@ -511,9 +437,6 @@ func (x *fastReflection_Params) NewField(fd protoreflect.FieldDescriptor) protor case "milkyway.liquidvesting.v1.Params.minters": list := []string{} return protoreflect.ValueOfList(&_Params_3_list{list: &list}) - case "milkyway.liquidvesting.v1.Params.trusted_delegates": - list := []string{} - return protoreflect.ValueOfList(&_Params_4_list{list: &list}) case "milkyway.liquidvesting.v1.Params.allowed_channels": list := []string{} return protoreflect.ValueOfList(&_Params_5_list{list: &list}) @@ -602,12 +525,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { n += 1 + l + runtime.Sov(uint64(l)) } } - if len(x.TrustedDelegates) > 0 { - for _, s := range x.TrustedDelegates { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } if len(x.AllowedChannels) > 0 { for _, s := range x.AllowedChannels { l = len(s) @@ -652,15 +569,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { dAtA[i] = 0x2a } } - if len(x.TrustedDelegates) > 0 { - for iNdEx := len(x.TrustedDelegates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.TrustedDelegates[iNdEx]) - copy(dAtA[i:], x.TrustedDelegates[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.TrustedDelegates[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } if len(x.Minters) > 0 { for iNdEx := len(x.Minters) - 1; iNdEx >= 0; iNdEx-- { i -= len(x.Minters[iNdEx]) @@ -831,38 +739,6 @@ func (x *fastReflection_Params) ProtoMethods() *protoiface.Methods { } x.Minters = append(x.Minters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field TrustedDelegates", 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.TrustedDelegates = append(x.TrustedDelegates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AllowedChannels", wireType) @@ -960,9 +836,6 @@ type Params struct { // This value represents the list of users who are authorized to execute the // MsgMintLockedRepresentation. Minters []string `protobuf:"bytes,3,rep,name=minters,proto3" json:"minters,omitempty"` - // TrustedDelegates represents the list of users who are allowed to deposit - // on the insurance fund. - TrustedDelegates []string `protobuf:"bytes,4,rep,name=trusted_delegates,json=trustedDelegates,proto3" json:"trusted_delegates,omitempty"` // List of channels from which is allowed to receive deposits to the insurance // fund. AllowedChannels []string `protobuf:"bytes,5,rep,name=allowed_channels,json=allowedChannels,proto3" json:"allowed_channels,omitempty"` @@ -1009,13 +882,6 @@ func (x *Params) GetMinters() []string { return nil } -func (x *Params) GetTrustedDelegates() []string { - if x != nil { - return x.TrustedDelegates - } - return nil -} - func (x *Params) GetAllowedChannels() []string { if x != nil { return x.AllowedChannels @@ -1033,7 +899,7 @@ var file_milkyway_liquidvesting_v1_params_proto_rawDesc = []byte{ 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, 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, 0x22, 0xc8, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, + 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x87, 0x02, 0x0a, 0x06, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x12, 0x64, 0x0a, 0x14, 0x69, 0x6e, 0x73, 0x75, 0x72, 0x61, 0x6e, 0x63, 0x65, 0x5f, 0x70, 0x65, 0x72, 0x63, 0x65, 0x6e, 0x74, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x31, 0xc8, 0xde, 0x1f, 0x00, 0xda, 0xde, 0x1f, 0x1b, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, @@ -1046,31 +912,27 @@ var file_milkyway_liquidvesting_v1_params_proto_rawDesc = []byte{ 0x52, 0x07, 0x62, 0x75, 0x72, 0x6e, 0x65, 0x72, 0x73, 0x12, 0x32, 0x0a, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, - 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x45, 0x0a, - 0x11, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, - 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 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, 0x10, 0x74, 0x72, 0x75, 0x73, 0x74, 0x65, 0x64, 0x44, 0x65, 0x6c, 0x65, 0x67, - 0x61, 0x74, 0x65, 0x73, 0x12, 0x29, 0x0a, 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, - 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, - 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x42, - 0x86, 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, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x52, 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, 0x76, 0x33, 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, 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, + 0x72, 0x69, 0x6e, 0x67, 0x52, 0x07, 0x6d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x73, 0x12, 0x29, 0x0a, + 0x10, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x5f, 0x63, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, + 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, + 0x43, 0x68, 0x61, 0x6e, 0x6e, 0x65, 0x6c, 0x73, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x42, 0x86, + 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, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, + 0x52, 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, 0x76, 0x33, 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, 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 ( diff --git a/proto/milkyway/liquidvesting/v1/params.proto b/proto/milkyway/liquidvesting/v1/params.proto index 8b08aede..0f1e379b 100644 --- a/proto/milkyway/liquidvesting/v1/params.proto +++ b/proto/milkyway/liquidvesting/v1/params.proto @@ -8,6 +8,9 @@ option go_package = "github.com/milkyway-labs/milkyway/v3/x/liquidvesting/types" // Params defines the parameters for the module. message Params { + // List of fields that have been removed and should not be used. + reserved 4; + // This value represents the percentage that needs to be sent to the // insurance fund in order to restake a certain amount of locked tokens. // For example, if this value is 2%, a user must send 2 tokens to @@ -28,11 +31,6 @@ message Params { repeated string minters = 3 [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // TrustedDelegates represents the list of users who are allowed to deposit - // on the insurance fund. - repeated string trusted_delegates = 4 - [ (cosmos_proto.scalar) = "cosmos.AddressString" ]; - // List of channels from which is allowed to receive deposits to the insurance // fund. repeated string allowed_channels = 5; diff --git a/x/liquidvesting/keeper/burn_test.go b/x/liquidvesting/keeper/burn_test.go index e1eb4e66..a6b36007 100644 --- a/x/liquidvesting/keeper/burn_test.go +++ b/x/liquidvesting/keeper/burn_test.go @@ -235,7 +235,6 @@ func (suite *KeeperTestSuite) TestKeeper_TestIsBurner() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, nil, nil, - nil, )) suite.Assert().NoError(err) }, diff --git a/x/liquidvesting/keeper/genesis_test.go b/x/liquidvesting/keeper/genesis_test.go index 169054d8..ec78e056 100644 --- a/x/liquidvesting/keeper/genesis_test.go +++ b/x/liquidvesting/keeper/genesis_test.go @@ -192,7 +192,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block negative insurance fund percentage", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(-1), nil, nil, nil, nil), + types.NewParams(math.LegacyNewDec(-1), nil, nil, nil), nil, nil, ), @@ -201,7 +201,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block 0 insurance fund percentage", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(0), nil, nil, nil, nil), + types.NewParams(math.LegacyNewDec(0), nil, nil, nil), nil, nil, ), @@ -210,7 +210,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should allow 100 insurance fund percentage", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(100), nil, nil, nil, nil), + types.NewParams(math.LegacyNewDec(100), nil, nil, nil), nil, nil, ), @@ -223,7 +223,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block > 100 insurance fund percentage", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(101), nil, nil, nil, nil), + types.NewParams(math.LegacyNewDec(101), nil, nil, nil), nil, nil, ), @@ -232,7 +232,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block invalid minter address", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(2), nil, []string{"cosmos1fdsfd"}, nil, nil), + types.NewParams(math.LegacyNewDec(2), nil, []string{"cosmos1fdsfd"}, nil), nil, nil, ), @@ -241,7 +241,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block invalid burners address", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(2), []string{"cosmos1fdsfd"}, nil, nil, nil), + types.NewParams(math.LegacyNewDec(2), []string{"cosmos1fdsfd"}, nil, nil), nil, nil, ), @@ -250,7 +250,7 @@ func (suite *KeeperTestSuite) TestKeepr_InitGenesis() { { name: "should block invalid allowed depositors address", genesis: types.NewGenesisState( - types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"cosmos1fdsfd"}, nil), + types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"cosmos1fdsfd"}), nil, nil, ), diff --git a/x/liquidvesting/keeper/grpc_query_test.go b/x/liquidvesting/keeper/grpc_query_test.go index 71258b33..e6533927 100644 --- a/x/liquidvesting/keeper/grpc_query_test.go +++ b/x/liquidvesting/keeper/grpc_query_test.go @@ -319,7 +319,7 @@ func (suite *KeeperTestSuite) TestQuerier_UserRestakableAssets() { name: "1% insurance fund", store: func(ctx sdk.Context) { suite.Assert().NoError(suite.k.SetParams(ctx, types.NewParams( - math.LegacyMustNewDecFromStr("1"), nil, nil, nil, nil, + math.LegacyMustNewDecFromStr("1"), nil, nil, nil, ))) suite.fundAccountInsuranceFund(ctx, "cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre", @@ -334,7 +334,7 @@ func (suite *KeeperTestSuite) TestQuerier_UserRestakableAssets() { name: "5% insurance fund", store: func(ctx sdk.Context) { suite.Assert().NoError(suite.k.SetParams(ctx, types.NewParams( - math.LegacyMustNewDecFromStr("5"), nil, nil, nil, nil, + math.LegacyMustNewDecFromStr("5"), nil, nil, nil, ))) suite.fundAccountInsuranceFund(ctx, "cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre", diff --git a/x/liquidvesting/keeper/ibc.go b/x/liquidvesting/keeper/ibc.go index 37694631..5ba73732 100644 --- a/x/liquidvesting/keeper/ibc.go +++ b/x/liquidvesting/keeper/ibc.go @@ -2,7 +2,6 @@ package keeper import ( "fmt" - "slices" "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" @@ -25,11 +24,6 @@ func (k *Keeper) OnRecvPacket( return err } - // Ensure that the sender is allowed to deposit - if !slices.Contains(params.TrustedDelegates, data.Sender) { - return fmt.Errorf("the sender %s is not allowed to deposit", data.Sender) - } - // Check if is allowed to receive deposits to the insurance fund // from the channel if !params.IsAllowedChannel(packet.DestinationChannel) { diff --git a/x/liquidvesting/keeper/ibc_test.go b/x/liquidvesting/keeper/ibc_test.go index deed296d..03821222 100644 --- a/x/liquidvesting/keeper/ibc_test.go +++ b/x/liquidvesting/keeper/ibc_test.go @@ -121,41 +121,6 @@ func (suite *KeeperTestSuite) TestKeeper_IBCHooks() { "depositor": "%s", "amount": "600" }] - }}`, - "cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4", - "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd", - ), - shouldErr: true, - check: func(ctx sdk.Context) { - // Make sure the user's insurance fund is not updated - insuranceFund, err := suite.k.GetUserInsuranceFundBalance(ctx, "cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4") - suite.Assert().NoError(err) - suite.Assert().Empty(insuranceFund) - }, - }, - { - name: "unauthorized depositor can't deposit", - store: func(ctx sdk.Context) { - err := suite.k.SetParams(ctx, types.Params{ - InsurancePercentage: sdkmath.LegacyNewDec(2), - AllowedChannels: []string{"channel-0"}, - }) - suite.Require().NoError(err) - }, - destinationChannel: "channel-0", - transferAmount: sdk.NewInt64Coin("foo", 1000), - sender: "cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre", - receiver: authtypes.NewModuleAddress(types.ModuleName).String(), - memo: fmt.Sprintf(`{ - "liquidvesting": { - "amounts": [{ - "depositor": "%s", - "amount": "600" - }, - { - "depositor": "%s", - "amount": "400" - }] }}`, "cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4", "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd", @@ -173,7 +138,7 @@ func (suite *KeeperTestSuite) TestKeeper_IBCHooks() { store: func(ctx sdk.Context) { err := suite.k.SetParams(ctx, types.Params{ InsurancePercentage: sdkmath.LegacyNewDec(2), - AllowedChannels: []string{"channel-0"}, + AllowedChannels: []string{"channel-1"}, }) suite.Require().NoError(err) }, @@ -202,7 +167,6 @@ func (suite *KeeperTestSuite) TestKeeper_IBCHooks() { // Set the sender as an allowed depositor err := suite.k.SetParams(ctx, types.Params{ InsurancePercentage: sdkmath.LegacyNewDec(2), - TrustedDelegates: []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, AllowedChannels: []string{"channel-0"}, }) suite.Require().NoError(err) diff --git a/x/liquidvesting/keeper/insurance_fund_test.go b/x/liquidvesting/keeper/insurance_fund_test.go index dbbf6183..652bfcb6 100644 --- a/x/liquidvesting/keeper/insurance_fund_test.go +++ b/x/liquidvesting/keeper/insurance_fund_test.go @@ -125,7 +125,7 @@ func (suite *KeeperTestSuite) TestKeeper_UsedInsuranceFundIsUpdatedCorrectly() { restaker := "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd" // Set insurance percentage to 2% - err := suite.k.SetParams(ctx, types.NewParams(math.LegacyNewDec(2), nil, nil, nil, nil)) + err := suite.k.SetParams(ctx, types.NewParams(math.LegacyNewDec(2), nil, nil, nil)) suite.Require().NoError(err) // Fund the restaker insurance fund @@ -190,7 +190,7 @@ func (suite *KeeperTestSuite) TestKeeper_InsuranceFundUpdatesCorreclyWithComplet restaker := "cosmos13t6y2nnugtshwuy0zkrq287a95lyy8vzleaxmd" // Set insurance percentage to 2% - suite.k.SetParams(ctx, types.NewParams(math.LegacyNewDec(2), nil, nil, nil, nil)) + suite.k.SetParams(ctx, types.NewParams(math.LegacyNewDec(2), nil, nil, nil)) // Fund the restaker insurance fund suite.fundAccountInsuranceFund(ctx, restaker, sdk.NewCoins(sdk.NewInt64Coin("stake", 20))) diff --git a/x/liquidvesting/keeper/msg_server_test.go b/x/liquidvesting/keeper/msg_server_test.go index ed82a2b7..2cf06f15 100644 --- a/x/liquidvesting/keeper/msg_server_test.go +++ b/x/liquidvesting/keeper/msg_server_test.go @@ -27,7 +27,6 @@ func (suite *KeeperTestSuite) TestMsgServer_MintLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) }, @@ -47,7 +46,6 @@ func (suite *KeeperTestSuite) TestMsgServer_MintLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) }, @@ -67,7 +65,6 @@ func (suite *KeeperTestSuite) TestMsgServer_MintLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) }, @@ -140,7 +137,6 @@ func (suite *KeeperTestSuite) TestMsgServer_BurnLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) @@ -165,7 +161,6 @@ func (suite *KeeperTestSuite) TestMsgServer_BurnLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) @@ -193,7 +188,6 @@ func (suite *KeeperTestSuite) TestMsgServer_BurnLockedRepresentation() { []string{"cosmos1pgzph9rze2j2xxavx4n7pdhxlkgsq7raqh8hre"}, []string{"cosmos167x6ehhple8gwz5ezy9x0464jltvdpzl6qfdt4"}, nil, - nil, )) suite.Assert().NoError(err) @@ -400,34 +394,10 @@ func (suite *KeeperTestSuite) TestMsgServer_UpdateParams() { name: "invalid allowed channels returns error", msg: types.NewMsgUpdateParams( authtypes.NewModuleAddress("gov").String(), - types.NewParams(math.LegacyNewDec(2), nil, nil, nil, []string{"invalid-channel"}), - ), - shouldErr: true, - }, - { - name: "trust delegates with invalid bech32 prefix returns error", - msg: types.NewMsgUpdateParams( - authtypes.NewModuleAddress("gov").String(), - types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"invalid"}, nil), + types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"invalid-channel"}), ), shouldErr: true, }, - { - name: "trust delegates with different bech32 prefix are allowed", - msg: types.NewMsgUpdateParams( - authtypes.NewModuleAddress("gov").String(), - types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"celestia102lq49sg6lmw2e0mw740tjldzq68v0yfhj2vst"}, nil), - ), - shouldErr: false, - expEvents: sdk.Events{}, - check: func(ctx sdk.Context) { - params, err := suite.k.GetParams(ctx) - suite.Assert().NoError(err) - - expParams := types.NewParams(math.LegacyNewDec(2), nil, nil, []string{"celestia102lq49sg6lmw2e0mw740tjldzq68v0yfhj2vst"}, nil) - suite.Assert().Equal(expParams, params) - }, - }, } for _, tc := range testCases { diff --git a/x/liquidvesting/types/params.go b/x/liquidvesting/types/params.go index 88862b16..8c37eff3 100644 --- a/x/liquidvesting/types/params.go +++ b/x/liquidvesting/types/params.go @@ -6,7 +6,6 @@ import ( "cosmossdk.io/math" sdk "github.com/cosmos/cosmos-sdk/types" - "github.com/cosmos/cosmos-sdk/types/bech32" channeltypes "github.com/cosmos/ibc-go/v8/modules/core/04-channel/types" ) @@ -15,21 +14,19 @@ func NewParams( insurancePercentage math.LegacyDec, burners []string, minters []string, - trustedDelegates []string, allowedChannels []string, ) Params { return Params{ InsurancePercentage: insurancePercentage, Burners: burners, Minters: minters, - TrustedDelegates: trustedDelegates, AllowedChannels: allowedChannels, } } // DefaultParams returns a default set of parameters. func DefaultParams() Params { - return NewParams(math.LegacyNewDec(2), nil, nil, nil, nil) + return NewParams(math.LegacyNewDec(2), nil, nil, nil) } // Validate ensure that the Prams structure is correct @@ -49,12 +46,6 @@ func (p *Params) Validate() error { return err } } - for _, address := range p.TrustedDelegates { - _, _, err := bech32.DecodeAndConvert(address) - if err != nil { - return err - } - } for _, channel := range p.AllowedChannels { if !channeltypes.IsValidChannelID(channel) { return fmt.Errorf("invalid channel id: %s", channel) diff --git a/x/liquidvesting/types/params.pb.go b/x/liquidvesting/types/params.pb.go index e3ad345d..a2fd0df6 100644 --- a/x/liquidvesting/types/params.pb.go +++ b/x/liquidvesting/types/params.pb.go @@ -38,9 +38,6 @@ type Params struct { // This value represents the list of users who are authorized to execute the // MsgMintLockedRepresentation. Minters []string `protobuf:"bytes,3,rep,name=minters,proto3" json:"minters,omitempty"` - // TrustedDelegates represents the list of users who are allowed to deposit - // on the insurance fund. - TrustedDelegates []string `protobuf:"bytes,4,rep,name=trusted_delegates,json=trustedDelegates,proto3" json:"trusted_delegates,omitempty"` // List of channels from which is allowed to receive deposits to the insurance // fund. AllowedChannels []string `protobuf:"bytes,5,rep,name=allowed_channels,json=allowedChannels,proto3" json:"allowed_channels,omitempty"` @@ -93,13 +90,6 @@ func (m *Params) GetMinters() []string { return nil } -func (m *Params) GetTrustedDelegates() []string { - if m != nil { - return m.TrustedDelegates - } - return nil -} - func (m *Params) GetAllowedChannels() []string { if m != nil { return m.AllowedChannels @@ -116,30 +106,29 @@ func init() { } var fileDescriptor_47e3045990d8fa3d = []byte{ - // 356 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0xbf, 0x0e, 0xd2, 0x40, - 0x1c, 0xc7, 0x5b, 0x50, 0x0c, 0x5d, 0xc4, 0xca, 0x50, 0x30, 0x29, 0xc4, 0xc1, 0xe0, 0x40, 0x2f, - 0xc8, 0xe6, 0x26, 0xe2, 0xe6, 0x40, 0xd0, 0xc9, 0xa5, 0xb9, 0xde, 0xfd, 0x72, 0x5c, 0x68, 0xef, - 0xea, 0xdd, 0xb5, 0xd8, 0xb7, 0xf0, 0x61, 0x78, 0x08, 0x46, 0xc2, 0x64, 0x1c, 0x88, 0x81, 0x17, - 0x31, 0xa5, 0x2d, 0x89, 0x2e, 0x6c, 0xbf, 0x3f, 0xdf, 0xcf, 0x67, 0xf9, 0x3a, 0x6f, 0x12, 0x1e, - 0x6f, 0x8b, 0x1d, 0x2e, 0x50, 0xcc, 0xbf, 0x67, 0x9c, 0xe6, 0xa0, 0x0d, 0x17, 0x0c, 0xe5, 0x33, - 0x94, 0x62, 0x85, 0x13, 0x1d, 0xa4, 0x4a, 0x1a, 0xe9, 0x0e, 0x9a, 0x5c, 0xf0, 0x4f, 0x2e, 0xc8, - 0x67, 0xc3, 0x3e, 0x93, 0x4c, 0xde, 0x52, 0xa8, 0x9c, 0x2a, 0x60, 0x38, 0x20, 0x52, 0x27, 0x52, - 0x87, 0xd5, 0xa3, 0x5a, 0xaa, 0xd7, 0xeb, 0x43, 0xcb, 0xe9, 0xac, 0x6e, 0x72, 0x97, 0x3a, 0x7d, - 0x2e, 0x74, 0xa6, 0xb0, 0x20, 0x10, 0xa6, 0xa0, 0x08, 0x08, 0x83, 0x19, 0x78, 0xf6, 0xd8, 0x9e, - 0x74, 0x17, 0xb3, 0xc3, 0x79, 0x64, 0xfd, 0x3e, 0x8f, 0x5e, 0x55, 0xb8, 0xa6, 0xdb, 0x80, 0x4b, - 0x94, 0x60, 0xb3, 0x09, 0x3e, 0x03, 0xc3, 0xa4, 0x58, 0x02, 0x39, 0xed, 0xa7, 0x4e, 0x6d, 0x5f, - 0x02, 0x59, 0xbf, 0xbc, 0xeb, 0x56, 0x77, 0x9b, 0xfb, 0xce, 0x79, 0x16, 0x65, 0x4a, 0x80, 0xd2, - 0x5e, 0x6b, 0xdc, 0x9e, 0x74, 0x17, 0xde, 0x69, 0x3f, 0xed, 0xd7, 0xd4, 0x07, 0x4a, 0x15, 0x68, - 0xfd, 0xc5, 0x28, 0x2e, 0xd8, 0xba, 0x09, 0x96, 0x4c, 0xc2, 0x85, 0x29, 0x99, 0xf6, 0x23, 0xa6, - 0x0e, 0xba, 0x9f, 0x9c, 0x17, 0x46, 0x65, 0xda, 0x00, 0x0d, 0x29, 0xc4, 0xc0, 0xb0, 0x01, 0xed, - 0x3d, 0x79, 0x40, 0xf7, 0x6a, 0x64, 0xd9, 0x10, 0xee, 0x5b, 0xa7, 0x87, 0xe3, 0x58, 0xee, 0x80, - 0x86, 0x64, 0x83, 0x85, 0x80, 0x58, 0x7b, 0x4f, 0x4b, 0xcb, 0xfa, 0x79, 0x7d, 0xff, 0x58, 0x9f, - 0x17, 0x5f, 0x0f, 0x17, 0xdf, 0x3e, 0x5e, 0x7c, 0xfb, 0xcf, 0xc5, 0xb7, 0x7f, 0x5e, 0x7d, 0xeb, - 0x78, 0xf5, 0xad, 0x5f, 0x57, 0xdf, 0xfa, 0xf6, 0x9e, 0x71, 0xb3, 0xc9, 0xa2, 0x80, 0xc8, 0x04, - 0x35, 0xdd, 0x4d, 0x63, 0x1c, 0xe9, 0xfb, 0x86, 0xf2, 0x39, 0xfa, 0xf1, 0x5f, 0xed, 0xa6, 0x48, - 0x41, 0x47, 0x9d, 0x5b, 0x4f, 0xf3, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x83, 0x02, 0x6b, 0x08, - 0x1d, 0x02, 0x00, 0x00, + // 341 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x91, 0x3f, 0x4f, 0xc2, 0x40, + 0x18, 0xc6, 0x5b, 0xfe, 0x29, 0x5d, 0x24, 0x95, 0xa1, 0x60, 0x52, 0x88, 0x83, 0xc1, 0x81, 0x5e, + 0x90, 0xcd, 0x4d, 0x64, 0x32, 0x0e, 0x04, 0x9d, 0x5c, 0xc8, 0xf5, 0x7a, 0x39, 0x2e, 0xb4, 0x77, + 0xf5, 0xee, 0x5a, 0xec, 0x27, 0x70, 0xf5, 0xc3, 0xf0, 0x21, 0x18, 0x09, 0x93, 0x71, 0x20, 0x06, + 0xbe, 0x88, 0x29, 0x2d, 0x24, 0xba, 0xb8, 0xdd, 0xfb, 0xbe, 0xbf, 0xdf, 0x33, 0x3c, 0x67, 0x5c, + 0x05, 0xd4, 0x9f, 0x25, 0x73, 0x98, 0x00, 0x9f, 0xbe, 0x46, 0xd4, 0x8b, 0xb1, 0x54, 0x94, 0x11, + 0x10, 0xf7, 0x40, 0x08, 0x05, 0x0c, 0xa4, 0x13, 0x0a, 0xae, 0xb8, 0xd9, 0x38, 0x70, 0xce, 0x2f, + 0xce, 0x89, 0x7b, 0xcd, 0x3a, 0xe1, 0x84, 0xef, 0x29, 0x90, 0xbe, 0x32, 0xa1, 0xd9, 0x40, 0x5c, + 0x06, 0x5c, 0x4e, 0xb2, 0x43, 0x36, 0x64, 0xa7, 0xcb, 0xf7, 0x82, 0x51, 0x19, 0xed, 0xc3, 0x4d, + 0xcf, 0xa8, 0x53, 0x26, 0x23, 0x01, 0x19, 0xc2, 0x93, 0x10, 0x0b, 0x84, 0x99, 0x82, 0x04, 0x5b, + 0x7a, 0x5b, 0xef, 0x54, 0x07, 0xbd, 0xe5, 0xa6, 0xa5, 0x7d, 0x6d, 0x5a, 0x17, 0x99, 0x2e, 0xbd, + 0x99, 0x43, 0x39, 0x08, 0xa0, 0x9a, 0x3a, 0x8f, 0x98, 0x40, 0x94, 0x0c, 0x31, 0x5a, 0x2f, 0xba, + 0x46, 0x9e, 0x3e, 0xc4, 0x68, 0x7c, 0x7e, 0x8c, 0x1b, 0x1d, 0xd3, 0xcc, 0x1b, 0xe3, 0xc4, 0x8d, + 0x04, 0xc3, 0x42, 0x5a, 0x85, 0x76, 0xb1, 0x53, 0x1d, 0x58, 0xeb, 0x45, 0xb7, 0x9e, 0x5b, 0x77, + 0x9e, 0x27, 0xb0, 0x94, 0x4f, 0x4a, 0x50, 0x46, 0xc6, 0x07, 0x30, 0x75, 0x02, 0xca, 0x54, 0xea, + 0x14, 0xff, 0x73, 0x72, 0xd0, 0xbc, 0x36, 0x6a, 0xd0, 0xf7, 0xf9, 0x1c, 0x7b, 0x13, 0x34, 0x85, + 0x8c, 0x61, 0x5f, 0x5a, 0xe5, 0x54, 0x1e, 0x9f, 0xe5, 0xfb, 0xfb, 0x7c, 0xfd, 0x50, 0x3a, 0x2d, + 0xd5, 0xca, 0x83, 0xe7, 0xe5, 0xd6, 0xd6, 0x57, 0x5b, 0x5b, 0xff, 0xde, 0xda, 0xfa, 0xc7, 0xce, + 0xd6, 0x56, 0x3b, 0x5b, 0xfb, 0xdc, 0xd9, 0xda, 0xcb, 0x2d, 0xa1, 0x6a, 0x1a, 0xb9, 0x0e, 0xe2, + 0x01, 0x38, 0x54, 0xdf, 0xf5, 0xa1, 0x2b, 0x8f, 0x13, 0x88, 0xfb, 0xe0, 0xed, 0xcf, 0xaf, 0xa9, + 0x24, 0xc4, 0xd2, 0xad, 0xec, 0x6b, 0xee, 0xff, 0x04, 0x00, 0x00, 0xff, 0xff, 0xf7, 0xb9, 0x55, + 0xd2, 0xdc, 0x01, 0x00, 0x00, } func (m *Params) Marshal() (dAtA []byte, err error) { @@ -171,15 +160,6 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { dAtA[i] = 0x2a } } - if len(m.TrustedDelegates) > 0 { - for iNdEx := len(m.TrustedDelegates) - 1; iNdEx >= 0; iNdEx-- { - i -= len(m.TrustedDelegates[iNdEx]) - copy(dAtA[i:], m.TrustedDelegates[iNdEx]) - i = encodeVarintParams(dAtA, i, uint64(len(m.TrustedDelegates[iNdEx]))) - i-- - dAtA[i] = 0x22 - } - } if len(m.Minters) > 0 { for iNdEx := len(m.Minters) - 1; iNdEx >= 0; iNdEx-- { i -= len(m.Minters[iNdEx]) @@ -242,12 +222,6 @@ func (m *Params) Size() (n int) { n += 1 + l + sovParams(uint64(l)) } } - if len(m.TrustedDelegates) > 0 { - for _, s := range m.TrustedDelegates { - l = len(s) - n += 1 + l + sovParams(uint64(l)) - } - } if len(m.AllowedChannels) > 0 { for _, s := range m.AllowedChannels { l = len(s) @@ -390,38 +364,6 @@ func (m *Params) Unmarshal(dAtA []byte) error { } m.Minters = append(m.Minters, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TrustedDelegates", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowParams - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthParams - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthParams - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TrustedDelegates = append(m.TrustedDelegates, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex case 5: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AllowedChannels", wireType)